query
stringlengths 8
1.54M
| document
stringlengths 9
312k
| negatives
sequencelengths 19
20
| metadata
dict |
---|---|---|---|
Gets the title of the agreement. | public String getAgreementTitle()
{
return lookupValue(Param.AGREEMENT_TITLE);
} | [
"public String getAgreementCheckTitle() \r\n\t{\r\n\t\treturn lookupValue(Param.AGREEMENT_CHECK_TITLE);\r\n\t}",
"public String getTitle() {\r\n return insertMode ? \"\" : stringValue(CONTACTS_TITLE);\r\n }",
"@Override\n\tpublic java.lang.String getTitle() {\n\t\treturn _announcement.getTitle();\n\t}",
"public String getEditorialTitle();",
"public String getTitle() {\r\n return (String) get(\"title\");\r\n }",
"@Override\n\tpublic java.lang.String getTitle() {\n\t\treturn _candidate.getTitle();\n\t}",
"public String getTitle()\n {\n return getComponent().getDialogTitle();\n }",
"java.lang.String getTitleForPayment();",
"public String getTitle() {\r\n return (String)getAttributeInternal(TITLE);\r\n }",
"public String getAddLicenseDialogTitle() {\n return getElement( addLicenseDialogTitle ).getText();\n }",
"String getTitle();",
"public String title() {\n\t\treturn title;\n\t}",
"public org.gridsphere.portletcontainer.impl.descriptor.Title getTitle() {\n return this._title;\n }",
"@Override\n\tpublic java.lang.String getTitle() {\n\t\treturn _scienceApp.getTitle();\n\t}",
"@Override\n\tpublic java.lang.String getTitle() {\n\t\treturn _macroscopeDocument.getTitle();\n\t}",
"@Override\n public String getAlertTitle() {\n waitsService.waitToBeVisible(ALERT_TITLE);\n return elementService.find(ALERT_TITLE).getText();\n }",
"public String getTitleCn() {\n return titleCn;\n }",
"public org.hl7.fhir.String getTitle()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.String target = null;\n target = (org.hl7.fhir.String)get_store().find_element_user(TITLE$8, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public String getTitleFormula() {\n\t if(! chart.isSetTitle()) {\n\t return null;\n\t }\n\n\t CTTitle title = chart.getTitle();\n\t \n\t if (! title.isSetTx()) {\n\t return null;\n\t }\n\t \n\t CTTx tx = title.getTx();\n\t \n\t if (! tx.isSetStrRef()) {\n\t return null;\n\t }\n\t \n\t return tx.getStrRef().getF();\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates the following test fixtures: Substances (children of SUBSTANCE): INGREDIENT1 (ingredient with three inbound from PANADOL and ABACAVIR TABLET) INGREDIENT2 (ingredient with five inbound from TRIPHASIL AND PANADOL AND ABACAVIR TABLET) Drugs (children of DRUG_ROOT): ABACAVIR_TABLET (drug with two outgoing inferred relationships, one HAS_BOSS and one HAS_TRADE_NAME relationship to INGREDIENT1) PANADOL_TABLET (drug with three outgoing inferred relationships, one HAI to INGREDIENT1, one HAS_BOSS to INGREDIENT 2 and one HAS_TRADE_NAME to INGREDIENT2) TRIPHASIL_TABLET (drug with three outgoing inferred relationships, one HAI, one HAS_BOSS and one HAS_TRADE_NAME to INGREDIENT2) | private void generateHierarchy() {
index().write(MAIN, currentTime(), writer -> {
// substances
writer.put(nextStorageKey(), concept(INGREDIENT1)
.parents(SUBSTANCEL)
.statedParents(SUBSTANCEL)
.build());
writer.put(nextStorageKey(), concept(INGREDIENT2)
.parents(SUBSTANCEL)
.statedParents(SUBSTANCEL)
.build());
//drugs
writer.put(nextStorageKey(), concept(ABACAVIR_TABLET)
.parents(DRUG_ROOTL)
.statedParents(DRUG_ROOTL)
.build());
writer.put(nextStorageKey(), concept(PANADOL_TABLET)
.parents(DRUG_ROOTL)
.statedParents(DRUG_ROOTL)
.build());
writer.put(nextStorageKey(), concept(TRIPHASIL_TABLET)
.parents(DRUG_ROOTL)
.statedParents(DRUG_ROOTL)
.build());
if (isAxiom()) {
writer.put(nextStorageKey(), classAxioms(PANADOL_TABLET,
HAS_ACTIVE_INGREDIENT, INGREDIENT1, 1,
HAS_BOSS, INGREDIENT2, 1,
HAS_TRADE_NAME, INGREDIENT2, 1
).build());
writer.put(nextStorageKey(), classAxioms(ABACAVIR_TABLET,
HAS_BOSS, INGREDIENT1, 1,
HAS_TRADE_NAME, INGREDIENT1, 1
).build());
writer.put(nextStorageKey(), classAxioms(TRIPHASIL_TABLET,
HAS_ACTIVE_INGREDIENT, INGREDIENT2, 2,
HAS_BOSS, INGREDIENT2, 2,
HAS_TRADE_NAME, INGREDIENT2, 1
).build());
} else {
writer.put(nextStorageKey(), relationship(PANADOL_TABLET, HAS_ACTIVE_INGREDIENT, INGREDIENT1, getCharacteristicType()).group(1).build());
writer.put(nextStorageKey(), relationship(PANADOL_TABLET, HAS_BOSS, INGREDIENT2, getCharacteristicType()).group(1).build());
writer.put(nextStorageKey(), relationship(PANADOL_TABLET, HAS_TRADE_NAME, INGREDIENT2, getCharacteristicType()).group(1).build());
writer.put(nextStorageKey(), relationship(ABACAVIR_TABLET, HAS_BOSS, INGREDIENT1, getCharacteristicType()).group(1).build());
writer.put(nextStorageKey(), relationship(ABACAVIR_TABLET, HAS_TRADE_NAME, INGREDIENT1, getCharacteristicType()).group(1).build());
writer.put(nextStorageKey(), relationship(TRIPHASIL_TABLET, HAS_ACTIVE_INGREDIENT, INGREDIENT2, getCharacteristicType()).group(2).build());
writer.put(nextStorageKey(), relationship(TRIPHASIL_TABLET, HAS_BOSS, INGREDIENT2, getCharacteristicType()).group(2).build());
writer.put(nextStorageKey(), relationship(TRIPHASIL_TABLET, HAS_TRADE_NAME, INGREDIENT2, getCharacteristicType()).group(1).build());
}
writer.commit();
return null;
});
} | [
"private void generateDrugHierarchy() {\n\t\tindex().write(MAIN, currentTime(), writer -> {\n\t\t\t// substances\n\t\t\twriter.put(nextStorageKey(), concept(INGREDIENT1)\n\t\t\t\t\t.parents(SUBSTANCEL)\n\t\t\t\t\t.statedParents(SUBSTANCEL)\n\t\t\t\t\t.build());\n\t\t\twriter.put(nextStorageKey(), concept(INGREDIENT2)\n\t\t\t\t\t.parents(SUBSTANCEL)\n\t\t\t\t\t.statedParents(SUBSTANCEL)\n\t\t\t\t\t.build());\n\t\t\twriter.put(nextStorageKey(), concept(INGREDIENT3)\n\t\t\t\t\t.parents(SUBSTANCEL)\n\t\t\t\t\t.statedParents(SUBSTANCEL)\n\t\t\t\t\t.build());\n\t\t\t// drugs\n\t\t\twriter.put(nextStorageKey(), concept(ABACAVIR_TABLET)\n\t\t\t\t\t.parents(DRUG_ROOTL)\n\t\t\t\t\t.statedParents(DRUG_ROOTL)\n\t\t\t\t\t.build());\n\t\t\twriter.put(nextStorageKey(), concept(PANADOL_TABLET)\n\t\t\t\t\t.parents(DRUG_ROOTL)\n\t\t\t\t\t.statedParents(DRUG_ROOTL)\n\t\t\t\t\t.build());\n\t\t\twriter.put(nextStorageKey(), concept(TRIPHASIL_TABLET)\n\t\t\t\t\t.parents(DRUG_ROOTL)\n\t\t\t\t\t.statedParents(DRUG_ROOTL)\n\t\t\t\t\t.build());\n\t\t\twriter.put(nextStorageKey(), concept(AMOXICILLIN_TABLET)\n\t\t\t\t\t.parents(DRUG_ROOTL)\n\t\t\t\t\t.statedParents(DRUG_ROOTL)\n\t\t\t\t\t.build());\n\t\t\t// has active ingredient relationships\n\t\t\t\n\t\t\tif (isAxiom()) {\n\t\t\t\twriter.put(nextStorageKey(), classAxioms(PANADOL_TABLET, \n\t\t\t\t\tHAS_ACTIVE_INGREDIENT, INGREDIENT1, 0\n\t\t\t\t).build());\n\t\t\t\twriter.put(nextStorageKey(), classAxioms(TRIPHASIL_TABLET, \n\t\t\t\t\tHAS_ACTIVE_INGREDIENT, INGREDIENT1, 0,\n\t\t\t\t\tHAS_ACTIVE_INGREDIENT, INGREDIENT2, 0,\n\t\t\t\t\tHAS_BOSS, INGREDIENT2, 0\n\t\t\t\t).build());\n\t\t\t} else {\n\t\t\t\twriter.put(nextStorageKey(), relationship(PANADOL_TABLET, HAS_ACTIVE_INGREDIENT, INGREDIENT1, getCharacteristicType()).group(0).build());\n\t\t\t\twriter.put(nextStorageKey(), relationship(TRIPHASIL_TABLET, HAS_ACTIVE_INGREDIENT, INGREDIENT1, getCharacteristicType()).group(0).build());\n\t\t\t\twriter.put(nextStorageKey(), relationship(TRIPHASIL_TABLET, HAS_ACTIVE_INGREDIENT, INGREDIENT2, getCharacteristicType()).group(0).build());\n\t\t\t\twriter.put(nextStorageKey(), relationship(TRIPHASIL_TABLET, HAS_BOSS, INGREDIENT2, getCharacteristicType()).group(0).build());\n\t\t\t}\n\t\t\t// XXX: This relationship's characteristicType setting is here for a reason so in ecl searches we won't find this\n\t\t\twriter.put(nextStorageKey(), relationship(AMOXICILLIN_TABLET, HAS_ACTIVE_INGREDIENT, INGREDIENT1, getCharacteristicType())\n\t\t\t\t\t.group(0)\n\t\t\t\t\t.characteristicTypeId(isInferred() ? Concepts.STATED_RELATIONSHIP : Concepts.INFERRED_RELATIONSHIP) // inverse!\n\t\t\t\t\t.build());\n\t\t\t\n\t\t\t// trade names\n\t\t\twriter.put(nextStorageKey(), stringMember(PANADOL_TABLET, HAS_TRADE_NAME, \"PANADOL\", getCharacteristicType()).build());\n\t\t\twriter.put(nextStorageKey(), stringMember(TRIPHASIL_TABLET, HAS_TRADE_NAME, \"TRIPHASIL\", getCharacteristicType()).build());\n\t\t\twriter.put(nextStorageKey(), stringMember(AMOXICILLIN_TABLET, HAS_TRADE_NAME, \"AMOXICILLIN\", getCharacteristicType()).build());\n\t\t\t// strengths\n\t\t\twriter.put(nextStorageKey(), integerMember(PANADOL_TABLET, PREFERRED_STRENGTH, 500, getCharacteristicType()).build());\n\t\t\twriter.put(nextStorageKey(), integerMember(TRIPHASIL_TABLET, PREFERRED_STRENGTH, -500, getCharacteristicType()).build());\n\t\t\twriter.put(nextStorageKey(), decimalMember(AMOXICILLIN_TABLET, PREFERRED_STRENGTH, BigDecimal.valueOf(5.5d), getCharacteristicType()).build());\n\t\t\twriter.put(nextStorageKey(), decimalMember(ABACAVIR_TABLET, PREFERRED_STRENGTH, BigDecimal.valueOf(-5.5d), getCharacteristicType()).build());\n\t\t\t\n\t\t\twriter.commit();\n\t\t\treturn null;\n\t\t});\n\t}",
"private void generateDrugsWithGroups() {\n\t\tindex().write(MAIN, currentTime(), writer -> {\n\t\t\twriter.put(nextStorageKey(), concept(INGREDIENT5)\n\t\t\t\t\t.parents(SUBSTANCEL)\n\t\t\t\t\t.statedParents(SUBSTANCEL)\n\t\t\t\t\t.build());\n\t\t\twriter.put(nextStorageKey(), concept(INGREDIENT6)\n\t\t\t\t\t.parents(SUBSTANCEL)\n\t\t\t\t\t.statedParents(SUBSTANCEL)\n\t\t\t\t\t.build());\n\t\t\t\n\t\t\twriter.put(nextStorageKey(), concept(EPOX_TABLET)\n\t\t\t\t\t.parents(DRUG_ROOTL)\n\t\t\t\t\t.statedParents(DRUG_ROOTL)\n\t\t\t\t\t.build());\n\t\t\twriter.put(nextStorageKey(), concept(ASPIRIN_TABLET)\n\t\t\t\t\t.parents(DRUG_ROOTL)\n\t\t\t\t\t.statedParents(DRUG_ROOTL)\n\t\t\t\t\t.build());\n\t\t\twriter.put(nextStorageKey(), concept(ALGOFLEX_TABLET)\n\t\t\t\t\t.parents(DRUG_ROOTL)\n\t\t\t\t\t.statedParents(DRUG_ROOTL)\n\t\t\t\t\t.build());\n\t\t\twriter.put(nextStorageKey(), concept(TRIPLEX_TABLET)\n\t\t\t\t\t.parents(DRUG_ROOTL)\n\t\t\t\t\t.statedParents(DRUG_ROOTL)\n\t\t\t\t\t.build());\n\t\t\t\n\t\t\tif (isAxiom()) {\n\t\t\t\twriter.put(nextStorageKey(), classAxioms(EPOX_TABLET, \n\t\t\t\t\tHAS_ACTIVE_INGREDIENT, INGREDIENT5, 0\n\t\t\t\t).build());\n\t\t\t\twriter.put(nextStorageKey(), classAxioms(ASPIRIN_TABLET, \n\t\t\t\t\tHAS_ACTIVE_INGREDIENT, INGREDIENT5, 1,\n\t\t\t\t\tHAS_BOSS, INGREDIENT6, 1\n\t\t\t\t).build());\n\t\t\t\twriter.put(nextStorageKey(), classAxioms(ALGOFLEX_TABLET, \n\t\t\t\t\tHAS_ACTIVE_INGREDIENT, INGREDIENT5, 1,\n\t\t\t\t\tHAS_BOSS, INGREDIENT6, 1,\n\t\t\t\t\tHAS_ACTIVE_INGREDIENT, INGREDIENT6, 2,\n\t\t\t\t\tHAS_BOSS, INGREDIENT5, 2\n\t\t\t\t).build());\n\t\t\t\twriter.put(nextStorageKey(), classAxioms(TRIPLEX_TABLET, \n\t\t\t\t\t\tHAS_ACTIVE_INGREDIENT, INGREDIENT5, 1,\n\t\t\t\t\t\tHAS_BOSS, INGREDIENT6, 2)\n\t\t\t\t.build());\n\t\t\t} else {\n\t\t\t\twriter.put(nextStorageKey(), relationship(EPOX_TABLET, HAS_ACTIVE_INGREDIENT, INGREDIENT5, getCharacteristicType()).group(0).build());\n\t\t\t\t\n\t\t\t\twriter.put(nextStorageKey(), relationship(ASPIRIN_TABLET, HAS_ACTIVE_INGREDIENT, INGREDIENT5, getCharacteristicType()).group(1).build());\n\t\t\t\twriter.put(nextStorageKey(), relationship(ASPIRIN_TABLET, HAS_BOSS, INGREDIENT6, getCharacteristicType()).group(1).build());\n\t\t\t\t\n\t\t\t\twriter.put(nextStorageKey(), relationship(ALGOFLEX_TABLET, HAS_ACTIVE_INGREDIENT, INGREDIENT5, getCharacteristicType()).group(1).build());\n\t\t\t\twriter.put(nextStorageKey(), relationship(ALGOFLEX_TABLET, HAS_BOSS, INGREDIENT6, getCharacteristicType()).group(1).build());\n\t\t\t\twriter.put(nextStorageKey(), relationship(ALGOFLEX_TABLET, HAS_ACTIVE_INGREDIENT, INGREDIENT6, getCharacteristicType()).group(2).build());\n\t\t\t\twriter.put(nextStorageKey(), relationship(ALGOFLEX_TABLET, HAS_BOSS, INGREDIENT5, getCharacteristicType()).group(2).build());\n\t\t\t\t\n\t\t\t\twriter.put(nextStorageKey(), relationship(TRIPLEX_TABLET, HAS_ACTIVE_INGREDIENT, INGREDIENT5, getCharacteristicType()).group(1).build());\n\t\t\t\twriter.put(nextStorageKey(), relationship(TRIPLEX_TABLET, HAS_BOSS, INGREDIENT6, getCharacteristicType()).group(2).build());\n\t\t\t}\n\t\t\t\n\t\n\t\t\twriter.commit();\n\t\t\treturn null;\n\t\t});\n\t\t\n\t}",
"private LinkedList<Treasure> generateTestTreasures(){\r\n TreasureFactory tf = new TreasureFactory(1);\r\n LinkedList<Treasure> testTreasures = tf.genTreasureList();\r\n return testTreasures;\r\n }",
"@Ignore\n @Test\n public final void testGenerateMinimalConcreteTripleTestFile() throws Exception\n {\n this.getTestRepositoryConnection().add(this.getClass().getResourceAsStream(\"/inferredplantontology-v16.nt\"),\n \"\", RDFFormat.NTRIPLES, this.testContextUri);\n this.getTestRepositoryConnection().commit();\n \n // Dump to a concrete set of triples to narrow down the cause\n final RDFWriter writer =\n Rio.createWriter(RDFFormat.NTRIPLES, new FileOutputStream(\n \"/home/peter/temp/minimalinferredplantontology-v16.nt\"));\n \n // GraphQuery query =\n // this.getTestRepositoryConnection().prepareGraphQuery(QueryLanguage.SPARQL,\n // \"CONSTRUCT { ?parent a ?parentType . ?class a ?childType . ?class <http://www.w3.org/2000/01/rdf-schema#subClassOf> ?parent . } WHERE { ?class <http://www.w3.org/2000/01/rdf-schema#subClassOf> ?parent . OPTIONAL { ?parent a ?parentType . } OPTIONAL { ?class a ?childType . } } ORDER BY ?parent\");\n final GraphQuery query =\n this.getTestRepositoryConnection()\n .prepareGraphQuery(\n QueryLanguage.SPARQL,\n \"CONSTRUCT { ?parent a ?parentType . ?child a ?childType . ?child <http://www.w3.org/2000/01/rdf-schema#subClassOf> ?parent . } WHERE { ?child <http://www.w3.org/2000/01/rdf-schema#subClassOf> ?parent . OPTIONAL { ?parent a ?parentType . } OPTIONAL { ?child a ?childType . } FILTER(isIRI(?child) && isIRI(?parent))} ORDER BY DESC(?parent) OFFSET 0 LIMIT 1000\");\n \n query.evaluate(writer);\n }",
"@Test(description = \"positive test that a derived relationship is defined\")\n public void t23a_positiveTestDerived()\n throws Exception\n {\n this.createNewData(\"Parent\")\n .create();\n this.createNewData(\"Test\")\n .create()\n .update(\"\")\n .setValue(\"derived\", AbstractTest.PREFIX + \"Parent\")\n .update(\"\")\n .checkExport();\n }",
"public static void populateTestData() {\n // Populate parts into Inventory\n Inventory.addPart(new InHouse(Inventory.generatePartID(), \"Prefabulated amulite base plate\", 1125.23, 5, 1, 5, 100));\n Inventory.addPart(new InHouse(Inventory.generatePartID(), \"Maleable logarithmic casing\", 500.15, 3, 1, 5, 150));\n Inventory.addPart(new Outsourced(Inventory.generatePartID(), \"Spurving bearings\", 64.55, 20, 15, 50, \"North Bearing Co.\"));\n Inventory.addPart(new Outsourced(Inventory.generatePartID(), \"Stator with pandermic semi-boloid slots\", 747.11, 7, 5, 10, \"Stator the Union LLC\"));\n Inventory.addPart(new InHouse(Inventory.generatePartID(), \"Differential girdle springs\", 55.13, 34, 15, 75, 205));\n Inventory.addPart(new InHouse(Inventory.generatePartID(), \"Grammeters\", 357.45, 9, 5, 10, 502));\n Inventory.addPart(new Outsourced(Inventory.generatePartID(), \"Lotus-o-deltoid winding\", 867.34, 3, 2, 6, \"Wound Windings Winders Co.\"));\n Inventory.addPart(new InHouse(Inventory.generatePartID(), \"Non-reversible tremie pipe\", 14.01, 15, 5, 15, 125));\n\n // Populate products into Inventory\n Inventory.addProduct(new Product(Inventory.generateProductID(), \"Turboencabulator\", 5325.13, 2, 1, 2));\n Inventory.addProduct(new Product (Inventory.generateProductID(), \"Microencabulator\", 2425.99, 3, 1, 4));\n\n // Associate some Parts with the Products in Inventory\n Inventory.getAllProducts().get(0).addAssociatedPart(Inventory.lookupPart(1));\n Inventory.getAllProducts().get(0).addAssociatedPart(Inventory.lookupPart(2));\n Inventory.getAllProducts().get(0).addAssociatedPart(Inventory.lookupPart(4));\n Inventory.getAllProducts().get(0).addAssociatedPart(Inventory.lookupPart(5));\n Inventory.getAllProducts().get(0).addAssociatedPart(Inventory.lookupPart(6));\n Inventory.getAllProducts().get(1).addAssociatedPart(Inventory.lookupPart(1));\n Inventory.getAllProducts().get(1).addAssociatedPart(Inventory.lookupPart(2));\n Inventory.getAllProducts().get(1).addAssociatedPart(Inventory.lookupPart(4));\n }",
"@Test\n public void testFindRecipesByIngredients() {\n try {\n Ingredient chicken = new Ingredient(\"chicken\", 1, \"kg\");\n Ingredient potatoes = new Ingredient(\"potatoes\", 1, \"kg\");\n Ingredient milk = new Ingredient(\"milk\", 1, \"l\");\n\n SortedSet<Ingredient> ing1 = new TreeSet<Ingredient>();\n SortedSet<Ingredient> ing2 = new TreeSet<Ingredient>();\n SortedSet<Ingredient> emptySet = new TreeSet<Ingredient>();\n\n Recipe r1 = new Recipe();\n\n r1.setName(\"chicken\");\n r1.setType(MealType.MAIN_DISH);\n r1.setCookingTime(120);\n r1.setNumPortions(5);\n r1.setInstructions(\"cook chiken\");\n r1.setCategory(MealCategory.MEAT);\n\n Recipe r2 = new Recipe();\n\n r2.setName(\"potatoes with milk\");\n r2.setType(MealType.MAIN_DISH);\n r2.setCookingTime(120);\n r2.setNumPortions(5);\n r2.setInstructions(\"put it together\");\n r2.setCategory(MealCategory.MEAT);\n\n recipeManager.createRecipe(r1);\n recipeManager.createRecipe(r2);\n\n ing1.add(chicken);\n ing1.add(potatoes);\n\n ing2.add(potatoes);\n ing2.add(milk);\n \n manager.addIngredientsToRecipe(ing1, r1);\n manager.addIngredientsToRecipe(ing2, r2);\n \n assertEquals(ing1, manager.getIngredientsOfRecipe(r1));\n assertEquals(ing2, manager.getIngredientsOfRecipe(r2));\n\n Ingredient slanina = new Ingredient(\"slanina\", 1, \"kg\");\n SortedSet<Ingredient> slaninas = new TreeSet<Ingredient>();\n slaninas.add(slanina);\n SortedSet<Ingredient> in1 = new TreeSet<Ingredient>();\n in1.add(potatoes);\n SortedSet<Recipe> expected1 = new TreeSet<Recipe>();\n SortedSet<Recipe> expected2 = new TreeSet<Recipe>();\n expected1.add(r1);\n expected1.add(r2);\n expected2.add(r1);\n\n assertEquals(expected1, manager.findRecipesByIngredients(in1));\n assertEquals(expected2, manager.findRecipesByIngredients(ing1));\n assertEquals(new TreeSet<Recipe>(), manager.findRecipesByIngredients(slaninas));\n\n try {\n manager.findRecipesByIngredients(null);\n fail();\n } catch (IllegalArgumentException ex) {\n //OK\n }\n\n try {\n manager.findRecipesByIngredients(emptySet);\n fail();\n } catch (IllegalArgumentException ex) {\n //OK\n }\n\n Ingredient i1 = new Ingredient();\n i1.setName(\"mlieko\");\n i1.setUnit(\"1\");\n SortedSet<Ingredient> ingr1 = new TreeSet<Ingredient>();\n ingr1.add(i1);\n\n try {\n manager.findRecipesByIngredients(ingr1);\n fail();\n } catch (InvalidEntityException ex) {\n //OK\n }\n } catch (ServiceFailureException ex) {\n Logger.getLogger(RecipebookImplTest.class.getName()).log(Level.SEVERE, null, ex);\n fail();\n }\n }",
"@Test\n public void testAddIngredientsToRecipe() {\n try {\n Ingredient chicken = new Ingredient(\"chicken\", 1, \"kg\");\n Ingredient potatoes = new Ingredient(\"potatoes\", 1, \"kg\");\n Ingredient milk = new Ingredient(\"milk\", 1, \"l\");\n\n SortedSet<Ingredient> ing1 = new TreeSet<Ingredient>();\n SortedSet<Ingredient> ing2 = new TreeSet<Ingredient>();\n SortedSet<Ingredient> emptySet = new TreeSet<Ingredient>();\n\n Recipe r1 = new Recipe();\n\n r1.setName(\"chicken\");\n r1.setType(MealType.MAIN_DISH);\n r1.setCookingTime(120);\n r1.setNumPortions(5);\n r1.setInstructions(\"cook chiken\");\n r1.setCategory(MealCategory.MEAT);\n\n Recipe r2 = new Recipe();\n\n r2.setName(\"potatoes with milk\");\n r2.setType(MealType.MAIN_DISH);\n r2.setCookingTime(120);\n r2.setNumPortions(5);\n r2.setInstructions(\"put it together\");\n r2.setCategory(MealCategory.MEAT);\n\n recipeManager.createRecipe(r1);\n recipeManager.createRecipe(r2);\n\n ing1.add(chicken);\n ing1.add(potatoes);\n\n ing2.add(potatoes);\n ing2.add(milk);\n\n manager.addIngredientsToRecipe(ing1, r1);\n manager.addIngredientsToRecipe(ing2, r2);\n\n assertEquals(ing1, manager.getIngredientsOfRecipe(r1));\n assertEquals(ing2, manager.getIngredientsOfRecipe(r2));\n\n try {\n manager.addIngredientsToRecipe(emptySet, r2);\n fail();\n } catch (IllegalArgumentException ex) {\n //OK\n }\n\n try {\n manager.addIngredientsToRecipe(null, r2);\n fail();\n } catch (IllegalArgumentException ex) {\n //OK\n }\n\n Ingredient i1 = new Ingredient();\n i1.setName(\"mlieko\");\n i1.setUnit(\"1\");\n SortedSet<Ingredient> in1 = new TreeSet<Ingredient>();\n in1.add(i1);\n\n try {\n manager.addIngredientsToRecipe(in1, r2);\n fail();\n } catch (InvalidEntityException ex) {\n //OK\n }\n\n assertEquals(ing1, manager.getIngredientsOfRecipe(r1));\n assertEquals(ing2, manager.getIngredientsOfRecipe(r2));\n } catch (ServiceFailureException ex) {\n Logger.getLogger(RecipebookImplTest.class.getName()).log(Level.SEVERE, null, ex);\n fail();\n }\n }",
"@Test\n\tpublic void testWriteAllRelationships_fixtureInstance_18()\n\t\tthrows Exception {\n\t\tDotFormatter fixture = getFixtureInstance();\n\t\tTable table = new Table(new Database(Config.getInstance(), (Connection) null, (DatabaseMetaData) null, \"\", \"\", \"\", new SchemaMeta(\"\", \"\", \"\")), \"\", \"\", \"\", \"\");\n\t\tboolean twoDegreesOfSeparation = false;\n\t\tArrayList<Table> list = new ArrayList<Table>();\n\t\tlist.add(new Table(new Database(Config.getInstance(), (Connection) null, (DatabaseMetaData) null, \"\", \"\", \"\", new SchemaMeta(\"\", \"\", \"\")), \"\", \"\", \"\", \"\"));\n\t\tWriteStats stats = new WriteStats(list);\n\t\tLineWriter dot = new LineWriter(\"0123456789\", \"0123456789\");\n\n\t\tfixture.writeAllRelationships(table, twoDegreesOfSeparation, stats, dot);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// net.sourceforge.schemaspy.model.InvalidConfigurationException: Specified meta file \"\" does not exist\n\t\t// at net.sourceforge.schemaspy.model.xml.SchemaMeta.<init>(SchemaMeta.java:74)\n\t}",
"@Test\n\tpublic void testWriteAllRelationships_fixtureInstance_17()\n\t\tthrows Exception {\n\t\tDotFormatter fixture = getFixtureInstance();\n\t\tTable table = new Table(new Database(new Config(), (Connection) null, (DatabaseMetaData) null, (String) null, (String) null, (String) null, (SchemaMeta) null), (String) null, (String) null, (String) null, (String) null);\n\t\tboolean twoDegreesOfSeparation = false;\n\t\tWriteStats stats = new WriteStats((WriteStats) null);\n\t\tLineWriter dot = new LineWriter(\"\", 0, \"\");\n\n\t\tfixture.writeAllRelationships(table, twoDegreesOfSeparation, stats, dot);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// net.sourceforge.schemaspy.model.InvalidConfigurationException: Failed to load properties for ora: java.io.FileNotFoundException: ora (No such file or directory)\n\t\t// at net.sourceforge.schemaspy.Config.getMaxDbThreads(Config.java:699)\n\t\t// at net.sourceforge.schemaspy.model.Database.initTables(Database.java:238)\n\t\t// at net.sourceforge.schemaspy.model.Database.<init>(Database.java:74)\n\t}",
"public void testInheritanceGetAllAttributes()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\tAttributeInterface label = factory.createStringAttribute();\r\n\t\t\tlabel.setName(\"label\");\r\n\t\t\tspecimen.addAbstractAttribute(label);\r\n\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\ttissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\t\t\tEntityInterface advanceTissueSpecimenA = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenA.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenA.setName(\"advanceTissueSpecimenA\");\r\n\t\t\tAttributeInterface newAttribute = factory.createIntegerAttribute();\r\n\t\t\tnewAttribute.setName(\"newAttributeA\");\r\n\t\t\tadvanceTissueSpecimenA.addAbstractAttribute(newAttribute);\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenB = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenB.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenB.setName(\"advanceTissueSpecimenB\");\r\n\t\t\tAttributeInterface newAttributeB = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB.setName(\"newAttributeB\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB);\r\n\t\t\tAttributeInterface newAttributeB2 = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB2.setName(\"newAttributeB2\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB2);\r\n\r\n\t\t\t// Step 2\t\t\t\r\n\t\t\tentityManagerInterface.persistEntity(advanceTissueSpecimenA);\r\n\t\t\tentityManagerInterface.persistEntity(advanceTissueSpecimenB);\r\n\r\n\t\t\t// Step 3\t\r\n\r\n\t\t\tCollection<AttributeInterface> specimenAttributes = specimen.getAllAttributes();\r\n\t\t\t//2 user attributes + 1 system attribute for id\r\n\t\t\tassertEquals(3, specimenAttributes.size());\r\n\r\n\t\t\t//2 child Attributes + 1 parent Attribute + 2 system generated attributes for id\r\n\t\t\tCollection<AttributeInterface> tissueSpecimenAttributes = tissueSpecimen\r\n\t\t\t\t\t.getAllAttributes();\r\n\t\t\tassertEquals(5, tissueSpecimenAttributes.size());\r\n\r\n\t\t\tCollection<AttributeInterface> advanceTissueSpecimenAAttributes = advanceTissueSpecimenA\r\n\t\t\t\t\t.getAllAttributes();\r\n\t\t\t//1 child attribute + 2 parent Attribute + 1 grand parent attribute + 3 system generated attributes\r\n\t\t\tassertEquals(7, advanceTissueSpecimenAAttributes.size());\r\n\r\n\t\t\tCollection<AttributeInterface> advanceTissueSpecimenBAttributes = advanceTissueSpecimenB\r\n\t\t\t\t\t.getAllAttributes();\r\n\t\t\t//2 child attribute + 2 parent Attribute + 1 grand parent attribute + 3 system generated attributes\r\n\t\t\tassertEquals(8, advanceTissueSpecimenBAttributes.size());\r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}",
"@Ignore\n @Test\n public final void testGenerateReducedConcreteTriplesTestFile() throws Exception\n {\n this.getTestRepositoryConnection().add(this.getClass().getResourceAsStream(\"/inferredplantontology-v16.nt\"),\n \"\", RDFFormat.NTRIPLES, this.testContextUri);\n this.getTestRepositoryConnection().commit();\n \n // Dump to a concrete set of triples to narrow down the cause\n final RDFWriter writer =\n Rio.createWriter(RDFFormat.NTRIPLES, new FileOutputStream(\n \"/home/peter/temp/reducedinferredplantontology-v16.nt\"));\n \n final GraphQuery query =\n this.getTestRepositoryConnection()\n .prepareGraphQuery(\n QueryLanguage.SPARQL,\n \"CONSTRUCT { ?parent a ?parentType . ?class a ?childType . ?class <http://www.w3.org/2000/01/rdf-schema#subClassOf> ?parent . } WHERE { ?class <http://www.w3.org/2000/01/rdf-schema#subClassOf> ?parent . OPTIONAL { ?parent a ?parentType . } OPTIONAL { ?class a ?childType . } }\");\n \n query.evaluate(writer);\n }",
"private void initFixtureStructure() {\n\r\n main.setIsMain(true);\r\n resource.getContents().add(main);\r\n\r\n funcTemplate.setFunctionSequence(funcTemplateSeq);\r\n funcTemplateSeq.getElements().add(funcTemplateLit);\r\n resource.getContents().add(funcTemplate);\r\n\r\n abstractSequenceTemplate.getNames().add(\"Template\");\r\n abstractSequenceTemplate.setIsAbstract(true);\r\n resource.getContents().add(abstractSequenceTemplate);\r\n\r\n // look up through names\r\n functionTemplateTemplateMode1.getNames().add(\"FunctionTemplate\");\r\n functionTemplateTemplateMode1.setMode(\"mode1\");\r\n functionTemplateTemplateMode1.setTemplateSequence(functionTemplateTemplateSeqMode1);\r\n functionTemplateTemplateSeqMode1.getElements().add(functionTemplateTemplateLitMode1);\r\n resource.getContents().add(functionTemplateTemplateMode1);\r\n\r\n // look up through metaReference.qualifiedName\r\n EClass metaReference = EcoreFactory.eINSTANCE.createEClass();\r\n metaReference.setName(\"FunctionTemplate\");\r\n functionTemplateTemplateMode2.setMetaReference(metaReference);\r\n functionTemplateTemplateMode2.setMode(\"mode2\");\r\n functionTemplateTemplateMode2.setTemplateSequence(functionTemplateTemplateSeqMode2);\r\n functionTemplateTemplateSeqMode2.getElements().add(functionTemplateTemplateLitMode2);\r\n resource.getContents().add(functionTemplateTemplateMode2);\r\n\r\n main.setTemplateSequence(mainSeq);\r\n mainSeq.getElements().add(main1Lit);\r\n mainSeq.getElements().add(main2Cond);\r\n main2Cond.setThenSequence(main2CondThenSeq);\r\n main2CondThenSeq.getElements().add(main2CondThenLit);\r\n main2Cond.setElseSequence(null);\r\n mainSeq.getElements().add(main3Prop);\r\n mainSeq.getElements().add(main4Alt);\r\n main4Alt.getSequences().add(main4AltCase1Seq);\r\n main4AltCase1Seq.getElements().add(main4AltCase1Lit);\r\n main4AltCase1Seq.getElements().add(main4AltCase1CustomSeparator);\r\n main4Alt.getSequences().add(main4AltCase2Seq);\r\n main4AltCase2Seq.getElements().add(main4AltCase2Lit);\r\n mainSeq.getElements().add(main5Block);\r\n main5Block.setBlockSequence(main5BlockSeq);\r\n main5BlockSeq.getElements().add(main5BlockProp);\r\n mainSeq.getElements().add(main6Call);\r\n main6Call.setCalledFunction(funcTemplate);\r\n mainSeq.getElements().add(main7Lit);\r\n mainSeq.getElements().add(main8Call);\r\n main8Call.setCalledFunction(funcTemplate);\r\n mainSeq.getElements().add(main9Lit);\r\n\r\n keywordA.setValue(\"keywordA\");\r\n keywordB.setValue(\"keywordB\");\r\n symbolA.setValue(\"symbolA\");\r\n symbolB.setValue(\"symbolB\");\r\n\r\n funcTemplateLit.setReferredLiteral(keywordA);\r\n functionTemplateTemplateLitMode1.setReferredLiteral(symbolA);\r\n functionTemplateTemplateLitMode2.setReferredLiteral(symbolB);\r\n main1Lit.setReferredLiteral(keywordA);\r\n main2CondThenLit.setReferredLiteral(keywordA);\r\n main4AltCase1Lit.setReferredLiteral(keywordB);\r\n main4AltCase2Lit.setReferredLiteral(symbolB);\r\n main7Lit.setReferredLiteral(keywordA);\r\n main9Lit.setReferredLiteral(keywordB);\r\n\r\n // link main3Prop to TCS.Property.propertyReference.name attribute\r\n EClass propReferenceClass = modelFactory.createPropertyReference().eClass();\r\n setStrucfeature(main3Prop, propReferenceClass.getEStructuralFeature(\"name\"));\r\n\r\n // link main5BlockProp to TCS.ConcreteSyntax.templates reference\r\n EClass concreteSyntaxClass = modelFactory.createConcreteSyntax().eClass();\r\n setStrucfeature(main5BlockProp, concreteSyntaxClass.getEStructuralFeature(\"templates\"));\r\n\r\n // add modearg of main5BlockProp to \"mode2\"\r\n ModePArg modeArg = modelFactory.createModePArg();\r\n modeArg.setMode(\"mode2\");\r\n main5BlockProp.getPropertyArgs().add(modeArg);\r\n\r\n }",
"@Before\n public void setUp() {\n predSents = new AnnoSentenceCollection();\n goldSents = new AnnoSentenceCollection();\n AnnoSentence pred = new AnnoSentence();\n AnnoSentence gold = new AnnoSentence();\n int n = 5;\n List<String> words = QLists.getList(\"cats\", \"like\", \"eating\", \"food\");\n pred.setWords(words);\n gold.setWords(words);\n \n DepGraph predSrl = new DepGraph(n);\n DepGraph goldSrl = new DepGraph(n);\n \n predSrl.set(-1, 1, \"like.01\"); // Pred\n predSrl.set(1, 0, \"agent\"); // Arg\n predSrl.set(1, 1, \"patient\"); // Arg (incorrect position)\n predSrl.set(1, 3, \"nonarg\"); // Arg\n predSrl.set(-1, 2, \"drink.01\");// Pred (incorrect label)\n // Arg (incorrect: missing 2, 0, agent.)\n predSrl.set(2, 3, \"theme\"); // Arg (incorrect label)\n predSrl.set(-1, 0, \"run.02\"); // Pred (extra)\n pred.setSrlGraph(predSrl);\n pred.setKnownPredsFromSrlGraph();\n \n goldSrl.set(-1, 1, \"like.01\"); // Pred\n goldSrl.set(1, 0, \"agent\"); // Arg\n goldSrl.set(1, 2, \"patient\"); // Arg\n goldSrl.set(1, 3, \"nonarg\"); // Arg\n goldSrl.set(-1, 2, \"eat.01\"); // Pred\n goldSrl.set(2, 0, \"agent\"); // Arg\n goldSrl.set(2, 3, \"patient\"); // Arg\n gold.setSrlGraph(goldSrl);\n gold.setKnownPredsFromSrlGraph();\n\n System.out.println(pred.getSrlGraph());\n System.out.println(gold.getSrlGraph());\n \n predSents.add(pred);\n goldSents.add(gold);\n }",
"public void testInsertDataForInheritance()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\tAttributeInterface label = factory.createStringAttribute();\r\n\t\t\tlabel.setName(\"label\");\r\n\t\t\tspecimen.addAbstractAttribute(label);\r\n\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\tAttributeInterface arivalDate = factory.createDateAttribute();\r\n\t\t\tarivalDate.setName(\"arivalDate\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(arivalDate);\r\n\r\n\t\t\ttissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\r\n\t\t\tMap dataValue = new HashMap();\r\n\t\t\tdataValue.put(barcode, \"123456\");\r\n\t\t\tdataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-12-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\r\n\t\t\tLong recordId = entityManagerInterface.insertData(tissueSpecimen, dataValue);\r\n\r\n\t\t\tResultSet resultSet = executeQuery(\"select * from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(4));\r\n\r\n\t\t\tresultSet = executeQuery(\"select * from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(4));\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenA = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenA.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenA.setName(\"advanceTissueSpecimenA\");\r\n\r\n\t\t\tAttributeInterface newAttribute = factory.createIntegerAttribute();\r\n\t\t\tnewAttribute.setName(\"newAttributeA\");\r\n\t\t\tadvanceTissueSpecimenA.addAbstractAttribute(newAttribute);\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenB = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenB.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenB.setName(\"advanceTissueSpecimenB\");\r\n\r\n\t\t\tAttributeInterface newAttributeB = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB.setName(\"newAttributeB\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB);\r\n\t\t\tAttributeInterface newAttributeB2 = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB2.setName(\"newAttributeB2\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB2);\r\n\r\n\t\t\tadvanceTissueSpecimenA = entityManagerInterface.persistEntity(advanceTissueSpecimenA);\r\n\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue.put(barcode, \"869\");\r\n\t\t\tdataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-12-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\t\t\tdataValue.put(newAttribute, \"12\");\r\n\r\n\t\t\trecordId = entityManagerInterface.insertData(advanceTissueSpecimenA, dataValue);\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ advanceTissueSpecimenA.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}",
"@Test\n public void preDefine_TestA()\n {\n //list of prerequisites,i.e. source accounts and destination accounts\n //source accounts created and added to db\n Account Deposit_High_Risk_srcAccount = new Account(3123, \"Deposit_High_Risk_srcAccount\", 10000);\n Account Deposit_Low_Risk_srcAccount = new Account(8665, \"Deposit_Low_Risk_srcAccount\", 10000);\n Account Main_High_Risk_srcAccount = new Account(3143, \"Main_High_Risk_srcAccount\", 10000);\n Account Main_Low_Risk_srcAccount = new Account(3133, \"Main_Low_Risk_srcAccount\", 10000);\n Account Commission_High_Risk_srcAccount = new Account(6565, \"Commission_High_Risk_srcAccount\", 10000);\n Account Commission_Low_Risk_srcAccount = new Account(6588, \"Commission_Low_Risk_srcAccount\", 10000);\n acc_db.addAccount(Deposit_High_Risk_srcAccount);\n acc_db.addAccount(Deposit_Low_Risk_srcAccount);\n acc_db.addAccount(Main_High_Risk_srcAccount);\n acc_db.addAccount(Main_Low_Risk_srcAccount);\n acc_db.addAccount(Commission_High_Risk_srcAccount);\n acc_db.addAccount(Commission_Low_Risk_srcAccount);\n\n //create and add destination accounts\n Account Commission_High_Risk_destAccount = new Account(4444, \"Commission_High_Risk_destAccount\", 10000);\n Account Commission_Low_Risk_destAccount = new Account(4445, \"Commission_Low_Risk_destAccount\", 10000);\n acc_db.addAccount(Commission_High_Risk_destAccount);\n acc_db.addAccount(Commission_Low_Risk_destAccount);\n\n\n\n //adding Main Transaction Destination Accounts to database\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n CompoundTransaction ct = new CompoundTransaction(\"High Risk Preset\");\n\n List<Account> mainDests = new ArrayList<Account>();\n mainDests.add(acc);\n mainDests.add(acc2);\n\n List<Long> mainAmounts = new ArrayList<Long>();\n long main_amount1 = 130;\n long main_amount2=70;\n mainAmounts.add(main_amount1);\n mainAmounts.add(main_amount2);\n\n //Creating and Adding Deposit Destination Account to Database\n acc3 = new Account(3,\"Jacob&Leon3\",2000);\n long depAmount = 20;\n acc_db.addAccount(acc3);\n\n RiskPresets preset = new RiskPresets(\"high\");\n\n Assert.assertEquals(true,ct.preDefine(preset,acc3,depAmount,mainDests,mainAmounts,acc_db));\n }",
"@Test\n public void preDefine_TestB()\n {\n //list of prerequisites,i.e. source accounts and destination accounts\n //source accounts created and added to db\n Account Deposit_High_Risk_srcAccount = new Account(3123, \"Deposit_High_Risk_srcAccount\", 10000);\n Account Deposit_Low_Risk_srcAccount = new Account(8665, \"Deposit_Low_Risk_srcAccount\", 10000);\n Account Main_High_Risk_srcAccount = new Account(3143, \"Main_High_Risk_srcAccount\", 10000);\n Account Main_Low_Risk_srcAccount = new Account(3133, \"Main_Low_Risk_srcAccount\", 10000);\n Account Commission_High_Risk_srcAccount = new Account(6565, \"Commission_High_Risk_srcAccount\", 10000);\n Account Commission_Low_Risk_srcAccount = new Account(6588, \"Commission_Low_Risk_srcAccount\", 10000);\n acc_db.addAccount(Deposit_High_Risk_srcAccount);\n acc_db.addAccount(Deposit_Low_Risk_srcAccount);\n acc_db.addAccount(Main_High_Risk_srcAccount);\n acc_db.addAccount(Main_Low_Risk_srcAccount);\n acc_db.addAccount(Commission_High_Risk_srcAccount);\n acc_db.addAccount(Commission_Low_Risk_srcAccount);\n\n //create and add destination accounts\n Account Commission_High_Risk_destAccount = new Account(4444, \"Commission_High_Risk_destAccount\", 10000);\n Account Commission_Low_Risk_destAccount = new Account(4445, \"Commission_Low_Risk_destAccount\", 10000);\n acc_db.addAccount(Commission_High_Risk_destAccount);\n acc_db.addAccount(Commission_Low_Risk_destAccount);\n\n //adding Main Transaction Destination Accounts to database\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n CompoundTransaction ct = new CompoundTransaction(\"Low Risk Preset\");\n\n List<Account> mainDests = new ArrayList<Account>();\n mainDests.add(acc);\n mainDests.add(acc2);\n\n List<Long> mainAmounts = new ArrayList<Long>();\n long main_amount1 = 130;\n long main_amount2=70;\n mainAmounts.add(main_amount1);\n mainAmounts.add(main_amount2);\n\n //Creating and Adding Deposit Destination Account to Database\n acc3 = new Account(3,\"Jacob&Leon3\",2000);\n long depAmount = 20;\n acc_db.addAccount(acc3);\n\n RiskPresets preset = new RiskPresets(\"low\");\n\n Assert.assertEquals(true,ct.preDefine(preset,acc3,depAmount,mainDests,mainAmounts,acc_db));\n }",
"@Test\n\tpublic void testWriteAllRelationships_fixtureInstance_26()\n\t\tthrows Exception {\n\t\tDotFormatter fixture = getFixtureInstance();\n\t\tTable table = new Table(new Database((Config) null, (Connection) null, (DatabaseMetaData) null, \"0123456789\", \"0123456789\", \"0123456789\", new SchemaMeta(\"0123456789\", \"0123456789\", \"0123456789\")), \"0123456789\", \"0123456789\", \"\", (String) null);\n\t\tboolean twoDegreesOfSeparation = false;\n\t\tArrayList<Table> list = new ArrayList<Table>();\n\t\tlist.add(new Table(new Database(Config.getInstance(), (Connection) null, (DatabaseMetaData) null, \"\", \"\", \"\", new SchemaMeta(\"\", \"\", \"\")), \"\", \"\", \"\", \"\"));\n\t\tWriteStats stats = new WriteStats(list);\n\t\tLineWriter dot = new LineWriter(new ByteArrayOutputStream(), \"\");\n\n\t\tfixture.writeAllRelationships(table, twoDegreesOfSeparation, stats, dot);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// net.sourceforge.schemaspy.model.InvalidConfigurationException: Specified meta file \"\" does not exist\n\t\t// at net.sourceforge.schemaspy.model.xml.SchemaMeta.<init>(SchemaMeta.java:74)\n\t}",
"@Test\n\tpublic void testWriteRealRelationships_fixtureInstance_18()\n\t\tthrows Exception {\n\t\tDotFormatter fixture = getFixtureInstance();\n\t\tTable table = new Table(new Database(Config.getInstance(), (Connection) null, (DatabaseMetaData) null, \"\", \"\", \"\", new SchemaMeta(\"\", \"\", \"\")), \"\", \"\", \"\", \"\");\n\t\tboolean twoDegreesOfSeparation = false;\n\t\tArrayList<Table> list = new ArrayList<Table>();\n\t\tlist.add(new Table(new Database(Config.getInstance(), (Connection) null, (DatabaseMetaData) null, \"\", \"\", \"\", new SchemaMeta(\"\", \"\", \"\")), \"\", \"\", \"\", \"\"));\n\t\tWriteStats stats = new WriteStats(list);\n\t\tLineWriter dot = new LineWriter(\"0123456789\", \"0123456789\");\n\n\t\tSet<ForeignKeyConstraint> result = fixture.writeRealRelationships(table, twoDegreesOfSeparation, stats, dot);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// net.sourceforge.schemaspy.model.InvalidConfigurationException: Specified meta file \"\" does not exist\n\t\t// at net.sourceforge.schemaspy.model.xml.SchemaMeta.<init>(SchemaMeta.java:74)\n\t\tassertNotNull(result);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the sim pro science app link persistence. | public void setSimProScienceAppLinkPersistence(
SimProScienceAppLinkPersistence simProScienceAppLinkPersistence) {
this.simProScienceAppLinkPersistence = simProScienceAppLinkPersistence;
} | [
"public SimProScienceAppLinkPersistence getSimProScienceAppLinkPersistence() {\n\t\treturn simProScienceAppLinkPersistence;\n\t}",
"public void setSimProScienceAppLinkFinder(\n\t\tSimProScienceAppLinkFinder simProScienceAppLinkFinder) {\n\t\tthis.simProScienceAppLinkFinder = simProScienceAppLinkFinder;\n\t}",
"public void setSimProScienceAppLinkLocalService(\n\t\torg.kisti.edison.service.SimProScienceAppLinkLocalService simProScienceAppLinkLocalService) {\n\t\tthis.simProScienceAppLinkLocalService = simProScienceAppLinkLocalService;\n\t}",
"protected void setPersistence(Persistence persistence) {\n this.persistence = persistence;\n }",
"public org.kisti.edison.service.SimProScienceAppLinkLocalService getSimProScienceAppLinkLocalService() {\n\t\treturn simProScienceAppLinkLocalService;\n\t}",
"public void save () throws Exception\n {\n // set all values on the native side\n set (); \n \n // make sure the target actually resolves\n int result = Resolve ();\n if (result != SL_OK)\n {\n throw (new Exception (\"cannot resolve target\"));\n }\n \n // make sure the directory exists\n File directory = new File (fullLinkPath (userType));\n if (!directory.exists ())\n {\n directory.mkdirs ();\n linkDirectory = directory.getPath ();\n }\n else\n {\n linkDirectory = \"\";\n }\n \n // perform the save operation\n String saveTo = fullLinkName (userType);\n result = saveLink (saveTo);\n \n if (result == SL_NO_IPERSIST)\n {\n throw (new Exception (\"could not get handle for IPesist\"));\n }\n else if (result == SL_NO_SAVE)\n {\n throw (new Exception (\"the save operation failed\"));\n }\n \n linkFileName = saveTo;\n }",
"public void setPersistence(EventPersistence persistence) {\n mStorage.eventPersistence = persistence;\n }",
"public void changePersistance() {\n this.properties.setProperty(BIN_PERSISTANCE, String.valueOf(!this.isBinPersistance()));\n String newValue = (isBinPersistance() ? \"BINARY\" : \"XML\");\n\n log(\"Persistance changed to \" + newValue + \".\");\n this.save();\n\n Database.getInstance().saveAllData();\n }",
"@Indexable(type = IndexableType.REINDEX)\n\t@Override\n\tpublic SimProScienceAppLink updateSimProScienceAppLink(\n\t\tSimProScienceAppLink simProScienceAppLink) throws SystemException {\n\t\treturn simProScienceAppLinkPersistence.update(simProScienceAppLink);\n\t}",
"@Override\n\tpublic SimProScienceAppLink createSimProScienceAppLink(\n\t\tSimProScienceAppLinkPK simProScienceAppLinkPK) {\n\t\treturn simProScienceAppLinkPersistence.create(simProScienceAppLinkPK);\n\t}",
"@Override\n\tpublic SimProScienceAppLink getSimProScienceAppLink(\n\t\tSimProScienceAppLinkPK simProScienceAppLinkPK)\n\t\tthrows PortalException, SystemException {\n\t\treturn simProScienceAppLinkPersistence.findByPrimaryKey(simProScienceAppLinkPK);\n\t}",
"public void setLibroPersistence(LibroPersistence libroPersistence) {\n this.libroPersistence = libroPersistence;\n }",
"public void setSedePersistence(SedePersistence sedePersistence) {\n\t\tthis.sedePersistence = sedePersistence;\n\t}",
"public void setPersistenceInterface(PreferencesPersistenceI pi) {\n\t\tif (contentLoaded) {\n\t\t\tthrow new RuntimeException(\"Cannot call setPersistenceInterface() after getContent()\");\n\t\t}\n\t\tpersistenceInterface = pi;\n\t}",
"public SimProScienceAppLinkFinder getSimProScienceAppLinkFinder() {\n\t\treturn simProScienceAppLinkFinder;\n\t}",
"public static void setRepositoryPersistenceURL(String url) {\n System.setProperty(REPOSITORY_PERSISTENCE_CONNECTION_URL, url);\n }",
"public boolean restoreLink(PCSession session, String sLinkID) throws SQLException;",
"public static void setUseGraphicLinkDatabase(boolean b)\r\n\t{\r\n\t\tIS_EXTERNAL_GRAPHIC_LINKS = b;\r\n\t}",
"public void setPianoPersistence(PianoPersistence pianoPersistence) {\n\t\tthis.pianoPersistence = pianoPersistence;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated string invitee_ids = 1; | public com.google.protobuf.ProtocolStringList
getInviteeIdsList() {
return inviteeIds_;
} | [
"public Builder addInviteeIds(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInviteeIdsIsMutable();\n inviteeIds_.add(value);\n onChanged();\n return this;\n }",
"public java.lang.String getInviteeIds(int index) {\n return inviteeIds_.get(index);\n }",
"public Builder addAllInviteeIds(\n java.lang.Iterable<java.lang.String> values) {\n ensureInviteeIdsIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, inviteeIds_);\n onChanged();\n return this;\n }",
"public Builder clearInviteeIds() {\n inviteeIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n return this;\n }",
"public Builder setInviteeIds(\n int index, java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInviteeIdsIsMutable();\n inviteeIds_.set(index, value);\n onChanged();\n return this;\n }",
"Iterator<Contact> invitees();",
"private List<String> updateInviteList(String invitesInput){\n \n List<String> invitedUsers;\n HashSet hs = new HashSet();\n \n if (invitesInput == null){\n invitesInput = \"\";\n }\n \n invitesInput = invitesInput.replace(\"\\n\", \"\").replace(\"\\r\", \"\").replace(\"\\t\", \"\");\n String[] part = invitesInput.split(\";\");\n invitedUsers = Arrays.asList(part);\n \n for (int i = 0; i < invitedUsers.size(); i++){\n invitedUsers.set(i, invitedUsers.get(i).replaceAll(\" \", \"\"));\n hs.add(invitedUsers.get(i));\n }\n \n hs.remove(\"\");\n invitedUsers = new ArrayList<>(hs);\n \n return invitedUsers;\n }",
"void sendInvitation(String eventId, String... userIds);",
"public void sendInvitations(){\r\n for(int i = 0; i< emails.size(); i++){\r\n System.out.println(\"Inviting: \" + emails.get(i));\r\n }\r\n\r\n }",
"private void AddParticipants()\n {\n ArrayList<String> emailBuffer =\n (ArrayList<String>) MiddleMan.getConversationObject();\n\n AddParticipantsToConversationAsyncTask aptc =\n new AddParticipantsToConversationAsyncTask(conversation.getID(), emailBuffer, new IListener<ArrayList<String>>()\n {\n @Override\n public void onBegin()\n {}\n\n @Override\n public void onFinish(WebServiceResult<ArrayList<String>> result)\n {\n if (result.status != 0)\n Toast.makeText(activity, result.message, Toast.LENGTH_LONG).show();\n }\n });\n\n aptc.execute();\n }",
"void addAllParticipant(List<String> participant);",
"private String[] getConflictedIds(String errorMsg){\n String startStr = \": \";\n String endStr = \";\";\n int startIndex = errorMsg.indexOf(startStr) + startStr.length();\n int endIndex = errorMsg.indexOf(endStr);\n return errorMsg.substring(startIndex, endIndex).split(\",\");\n }",
"long getMsgids(int index);",
"public Set<String> getParticipantIdsForImmutableMessage(ImmutableMessage message) {\n Set<String> result = new HashSet<>();\n String toParticipantId = message.getRecipient();\n if (Message.MessageType.VALUE_MESSAGE_TYPE_MULTICAST.equals(message.getType())) {\n getRecipientsForMulticast(message, result);\n } else if (toParticipantId != null) {\n result.add(toParticipantId);\n }\n logger.trace(\"Found the following recipients for {}: {}\", message, result);\n\n return result;\n }",
"java.util.List<String> getRepeatedStringFieldList();",
"long getGiftIds(int index);",
"private void inviteFriends() {\n\n // Get selected positions\n List<Integer> posSelected = new ArrayList<Integer>();\n\n int pos = 0;\n for (Boolean b : mSelectedPositions) {\n if (b) {\n posSelected.add(pos);\n }\n pos++;\n }\n\n // Get corresponding friend ids\n Set<Long> friendsIds = new HashSet<Long>();\n for (Integer i : posSelected) {\n friendsIds.add(mUserList.get(i).getId());\n }\n\n Log.d(TAG, \"Friends ids to invite: \" + friendsIds);\n\n if (!friendsIds.isEmpty()) {\n // Invite friends if at least one selected\n ServiceContainer.getCache().inviteFriendsToEvent(this.getIntent().getLongExtra(\"EVENT\", 0), friendsIds,\n new InviteFriendsCallback());\n } else {\n Toast.makeText(this, this.getString(R.string.invite_friends_no_items_selected), Toast.LENGTH_LONG).show();\n }\n\n }",
"int getGiftIdsCount();",
"private static String getIdListForLogging(Collection<Integer> ids) {\n if (ids == null)\n return null;\n StringBuilder idList = new StringBuilder();\n boolean firstTime = true;\n for (Integer id : ids) {\n if (firstTime)\n firstTime = false;\n else\n idList.append(',');\n idList.append(id);\n if (idList.length() > 200) {\n idList.append(\"...\");\n break;\n }\n }\n return idList.toString();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
encodes a tool card one event | public ArrayList<String> encodeToolCardOneEvent(ToolCardOneEvent toolCardOneEvent)
{
ArrayList<String> temp = new ArrayList<String>();
temp.add(transformer.simpleEncode("id",Integer.toString(toolCardOneEvent.getId())));
temp.add(transformer.simpleEncode("index",Integer.toString(toolCardOneEvent.getIndex())));
temp.add(transformer.simpleEncode("x",Integer.toString(toolCardOneEvent.getX())));
temp.add(transformer.simpleEncode("y",Integer.toString(toolCardOneEvent.getY())));
temp.add(transformer.simpleEncode("action",Character.toString(toolCardOneEvent.getAction())));
temp.add(transformer.simpleEncode("player",Integer.toString(toolCardOneEvent.getPlayer())));
return temp;
} | [
"byte[] encode(E event);",
"public ArrayList<String> encodeToolCardTwelveEvent(ToolCardTwelveEvent toolCardTwelveEvent)\n {\n ArrayList<String> temp = new ArrayList<String>();\n\n temp.add(transformer.simpleEncode(\"id\",Integer.toString(toolCardTwelveEvent.getId())));\n temp.add(transformer.simpleEncode(\"roundtrackturn\",Integer.toString(toolCardTwelveEvent.getTurn())));\n temp.add(transformer.simpleEncode(\"rounddicepos\",Integer.toString(toolCardTwelveEvent.getPos())));\n temp.add(transformer.simpleEncode(\"x01\",Integer.toString(toolCardTwelveEvent.getX01())));\n temp.add(transformer.simpleEncode(\"y01\",Integer.toString(toolCardTwelveEvent.getY01())));\n temp.add(transformer.simpleEncode(\"x02\",Integer.toString(toolCardTwelveEvent.getX02())));\n temp.add(transformer.simpleEncode(\"y02\",Integer.toString(toolCardTwelveEvent.getY02())));\n temp.add(transformer.simpleEncode(\"x11\",Integer.toString(toolCardTwelveEvent.getX11())));\n temp.add(transformer.simpleEncode(\"y11\",Integer.toString(toolCardTwelveEvent.getY11())));\n temp.add(transformer.simpleEncode(\"x22\",Integer.toString(toolCardTwelveEvent.getX22())));\n temp.add(transformer.simpleEncode(\"y22\",Integer.toString(toolCardTwelveEvent.getY22())));\n temp.add(transformer.simpleEncode(\"onlyOne\", Boolean.toString(toolCardTwelveEvent.isOnlyOne())));\n temp.add(transformer.simpleEncode(\"player\",Integer.toString(toolCardTwelveEvent.getPlayer())));\n\n\n return temp;\n\n }",
"public ArrayList<String> encodeToolCardFourEvent(ToolCardFourEvent toolCardFourEvent)\n {\n ArrayList<String> temp = new ArrayList<String>();\n\n temp.add(transformer.simpleEncode(\"id\",Integer.toString(toolCardFourEvent.getId())));\n temp.add(transformer.simpleEncode(\"x01\",Integer.toString(toolCardFourEvent.getX01())));\n temp.add(transformer.simpleEncode(\"y01\",Integer.toString(toolCardFourEvent.getY01())));\n temp.add(transformer.simpleEncode(\"x02\",Integer.toString(toolCardFourEvent.getX02())));\n temp.add(transformer.simpleEncode(\"y02\",Integer.toString(toolCardFourEvent.getY02())));\n temp.add(transformer.simpleEncode(\"x11\",Integer.toString(toolCardFourEvent.getX11())));\n temp.add(transformer.simpleEncode(\"y11\",Integer.toString(toolCardFourEvent.getY11())));\n temp.add(transformer.simpleEncode(\"x22\",Integer.toString(toolCardFourEvent.getX22())));\n temp.add(transformer.simpleEncode(\"y22\",Integer.toString(toolCardFourEvent.getY22())));\n temp.add(transformer.simpleEncode(\"player\",Integer.toString(toolCardFourEvent.getPlayer())));\n\n\n return temp;\n }",
"public void setUseTool(ToolCardEvent event)\n {\n useTool = event;\n }",
"public ArrayList<String> encodeToolCardFiveEvent(ToolCardFiveEvent toolCardFiveEvent)\n {\n ArrayList<String> temp = new ArrayList<String>();\n\n temp.add(transformer.simpleEncode(\"id\",Integer.toString(toolCardFiveEvent.getId())));\n temp.add(transformer.simpleEncode(\"index\",Integer.toString(toolCardFiveEvent.getIndex())));\n temp.add(transformer.simpleEncode(\"roundtrackturn\",Integer.toString(toolCardFiveEvent.getTurn())));\n temp.add(transformer.simpleEncode(\"rounddicepos\",Integer.toString(toolCardFiveEvent.getPos())));\n temp.add(transformer.simpleEncode(\"x\", Integer.toString(toolCardFiveEvent.getX())));\n temp.add(transformer.simpleEncode(\"y\", Integer.toString(toolCardFiveEvent.getY())));\n temp.add(transformer.simpleEncode(\"player\",Integer.toString(toolCardFiveEvent.getPlayer())));\n\n return temp;\n }",
"String evel_json_encode_event()\r\n\t {\r\n\t\tEVEL_ENTER();\r\n\t\t\r\n\t\tassert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_THRESHOLD_CROSSING);\r\n\t \r\n\t JsonObject obj = Json.createObjectBuilder()\r\n\t \t .add(\"event\", Json.createObjectBuilder()\r\n\t\t \t .add( \"commonEventHeader\",eventHeaderObject() )\r\n\t\t \t .add( \"thresholdCrossingAlert\",evelThresholdCrossingObject() )\r\n\t\t \t ).build();\r\n\r\n\t EVEL_EXIT();\r\n\t \r\n\t return obj.toString();\r\n\r\n\t }",
"public ArrayList<String> encodeToolCardEightNineTenEvent(ToolCardEightNineTenEvent toolCardEightNineTenEvent)\n {\n ArrayList<String> temp = new ArrayList<String>();\n\n temp.add(transformer.simpleEncode(\"id\",Integer.toString(toolCardEightNineTenEvent.getId())));\n temp.add(transformer.simpleEncode(\"index\",Integer.toString(toolCardEightNineTenEvent.getIndex())));\n temp.add(transformer.simpleEncode(\"x\",Integer.toString(toolCardEightNineTenEvent.getX())));\n temp.add(transformer.simpleEncode(\"y\",Integer.toString(toolCardEightNineTenEvent.getY())));\n temp.add(transformer.simpleEncode(\"player\",Integer.toString(toolCardEightNineTenEvent.getPlayer())));\n\n\n return temp;\n\n }",
"public ArrayList<String> encodeToolCardElevenEvent(ToolCardElevenEvent toolCardElevenEvent)\n {\n ArrayList<String> temp = new ArrayList<String>();\n\n temp.add(transformer.simpleEncode(\"id\",Integer.toString(toolCardElevenEvent.getId())));\n temp.add(transformer.simpleEncode(\"index\",Integer.toString(toolCardElevenEvent.getIndex())));\n temp.add(transformer.simpleEncode(\"newvalue\",Integer.toString(toolCardElevenEvent.getNewValue())));\n temp.add(transformer.simpleEncode(\"newcolor\",Integer.toString(toolCardElevenEvent.getNewColor())));\n temp.add(transformer.simpleEncode(\"x\",Integer.toString(toolCardElevenEvent.getX())));\n temp.add(transformer.simpleEncode(\"y\",Integer.toString(toolCardElevenEvent.getY())));\n temp.add(transformer.simpleEncode(\"applyOne\", Boolean.toString(toolCardElevenEvent.isApplyOne())));\n temp.add(transformer.simpleEncode(\"applyTwo\", Boolean.toString(toolCardElevenEvent.isApplyTwo())));\n temp.add(transformer.simpleEncode(\"firstCheck\", Boolean.toString(toolCardElevenEvent.isFirstCheck())));\n temp.add(transformer.simpleEncode(\"player\",Integer.toString(toolCardElevenEvent.getPlayer())));\n\n return temp;\n\n }",
"public void showTool(PlayerClient[] players, DraftPoolMP draft, RoundTrackMP track, int[] tools, int activePlayer, int me, ToolCardEvent event) throws InvalidIntArgumentException, FileNotFoundException {\n printOut(cliToolsManager.sceneInitializer(width));\n printOut(printerMaker.getGameScene(players, draft, track, privateObjective, pubObjs, tools, activePlayer, me));\n\n switch (event.getId()) {\n\n case 1: {\n ToolCardOneEvent currentEvent = (ToolCardOneEvent)event;\n printOut(cliToolsManager.simpleQuestionsMaker(\"Il giocatore \" + players[activePlayer].getName() + \" ha usato la carta strumento \" + currentEvent.getId(),40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha preso il dado in posizione \" + (currentEvent.getIndex()+1) + \" della draft\\n\",40,false));\n\n if(currentEvent.getAction() == '+')\n printOut(cliToolsManager.simpleQuestionsMaker(\"L'ha aumentato di valore e piazzato in posizione \" + (currentEvent.getX()+1) + \",\" + (currentEvent.getY()+1) + \" dello schema\\n\\n\",40,false));\n else\n printOut(cliToolsManager.simpleQuestionsMaker(\"L'ha diminuito di valore e piazzato in posizione \" + (currentEvent.getX()+1) + \",\" + (currentEvent.getY()+1) + \" dello schema\\n\\n\",40,false));\n\n break;\n }\n\n case 2: {\n ToolCardTwoThreeEvent currentEvent = (ToolCardTwoThreeEvent)event;\n printOut(cliToolsManager.simpleQuestionsMaker(\"Il giocatore \" + players[activePlayer].getName() + \" ha usato la carta strumento \" + currentEvent.getId(),40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha preso il dado in posizione \" + (currentEvent.getX0()+1) + \" , \" + (currentEvent.getY0()+1) + \" dello schema\\n\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"e l'ha spostato in posizione \" + (currentEvent.getX1()+1) + \",\" + (currentEvent.getY1()+1) + \"\\n\\n\",40,true));\n break;\n }\n\n case 3: {\n ToolCardTwoThreeEvent currentEvent = (ToolCardTwoThreeEvent)event;\n printOut(cliToolsManager.simpleQuestionsMaker(\"Il giocatore \" + players[activePlayer].getName() + \" ha usato la carta strumento \" + currentEvent.getId(),40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha preso il dado in posizione \" + (currentEvent.getX0()+1) + \",\" + (currentEvent.getY0()+1) + \" dello schema\\n\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"e l'ha spostato in posizione \" + (currentEvent.getX1()+1) + \",\" + (currentEvent.getY1()+1) + \"\\n\\n\",40,true));\n break;\n }\n\n case 4: {\n ToolCardFourEvent currentEvent = (ToolCardFourEvent)event;\n printOut(cliToolsManager.simpleQuestionsMaker(\"Il giocatore \" + players[activePlayer].getName() + \" ha usato la carta strumento \" + currentEvent.getId(),40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha preso i dadi in posizione \" + (currentEvent.getX01()+1) + \",\" + (currentEvent.getY01()+1) + \" e \" + (currentEvent.getX02()+1) + \",\" + (currentEvent.getY02()+1) + \"\\n\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"e li ha spostati in posizione \" + (currentEvent.getX11()+1) + \",\" + (currentEvent.getY11()+1) + \" e \" + (currentEvent.getX22()+1) + \",\" + (currentEvent.getY22()+1) + \"\\n\\n\",40,true));\n break;\n }\n\n case 5: {\n ToolCardFiveEvent currentEvent = (ToolCardFiveEvent)event;\n printOut(cliToolsManager.simpleQuestionsMaker(\"Il giocatore \" + players[activePlayer].getName() + \" ha usato la carta strumento \" + currentEvent.getId(),40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha preso il dado in posizione \" + (currentEvent.getIndex()+1) + \" della draft\\n\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"e l'ha scambiato con il dado nel turno \" + (currentEvent.getTurn()+1) + \" della roundtrack, in posizione \" + (currentEvent.getPos()+1),40,false));\n break;\n }\n\n case 6: {\n ToolCardSixEvent currentEvent = (ToolCardSixEvent)event;\n printOut(cliToolsManager.simpleQuestionsMaker(\"Il giocatore \" + players[activePlayer].getName() + \" ha usato la carta strumento \" + currentEvent.getId(),40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha scelto il dado in posizione \" + (currentEvent.getIndex()+1) + \" della draft e l'ha ritirato, nuovo valore \" + currentEvent.getNewValue() + \"\\n\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"e l'ha piazzato in posizione \" + (currentEvent.getX()+1) + \",\" + (currentEvent.getY()+1) + \" dello schema\",40,true));\n break;\n }\n\n case 7: {\n ToolCardSevenEvent currentEvent = (ToolCardSevenEvent)event;\n printOut(cliToolsManager.simpleQuestionsMaker(\"Il giocatore \" + players[activePlayer].getName() + \" ha usato la carta strumento \" + currentEvent.getId(),40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha ritirato tutti i dadi della draft\\n\\n\",40,false));\n break;\n\n }\n\n case 8: {\n ToolCardEightNineTenEvent currentEvent = (ToolCardEightNineTenEvent)event;\n printOut(cliToolsManager.simpleQuestionsMaker(\"Il giocatore \" + players[activePlayer].getName() + \" ha usato la carta strumento \" + currentEvent.getId(),40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha preso un altro dado dalla draft, in posizione \" + (currentEvent.getIndex()+1) + \"\\n\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"e l'ha piazzato in posizione \" + (currentEvent.getX()+1) + \" , \" + (currentEvent.getY()+1) + \" dello schema\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" salterà il suo secondo turno in questo round\\n\\n\",40,false));\n break;\n }\n\n case 9: {\n ToolCardEightNineTenEvent currentEvent = (ToolCardEightNineTenEvent)event;\n printOut(cliToolsManager.simpleQuestionsMaker(\"Il giocatore \" + players[activePlayer].getName() + \" ha usato la carta strumento \" + currentEvent.getId(),40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha preso il dado in posizione \" + (currentEvent.getIndex()+1) + \" della draft\\n\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"e l'ha piazzato in posizione \" + (currentEvent.getX()+1) + \" , \" + (currentEvent.getY()+1) + \" dello schema\",40,false));\n break;\n }\n\n case 10: {\n ToolCardEightNineTenEvent currentEvent = (ToolCardEightNineTenEvent)event;\n printOut(cliToolsManager.simpleQuestionsMaker(\"Il giocatore \" + players[activePlayer].getName() + \" ha usato la carta strumento \" + currentEvent.getId(),40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha preso il dado in posizione \" + (currentEvent.getIndex()+1) + \" della draft , l'ha girato sulla faccia opposta\\n\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"e l'ha piazzato in posizione \" + (currentEvent.getX()+1) + \" , \" + (currentEvent.getY()+1) + \" dello schema\\n\\n\",40,false));\n break;\n }\n\n case 11: {\n ToolCardElevenEvent currentEvent = (ToolCardElevenEvent)event;\n printOut(cliToolsManager.simpleQuestionsMaker(\"Il giocatore \" + players[activePlayer].getName() + \" ha usato la carta strumento \" + currentEvent.getId(),40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha preso il dado in posizione \" + (currentEvent.getIndex()+1) + \" della draft e l'ha rimesso nel sacchetto\\n\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"ha pescato un nuovo dado di colore \" + cliToolsManager.getColor(currentEvent.getNewColor()) + \" , ha scelto il valore \" + currentEvent.getNewValue() + \"\\n\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"e l'ha piazzato in posizione \" + (currentEvent.getX()+1) + \" , \" + (currentEvent.getY()+1) + \" dello schema\" + \"\\n\\n\",40,false));\n break;\n }\n\n case 12: {\n ToolCardTwelveEvent currentEvent = (ToolCardTwelveEvent)event;\n printOut(cliToolsManager.simpleQuestionsMaker(\"Il giocatore \" + players[activePlayer].getName() + \" ha usato la carta strumento \" + currentEvent.getId(),40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha scelto il colore del dado nel turno \" + (currentEvent.getTurn()+1) + \" roundtrack, in posizione \" + (currentEvent.getPos()+1) + \"\\n\",40,false));\n\n if(currentEvent.isOnlyOne()) {\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha deciso di spostare un solo dado\\n\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"ha preso il dado in posizione \" + (currentEvent.getX01()+1) + \",\" + (currentEvent.getY01()+1) + \" dello schema\\n\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"e l'ha spostato in posizione \" + (currentEvent.getX11()+1) + \",\" + (currentEvent.getY11()+1) + \"\\n\\n\",40,true));\n }\n\n else {\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha deciso di spostare un due dadi\\n\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"ha preso i dadi in posizione \" + (currentEvent.getX01()+1) + \",\" + (currentEvent.getY01()+1) + \" e \" + (currentEvent.getX02()+1) + \",\" + (currentEvent.getY02()+1) + \"\\n\", 40, false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"e li ha spostati in posizione \" + (currentEvent.getX11()+1) + \",\" + (currentEvent.getY11()+1) + \" e \" + (currentEvent.getX22()+1) + \",\" + (currentEvent.getY22()+1) + \"\\n\\n\", 40, true));\n }\n break;\n }\n\n\n\n }\n\n\n }",
"public ArrayList<String> encodeToolCardTwoThreeEvent(ToolCardTwoThreeEvent toolCardTwoThreeEvent)\n {\n ArrayList<String> temp = new ArrayList<String>();\n\n temp.add(transformer.simpleEncode(\"id\",Integer.toString(toolCardTwoThreeEvent.getId())));\n temp.add(transformer.simpleEncode(\"x0\",Integer.toString(toolCardTwoThreeEvent.getX0())));\n temp.add(transformer.simpleEncode(\"y0\",Integer.toString(toolCardTwoThreeEvent.getY0())));\n temp.add(transformer.simpleEncode(\"x1\",Integer.toString(toolCardTwoThreeEvent.getX1())));\n temp.add(transformer.simpleEncode(\"y1\",Integer.toString(toolCardTwoThreeEvent.getY1())));\n temp.add(transformer.simpleEncode(\"player\",Integer.toString(toolCardTwoThreeEvent.getPlayer())));\n\n\n return temp;\n }",
"public ArrayList<String> encodeToolCardSevenEvent(ToolCardSevenEvent toolCardSevenEvent)\n {\n ArrayList<String> temp = new ArrayList<String>();\n\n temp.add(transformer.simpleEncode(\"id\",Integer.toString(toolCardSevenEvent.getId())));\n if(toolCardSevenEvent.isValidated()) {\n String[] tempVector = encoder.arrayListEncoder(toolCardSevenEvent.getDice());\n for (int i = 0; i < tempVector.length; i++)\n temp.add(tempVector[i]);\n temp.add(transformer.simpleEncode(\"draft\", \"end\"));\n }\n temp.add(transformer.simpleEncode(\"player\",Integer.toString(toolCardSevenEvent.getPlayer())));\n\n return temp;\n }",
"public void eventCardPlayed(Player player, Card card);",
"public ArrayList<String> encodeToolCardSixEvent(ToolCardSixEvent toolCardSixEvent)\n {\n ArrayList<String> temp = new ArrayList<String>();\n\n temp.add(transformer.simpleEncode(\"id\",Integer.toString(toolCardSixEvent.getId())));\n temp.add(transformer.simpleEncode(\"index\",Integer.toString(toolCardSixEvent.getIndex())));\n temp.add(transformer.simpleEncode(\"newValue\", Integer.toString(toolCardSixEvent.getNewValue())));\n temp.add(transformer.simpleEncode(\"x\",Integer.toString(toolCardSixEvent.getX())));\n temp.add(transformer.simpleEncode(\"y\",Integer.toString(toolCardSixEvent.getY())));\n temp.add(transformer.simpleEncode(\"booleanapplyone\",Boolean.toString(toolCardSixEvent.isApplyOne())));\n temp.add(transformer.simpleEncode(\"booleanapplytwo\",Boolean.toString(toolCardSixEvent.isApplyTwo())));\n temp.add(transformer.simpleEncode(\"player\",Integer.toString(toolCardSixEvent.getPlayer())));\n\n return temp;\n }",
"String getEvent();",
"java.lang.String getEvent();",
"public byte[] encode(byte command,byte action) {\r\n byte[] encoded = new byte[82];\r\n for (int i = 0; i < 82; ++i) {\r\n encoded[i] =(byte) 0;\r\n }\r\n encoded[0] = (byte)0xaa; //signature\r\n encoded[1] = (byte)0xaa; //signature 2nd byte\r\n encoded[2] = (byte)1; //index\r\n encoded[4] = (byte)command; //command\r\n encoded[6] = (byte)action; //action \r\n encoded[8] = (byte)this.rtAddress; //rt address\r\n encoded[10]= (byte)this.txRx; //txrx\r\n encoded[12]= (byte)this.subAddress;//subaddress\r\n encoded[14]= (byte)this.data.length;//count\r\n for (int i = 0, j = 0; i < this.data.length; i++,j+=2) {\r\n encoded[18+j] =(byte) this.data[i];\r\n encoded[19+j] =(byte) (this.data[i] >> 8);\r\n }\r\n return encoded;\r\n }",
"@Override\n\tpublic String[] getConsumedToolEventNames() {\n\t\treturn new String[] { \"DummyToolEvent\" };\n\t}",
"ICommandObject playEventCard(int playerID, String card);",
"public void ResultVoiceCoincidence(EventVoice event);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use this API to unset the properties of policyexpression resources. Properties that need to be unset are specified in args array. | public static base_responses unset(nitro_service client, String name[], String args[]) throws Exception {
base_responses result = null;
if (name != null && name.length > 0) {
policyexpression unsetresources[] = new policyexpression[name.length];
for (int i=0;i<name.length;i++){
unsetresources[i] = new policyexpression();
unsetresources[i].name = name[i];
}
result = unset_bulk_request(client, unsetresources,args);
}
return result;
} | [
"public static base_responses unset(nitro_service client, policyexpression resources[], String[] args) throws Exception {\n\t\tbase_responses result = null;\n\t\tif (resources != null && resources.length > 0) {\n\t\t\tpolicyexpression unsetresources[] = new policyexpression[resources.length];\n\t\t\tfor (int i=0;i<resources.length;i++){\n\t\t\t\tunsetresources[i] = new policyexpression();\n\t\t\t\tunsetresources[i].name = resources[i].name;\n\t\t\t}\n\t\t\tresult = unset_bulk_request(client, unsetresources,args);\n\t\t}\n\t\treturn result;\n\t}",
"public static base_response unset(nitro_service client, policyexpression resource, String[] args) throws Exception{\n\t\tpolicyexpression unsetresource = new policyexpression();\n\t\tunsetresource.name = resource.name;\n\t\treturn unsetresource.unset_resource(client,args);\n\t}",
"public static base_responses unset(nitro_service client, responderpolicy resources[], String[] args) throws Exception {\n\t\tbase_responses result = null;\n\t\tif (resources != null && resources.length > 0) {\n\t\t\tresponderpolicy unsetresources[] = new responderpolicy[resources.length];\n\t\t\tfor (int i=0;i<resources.length;i++){\n\t\t\t\tunsetresources[i] = new responderpolicy();\n\t\t\t\tunsetresources[i].name = resources[i].name;\n\t\t\t}\n\t\t\tresult = unset_bulk_request(client, unsetresources,args);\n\t\t}\n\t\treturn result;\n\t}",
"public static base_responses delete(nitro_service client, policyexpression resources[]) throws Exception {\n\t\tbase_responses result = null;\n\t\tif (resources != null && resources.length > 0) {\n\t\t\tpolicyexpression deleteresources[] = new policyexpression[resources.length];\n\t\t\tfor (int i=0;i<resources.length;i++){\n\t\t\t\tdeleteresources[i] = new policyexpression();\n\t\t\t\tdeleteresources[i].name = resources[i].name;\n\t\t\t}\n\t\t\tresult = delete_bulk_request(client, deleteresources);\n\t\t}\n\t\treturn result;\n\t}",
"public static base_responses unset(nitro_service client, String name[], String args[]) throws Exception {\n\t\tbase_responses result = null;\n\t\tif (name != null && name.length > 0) {\n\t\t\tresponderpolicy unsetresources[] = new responderpolicy[name.length];\n\t\t\tfor (int i=0;i<name.length;i++){\n\t\t\t\tunsetresources[i] = new responderpolicy();\n\t\t\t\tunsetresources[i].name = name[i];\n\t\t\t}\n\t\t\tresult = unset_bulk_request(client, unsetresources,args);\n\t\t}\n\t\treturn result;\n\t}",
"public static policyexpression[] get(nitro_service service, policyexpression_args args) throws Exception{\n\t\tpolicyexpression obj = new policyexpression();\n\t\toptions option = new options();\n\t\toption.set_args(nitro_util.object_to_string_withoutquotes(args));\n\t\tpolicyexpression[] response = (policyexpression[])obj.get_resources(service, option);\n\t\treturn response;\n\t}",
"public static base_responses delete(nitro_service client, String name[]) throws Exception {\n\t\tbase_responses result = null;\n\t\tif (name != null && name.length > 0) {\n\t\t\tpolicyexpression deleteresources[] = new policyexpression[name.length];\n\t\t\tfor (int i=0;i<name.length;i++){\n\t\t\t\tdeleteresources[i] = new policyexpression();\n\t\t\t\tdeleteresources[i].name = name[i];\n\t\t\t}\n\t\t\tresult = delete_bulk_request(client, deleteresources);\n\t\t}\n\t\treturn result;\n\t}",
"public static base_responses update(nitro_service client, policyexpression resources[]) throws Exception {\n\t\tbase_responses result = null;\n\t\tif (resources != null && resources.length > 0) {\n\t\t\tpolicyexpression updateresources[] = new policyexpression[resources.length];\n\t\t\tfor (int i=0;i<resources.length;i++){\n\t\t\t\tupdateresources[i] = new policyexpression();\n\t\t\t\tupdateresources[i].name = resources[i].name;\n\t\t\t\tupdateresources[i].value = resources[i].value;\n\t\t\t\tupdateresources[i].description = resources[i].description;\n\t\t\t\tupdateresources[i].comment = resources[i].comment;\n\t\t\t\tupdateresources[i].clientsecuritymessage = resources[i].clientsecuritymessage;\n\t\t\t}\n\t\t\tresult = update_bulk_request(client, updateresources);\n\t\t}\n\t\treturn result;\n\t}",
"public static base_responses unset(nitro_service client, filterhtmlinjectionvariable resources[], String[] args) throws Exception {\n\t\tbase_responses result = null;\n\t\tif (resources != null && resources.length > 0) {\n\t\t\tfilterhtmlinjectionvariable unsetresources[] = new filterhtmlinjectionvariable[resources.length];\n\t\t\tfor (int i=0;i<resources.length;i++){\n\t\t\t\tunsetresources[i] = new filterhtmlinjectionvariable();\n\t\t\t\tunsetresources[i].variable = resources[i].variable;\n\t\t\t}\n\t\t\tresult = unset_bulk_request(client, unsetresources,args);\n\t\t}\n\t\treturn result;\n\t}",
"public static base_response unset(nitro_service client, responderpolicy resource, String[] args) throws Exception{\n\t\tresponderpolicy unsetresource = new responderpolicy();\n\t\tunsetresource.name = resource.name;\n\t\treturn unsetresource.unset_resource(client,args);\n\t}",
"public static base_responses unset(nitro_service client, nstimer resources[], String[] args) throws Exception {\n\t\tbase_responses result = null;\n\t\tif (resources != null && resources.length > 0) {\n\t\t\tnstimer unsetresources[] = new nstimer[resources.length];\n\t\t\tfor (int i=0;i<resources.length;i++){\n\t\t\t\tunsetresources[i] = new nstimer();\n\t\t\t\tunsetresources[i].name = resources[i].name;\n\t\t\t\tunsetresources[i].interval = resources[i].interval;\n\t\t\t\tunsetresources[i].unit = resources[i].unit;\n\t\t\t\tunsetresources[i].comment = resources[i].comment;\n\t\t\t}\n\t\t\tresult = unset_bulk_request(client, unsetresources,args);\n\t\t}\n\t\treturn result;\n\t}",
"public static base_responses unset(nitro_service client, dnssrvrec resources[], String[] args) throws Exception {\n\t\tbase_responses result = null;\n\t\tif (resources != null && resources.length > 0) {\n\t\t\tdnssrvrec unsetresources[] = new dnssrvrec[resources.length];\n\t\t\tfor (int i=0;i<resources.length;i++){\n\t\t\t\tunsetresources[i] = new dnssrvrec();\n\t\t\t\tunsetresources[i].domain = resources[i].domain;\n\t\t\t\tunsetresources[i].target = resources[i].target;\n\t\t\t}\n\t\t\tresult = unset_bulk_request(client, unsetresources,args);\n\t\t}\n\t\treturn result;\n\t}",
"public static base_responses unset(nitro_service client, String variable[], String args[]) throws Exception {\n\t\tbase_responses result = null;\n\t\tif (variable != null && variable.length > 0) {\n\t\t\tfilterhtmlinjectionvariable unsetresources[] = new filterhtmlinjectionvariable[variable.length];\n\t\t\tfor (int i=0;i<variable.length;i++){\n\t\t\t\tunsetresources[i] = new filterhtmlinjectionvariable();\n\t\t\t\tunsetresources[i].variable = variable[i];\n\t\t\t}\n\t\t\tresult = unset_bulk_request(client, unsetresources,args);\n\t\t}\n\t\treturn result;\n\t}",
"public static policyexpression[] get(nitro_service service) throws Exception{\n\t\tpolicyexpression obj = new policyexpression();\n\t\tpolicyexpression[] response = (policyexpression[])obj.get_resources(service);\n\t\treturn response;\n\t}",
"public static base_responses unset(nitro_service client, appfwconfidfield resources[], String[] args) throws Exception {\n\t\tbase_responses result = null;\n\t\tif (resources != null && resources.length > 0) {\n\t\t\tappfwconfidfield unsetresources[] = new appfwconfidfield[resources.length];\n\t\t\tfor (int i=0;i<resources.length;i++){\n\t\t\t\tunsetresources[i] = new appfwconfidfield();\n\t\t\t\tunsetresources[i].fieldname = resources[i].fieldname;\n\t\t\t\tunsetresources[i].url = resources[i].url;\n\t\t\t}\n\t\t\tresult = unset_bulk_request(client, unsetresources,args);\n\t\t}\n\t\treturn result;\n\t}",
"public static base_response delete(nitro_service client, policyexpression resource) throws Exception {\n\t\tpolicyexpression deleteresource = new policyexpression();\n\t\tdeleteresource.name = resource.name;\n\t\treturn deleteresource.delete_resource(client);\n\t}",
"public static base_responses unset(nitro_service client, String name[], String args[]) throws Exception {\n\t\tbase_responses result = null;\n\t\tif (name != null && name.length > 0) {\n\t\t\tnstimer unsetresources[] = new nstimer[name.length];\n\t\t\tfor (int i=0;i<name.length;i++){\n\t\t\t\tunsetresources[i] = new nstimer();\n\t\t\t\tunsetresources[i].name = name[i];\n\t\t\t}\n\t\t\tresult = unset_bulk_request(client, unsetresources,args);\n\t\t}\n\t\treturn result;\n\t}",
"private void removePolicy(){\n\texcludedPermissions = null;\n\tuncheckedPermissions = null;\n\trolePermissionsTable = null;\n\tremovePolicyFile(true);\n\tremovePolicyFile(false);\n\tremovePolicyContextDirectory();\n\tinitLinkTable();\n\tpolicy = null;\n\twriteOnCommit = true;\n }",
"public void unsetWebPr()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(WEBPR$2, 0);\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Original signature : void OpenMM_AmoebaGeneralizedKirkwoodForce_getParticleParameters(const OpenMM_AmoebaGeneralizedKirkwoodForce, int, double, double, double) | public static native void OpenMM_AmoebaGeneralizedKirkwoodForce_getParticleParameters(PointerByReference target, int index, DoubleBuffer charge, DoubleBuffer radius, DoubleBuffer scalingFactor); | [
"public static native void OpenMM_AmoebaGeneralizedKirkwoodForce_getParticleParameters(PointerByReference target, int index, DoubleByReference charge, DoubleByReference radius, DoubleByReference scalingFactor);",
"public static native void OpenMM_AmoebaVdwForce_getParticleParameters(PointerByReference target, int particleIndex, IntByReference parentIndex, DoubleByReference sigma, DoubleByReference epsilon, DoubleByReference reductionFactor, IntByReference isAlchemical);",
"public static native void OpenMM_AmoebaVdwForce_getParticleParameters(PointerByReference target, int particleIndex, IntBuffer parentIndex, DoubleBuffer sigma, DoubleBuffer epsilon, DoubleBuffer reductionFactor, IntBuffer isAlchemical);",
"public static native void OpenMM_AmoebaWcaDispersionForce_getParticleParameters(PointerByReference target, int particleIndex, DoubleByReference radius, DoubleByReference epsilon);",
"public static native void OpenMM_AmoebaWcaDispersionForce_getParticleParameters(PointerByReference target, int particleIndex, DoubleBuffer radius, DoubleBuffer epsilon);",
"public static native void OpenMM_AmoebaGeneralizedKirkwoodForce_setParticleParameters(PointerByReference target, int index, double charge, double radius, double scalingFactor);",
"public static native void OpenMM_HippoNonbondedForce_getParticleParameters(PointerByReference target, int index, DoubleByReference charge, PointerByReference dipole, PointerByReference quadrupole, DoubleByReference coreCharge, DoubleByReference alpha, DoubleByReference epsilon, DoubleByReference damping, DoubleByReference c6, DoubleByReference pauliK, DoubleByReference pauliQ, DoubleByReference pauliAlpha, DoubleByReference polarizability, IntByReference axisType, IntByReference multipoleAtomZ, IntByReference multipoleAtomX, IntByReference multipoleAtomY);",
"public static native void OpenMM_HippoNonbondedForce_getParticleParameters(PointerByReference target, int index, DoubleBuffer charge, PointerByReference dipole, PointerByReference quadrupole, DoubleBuffer coreCharge, DoubleBuffer alpha, DoubleBuffer epsilon, DoubleBuffer damping, DoubleBuffer c6, DoubleBuffer pauliK, DoubleBuffer pauliQ, DoubleBuffer pauliAlpha, DoubleBuffer polarizability, IntBuffer axisType, IntBuffer multipoleAtomZ, IntBuffer multipoleAtomX, IntBuffer multipoleAtomY);",
"public static native void OpenMM_AmoebaPiTorsionForce_getPiTorsionParameters(PointerByReference target, int index, IntByReference particle1, IntByReference particle2, IntByReference particle3, IntByReference particle4, IntByReference particle5, IntByReference particle6, DoubleByReference k);",
"public static native void OpenMM_AmoebaPiTorsionForce_getPiTorsionParameters(PointerByReference target, int index, IntBuffer particle1, IntBuffer particle2, IntBuffer particle3, IntBuffer particle4, IntBuffer particle5, IntBuffer particle6, DoubleBuffer k);",
"public static native void OpenMM_AmoebaVdwForce_setParticleParameters(PointerByReference target, int particleIndex, int parentIndex, double sigma, double epsilon, double reductionFactor, int isAlchemical);",
"public static native void OpenMM_AmoebaMultipoleForce_getPMEParameters(PointerByReference target, DoubleByReference alpha, IntByReference nx, IntByReference ny, IntByReference nz);",
"public static native void OpenMM_AmoebaOutOfPlaneBendForce_getOutOfPlaneBendParameters(PointerByReference target, int index, IntByReference particle1, IntByReference particle2, IntByReference particle3, IntByReference particle4, DoubleByReference k);",
"public static native void OpenMM_HippoNonbondedForce_getPMEParameters(PointerByReference target, DoubleByReference alpha, IntByReference nx, IntByReference ny, IntByReference nz);",
"public static native void OpenMM_AmoebaMultipoleForce_getPMEParameters(PointerByReference target, DoubleBuffer alpha, IntBuffer nx, IntBuffer ny, IntBuffer nz);",
"public static native void OpenMM_AmoebaInPlaneAngleForce_getAngleParameters(PointerByReference target, int index, IntByReference particle1, IntByReference particle2, IntByReference particle3, IntByReference particle4, DoubleByReference length, DoubleByReference quadraticK);",
"public static native void OpenMM_AmoebaAngleForce_getAngleParameters(PointerByReference target, int index, IntByReference particle1, IntByReference particle2, IntByReference particle3, DoubleByReference length, DoubleByReference quadraticK);",
"public static native void OpenMM_AmoebaBondForce_getBondParameters(PointerByReference target, int index, IntByReference particle1, IntByReference particle2, DoubleByReference length, DoubleByReference quadraticK);",
"public static native void OpenMM_AmoebaStretchBendForce_getStretchBendParameters(PointerByReference target, int index, IntByReference particle1, IntByReference particle2, IntByReference particle3, DoubleByReference lengthAB, DoubleByReference lengthCB, DoubleByReference angle, DoubleByReference k1, DoubleByReference k2);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the number of working units associated with the job pos. | @Override
public int getWorkingUnitsSize(long pk) throws SystemException {
long[] pks = jobPosToWorkingUnitTableMapper.getRightPrimaryKeys(pk);
return pks.length;
} | [
"public static int getWorkingUnitsCount()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getService().getWorkingUnitsCount();\n\t}",
"long getConsumedWorkUnits();",
"public int getNumberOfUnits() {\n return (numberOfUnits);\n }",
"public int getNbOfUnits(){\r\n\t\treturn this.NbOfUnits;\r\n\t}",
"public int getNbUnits() {\n\t\treturn units.size();\n\t}",
"public Integer getWorkSize(){\r\n\t\treturn work.size();\t\t\r\n\t}",
"public int getNumJobs() {\n return numJobs;\n }",
"public long getIndexTotalUnits()\n {\n // import Component.Util.Daemon.QueueProcessor.Service.Grid.PartitionedService.PartitionedCache$Storage as Storage;\n // import com.tangosol.util.Base;\n // import com.tangosol.util.MapIndex;\n // import com.tangosol.util.SimpleMapIndex;\n // import java.util.ConcurrentModificationException;\n // import java.util.Iterator;\n // import java.util.Map;\n \n long cUnits = 0L;\n Storage storage = get_Storage();\n Map mapIndex = storage == null ? null : storage.getIndexMap();\n\n if (mapIndex != null && !mapIndex.isEmpty())\n { \n for (int cAttempts = 4; cAttempts > 0; --cAttempts)\n {\n try\n {\n for (Iterator iter = mapIndex.values().iterator(); iter.hasNext();)\n {\n MapIndex index = (MapIndex) iter.next();\n\n if (index != null)\n {\n cUnits += index.getUnits();\n }\n }\n break;\n }\n catch (ConcurrentModificationException e)\n {\n cUnits = 0;\n }\n }\n }\n \n return cUnits;\n }",
"public NM getNumberOfItemsPerUnit() { \r\n\t\tNM retVal = this.getTypedField(14, 0);\r\n\t\treturn retVal;\r\n }",
"public Integer jobCount() {\n return this.jobCount;\n }",
"private int getNumberOfMachineUnits() {\r\n\t\tint machineUnitsCount = 0;\r\n\r\n\t\tfor (UnitType unitType : RepairableUnitTypes) {\r\n\t\t\tmachineUnitsCount += this.informationStorage.getCurrentGameInformation().getCurrentUnitCounts()\r\n\t\t\t\t\t.getOrDefault(unitType, 0);\r\n\t\t}\r\n\t\treturn machineUnitsCount;\r\n\t}",
"public Integer getUsedSlots(Job job){\r\n \t\treturn usedSlots.get(job);\r\n \t}",
"private int jobLength(){\n LocalDate completedLocalDate = LocalDate.of(this.dateCompleted.getYear(), \n this.dateCompleted.getMonth(), this.dateCompleted.getDay());\n \n LocalDate startedLocalDate = LocalDate.of(this.dateStarted.getYear(), \n this.dateStarted.getMonth(), this.dateStarted.getDay());\n \n return startedLocalDate.until(completedLocalDate).getDays();\n }",
"public long getTotalStockPieceQty()\n\t{\n\t\treturn wTotalStockPieceQty;\n\t}",
"public Integer jobCountOfTheDay();",
"public int getNumCompilationUnits()\n {\n return fCompilationUnits.size();\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getWorkitemsProcessed() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(WORKITEMSPROCESSED_PROP.get());\n }",
"public int numWorkedForJob(String jobName) {\n\t\treturn this.timesWorked.get(jobName);\n\t}",
"long getCumulativeJobInstancesCount();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new PdfData RecordBuilder by copying an existing Builder. | public static com.bdcor.util.temp2pdf.proto.PdfData.Builder newBuilder(com.bdcor.util.temp2pdf.proto.PdfData.Builder other) {
return new com.bdcor.util.temp2pdf.proto.PdfData.Builder(other);
} | [
"private Builder(com.bdcor.util.temp2pdf.proto.PdfData other) {\n super(SCHEMA$);\n if (isValidValue(fields()[0], other.pdfData)) {\n this.pdfData = data().deepCopy(fields()[0].schema(), other.pdfData);\n fieldSetFlags()[0] = true;\n }\n }",
"public static iodine.avro.TapRecord.Builder newBuilder(iodine.avro.TapRecord.Builder other) {\n return new iodine.avro.TapRecord.Builder(other);\n }",
"public static com.bdcor.util.temp2pdf.proto.PdfData.Builder newBuilder(com.bdcor.util.temp2pdf.proto.PdfData other) {\n return new com.bdcor.util.temp2pdf.proto.PdfData.Builder(other);\n }",
"public static com.bdcor.util.temp2pdf.proto.PdfData.Builder newBuilder() {\n return new com.bdcor.util.temp2pdf.proto.PdfData.Builder();\n }",
"public static com.babylon.avro.Data.Builder newBuilder(com.babylon.avro.Data.Builder other) {\n return new com.babylon.avro.Data.Builder(other);\n }",
"public static iodine.avro.TapRecord.Builder newBuilder(iodine.avro.TapRecord other) {\n return new iodine.avro.TapRecord.Builder(other);\n }",
"public static Builder createBuilder(Header header, WritableFontData data) {\n return new Builder(header, data);\n }",
"private DataObject(Builder builder) {\n super(builder);\n }",
"public static com.cdo.avro.AvroCDO.Builder newBuilder(com.cdo.avro.AvroCDO.Builder other) {\n return new com.cdo.avro.AvroCDO.Builder(other);\n }",
"public static avro.Item.Builder newBuilder(avro.Item.Builder other) {\n return new avro.Item.Builder(other);\n }",
"public static org.bdgenomics.formats.avro.RecordGroupMetadata.Builder newBuilder(org.bdgenomics.formats.avro.RecordGroupMetadata.Builder other) {\n return new org.bdgenomics.formats.avro.RecordGroupMetadata.Builder(other);\n }",
"public static com.politrons.avro.AvroPerson.Builder newBuilder(com.politrons.avro.AvroPerson.Builder other) {\n return new com.politrons.avro.AvroPerson.Builder(other);\n }",
"public static DataModelBuilder create() {\n return new DataModelBuilder();\n }",
"public static com.babylon.avro.Data.Builder newBuilder(com.babylon.avro.Data other) {\n return new com.babylon.avro.Data.Builder(other);\n }",
"public static com.nex3z.examples.kafka.data.CounterRecord.Builder newBuilder(com.nex3z.examples.kafka.data.CounterRecord.Builder other) {\n return new com.nex3z.examples.kafka.data.CounterRecord.Builder(other);\n }",
"private Builder(com.cdo.avro.AvroCDO other) {\n super(SCHEMA$);\n if (isValidValue(fields()[0], other.callId)) {\n this.callId = data().deepCopy(fields()[0].schema(), other.callId);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.fields)) {\n this.fields = data().deepCopy(fields()[1].schema(), other.fields);\n fieldSetFlags()[1] = true;\n }\n }",
"public static Builder builder() {\n return new Report.Builder();\n }",
"public static com.demo.Demo.Builder newBuilder(com.demo.Demo.Builder other) {\n return new com.demo.Demo.Builder(other);\n }",
"private LibraryDirtyData(Builder builder) {\n super(builder);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Decodes string x1, y1, r, g, b[, alpha], x2, y2, r, g, b[, alpha] into a Gradient object | Gradient decodeGradient(String p) {
StringTokenizer st = new StringTokenizer(p, ",");
int cnt = st.countTokens();
if (cnt < 10) {
return null;
}
int[] d = new int[cnt];
int tokens = 0;
while (st.hasMoreTokens()) {
d[tokens] = Integer.parseInt(st.nextToken().trim());
tokens++;
}
return new Gradient(d);
} | [
"Gradient gradientAt(Point point);",
"public static PointState decode(String value) throws Exception {\n if(value.length() == 3) {\n String color = value.substring(0, 1);\n int quantity = Integer.parseInt(value.substring(1, 3));\n return valueOf(Color.decode(color), quantity);\n } else {\n throw new IllegalArgumentException(\"invalid point state encoding: \" + value);\n }\n }",
"public void setGradientPos2Str(String s)\r\n\t{\r\n\t\tthis.gradientPos2 = gradientPosConverter.str2IntValue(s);\r\n\t}",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:34:26.524 -0500\", hash_original_method = \"138E7D6C6B15213658AC13EABF129E3A\", hash_generated_method = \"A9BFE4F88C6D703CA9290EE77B65E0C4\")\n \npublic LinearGradient(float x0, float y0, float x1, float y1,\n int color0, int color1, TileMode tile) {\n native_instance = nativeCreate2(x0, y0, x1, y1, color0, color1, tile.nativeInt);\n native_shader = nativePostCreate2(native_instance, x0, y0, x1, y1, color0, color1,\n tile.nativeInt);\n }",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:34:26.522 -0500\", hash_original_method = \"E21158B8192A6A62E47E5DB23E5C8298\", hash_generated_method = \"C0B1919E289E1D1CD148CF74042E6B33\")\n \npublic LinearGradient(float x0, float y0, float x1, float y1,\n int colors[], float positions[], TileMode tile) {\n if (colors.length < 2) {\n throw new IllegalArgumentException(\"needs >= 2 number of colors\");\n }\n if (positions != null && colors.length != positions.length) {\n throw new IllegalArgumentException(\"color and position arrays must be of equal length\");\n }\n native_instance = nativeCreate1(x0, y0, x1, y1, colors, positions, tile.nativeInt);\n native_shader = nativePostCreate1(native_instance, x0, y0, x1, y1, colors, positions,\n tile.nativeInt);\n }",
"JQGradientsLinearFeature getGradientFeature();",
"int[] getGradient();",
"public void setGradientPos1Str(String s)\r\n\t{\r\n\t\tthis.gradientPos1 = gradientPosConverter.str2IntValue(s);\r\n\t}",
"public void calculateGradient() {\r\n }",
"void computeGradient(GradientCalc calc);",
"public Gradient createGradient() {\n\t\treturn createGradient(GradientType.LINEAR);\n\t}",
"public GradientFill(final SWFDecoder coder, final Context context)\r\n throws CoderException {\r\n type = coder.readByte();\r\n transform = new CoordTransform(coder);\r\n count = coder.readByte();\r\n spread = count & 0x00C0;\r\n interpolation = count & 0x0030;\r\n count = count & 0x00FF;\r\n gradients = new ArrayList<Gradient>(count);\r\n \r\n for (int i = 0; i < count; i++) {\r\n gradients.add(new Gradient(coder, context));\r\n }\r\n }",
"private AlfaRGB hexParser(String text){\n\t\tAlfaRGB newColor = null;\n\t\ttry {\n\t\t\tif (text.startsWith(\"#\") && text.length() == 7) { //$NON-NLS-1$\n\t\t\t\tnewColor = AlfaRGB.getFullyOpaque(new RGB(Integer.valueOf(text.substring(1, 3), 16), Integer.valueOf(text.substring(3, 5), 16), Integer.valueOf(text.substring(5, 7), 16)));\n\t\t\t} else if (!text.startsWith(\"#\") && text.length() == 6) { //$NON-NLS-1$\n\t\t\t\tnewColor = AlfaRGB.getFullyOpaque(new RGB(Integer.valueOf(text.substring(0, 2), 16), Integer.valueOf(text.substring(2, 4), 16), Integer.valueOf(text.substring(4, 6), 16)));\n\t\t\t} else {\n\t\t\t\tString[] components = text.split(\",\");\n\t\t\t\tint[] resultComp = new int[]{0,0,0,255};\n\t\t\t\tboolean colsedBars = (text.contains(\"[\") && text.contains(\"]\")) || (text.contains(\"(\") && text.contains(\")\")) || (text.contains(\"{\") && text.contains(\"}\")) || (!text.contains(\"{\") && !text.contains(\"[\") && !text.contains(\"(\"));\n\t\t\t\tif (components.length>2 && colsedBars){\n\t\t\t\t\tfor(int i=0; i<components.length && i<4; i++){\n\t\t\t\t\t\tString component = components[i].replaceAll(\"[^\\\\d]\", \"\");;\n\t\t\t\t\t\tresultComp[i] = Integer.valueOf(component);\n\t\t\t\t\t}\n\t\t\t\t\tnewColor = new AlfaRGB(new RGB(resultComp[0],resultComp[1],resultComp[2]), resultComp[3]);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (NumberFormatException ex) {\n\t\t} catch (IllegalArgumentException ex) {\n\t\t}\n\t\treturn newColor;\n\t}",
"public Gradient(String id) {\n this.id = id;\n stops = new ArrayList();\n }",
"public GradientFactory() {\n }",
"public BufferedImage createGradientImage(Color color1, Color color2) {\r\n BufferedImage image = (BufferedImage)java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration().createCompatibleImage(256, 1); \r\n\r\n Graphics2D graphics = image.createGraphics();\r\n GradientPaint gp = new GradientPaint(0, 0, color1, 255, 0, color2);\r\n graphics.setPaint(gp);\r\n graphics.drawRect(0, 0, 255, 1);\r\n return image;\r\n }",
"public static\n Color convertStringToColor(String val)\n {\n Color ret_Color;\n\n try\n {\n String workstr1;\n int slen = val.length();\n if (val.startsWith(\"0x\") || val.startsWith(\"0X\"))\n {\n workstr1 = val.substring(2);\n slen -= 2;\n }\n else\n if (val.startsWith(\"#\"))\n {\n workstr1 = val.substring(1);\n slen -= 1;\n }\n else\n { // decimal integer\n return new Color(Integer.parseInt(val));\n }\n\n // process hex string\n if (slen <= 6)\n { // no alpha\n int ival = Integer.parseInt(workstr1, 16);\n ret_Color = new Color(ival);\n }\n else\n { // has alpha of some sort\n String workstr2;\n if (slen == 8)\n {\n workstr2 = workstr1;\n }\n else\n if (slen == 7)\n {\n workstr2 = \"0\" + workstr1;\n }\n else\n {\n workstr2 = workstr1.substring(slen - 8); // get rightmost 8\n }\n\n // System.out.println(\"Color,val=[\" + val + \"],key=[\" + key + \"],slen=\" + slen + \"]\");\n // System.out.println(\" workstr1=[\" + workstr1 + \"],workstr2=[\" + workstr2 + \"]\");\n int a = Integer.parseInt(workstr2.substring(0, 2), 16); // a\n int r = Integer.parseInt(workstr2.substring(2, 4), 16); // r\n int g = Integer.parseInt(workstr2.substring(4, 6), 16); // g\n int b = Integer.parseInt(workstr2.substring(6, 8), 16); // b\n // System.out.println(\" ret_Color1=[\" + r + \":\" + g + \":\" + b +\":\" + a + \"]\");\n // int ival = Integer.parseInt(workstr2, 16);\n // ret_Color = new Color(ival, true);\n // System.out.println(\" ival=\" + ival);\n try {\n ret_Color = new Color(r, g, b, a);\n }\n catch (NoSuchMethodError excp1) {\n System.out.println(\"YutilProperties:convertStringToColor|excp1=[\" + excp1 + \"]\");\n ret_Color = new Color(r, g, b);\n }\n // System.out.println(\" ret_Color1=[\" + ret_Color + \"]\");\n }\n }\n catch(NumberFormatException e)\n {\n ret_Color = Color.black;\n // System.out.println(\"Color,ret_Color3=[\" + ret_Color + \"]\");\n }\n\n return ret_Color;\n }",
"public abstract boolean gradient(BGRADES.Point point);",
"public Gradient(int[] colors, float[] startPoints) {\n this(colors, startPoints, DEFAULT_COLOR_MAP_SIZE);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return an object representing the DTE at the specified row. | public Object getRowObject(int row)
{
if (row < 0 || row >= dataTypes.size())
return null;
return dataTypes.elementAt(row);
} | [
"public Object getObject(int row);",
"public Object getObject(int row) {\n return objectMap.get(row);\n }",
"public Entity getEntityAtRow( int row )\r\n {\r\n return (Entity) getValueAt( row, LINK_VALUE );\r\n }",
"public Object getObjectAt(int row)\n {\n return ((IteratorTableModel) table.getModel()).getObjectAt(row);\n }",
"ExpDataClass getDataClass(int rowId);",
"protected Object nodeForRow(final int row) {\n\t\tTreePath treePath = tree.getPathForRow(row);\n\n\t\treturn treePath.getLastPathComponent();\n\t}",
"public Object getDetail(R row);",
"public Object getModelObject(SQLRowAccessor row) {\r\n check(row);\r\n if (this.getModelClass() == null)\r\n return null;\r\n\r\n final Object res;\r\n // seuls les SQLRow peuvent être cachées\r\n if (row instanceof SQLRow) {\r\n // MAYBE make the modelObject change\r\n final CacheResult<Object> cached = this.getModelCache().check(row);\r\n if (cached.getState() == CacheResult.State.NOT_IN_CACHE) {\r\n res = this.createModelObject(row);\r\n this.getModelCache().put(row, res, Collections.singleton(row));\r\n } else\r\n res = cached.getRes();\r\n } else\r\n res = this.createModelObject(row);\r\n\r\n return res;\r\n }",
"public TestCaseData getTestCaseRowData(int row) {\r\n\t\treturn new TestCaseData((String) data[row][0], (String) data[row][1], (TestingType) data[row][2], (Date) data[row][3], (Date) data[row][4], (boolean) data[row][5], (String) data[row][6], (String) data[row][7], (boolean) data[row][8]);\r\n\t}",
"public static Row createRow() {\n\t\treturn new Row(fsco,criteria,columns);\n\t}",
"RowValue createRowValue();",
"private ESICRecord getRecordFromRow(Row row) throws ParseException {\r\n\t\tESICRecord record = new ESICRecord();\r\n\r\n\t\t// storing for back reference...\r\n\t\trecord.setExcelRow(row);\r\n\r\n\t\tfor (ESICExcelColumns column : ESICExcelColumns.values()) {\r\n\r\n\t\t\tint position = column.ordinal();\r\n\t\t\tString value = null;\r\n\r\n\t\t\tCell c = row.getCell(position);\r\n\r\n\t\t\tif (c != null) {\r\n\r\n\t\t//\t\tSystem.out.println(c.getCellType());\r\n\r\n\t\t\t\tif (c.getCellType() == Cell.CELL_TYPE_NUMERIC && DateUtil.isCellDateFormatted(c))\r\n\t\t\t\t{\r\n\r\n\t\t\t\t\tDate d = c.getDateCellValue();\r\n\t\t\t\t\tvalue = com.esic.util.DateUtil.ddMMyyFormat.format(d);\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// FIXME: decide if this code really has no impact on cell\r\n\t\t\t\t\t// contents..\r\n\t\t\t\t\t// seems changing cell time might loose some data about\r\n\t\t\t\t\t// cell..\r\n\t\t\t\t//\tint celltype = c.getCellType();\r\n\t\t\t\t\tc.setCellType(Cell.CELL_TYPE_STRING);\r\n\t\t\t\t\tvalue = c.getStringCellValue().trim();\r\n\t\t\t\t//\tc.setCellType(celltype);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlogEmptyValue(row, column, value);\r\n\t\t\t\trecord.put(column.name(), value);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tESICRecordHelper.populateDependentList(record);\r\n\r\n\t\treturn record;\r\n\t}",
"public ContactModel getRowAsObject(int rowID) {\n\n ContactModel rowContactObj = new ContactModel();\n Cursor cursor;\n\n try {\n\n cursor = db.query(TABLE_NAME, new String[]{TABLE_ROW_ID,\n TABLE_ROW_NAME, TABLE_ROW_PHONENUM, TABLE_ROW_EMAIL,\n TABLE_ROW_PHOTOID}, TABLE_ROW_ID + \"=\" + rowID, null,\n null, null, null, null);\n\n cursor.moveToFirst();\n prepareSendObject(rowContactObj, cursor);\n\n } catch (SQLException e) {\n Log.e(\"DB ERROR\", e.toString());\n e.printStackTrace();\n }\n\n return rowContactObj;\n }",
"public VisualItem getItem(int row) {\n return (VisualItem)getTuple(row);\n }",
"Row createRow();",
"io.dstore.engine.procedures.ImGetTreeNodeInformationPu.Response.Row getRow(int index);",
"public DoubleMatrix2D viewRow(int row) {\r\n\t\tcheckRow(row);\r\n\t\tint sliceRows = this.slices;\r\n\t\tint sliceColumns = this.columns;\r\n\r\n\t\t// int sliceOffset = index(0,row,0);\r\n\t\tint sliceRowZero = sliceZero;\r\n\t\tint sliceColumnZero = columnZero + _rowOffset(_rowRank(row));\r\n\r\n\t\tint sliceRowStride = this.sliceStride;\r\n\t\tint sliceColumnStride = this.columnStride;\r\n\t\treturn like2D(sliceRows, sliceColumns, sliceRowZero, sliceColumnZero,\r\n\t\t\t\tsliceRowStride, sliceColumnStride);\r\n\t}",
"public ValueField getEntry(final int row, final int column) {\n if (row >= tableau.getRowDimension() && row < tableau.getRowDimension() + artificialRows.size()) {\n return artificialRows.get(row - tableau.getRowDimension())[column];\n }\n return tableau.getEntry(row, column);\n }",
"protected Object getRowKey(Object row)\n {\n assert (_rowKeyProperty != null);\n return __resolveProperty(row, _rowKeyProperty);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieve TSalesPosAttr based on given search criteria using Dynamic JPAQL. | public List<TSalesPosAttr> findTSalesPosAttrs(final SearchFilter<TSalesPosAttr> searchFilter) {
LOGGER.info("=========== Find TSalesPosAttrs ===========");
final PaginationInfo paginationInfo = searchFilter.getPaginationInfo();
final OperatorInfo operatorInfo = searchFilter.getOperatorInfo();
final TSalesPosAttr tSalesPosAttr = searchFilter.getEntityClass();
final int maxresult = paginationInfo.getMaxRows();
final int index = paginationInfo.getStartIndex();
//int maxresult = 3;
//int index=0;
final LogicalOperatorEnum logOpEnum = operatorInfo.getLogicalOperator();
final JPAQuery jpaQuery = new JPAQuery("tSalesPosAttrentity", tSalesPosAttr);
if (tSalesPosAttr.getTSalesPos() == null) {
jpaQuery.bind(TSALESPOS, new TSalesPos());
} else {
LOGGER.info("tSalesPos {}"+ tSalesPosAttr.getTSalesPos());
jpaQuery.bind(TSALESPOS, tSalesPosAttr.getTSalesPos());
}
if (tSalesPosAttr.getTAttrDef() == null) {
jpaQuery.bind(TATTRDEF, new TAttrDef());
} else {
LOGGER.info("tAttrDef {}"+ tSalesPosAttr.getTAttrDef());
jpaQuery.bind(TATTRDEF, tSalesPosAttr.getTAttrDef());
}
jpaQuery.setJPAql(JPAQL);
jpaQuery.setRestrictionExpressionStrings(RESTRICTIONS);
jpaQuery.setLogicalOperatorEnum(logOpEnum);
return genericDAO.findEntities(jpaQuery, index, maxresult);
} | [
"public List<TSalesPosAttr> getTSalesPosAttrsByTSalesPos(final SearchFilter<TSalesPos> searchFilter) {\n\n\t\tfinal PaginationInfo paginationInfo = searchFilter.getPaginationInfo();\n\t\tList<Object> queryParam=new ArrayList<Object> ();\n\t\tqueryParam.add(searchFilter.getEntityClass());\n\t\tfinal int maxresult = paginationInfo.getMaxRows();\n\t\tfinal int index = paginationInfo.getStartIndex();\n\n\t\treturn genericDAO.findEntitiesByNamedQueryMultiCond(\"FindTSalesPosAttrByTSalesPos\", queryParam, index, maxresult);\n\t}",
"public List<TSalesPosAttr> getTSalesPosAttrsByTAttrDef(final SearchFilter<TAttrDef> searchFilter) {\n\n\t\tfinal PaginationInfo paginationInfo = searchFilter.getPaginationInfo();\n\t\tList<Object> queryParam=new ArrayList<Object> ();\n\t\tqueryParam.add(searchFilter.getEntityClass());\n\t\tfinal int maxresult = paginationInfo.getMaxRows();\n\t\tfinal int index = paginationInfo.getStartIndex();\n\n\t\treturn genericDAO.findEntitiesByNamedQueryMultiCond(\"FindTSalesPosAttrByTAttrDef\", queryParam, index, maxresult);\n\t}",
"public Object countTSalesPosAttrs(final SearchFilter<TSalesPosAttr> searchFilter) {\n\t\tLOGGER.info(\"=========== Count TSalesPosAttr ===========\");\n\n\t\tfinal OperatorInfo operatorInfo = searchFilter.getOperatorInfo();\n\t\tfinal TSalesPosAttr tSalesPosAttr = searchFilter.getEntityClass();\n\t\tfinal LogicalOperatorEnum logOpEnum = operatorInfo.getLogicalOperator();\n\t\tfinal JPAQuery jpaCountQuery = new JPAQuery(\"tSalesPosAttrentity\", tSalesPosAttr);\n\n\t\tif (tSalesPosAttr.getTSalesPos() == null) {\n\t\t\tjpaCountQuery.bind(TSALESPOS, new TSalesPos());\n\t\t} else {\n\t\t\tLOGGER.info(\"tSalesPos {}\"+ tSalesPosAttr.getTSalesPos());\n\n\t\t\tjpaCountQuery.bind(TSALESPOS, tSalesPosAttr.getTSalesPos());\n\t\t}\n\n\t\tif (tSalesPosAttr.getTAttrDef() == null) {\n\t\t\tjpaCountQuery.bind(TATTRDEF, new TAttrDef());\n\t\t} else {\n\t\t\tLOGGER.info(\"tAttrDef {}\"+ tSalesPosAttr.getTAttrDef());\n\n\t\t\tjpaCountQuery.bind(TATTRDEF, tSalesPosAttr.getTAttrDef());\n\t\t}\n\n\t\tjpaCountQuery.setJPAql(JPACOUNTQL);\n\t\tjpaCountQuery.setRestrictionExpressionStrings(RESTRICTIONS);\n\t\tjpaCountQuery.setLogicalOperatorEnum(logOpEnum);\n\n\t\treturn genericDAO.findEntities(jpaCountQuery, -1, -1);\n\t}",
"public TSalesPosAttr findTSalesPosAttrById(final TSalesPosAttrId tSalesPosAttrId) {\n\t\tLOGGER.info(\"find TSalesPosAttr instance with TSalesPosAttrId: \" + tSalesPosAttrId);\n\t\treturn genericDAO.get(clazz, tSalesPosAttrId);\n\t}",
"public Object countTSalesPosAttrsByTSalesPos(final SearchFilter<TSalesPos> searchFilter) {\n\n\t\tList<Object> queryParam=new ArrayList<Object> ();\n\t\tqueryParam.add(searchFilter.getEntityClass());\n\t\treturn genericDAO.findEntitiesByNamedQuery(\"CountTSalesPosAttrsByTSalesPos\", queryParam);\n\t}",
"public Object countTSalesPosAttrsByTAttrDef(final SearchFilter<TAttrDef> searchFilter) {\n\n\t\tList<Object> queryParam=new ArrayList<Object> ();\n\t\tqueryParam.add(searchFilter.getEntityClass());\n\t\treturn genericDAO.findEntitiesByNamedQuery(\"CountTSalesPosAttrsByTAttrDef\", queryParam);\n\t}",
"TMirSalesPos getPrimarySalesPossByTSalesPos(final SearchFilter<TSalesPos> searchFilter);",
"TMirSalesPos findTMirSalesPosById(Long salesPosMirId);",
"public DocEstados[] findByDynamicSelect(String sql, Object[] sqlParams) throws DocEstadosDaoException;",
"List<TMirSalesPos> getTMirSalesPossByTSalesPos(SearchFilter<TSalesPos> searchFilter);",
"public interface TMirSalesPosDAO {\n\n\t/**\n\t * Stores a new TMirSalesPos entity object in to the persistent store\n\t * \n\t * @param tMirSalesPos\n\t * TMirSalesPos Entity object to be persisted\n\t * @return tMirSalesPos Persisted TMirSalesPos object\n\t */\n\tTMirSalesPos createTMirSalesPos(TMirSalesPos tMirSalesPos);\n\n\t/**\n\t * Deletes a TMirSalesPos entity object from the persistent store\n\t * \n\t * @param tMirSalesPos\n\t * TMirSalesPos Entity object to be deleted\n\t */\n\tvoid deleteTMirSalesPos(Long salesPosMirId);\n\n\t/**\n\t * Updates a TMirSalesPos entity object in to the persistent store\n\t * \n\t * @param tMirSalesPos\n\t * TMirSalesPos Entity object to be updated\n\t * @return tMirSalesPos Persisted TMirSalesPos object\n\t */\n\tTMirSalesPos updateTMirSalesPos(TMirSalesPos tMirSalesPos);\n\n\t/**\n\t * Retrieve an TMirSalesPos object based on given salesPosMirId.\n\t * \n\t * @param salesPosMirId\n\t * the primary key value of the TMirSalesPos Entity.\n\t * @return an Object if it exists against given primary key. Returns null of\n\t * not found\n\t */\n\tTMirSalesPos findTMirSalesPosById(Long salesPosMirId);\n\n\t/**\n\t * Retrieve TMirSalesPos based on given search criteria using Dynamic JPAQL.\n\t * \n\t * @param searchFilter\n\t * The query criteria and search filter conditions are set\n\t * @return List<TMirSalesPos> list of TMirSalesPoss if it exists against given\n\t * criteria. Returns null if not found\n\t */\n\tList<TMirSalesPos> findTMirSalesPoss(SearchFilter<TMirSalesPos> searchFilter);\n\n\t/**\n\t * Count TMirSalesPos based on given search criteria using Dynamic JPAQL.\n\t * \n\t * @param searchFilter\n\t * The query criteria and search filter conditions are set\n\t * @return a Object indicating the count\n\t */\n\tObject countTMirSalesPoss(SearchFilter<TMirSalesPos> searchFilter);\n\n\t/**\n\t * Retrieve TMirSalesPos based on given search criteria using JPA named Query.\n\t * The search criteria is of TSalesPos type.\n\t * \n\t * @param searchFilter\n\t * The query criteria and search filter conditions are set\n\t * @return List<TMirSalesPos> list of TMirSalesPoss if it exists against given\n\t * criteria. Returns null if not found\n\t */\n\tList<TMirSalesPos> getTMirSalesPossByTSalesPos(SearchFilter<TSalesPos> searchFilter);\n\n\t/**\n\t * Count TMirSalesPos based on given search criteria using JPA named Query.\n\t * The search criteria is of TSalesPos type.\n\t * \n\t * @param searchFilter\n\t * The query criteria and search filter conditions are set\n\t * @return a Object indicating the count\n\t */\n\tObject countTMirSalesPossByTSalesPos(SearchFilter<TSalesPos> searchFilter);\n\n\t/**\n\t * Retrieve TMirSalesPos based on given search criteria using JPA named Query.\n\t * The search criteria is of TSalesPos type.\n\t * \n\t * @param searchFilter\n\t * The query criteria and search filter conditions are set\n\t * @return List<TMirSalesPos> list of TMirSalesPoss if it exists against given\n\t * criteria. Returns null if not found\n\t */\n\tList<TMirSalesPos> getTMirSalesPossByTSalesPosByTMirSalesPosIbfk2(SearchFilter<TSalesPos> searchFilter);\n\n\t/**\n\t * Count TMirSalesPos based on given search criteria using JPA named Query.\n\t * The search criteria is of TSalesPos type.\n\t * \n\t * @param searchFilter\n\t * The query criteria and search filter conditions are set\n\t * @return a Object indicating the count\n\t */\n\tObject countTMirSalesPossByTSalesPosByTMirSalesPosIbfk2(SearchFilter<TSalesPos> searchFilter);\n\n\t\n\t/**\n\t * Gets the primary sales poss by t sales pos.\n\t *\n\t * @param searchFilter the search filter\n\t * @return the primary sales poss by t sales pos\n\t */\n\tTMirSalesPos getPrimarySalesPossByTSalesPos(final SearchFilter<TSalesPos> searchFilter);\n\n\t/**\n\t * Gets the t mir sp by sp id.\n\t *\n\t * @param salesPosId the sales pos id\n\t * @param userDetails the user details\n\t * @return the t mir sp by sp id\n\t */\n\tList<Object[]> getTMirSpBySpId(Long salesPosId, Short tenantId);\n}",
"public SgfensPedidoProducto[] findByDynamicSelect(String sql, Object[] sqlParams) throws SgfensPedidoProductoDaoException;",
"public DocEstados[] findByDynamicWhere(String sql, Object[] sqlParams) throws DocEstadosDaoException;",
"public Patti[] findByDynamicSelect(String sql, Object[] sqlParams) throws PattiDaoException;",
"public Renquiry[] findByDynamicSelect(String sql, Object[] sqlParams) throws RenquiryDaoException;",
"public UsState[] findByDynamicSelect(String sql, Object[] sqlParams) throws UsStateDaoException;",
"public ArrConducPf[] findByDynamicSelect(String sql, Object[] sqlParams) throws ArrConducPfDaoException;",
"public Escalation[] findByDynamicSelect(String sql, Object[] sqlParams) throws EscalationDaoException;",
"public Persona[] findByDynamicSelect(String sql, Object[] sqlParams) throws PersonaDaoException;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end rule__NamespaceDeclaration__UriAssignment_1_1 $ANTLR start rule__SignatureDeclaration__SigNameAssignment_1 ../info.kwarc.elf.ui/srcgen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:928:1: rule__SignatureDeclaration__SigNameAssignment_1 : ( RULE_ID ) ; | public final void rule__SignatureDeclaration__SigNameAssignment_1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:932:1: ( ( RULE_ID ) )
// ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:933:1: ( RULE_ID )
{
// ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:933:1: ( RULE_ID )
// ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:934:1: RULE_ID
{
before(grammarAccess.getSignatureDeclarationAccess().getSigNameIDTerminalRuleCall_1_0());
match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__SignatureDeclaration__SigNameAssignment_11811);
after(grammarAccess.getSignatureDeclarationAccess().getSigNameIDTerminalRuleCall_1_0());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__SignatureDeclaration__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:459:1: ( ( ( rule__SignatureDeclaration__SigNameAssignment_1 ) ) )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:460:1: ( ( rule__SignatureDeclaration__SigNameAssignment_1 ) )\n {\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:460:1: ( ( rule__SignatureDeclaration__SigNameAssignment_1 ) )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:461:1: ( rule__SignatureDeclaration__SigNameAssignment_1 )\n {\n before(grammarAccess.getSignatureDeclarationAccess().getSigNameAssignment_1()); \n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:462:1: ( rule__SignatureDeclaration__SigNameAssignment_1 )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:462:2: rule__SignatureDeclaration__SigNameAssignment_1\n {\n pushFollow(FOLLOW_rule__SignatureDeclaration__SigNameAssignment_1_in_rule__SignatureDeclaration__Group__1__Impl876);\n rule__SignatureDeclaration__SigNameAssignment_1();\n _fsp--;\n\n\n }\n\n after(grammarAccess.getSignatureDeclarationAccess().getSigNameAssignment_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__SignatureDef__NameAssignment_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:27990:1: ( ( ruleQualifiedName ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27991:1: ( ruleQualifiedName )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27991:1: ( ruleQualifiedName )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27992:1: ruleQualifiedName\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getSignatureDefAccess().getNameQualifiedNameParserRuleCall_1_0()); \r\n }\r\n pushFollow(FOLLOW_ruleQualifiedName_in_rule__SignatureDef__NameAssignment_156185);\r\n ruleQualifiedName();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getSignatureDefAccess().getNameQualifiedNameParserRuleCall_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__SignatureDef__Group__1__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:7463:1: ( ( ( rule__SignatureDef__NameAssignment_1 ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7464:1: ( ( rule__SignatureDef__NameAssignment_1 ) )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7464:1: ( ( rule__SignatureDef__NameAssignment_1 ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7465:1: ( rule__SignatureDef__NameAssignment_1 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getSignatureDefAccess().getNameAssignment_1()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7466:1: ( rule__SignatureDef__NameAssignment_1 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7466:2: rule__SignatureDef__NameAssignment_1\r\n {\r\n pushFollow(FOLLOW_rule__SignatureDef__NameAssignment_1_in_rule__SignatureDef__Group__1__Impl15738);\r\n rule__SignatureDef__NameAssignment_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.getSignatureDefAccess().getNameAssignment_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__MethodSpec__SignatureAssignment_0_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:16280:1: ( ( ruleSignature ) )\r\n // InternalGo.g:16281:2: ( ruleSignature )\r\n {\r\n // InternalGo.g:16281:2: ( ruleSignature )\r\n // InternalGo.g:16282:3: ruleSignature\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getMethodSpecAccess().getSignatureSignatureParserRuleCall_0_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleSignature();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getMethodSpecAccess().getSignatureSignatureParserRuleCall_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__FunctionLit__SignatureAssignment_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:18485:1: ( ( ruleSignature ) )\r\n // InternalGo.g:18486:2: ( ruleSignature )\r\n {\r\n // InternalGo.g:18486:2: ( ruleSignature )\r\n // InternalGo.g:18487:3: ruleSignature\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getFunctionLitAccess().getSignatureSignatureParserRuleCall_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleSignature();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getFunctionLitAccess().getSignatureSignatureParserRuleCall_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__SignatureReference__RefAssignment_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:27955:1: ( ( ( RULE_ID ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27956:1: ( ( RULE_ID ) )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27956:1: ( ( RULE_ID ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27957:1: ( RULE_ID )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getSignatureReferenceAccess().getRefSignatureDefCrossReference_1_0()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27958:1: ( RULE_ID )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27959:1: RULE_ID\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getSignatureReferenceAccess().getRefSignatureDefIDTerminalRuleCall_1_0_1()); \r\n }\r\n match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__SignatureReference__RefAssignment_156117); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getSignatureReferenceAccess().getRefSignatureDefIDTerminalRuleCall_1_0_1()); \r\n }\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getSignatureReferenceAccess().getRefSignatureDefCrossReference_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__SignatureDeclaration__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:550:1: ( ( ( rule__SignatureDeclaration__SigDefinitionsAssignment_4 )* ) )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:551:1: ( ( rule__SignatureDeclaration__SigDefinitionsAssignment_4 )* )\n {\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:551:1: ( ( rule__SignatureDeclaration__SigDefinitionsAssignment_4 )* )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:552:1: ( rule__SignatureDeclaration__SigDefinitionsAssignment_4 )*\n {\n before(grammarAccess.getSignatureDeclarationAccess().getSigDefinitionsAssignment_4()); \n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:553:1: ( rule__SignatureDeclaration__SigDefinitionsAssignment_4 )*\n loop4:\n do {\n int alt4=2;\n int LA4_0 = input.LA(1);\n\n if ( (LA4_0==RULE_ID) ) {\n alt4=1;\n }\n\n\n switch (alt4) {\n \tcase 1 :\n \t // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:553:2: rule__SignatureDeclaration__SigDefinitionsAssignment_4\n \t {\n \t pushFollow(FOLLOW_rule__SignatureDeclaration__SigDefinitionsAssignment_4_in_rule__SignatureDeclaration__Group__4__Impl1060);\n \t rule__SignatureDeclaration__SigDefinitionsAssignment_4();\n \t _fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop4;\n }\n } while (true);\n\n after(grammarAccess.getSignatureDeclarationAccess().getSigDefinitionsAssignment_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__MethodDecl__SignatureAssignment_4() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:15800:1: ( ( ruleSignature ) )\r\n // InternalGo.g:15801:2: ( ruleSignature )\r\n {\r\n // InternalGo.g:15801:2: ( ruleSignature )\r\n // InternalGo.g:15802:3: ruleSignature\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getMethodDeclAccess().getSignatureSignatureParserRuleCall_4_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleSignature();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getMethodDeclAccess().getSignatureSignatureParserRuleCall_4_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__SigDefinitions__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:654:1: ( ( ( rule__SigDefinitions__SymbNameAssignment_0 ) ) )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:655:1: ( ( rule__SigDefinitions__SymbNameAssignment_0 ) )\n {\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:655:1: ( ( rule__SigDefinitions__SymbNameAssignment_0 ) )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:656:1: ( rule__SigDefinitions__SymbNameAssignment_0 )\n {\n before(grammarAccess.getSigDefinitionsAccess().getSymbNameAssignment_0()); \n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:657:1: ( rule__SigDefinitions__SymbNameAssignment_0 )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:657:2: rule__SigDefinitions__SymbNameAssignment_0\n {\n pushFollow(FOLLOW_rule__SigDefinitions__SymbNameAssignment_0_in_rule__SigDefinitions__Group__0__Impl1256);\n rule__SigDefinitions__SymbNameAssignment_0();\n _fsp--;\n\n\n }\n\n after(grammarAccess.getSigDefinitionsAccess().getSymbNameAssignment_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__SigDefinitions__SymbNameAssignment_0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:962:1: ( ( RULE_ID ) )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:963:1: ( RULE_ID )\n {\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:963:1: ( RULE_ID )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:964:1: RULE_ID\n {\n before(grammarAccess.getSigDefinitionsAccess().getSymbNameIDTerminalRuleCall_0_0()); \n match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__SigDefinitions__SymbNameAssignment_01873); \n after(grammarAccess.getSigDefinitionsAccess().getSymbNameIDTerminalRuleCall_0_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__HostNode__SignatureDefsAssignment_4() 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:30071:1: ( ( ruleSignatureDef ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30072:1: ( ruleSignatureDef )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30072:1: ( ruleSignatureDef )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30073:1: ruleSignatureDef\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getHostNodeAccess().getSignatureDefsSignatureDefParserRuleCall_4_0()); \r\n }\r\n pushFollow(FOLLOW_ruleSignatureDef_in_rule__HostNode__SignatureDefsAssignment_460454);\r\n ruleSignatureDef();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getHostNodeAccess().getSignatureDefsSignatureDefParserRuleCall_4_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__CV_spec__SignatureDefsAssignment_4() 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:29981:1: ( ( ruleSignatureDef ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:29982:1: ( ruleSignatureDef )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:29982:1: ( ruleSignatureDef )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:29983:1: ruleSignatureDef\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getCV_specAccess().getSignatureDefsSignatureDefParserRuleCall_4_0()); \r\n }\r\n pushFollow(FOLLOW_ruleSignatureDef_in_rule__CV_spec__SignatureDefsAssignment_460268);\r\n ruleSignatureDef();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getCV_specAccess().getSignatureDefsSignatureDefParserRuleCall_4_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__SignatureDeclaration__SigDefinitionsAssignment_4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:947:1: ( ( rulesigDefinitions ) )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:948:1: ( rulesigDefinitions )\n {\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:948:1: ( rulesigDefinitions )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:949:1: rulesigDefinitions\n {\n before(grammarAccess.getSignatureDeclarationAccess().getSigDefinitionsSigDefinitionsParserRuleCall_4_0()); \n pushFollow(FOLLOW_rulesigDefinitions_in_rule__SignatureDeclaration__SigDefinitionsAssignment_41842);\n rulesigDefinitions();\n _fsp--;\n\n after(grammarAccess.getSignatureDeclarationAccess().getSigDefinitionsSigDefinitionsParserRuleCall_4_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__NamespaceDeclaration__Group_1_0__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:393:1: ( ( ( rule__NamespaceDeclaration__UriAssignment_1_0_2 ) ) )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:394:1: ( ( rule__NamespaceDeclaration__UriAssignment_1_0_2 ) )\n {\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:394:1: ( ( rule__NamespaceDeclaration__UriAssignment_1_0_2 ) )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:395:1: ( rule__NamespaceDeclaration__UriAssignment_1_0_2 )\n {\n before(grammarAccess.getNamespaceDeclarationAccess().getUriAssignment_1_0_2()); \n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:396:1: ( rule__NamespaceDeclaration__UriAssignment_1_0_2 )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:396:2: rule__NamespaceDeclaration__UriAssignment_1_0_2\n {\n pushFollow(FOLLOW_rule__NamespaceDeclaration__UriAssignment_1_0_2_in_rule__NamespaceDeclaration__Group_1_0__2__Impl748);\n rule__NamespaceDeclaration__UriAssignment_1_0_2();\n _fsp--;\n\n\n }\n\n after(grammarAccess.getNamespaceDeclarationAccess().getUriAssignment_1_0_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__SignatureDef__Group__0__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:7434:1: ( ( ( rule__SignatureDef__SignatureTypeAssignment_0 ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7435:1: ( ( rule__SignatureDef__SignatureTypeAssignment_0 ) )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7435:1: ( ( rule__SignatureDef__SignatureTypeAssignment_0 ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7436:1: ( rule__SignatureDef__SignatureTypeAssignment_0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getSignatureDefAccess().getSignatureTypeAssignment_0()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7437:1: ( rule__SignatureDef__SignatureTypeAssignment_0 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7437:2: rule__SignatureDef__SignatureTypeAssignment_0\r\n {\r\n pushFollow(FOLLOW_rule__SignatureDef__SignatureTypeAssignment_0_in_rule__SignatureDef__Group__0__Impl15678);\r\n rule__SignatureDef__SignatureTypeAssignment_0();\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.getSignatureDefAccess().getSignatureTypeAssignment_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__FunctionDecl__SignatureAssignment_3() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:15845:1: ( ( ruleSignature ) )\r\n // InternalGo.g:15846:2: ( ruleSignature )\r\n {\r\n // InternalGo.g:15846:2: ( ruleSignature )\r\n // InternalGo.g:15847:3: ruleSignature\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getFunctionDeclAccess().getSignatureSignatureParserRuleCall_3_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleSignature();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getFunctionDeclAccess().getSignatureSignatureParserRuleCall_3_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__Signal__NameAssignment() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:17060:1: ( ( RULE_ID ) )\r\n // InternalDroneScript.g:17061:2: ( RULE_ID )\r\n {\r\n // InternalDroneScript.g:17061:2: ( RULE_ID )\r\n // InternalDroneScript.g:17062:3: RULE_ID\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getSignalAccess().getNameIDTerminalRuleCall_0()); \r\n }\r\n match(input,RULE_ID,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getSignalAccess().getNameIDTerminalRuleCall_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 rulesignatureDeclaration() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:130:2: ( ( ( rule__SignatureDeclaration__Group__0 ) ) )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:131:1: ( ( rule__SignatureDeclaration__Group__0 ) )\n {\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:131:1: ( ( rule__SignatureDeclaration__Group__0 ) )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:132:1: ( rule__SignatureDeclaration__Group__0 )\n {\n before(grammarAccess.getSignatureDeclarationAccess().getGroup()); \n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:133:1: ( rule__SignatureDeclaration__Group__0 )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:133:2: rule__SignatureDeclaration__Group__0\n {\n pushFollow(FOLLOW_rule__SignatureDeclaration__Group__0_in_rulesignatureDeclaration215);\n rule__SignatureDeclaration__Group__0();\n _fsp--;\n\n\n }\n\n after(grammarAccess.getSignatureDeclarationAccess().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__Interface__SignatureReferencesAssignment_2_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:27924:1: ( ( ruleSignatureReference ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27925:1: ( ruleSignatureReference )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27925:1: ( ruleSignatureReference )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27926:1: ruleSignatureReference\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getInterfaceAccess().getSignatureReferencesSignatureReferenceParserRuleCall_2_1_0()); \r\n }\r\n pushFollow(FOLLOW_ruleSignatureReference_in_rule__Interface__SignatureReferencesAssignment_2_156049);\r\n ruleSignatureReference();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getInterfaceAccess().getSignatureReferencesSignatureReferenceParserRuleCall_2_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 }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set game list sort choice. | public static void setGamelistSort(int selection) {
prefs.putInt(GAMELIST_SORT_KEY, selection);
} | [
"public void changeSortOrder();",
"public void setSort(int v) \r\n {\r\n\r\n if (this.sort != v)\r\n {\r\n this.sort = v;\r\n setModified(true);\r\n }\r\n\r\n\r\n }",
"void setSortingPreference(String newSortingPreference);",
"public void setSongListSortBy(String sort) {\n\t\tprefs.edit()\n\t\t\t.putString(KEY_SONGLIST_SORT, sort)\n\t\t.commit();\n\t}",
"public void setSort(boolean value) {\n this.sort = value;\n }",
"public void setScoreSort(String sort) {\n\t\tprefs.edit()\n\t\t\t.putString(KEY_SCORE_SORT, sort)\n\t\t.commit();\n\t}",
"private void cmbSortByActionPerformed() {\n \t\tif (this.cbxOnThisDay.isSelected()) {\n \t\t\tswitch (this.cmbSortBy.getSelectedIndex()) {\n \t\t\t\tcase 2:\t\t// Date Taken Descending\n \t\t\t\tcase 3:\t\t// Date Taken Ascending\n \t\t\t\tcase 6:\t\t// No Particular Order\n \t\t\t\tcase 9:\t\t// Random\n \t\t\t\t\t// These sorting modes are handled correctly.\n \t\t\t\t\tbreak;\n \n \t\t\t\tdefault:\n \t\t\t\t\tJOptionPane.showMessageDialog(this,\n \t\t\t\t\t\t\tresourceBundle.getString(\"SetEditor.sortOrder.message\"),\n \t\t\t\t\t\t\tresourceBundle.getString(\"SetEditor.sortOrder.title\"),\n \t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\n \t\t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}",
"void onConditionSortSelected(boolean selection);",
"@VTID(29)\n void setSortUsingCustomLists(\n boolean rhs);",
"public static int getGamelistSort() {\n\t\treturn prefs.getInt(GAMELIST_SORT_KEY, 0);\n\t}",
"private static void selectSortingOption(ArrayList<Person> p) {\n\t\tArrayList<Person> personList = p;\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tboolean again = true;\n\t\twhile (again) {\n\t\t\tagain = false;\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"Pick your sorting option\\n\" + \"1: First Name\\n\" + \"2: Last Name\\n\" + \"3: Starting Date\");\n\n\t\t\tint input = scan.nextInt();\n\n\t\t\tswitch (input) {\n\t\t\tcase 1:\n\t\t\t\tCollections.sort(personList, new Comparator<Person>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int compare(final Person object1, final Person object2) {\n\t\t\t\t\t\treturn object1.getFirstName().toUpperCase().compareTo(object2.getFirstName().toUpperCase());\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tsortingOptions(personList);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tCollections.sort(personList, new Comparator<Person>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int compare(final Person object1, final Person object2) {\n\t\t\t\t\t\treturn object1.getLastName().toUpperCase().compareTo(object2.getLastName().toUpperCase());\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tsortingOptions(personList);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tCollections.sort(personList, new Comparator<Person>() {\n\t\t\t\t\tDateFormat f = new SimpleDateFormat(\"yyyyMMdd\");\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int compare(Person o1, Person o2) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\treturn f.parse(o1.getStartDate()).compareTo(f.parse(o2.getStartDate()));\n\t\t\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t\t\tthrow new IllegalArgumentException(e);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tsortingOptions(personList);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tagain = true;\n\t\t\t\tSystem.out.println(\"Enter a number between 1 and 3\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tscan.close();\n\t}",
"Imports setSortkey(String sortkey);",
"public void OnSort(View v) {\n int sortBy = 0;\n switch (v.getId()) {\n case R.id.radioButton7:\n // Sort by time\n sortBy = 1;\n break;\n case R.id.radioButton8:\n // Sort by distance\n sortBy = 2;\n break;\n }\n queryExercises(sortBy);\n }",
"public void setSortOrder(String sortOrder);",
"private void updateSortOrderCheckBox(){\n MenuItem alphabeticalSortItem = sortMenu.findItem(R.id.menuSortAlphabetically);\n MenuItem dateSortItem = sortMenu.findItem(R.id.menuSortDate);\n MenuItem fileTypeSortItem = sortMenu.findItem(R.id.menuSortFileType);\n MenuItem fileSizeSortItem = sortMenu.findItem(R.id.menuSortFileSize);\n if(sortOrder == SortOrder.ALPHABETICAL){\n alphabeticalSortItem.setChecked(true);\n dateSortItem.setChecked(false);\n fileTypeSortItem.setChecked(false);\n fileSizeSortItem.setChecked(false);\n } else if (sortOrder == SortOrder.DATE){\n alphabeticalSortItem.setChecked(false);\n dateSortItem.setChecked(true);\n fileTypeSortItem.setChecked(false);\n fileSizeSortItem.setChecked(false);\n } else if (sortOrder == SortOrder.FILE_TYPE){\n alphabeticalSortItem.setChecked(false);\n dateSortItem.setChecked(false);\n fileTypeSortItem.setChecked(true);\n fileSizeSortItem.setChecked(false);\n } else if(sortOrder == SortOrder.FILE_SIZE){\n alphabeticalSortItem.setChecked(false);\n dateSortItem.setChecked(false);\n fileTypeSortItem.setChecked(false);\n fileSizeSortItem.setChecked(true);\n }\n }",
"public void selectionSort(ArrayList <Comparable> list){\r\n\t\tsteps += 2;\r\n\t\tfor (int i = list.size() - 1; i >= 0; i--){\r\n\t\t\tsteps ++;\r\n\t\t\tint biggest = 0; \r\n\t\t\tsteps += 2;\r\n\t\t\tfor (int j = 0; j < i; j++){\r\n\t\t\t\tsteps += 4;\r\n\t\t\t\tif (list.get(j).compareTo(list.get(biggest)) > 0){\r\n\t\t\t\t\tsteps ++;\r\n\t\t\t\t\tbiggest = j;\r\n\t\t\t\t}\r\n\t\t\t\tsteps += 2;\r\n\t\t\t}\r\n\t\t\tsteps += 5;\r\n\t\t\tswap(list, i, biggest);\r\n\t\t\tsteps += 2;\r\n\t\t}\r\n\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Selection Sort\");\r\n\t\tSystem.out.println();\r\n\t}",
"public void setSort(Long sort) {\n this.sort = sort;\n }",
"@Override\n public void saveSortByPreference(@Constant.NavigationMode String sort) {\n SharedPreferences.Editor editor = mSharedPreferences.edit();\n editor.putString(PREF_SORT_BY_KEY, String.valueOf(sort));\n editor.apply();\n }",
"private static void populateArtworkSorts() {\r\n if (artworkSorts.isEmpty()) {\r\n artworkSorts.add(SORT_FAV_ASC);\r\n artworkSorts.add(SORT_FAV_DESC);\r\n artworkSorts.add(SORT_NAME_ASC);\r\n artworkSorts.add(SORT_NAME_DESC);\r\n }\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form MainFrame | public MainFrame() {
initFrame();
} | [
"protected MainFrame newFrame() {\n return new MainFrame(\"New Window\");\n }",
"public MainFrame() {\r\n\t\tinitCode();\r\n\t\tinitComponents();\r\n\t}",
"public MainFrame() {\n initComponents();\n initializeAfterFrame();\n }",
"public MainFrame() {\n initComponents();\n \n }",
"public Main_frame() {\n initComponents();\n }",
"protected JFrame createMainFrame(){\n JFrame mainframe = new JFrame(\"Main\");\n mainframe.setMinimumSize(new Dimension(1000, 800));\n mainframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n mainframe.setLayout(new BorderLayout());\n\n\n\n return mainframe;\n }",
"public FrameMain() {\n initComponents();\n }",
"public frmMain() {\n //components initialization\n initComponents();\n //internal initialization\n init();\n //frame initialization\n setLocationRelativeTo(null);\n setTitle(TITLE);\n }",
"protected void createMainFrame() throws Exception {\n\t\t/*String dataSrc = \" using tranSMART\";\n\t\tif (Singleton.getState().getDataMode() == State.BIOSERVICES_MODE) {\n\t\t\tdataSrc = \" using AQG\";\n\t\t} else if (Singleton.getState().getDataMode() == State.TRANSMART_DEV_SERVICES_MODE) {\n\t\t\tdataSrc = \" using tranSMART Dev Instance\";\n\t\t} else if (Singleton.getState().getDataMode() == State.TRANSMART_SERVICES_MODE) {\n\t\t\tdataSrc = \" using tranSMART Stage Instance\";\n\t\t}*/\n String dataRetrievalSource = Singleton.getDataModel().getWebServices().getSourceName();\n frame = Singleton.getMainFrame();\n frame.setTitle(\"GWAVA: Genome-Wide Association Visual Analyzer \"\n\t\t\t\t+ VERSION + \" using \" + dataRetrievalSource);\n\t\t/*\n\t\t * UserPreferences userPref = Singleton.getUserPreferences();\n\t\t * userPref.loadUserPreferences();\n\t\t */\n\t\tDataModel dataModel = Singleton.getDataModel();\n\n\t\t//MainPanel mainPanel = new MainPanel();\n MainPanel mainPanel = Singleton.getMainPanel();\n\n\t\tframe.setContentPane(mainPanel);\n\t\tframe.setJMenuBar(new MenuBar(mainPanel));\n Image img = loadImageIconResource();\n if(img != null) {\n frame.setIconImage(img);\n\t\t}\n\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.addWindowListener(new WindowCloseController());\n\t\tframe.pack();\n if(Singleton.getUserPreferences().getMainFrameLocation() != null) {\n frame.setLocation(Singleton.getUserPreferences().getMainFrameLocation());\n }\n if(Singleton.getUserPreferences().getMainFrameSize() != null) {\n frame.setSize(Singleton.getUserPreferences().getMainFrameSize());\n }\n\t\tframe.setVisible(true);\n \n\t}",
"private void makeGUI()\n {\n mainFrame = new JFrame();\n mainFrame.setPreferredSize(new Dimension(750,400));\n aw = new AccountWindow();\n mainFrame.add(aw);\n mainFrame.setVisible(true);\n mainFrame.pack();\n }",
"public JFrameMain() {\n initComponents();\n \n }",
"Frame createFrame();",
"public AddFrame(MainFrame parent) {\n this.parent = parent;\n initComponents();\n }",
"public void createFrame()\n\t{\n\t\tframe = new JFrame(\"Question \" + questionCode + \":\"); // title is removed (see below)\n\t\tframe.setSize(600, 348);\n\t\tframe.setDefaultCloseOperation(frame.HIDE_ON_CLOSE);\n\t\tframe.setResizable(false);\n\t\tframe.setLocation(300, 426);\n\t\t\n\t\tholderPanel = new JPanel();\n\t\tcards = new CardLayout();\n\t\tholderPanel.setLayout(cards);\n\t\t\n\t\tfirstPage = new FirstPage(this);\n\t\tsecondPage = new SecondPage(this);\n\t\t\n\t\tholderPanel.add(firstPage, \"first\"); \n\t\tholderPanel.add(secondPage, \"second\");\n\t\t\n\t\tframe.getContentPane().add(holderPanel);\n\t\t\n\t\t// Got the below code from: \n\t\t//https://stackoverflow.com/questions/276254/how-to-disable-or-hide-the-close-x-button-on-a-jframe \n\t\t// it removes the top bar so user can't close it by themselves\n\t\t// they are forced to answer the question\n\t\tframe.setUndecorated(true);\n\t\tframe.getRootPane().setWindowDecorationStyle(JRootPane.NONE);\n\t\t\n\t\tframe.setVisible(true);\n\n\t}",
"public ManageMainJFrame() {\n initComponents();\n }",
"protected void createFrame() {\n MyInternalFrame frame = new MyInternalFrame();\n frame.setVisible(true); //necessary as of 1.3\n desktop.add(frame);\n try {\n frame.setSelected(true);\n } catch (java.beans.PropertyVetoException e) {}\n }",
"private void initMainFrame() {\n\t\tmainForm = new TaskList(taskPersistencefileSystem);\n\t\tmainForm.setVisible(true);\n\t}",
"public cinema_main_form() {\n \t\t\n \t\tmain_frame = new JFrame();//main frame\n\t\tmain_panel = new JPanel();//kedriko panel\n\t\t\n\t\t// Add the panel to the frame.\n\t\tmain_frame.getContentPane().add(main_panel, BorderLayout.CENTER);\n \t\n initComponents();\n\t\n\t\t// Exit when the window is closed.\n\t\tmain_frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n }",
"public NewJFrame() {\n Connect();\n initComponents();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
To get Query builder dGrid header cell number | public static int queryBuilderdGridHeaderCellNumber(String dGridHeaderName, int lastRowInExcel, String sheetName) throws Exception{
int dGridheaderCellNum = 0;
try {
Thread.sleep(1000);
WebElement dGridHeader = driver.findElement(By.className("compareHeaderTable"));
if(dGridHeader.isDisplayed()){
List<WebElement> thTagList = dGridHeader.findElements(By.tagName("th"));
int count = 0;
// to get cell position of Block, lot and Municipality header
for (WebElement thTagListItem : thTagList) {
// will scroll until given element is not appeared on page.
((JavascriptExecutor) driver).executeScript("arguments[0].scrollIntoView(true);", thTagListItem);
count++;
if(thTagListItem.getText().trim().equals(dGridHeaderName)){
dGridheaderCellNum = count;
break;
}
}
}
} catch (Exception e) {
StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace();
String screenShotPath = CommonUtility.getscreenshot(stackTraceElements);
CreateLog.createLogFile(stackTraceElements, e, screenShotPath, driver);
}
return dGridheaderCellNum;
} | [
"public static int dGridHeaderCellNumber(String dGridHeaderName, int lastRowInExcel, String sheetName) throws Exception{\r\n\t\tint dGridheaderCellNum = 0;\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"into grid header cell number method\");\r\n\t\t\tWebElement dGridHeader = driver.findElement(By.className(\"dgrid-header\"));\r\n\t\t\tif(dGridHeader.isDisplayed()){\r\n\t\t\t\tList<WebElement> thTagList = dGridHeader.findElements(By.tagName(\"th\"));\r\n\t\t\t\tint count = 0;\r\n\r\n\t\t\t\t// to get cell position of Block, lot and Municipality header\r\n\t\t\t\tfor (WebElement thTagListItem : thTagList) {\r\n\r\n\t\t\t\t\t// will scroll until given element is not appeared on page.\r\n\t\t\t\t\t((JavascriptExecutor) driver).executeScript(\"arguments[0].scrollIntoView(true);\", thTagListItem);\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t\tif(thTagListItem.getText().trim().equals(dGridHeaderName)){\r\n\t\t\t\t\t\tdGridheaderCellNum = count;\r\n\t\t\t\t\t\tSystem.out.println(\"Grid header cell number = \" +dGridheaderCellNum);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tStackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace();\r\n\t\t\tString screenShotPath = CommonUtility.getscreenshot(stackTraceElements);\r\n\t\t\tCommonUtility.writeResultsInExcel(lastRowInExcel, \"FAIL\", sheetName, screenShotPath);\r\n\t\t\tCreateLog.createLogFile(stackTraceElements, e, screenShotPath, driver);\r\n\t\t}\r\n\t\treturn dGridheaderCellNum;\t\r\n\t}",
"protected Integer getColumnIndex(String header){\n for (Map.Entry<String, Integer> entry: headerMap.entrySet()){\n if (header.toLowerCase().equals(entry.getKey().toLowerCase())) return entry.getValue();\n }\n return -1;\n }",
"public int getGridColumn();",
"long getCellColumn();",
"String firstColumnHeader();",
"String getCellindex();",
"String lastColumnHeader();",
"int getColumnIndex();",
"public int getGridRow();",
"public final ILink getNumberColumnHeaderLink() {\n if (this.numberColumnHeaderLink == null) {\n this.numberColumnHeaderLink = Link.getByLinkText(\"Number\");\n }\n return numberColumnHeaderLink;\n }",
"protected String getColumnHeader(Integer index){\n for (Map.Entry<String, Integer> entry: headerMap.entrySet()){\n if (index.equals(entry.getValue())) return entry.getKey();\n }\n return null;\n }",
"public int getColumnIndex();",
"int getCellId();",
"public int getHeaderRowCount() {\n return header.getRowCount();\n }",
"private int getNIdx() {\n return this.colStartOffset + 7;\n }",
"int getCellid();",
"protected Integer getColumnIndex(String header, boolean caseSensitive){\n if (caseSensitive) return headerMap.getOrDefault(header, -1);\n else return getColumnIndex(header);\n }",
"int getClientCellid();",
"public int getRowNo() {\n return rowIndex+1;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Equivalent to ec_decode() with _ft == 1<<_bits. | final int ec_decode_bin(final int _bits) {
this.ext = this.rng >>> _bits;
long s = (this.val / this.ext);
// return (int)((1L << _bits) - EC_MINI( s + 1L, 1L << _bits ));
s++;
long b = 1L << _bits;
b -= s;
if( b > 0 ) {
b = 0;
}
s += b;
return (int)((1L << _bits) - s);
} | [
"byte decodeByte();",
"T decode() throws IOException;",
"private float decodeTemperature(byte msb, byte lsb) {\n return ((msb << 8) | (lsb & 0xff)) / 256f;\n }",
"final void ec_dec_update(final int _fl, final int _fh, final int _ft) {// FIXME calling with int\r\n\t\t// java: if ft > fh > fl, than & 0xffffffff don't need\r\n\t\t/*\r\n\t\tfinal long s = ( _this.ext * ((long)(_ft - _fh) & 0xffffffffL) );\r\n\t\t_this.val -= s;\r\n\t\t_this.rng = _fl > 0 ? ( _this.ext * ((long)(_fh - _fl) & 0xffffffffL) ) : _this.rng - s;\r\n\t\tec_dec_normalize( _this );\r\n\t\t*/\r\n\t\tfinal long fl = (long)_fl & 0xffffffffL;// java\r\n\t\tfinal long fh = (long)_fh & 0xffffffffL;// java\r\n\t\tfinal long ft = (long)_ft & 0xffffffffL;// java\r\n\t\tfinal long s = ( this.ext * (ft - fh) );\r\n\t\tthis.val -= s;\r\n\t\t// _this.rng = fl > 0 ? ( _this.ext * (fh - fl) ) : _this.rng - s;\r\n\t\t// java: unsigned _fl, so _fl > 0 equals _fl != 0\r\n\t\tthis.rng = _fl != 0 ? (this.ext * (fh - fl)) : this.rng - s;\r\n\t\tec_dec_normalize();\r\n\t}",
"COSArray getDecode();",
"R decode(T value);",
"int getDecodeType();",
"private int decodeTVOC(byte msb, byte lsb) {\n return (msb << 8) | (lsb & 0xff);\n }",
"byte[] decodeBytes();",
"public static LNDCDC_NCS_TCS_CF_MEDIA_TYPES fromByteBuffer(\n java.nio.ByteBuffer b) throws java.io.IOException {\n return DECODER.decode(b);\n }",
"byte getEByte();",
"@Test\n public void decodeTest1() throws IOException {\n int[] maxCode = new int[] { -1, 0, 6, 14, 30, 62, 126, 254, 510, -1, -1, -1, -1, -1, -1, -1 };\n int[] minCode = new int[] { 0, 0, 2, 14, 30, 62, 126, 254, 510, 0, 0, 0, 0, 0, 0, 0 };\n int[] valPtr = new int[] { 0, 0, 1, 6, 7, 8, 9, 10, 11, 0, 0, 0, 0, 0, 0, 0 };\n int[] huffVal = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };\n DecodeTables dcDt = new DecodeTables(maxCode, minCode, valPtr);\n \n InputStream is = Mockito.mock(InputStream.class);\n //return single byte f2, where only 5 most significant bits(11110) would be used\n //to decode DC coefficient. Because in java byte is signed needs two complement to represent it.\n //Hence 0xf2(11110010) would be represented as -14\n when(is.read(any(byte[].class), any(Integer.class), any(Integer.class))).then(new Answer<Integer>() {\n @Override\n public Integer answer(InvocationOnMock invocation) throws Throwable {\n Object[] args = invocation.getArguments();\n ((byte[])args[0])[0] = -14;\n return 1;\n }\n });\n \n NextBitReader nbr = new NextBitReader(new BufferedReader(is)); \n\n int dc = dcDp.decode(dcDt, huffVal, nbr)[0];\n assertEquals(7, dc);\n }",
"@Test\n public void testDecodeETypeInfoEntry()\n {\n\n ByteBuffer stream = ByteBuffer.allocate( 0x0F );\n\n stream.put( new byte[]\n {\n 0x30, 0x0D,\n ( byte ) 0xA0, 0x03, // etype\n 0x02,\n 0x01,\n 0x05,\n ( byte ) 0xA1,\n 0x06, // salt\n 0x04,\n 0x04,\n 0x31,\n 0x32,\n 0x33,\n 0x34\n } );\n\n String decodedPdu = Strings.dumpBytes( stream.array() );\n stream.flip();\n\n ETypeInfoEntryContainer container = new ETypeInfoEntryContainer();\n\n try\n {\n Asn1Decoder.decode( stream, container );\n }\n catch ( DecoderException de )\n {\n de.printStackTrace();\n\n fail( de.getMessage() );\n }\n\n ETypeInfoEntry etypeInforEntry = container.getETypeInfoEntry();\n\n assertEquals( EncryptionType.DES3_CBC_MD5, etypeInforEntry.getEType() );\n assertTrue( Arrays.equals( Strings.getBytesUtf8( \"1234\" ), etypeInforEntry.getSalt() ) );\n\n ByteBuffer bb = ByteBuffer.allocate( etypeInforEntry.computeLength() );\n\n try\n {\n bb = etypeInforEntry.encode( bb );\n\n // Check the length\n assertEquals( 0x0F, bb.limit() );\n\n String encodedPdu = Strings.dumpBytes( bb.array() );\n\n assertEquals( encodedPdu, decodedPdu );\n }\n catch ( EncoderException ee )\n {\n fail();\n }\n }",
"private void mpeg_decode_quant_matrix_extension() {\n int i, v, j;\n if (in.getTrueFalse()) {\n for(i=0;i<64;i++) {\n v = in.getBits(8);\n j= zigZagDirect.getPermutated()[i];\n intra_matrix[j] = v;\n chroma_intra_matrix[j] = v;\n }\n }\n if (in.getTrueFalse()) {\n for(i=0;i<64;i++) {\n v = in.getBits(8);\n j= zigZagDirect.getPermutated()[i];\n inter_matrix[j] = v;\n chroma_inter_matrix[j] = v;\n }\n }\n if (in.getTrueFalse()) {\n for(i=0;i<64;i++) {\n v = in.getBits(8);\n j= zigZagDirect.getPermutated()[i];\n chroma_intra_matrix[j] = v;\n }\n }\n if (in.getTrueFalse()) {\n for(i=0;i<64;i++) {\n v = in.getBits(8);\n j= zigZagDirect.getPermutated()[i];\n chroma_inter_matrix[j] = v;\n }\n }\n }",
"public CFmt() {\n this.hexByteCnt=8;\n }",
"final int ec_laplace_decode(int fs, final int decay)\r\n\t{\r\n\t\tint value = 0;\r\n\t\tfinal int fm = ec_decode_bin( 15 );\r\n\t\tint fl = 0;\r\n\t\tif( fm >= fs )\r\n\t\t{\r\n\t\t\tvalue++;\r\n\t\t\tfl = fs;\r\n\t\t\tfs = ec_laplace_get_freq1( fs, decay ) + LAPLACE_MINP;\r\n\t\t\t/* Search the decaying part of the PDF.*/\r\n\t\t\twhile( fs > LAPLACE_MINP && fm >= fl + (fs << 1) )\r\n\t\t\t{\r\n\t\t\t\tfs <<= 1;\r\n\t\t\t\tfl += fs;\r\n\t\t\t\tfs = ((fs - (2 * LAPLACE_MINP)) * decay) >> 15;\r\n\t\t\t\tfs += LAPLACE_MINP;\r\n\t\t\t\tvalue++;\r\n\t\t\t}\r\n\t\t\t/* Everything beyond that has probability LAPLACE_MINP. */\r\n\t\t\tif( fs <= LAPLACE_MINP )\r\n\t\t\t{\r\n\t\t\t\tfinal int di = (fm - fl) >> (LAPLACE_LOG_MINP + 1);\r\n\t\t\t\tvalue += di;\r\n\t\t\t\tfl += di * (2 * LAPLACE_MINP);\r\n\t\t\t}\r\n\t\t\tif( fm < fl + fs ) {\r\n\t\t\t\tvalue = -value;\r\n\t\t\t} else {\r\n\t\t\t\tfl += fs;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// celt_assert( fl < 32768 );\r\n\t\t// celt_assert( fs > 0 );\r\n\t\t// celt_assert( fl <= fm );\r\n\t\t// celt_assert( fm < IMIN( fl + fs, 32768 ) );\r\n\t\tfs += fl;// java\r\n\t\tfs = fs <= 32768 ? fs : 32768;\r\n\t\tec_dec_update( fl, fs, 32768 );\r\n\t\treturn value;\r\n\t}",
"public void decode()\n {\n if (null == escherRecords || 0 == escherRecords.size()){\n byte[] rawData = getRawData();\n convertToEscherRecords(0, rawData.length, rawData );\n }\n }",
"public final int ec_dec_icdf(final char[] _icdf, final int ioffset, final int _ftb) {// java\r\n\t\tlong s = this.rng;\r\n\t\tfinal long d = this.val;\r\n\t\tfinal long r = s >>> _ftb;\r\n\t\tint ret = ioffset - 1;\r\n\t\tlong t;\r\n\t\tdo {\r\n\t\t\tt = s;\r\n\t\t\ts = r * (long)_icdf[++ret];\r\n\t\t} while( d < s );\r\n\t\tthis.val = d - s;// d >= s\r\n\t\tthis.rng = (t - s) & 0xffffffffL;// java. & 0xffffffffL to uint32. t < s is possible?\r\n\t\tec_dec_normalize();\r\n\t\treturn ret - ioffset;\r\n\t}",
"public void initializeDecoding() {\r\n\r\n\tXTIFFField fillOrderField = \r\n\t directory.getField(XTIFF.TIFFTAG_FILL_ORDER);\r\n\tif (fillOrderField != null) {\r\n\t fillOrder = fillOrderField.getAsInt(0);\r\n\t} else {\r\n\t // Default Fill Order\r\n\t fillOrder = 1;\r\n\t}\r\n\t // Fax T.4 compression options\r\n\tif (compression == 3) {\r\n\t\tXTIFFField t4OptionsField = \r\n\t\t directory.getField(XTIFF.TIFFTAG_T4_OPTIONS);\r\n\t\tif (t4OptionsField != null) {\r\n\t\t tiffT4Options = t4OptionsField.getAsLong(0);\r\n\t\t} else {\r\n\t\t // Use default value\r\n\t\t tiffT4Options = 0;\r\n\t\t}\r\n\t}\r\n\r\n\t // Fax T.6 compression options\r\n\tif (compression == 4) {\r\n\t\tXTIFFField t6OptionsField =\r\n\t\t directory.getField(XTIFF.TIFFTAG_T6_OPTIONS);\r\n\t\tif (t6OptionsField != null) {\r\n\t\t tiffT6Options = t6OptionsField.getAsLong(0);\r\n\t\t} else {\r\n\t\t // Use default value\r\n\t\t tiffT6Options = 0;\r\n\t\t}\r\n\t}\r\n\r\n\tdecoder = new XTIFFFaxDecoder(fillOrder, tileWidth, tileLength);\r\n\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Lookup the anchorTrace to find the branch hanging off it. If there isn't one, then install branch as that branch. Otherwise walk a balanced walk down the binary tree of branches to find a place to hang the new branch. | public void installBranchAfter(BranchDescription branch, TracePosition anchorTrace) {
BranchDescription prevBranch;
Position pos;
prevBranch = (BranchDescription) (myTrunk.fetch((pos = HeaperAsPosition.make(anchorTrace))));
if (prevBranch == null) {
myTrunk.introduce(pos, branch);
}
else {
prevBranch.installBranch(branch);
}
/*
udanax-top.st:5932:DagWood methodsFor: 'branches'!
{void} installBranch: branch {BranchDescription} after: anchorTrace {TracePosition}
"Lookup the anchorTrace to find the branch hanging off it. If there isn't one,
then install branch as that branch. Otherwise walk a balanced walk down the
binary tree of branches to find a place to hang the new branch."
| prevBranch {BranchDescription} pos {Position} |
prevBranch _ (myTrunk fetch: (pos _ HeaperAsPosition make: anchorTrace)) cast: BranchDescription.
prevBranch == NULL
ifTrue: [myTrunk at: pos introduce: branch]
ifFalse: [prevBranch installBranch: branch]!
*/
} | [
"HibBranch getInitialBranch();",
"public void installBranch(BranchDescription branch) {\n\tif (branch.isEqual(this)) {\n\t\treturn ;\n\t}\n\tdiskUpdate();\n\tif (myLeft == null) {\n\t\tmyLeft = branch;\n\t}\n\telse {\n\t\tBranchDescription tmpBr;\n\t\tmyLeft.installBranch(branch);\n\t\ttmpBr = myLeft;\n\t\tmyLeft = myRight;\n\t\tmyRight = tmpBr;\n\t}\n/*\nudanax-top.st:4304:BranchDescription methodsFor: 'position making'!\n{void} installBranch: branch {BranchDescription} \n\t\"Install branch as a descendant branch of myself. Walk down the binary tree of \n\tbranches to find a place to lodge it. This gets called if there was already a \n\tbranch existing off my root.\"\n\t(branch isEqual: self) ifTrue: [^VOID].\n\tself diskUpdate.\n\tmyLeft == NULL\n\t\tifTrue: [myLeft _ branch]\n\t\tifFalse: \n\t\t\t[| tmpBr {BranchDescription} |\n\t\t\tmyLeft installBranch: branch.\n\t\t\ttmpBr _ myLeft.\n\t\t\tmyLeft _ myRight.\n\t\t\tmyRight _ tmpBr]!\n*/\n}",
"private void findNewAnchor() {\n assert stack.empty();\n prevAnchor = anchor;\n if (anchor == HEAD_NODE) {\n next = Chunk.NONE; // there is no more in this chunk\n return;\n } else if (anchor == FIRST_ITEM) {\n anchor = HEAD_NODE;\n } else {\n anchor = anchor - FIELDS;\n }\n stack.push(anchor);\n }",
"private void addBinRefToQueueAlreadyLatched(BINReference binRef) {\n\n final Long node = binRef.getNodeId();\n\n if (binRefQueue.containsKey(node)) {\n return;\n }\n\n binRefQueue.put(node, binRef);\n }",
"protected void branch(ResourceMapping mapping, CVSTag branch) throws CoreException, IOException {\n CVSTag version = new CVSTag(\"Root_\" + branch.getName(), CVSTag.VERSION);\n branch(new ResourceMapping[] { mapping }, version, branch, true /* update */);\n assertTagged(mapping, version);\n assertBranched(mapping, branch);\n }",
"@Test\n public void resolveBranch() throws Exception {\n ObjectId commitId = repo.resolve(Constants.MASTER);\n try (RevWalk walk = new RevWalk(repo)) {\n // Unknown type (any)\n RevObject object = walk.parseAny(commitId);\n assertThat(object.getType()).isEqualTo(Constants.OBJ_COMMIT);\n assertThat(object).isEqualTo(initialCommit);\n\n // Known type (commit)\n RevCommit commit = walk.parseCommit(commitId);\n assertThat(commit).isEqualTo(initialCommit);\n }\n }",
"HibBranch getBranch(InternalActionContext ac, HibProject project);",
"public void forceCheckout(String branch) throws VcsException {\n GeneralCommandLine cmd = createCommandLine();\n cmd.addParameters(\"checkout\", \"-q\", \"-f\", branch);\n runCommand(cmd);\n }",
"BranchingBlock createBranchingBlock();",
"private void addBinToQueueAlreadyLatched(BIN bin) {\n\n final Long node = bin.getNodeId();\n\n if (binRefQueue.containsKey(node)) {\n return;\n }\n\n binRefQueue.put(node, bin.createReference());\n }",
"private Branch findBranch(String branchName) {\n for (int i = 0; i < branches.size(); i += 1) {\n Branch existingBranch = this.branches.get(i);\n if (existingBranch.getName().equals(branchName)) {\n return existingBranch;\n }\n }\n return null;\n }",
"HibBranch getLatestBranch();",
"public void rebase(String branch) throws IOException {\n\t\t// failure cases\n\t\tif (!myBranch.containsKey(branch)) {\n\t\t\tSystem.out.println(\"A branch with that name does not exist.\");\n\t\t\treturn;\n\t\t}\n\t\tif (myBranch.get(branch).getID() == myHead.getID()) {\n\t\t\tSystem.out.println(\"Cannot rebase a branch onto itself.\");\n\t\t\treturn;\n\t\t}\n\t\tVersion splitPoint = splitHelper(myHead, myBranch.get(branch));\n\n\t\tif (splitPoint.getID() == myBranch.get(branch).getID()) {\n\t\t\tSystem.out.println(\"Already up-to-date.\");\n\t\t\treturn;\n\t\t} else if (splitPoint.getID() == myHead.getID()) {\n\t\t\t// move the pointer of the given branch to myHead b/c given branch\n\t\t\t// is in myHead's history\n\t\t\tmyBranch.put(myHead.branchName(), myBranch.get(branch));\n\t\t\tmyHead = myBranch.get(branch);\n\t\t\tfor (String f : myHead.file().keySet()) {\n\t\t\t\tFile before = new File(myHead.file().get(f));\n\t\t\t\tcheckoutHelper(f);\n\t\t\t\tFile after = new File(f);\n\t\t\t\tcopyFile(before.getCanonicalPath(), after.getCanonicalPath());\n\t\t\t}\n\t\t} else {\n\t\t\t// copy all the versions in current branch and attach them to given\n\t\t\t// branch, move myHead to the new myHead version\n\t\t\tVersion count = myHead;\n\t\t\tint Counter = 0;\n\t\t\tHashMap<String, String> propagate = new HashMap<String, String>();\n\t\t\t// get the propagated tracked files\n\t\t\tfor (String s : myBranch.get(branch).file().keySet()) {\n\t\t\t\tif (splitPoint.file().get(s) != myBranch.get(branch).file()\n\t\t\t\t\t\t.get(s)) {\n\t\t\t\t\tpropagate.put(s, myBranch.get(branch).file().get(s));\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile (splitPoint.getID() != count.getID()) {\n\t\t\t\tCounter++;\n\t\t\t\tcount = count.getParent();\n\t\t\t}// count the number of nodes to copy\n\t\t\tint finalID = ID + Counter - 1;\n\t\t\t// assigning ID in reverse order\n\t\t\tVersion curr = myHead;\n\t\t\tint i = 0;\n\t\t\tVersion result = new Version(finalID - i, curr.message(), null,\n\t\t\t\t\tcurr.isBranchHead(), curr.branchName());\n\t\t\tmyHead = result;// set myHead to the front of the rebased branch\n\t\t\tmyBranch.put(currentBranch, result);\n\t\t\trebaseCopyHelper(finalID - i, curr, result, propagate, splitPoint);\n\t\t\t// start to copy node\n\t\t\tfor (String f : result.file().keySet()) {\n\t\t\t\tFile before = new File(result.file().get(f));\n\t\t\t\tcheckoutHelper(f);\n\t\t\t\tFile after = new File(f);\n\t\t\t\tcopyFile(before.getCanonicalPath(), after.getCanonicalPath());\n\t\t\t}\n\t\t\twhile (curr.getParent().getID() != splitPoint.getID()) {\n\t\t\t\ti++;\n\t\t\t\tcurr = curr.getParent();// iterate to the new version to be\n\t\t\t\t\t\t\t\t\t\t// copied\n\t\t\t\tVersion temp = new Version(finalID - i, curr.message(), null,\n\t\t\t\t\t\tcurr.isBranchHead(), curr.branchName());// initiate\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// version(did\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// not create\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// folder in the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// folder\n\t\t\t\trebaseCopyHelper(finalID - i, curr, temp, propagate, splitPoint);\n\t\t\t\tresult.setParent(temp);// make the newly created version the\n\t\t\t\t\t\t\t\t\t\t// parent of the old result\n\t\t\t\tresult = temp;// update the result to the new version\n\n\t\t\t}\n\t\t\tresult.setParent(myBranch.get(branch));\n\t\t\tID = finalID;// update ID in Gitlet\n\t\t}\n\n\t\tSerialization();\n\t}",
"private static SpatialHash findNextBucket(SpatialHash currentHash, Vector2 dir, RayCaster rayCaster) {\n final float currentBucketXLeft = currentHash.x * Constants.SPATIAL_HASH_TABLE_BUCKET_WIDTH;\n final float currentBucketXRight = (currentHash.x + 1) * Constants.SPATIAL_HASH_TABLE_BUCKET_WIDTH;\n final float currentBucketYBottom = currentHash.y * Constants.SPATIAL_HASH_TABLE_BUCKET_HEIGHT;\n final float currentBucketYTop = (currentHash.y + 1) * Constants.SPATIAL_HASH_TABLE_BUCKET_HEIGHT;\n int delta = 0;\n LineSegment bucketBound;\n // use heuristics to determine which bound should be checked first\n if (Math.abs(dir.x) > Math.abs(dir.y)) {\n // then ray points mostly left or right\n if (dir.x < 0) {\n bucketBound = new LineSegment(\n new Point(currentBucketXLeft, currentBucketYBottom),\n new Point(currentBucketXLeft, currentBucketYTop)\n );\n delta = -1;\n } else {\n bucketBound = new LineSegment(\n new Point(currentBucketXRight, currentBucketYBottom),\n new Point(currentBucketXRight, currentBucketYTop)\n );\n delta = +1;\n }\n if (null != rayCaster.findIntersection(bucketBound)) {\n return new SpatialHash(currentHash.x + delta, currentHash.y);\n } else {\n if (dir.y < 0) {\n bucketBound = new LineSegment(\n new Point(currentBucketXLeft, currentBucketYBottom),\n new Point(currentBucketXRight, currentBucketYBottom)\n );\n delta = -1;\n } else {\n bucketBound = new LineSegment(\n new Point(currentBucketXLeft, currentBucketYTop),\n new Point(currentBucketXRight, currentBucketYTop)\n );\n delta = +1;\n }\n if (null != rayCaster.findIntersection(bucketBound)) {\n return new SpatialHash(currentHash.x, currentHash.y + delta);\n } else {\n return null;\n }\n }\n } else {\n // then ray points mostly down or up\n if (dir.y < 0) {\n bucketBound = new LineSegment(\n new Point(currentBucketXLeft, currentBucketYBottom),\n new Point(currentBucketXRight, currentBucketYBottom)\n );\n delta = -1;\n } else {\n bucketBound = new LineSegment(\n new Point(currentBucketXLeft, currentBucketYTop),\n new Point(currentBucketXRight, currentBucketYTop)\n );\n delta = +1;\n }\n if (null != rayCaster.findIntersection(bucketBound)) {\n return new SpatialHash(currentHash.x, currentHash.y + delta);\n } else {\n if (dir.x < 0) {\n bucketBound = new LineSegment(\n new Point(currentBucketXLeft, currentBucketYBottom),\n new Point(currentBucketXLeft, currentBucketYTop)\n );\n delta = -1;\n } else {\n bucketBound = new LineSegment(\n new Point(currentBucketXRight, currentBucketYBottom),\n new Point(currentBucketXRight, currentBucketYTop)\n );\n delta = +1;\n }\n if (null != rayCaster.findIntersection(bucketBound)) {\n return new SpatialHash(currentHash.x + delta, currentHash.y);\n } else {\n return null;\n }\n }\n }\n }",
"void setInitialBranch(Branch branch);",
"private void searchAndPlaceBranches(IMolecule molecule, IAtomContainer chain, AtomPlacer3D ap3d, AtomTetrahedralLigandPlacer3D atlp3d, AtomPlacer atomPlacer) throws Exception {\n\t\t//logger.debug(\"****** SEARCH AND PLACE ****** Chain length: \"+chain.getAtomCount());\n\t\tjava.util.List atoms = null;\n\t\tIAtomContainer branchAtoms = molecule.getBuilder().newAtomContainer();\n\t\tIAtomContainer connectedAtoms = molecule.getBuilder().newAtomContainer();\n\t\tfor (int i = 0; i < chain.getAtomCount(); i++) {\n\t\t\tatoms = molecule.getConnectedAtomsList(chain.getAtom(i));\n\t\t\tfor (int j = 0; j < atoms.size(); j++) {\n\t\t\t\tIAtom atom = (IAtom)atoms.get(j);\n\t\t\t\tif (!(atom.getSymbol()).equals(\"H\") & !(atom.getFlag(CDKConstants.ISPLACED)) & !(atom.getFlag(CDKConstants.ISINRING))) {\n\t\t\t\t\t//logger.debug(\"SEARCH PLACE AND FOUND Branch Atom \"+molecule.getAtomNumber(chain.getAtomAt(i))+\n\t\t\t\t\t//\t\t\t\" New Atom:\"+molecule.getAtomNumber(atoms[j])+\" -> STORE\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconnectedAtoms.add(ap3d.getPlacedHeavyAtoms(molecule, chain.getAtom(i)));\n\t\t\t\t\t\t//logger.debug(\"Connected atom1:\"+molecule.getAtomNumber(connectedAtoms.getAtomAt(0))+\" atom2:\"+\n\t\t\t\t\t\t//molecule.getAtomNumber(connectedAtoms.getAtomAt(1))+ \" Length:\"+connectedAtoms.getAtomCount());\n\t\t\t\t\t} catch (Exception ex1) {\n\t\t\t\t\t\tlogger.error(\"SearchAndPlaceBranchERROR: Cannot find connected placed atoms due to\" + ex1.toString());\n\t\t\t\t\t\tthrow new IOException(\"SearchAndPlaceBranchERROR: Cannot find connected placed atoms\");\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsetBranchAtom(molecule, atom, chain.getAtom(i), connectedAtoms, ap3d, atlp3d);\n\t\t\t\t\t} catch (Exception ex2) {\n\t\t\t\t\t\tlogger.error(\"SearchAndPlaceBranchERROR: Cannot find enough neighbour atoms due to\" + ex2.toString());\n\t\t\t\t\t\tthrow new CDKException(\"SearchAndPlaceBranchERROR: Cannot find enough neighbour atoms: \" + ex2.getMessage(), ex2);\n\t\t\t\t\t}\n\t\t\t\t\tbranchAtoms.addAtom(atom);\n\t\t\t\t\tconnectedAtoms.removeAllElements();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}//for ac.getAtomCount\n\t\tplaceLinearChains3D(molecule, branchAtoms, ap3d, atlp3d, atomPlacer);\n\t}",
"private void switchFork(BlockCapsule newHead)\n throws ValidateSignatureException, ContractValidateException, ContractExeException,\n ValidateScheduleException, AccountResourceInsufficientException, TaposException,\n TooBigTransactionException, TooBigTransactionResultException, DupTransactionException, TransactionExpirationException,\n NonCommonBlockException, ReceiptCheckErrException,\n VMIllegalException, BadBlockException {\n Pair<LinkedList<KhaosBlock>, LinkedList<KhaosBlock>> branchPair;\n try {\n //trace back fork chain & main chain\n branchPair = khaosDb.getBranch(newHead.getBlockId(), getDynamicPropertiesStore().getLatestBlockHeaderHash());\n } catch (NonCommonBlockException e) {\n logger.info(\"there is not the most recent common ancestor, need to remove all blocks in the fork chain.\");\n BlockCapsule tmp = newHead;\n while (tmp != null) {\n khaosDb.removeBlk(tmp.getBlockId());\n tmp = khaosDb.getBlock(tmp.getParentHash());\n }\n throw e;\n }\n\n //loop & remove block from main branch, also revert snapshot.\n if (CollectionUtils.isNotEmpty(branchPair.getValue())) {\n while (!getDynamicPropertiesStore().getLatestBlockHeaderHash().equals(branchPair.getValue().peekLast().getParentHash())) {\n reorgContractTrigger();\n eraseBlock();\n }\n }\n\n //apply fork branch\n if (CollectionUtils.isNotEmpty(branchPair.getKey())) {\n List<KhaosBlock> forkBranch = new ArrayList<>(branchPair.getKey());\n Collections.reverse(forkBranch);\n for (KhaosBlock kForkBlock : forkBranch) {\n Exception exception = null;\n //@todo process the exception carefully later\n try (ISession tmpSession = revokingStore.buildSession()) {\n applyBlock(kForkBlock.getBlk());\n tmpSession.commit();\n } catch (AccountResourceInsufficientException\n | ValidateSignatureException\n | ContractValidateException\n | ContractExeException\n | TaposException\n | DupTransactionException\n | TransactionExpirationException\n | ReceiptCheckErrException\n | TooBigTransactionException\n | TooBigTransactionResultException\n | ValidateScheduleException\n | VMIllegalException\n | BadBlockException e) {\n logger.warn(e.getMessage(), e);\n exception = e;\n throw e;\n } finally {\n if (exception != null) {\n logger.warn(\"switch back because exception thrown while switching forks. \" + exception.getMessage(), exception);\n //remove bad fork branch from khaos db\n forkBranch.forEach(_kForkBlock -> khaosDb.removeBlk(_kForkBlock.getBlk().getBlockId()));\n khaosDb.setHead(branchPair.getValue().peekFirst());\n\n //revert the result of fork branch\n while (!getDynamicPropertiesStore().getLatestBlockHeaderHash().equals(branchPair.getValue().peekLast().getParentHash())) {\n eraseBlock();\n }\n\n //re-apply old-stable main branch\n List<KhaosBlock> second = new ArrayList<>(branchPair.getValue());\n Collections.reverse(second);\n for (KhaosBlock khaosBlock : second) {\n //@todo process the exception carefully later\n try (ISession tmpSession = revokingStore.buildSession()) {\n applyBlock(khaosBlock.getBlk());\n tmpSession.commit();\n } catch (AccountResourceInsufficientException\n | ValidateSignatureException\n | ContractValidateException\n | ContractExeException\n | TaposException\n | DupTransactionException\n | TransactionExpirationException\n | TooBigTransactionException\n | ValidateScheduleException e) {\n logger.warn(e.getMessage(), e);\n }\n }\n }\n }\n }\n }\n }",
"public void branch(int address) {\n currentStatement = address;\n }",
"private SiteNode addHistoryReferenceAndMakeNode(HistoryReference href) {\n\n SiteNode startNode = null;\n\n Model.getSingleton().getSession().getSiteTree().addPath(href);\n\n startNode = getSiteNode(href);\n\n return startNode;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A DIME request is really a SOAP request that we are dealing with, and so its authentication is the SOAP authentication approach. Since Axis2 does not handle DIME messages we deal with them here. | private void processDimeRequest(HttpServletRequest request, HttpServletResponse response) {
S3PutObjectRequest putRequest = null;
S3PutObjectResponse putResponse = null;
int bytesRead = 0;
S3Engine engine = new S3Engine();
try {
logRequest(request);
MultiPartDimeInputStream ds = new MultiPartDimeInputStream(request.getInputStream());
// -> the first stream MUST be the SOAP party
if (ds.nextInputStream()) {
//logger.debug( "DIME msg [" + ds.getStreamType() + "," + ds.getStreamTypeFormat() + "," + ds.getStreamId() + "]" );
byte[] buffer = new byte[8192];
bytesRead = ds.read(buffer, 0, 8192);
//logger.debug( "DIME SOAP Bytes read: " + bytesRead );
ByteArrayInputStream bis = new ByteArrayInputStream(buffer, 0, bytesRead);
putRequest = toEnginePutObjectRequest(bis);
}
// -> we only need to support a DIME message with two bodyparts
if (null != putRequest && ds.nextInputStream()) {
InputStream is = ds.getInputStream();
putRequest.setData(is);
}
// -> need to do SOAP level auth here, on failure return the SOAP fault
StringBuffer xml = new StringBuffer();
String AWSAccessKey = putRequest.getAccessKey();
UserInfo info = ServiceProvider.getInstance().getUserInfo(AWSAccessKey);
try {
S3SoapAuth.verifySignature(putRequest.getSignature(), "PutObject", putRequest.getRawTimestamp(), AWSAccessKey, info.getSecretKey());
} catch (AxisFault e) {
String reason = e.toString();
int start = reason.indexOf(".AxisFault:");
if (-1 != start)
reason = reason.substring(start + 11);
xml.append("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
xml.append("<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" >\n");
xml.append("<soap:Body>\n");
xml.append("<soap:Fault>\n");
xml.append("<faultcode>").append(e.getFaultCode().toString()).append("</faultcode>\n");
xml.append("<faultstring>").append(reason).append("</faultstring>\n");
xml.append("</soap:Fault>\n");
xml.append("</soap:Body></soap:Envelope>");
endResponse(response, xml.toString());
return;
}
// -> PutObject S3 Bucket Policy would be done in the engine.handleRequest() call
UserContext.current().initContext(AWSAccessKey, info.getSecretKey(), AWSAccessKey, "S3 DIME request", request);
putResponse = engine.handleRequest(putRequest);
xml.append("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
xml.append("<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:tns=\"http://s3.amazonaws.com/doc/2006-03-01/\">");
xml.append("<soap:Body>");
xml.append("<tns:PutObjectResponse>");
xml.append("<tns:PutObjectResponse>");
xml.append("<tns:ETag>\"").append(putResponse.getETag()).append("\"</tns:ETag>");
xml.append("<tns:LastModified>").append(DatatypeConverter.printDateTime(putResponse.getLastModified())).append("</tns:LastModified>");
xml.append("</tns:PutObjectResponse></tns:PutObjectResponse>");
xml.append("</soap:Body></soap:Envelope>");
endResponse(response, xml.toString());
} catch (PermissionDeniedException e) {
logger.error("Unexpected exception " + e.getMessage(), e);
response.setStatus(403);
endResponse(response, "Access denied");
} catch (Throwable e) {
logger.error("Unexpected exception " + e.getMessage(), e);
} finally {
}
} | [
"private AuthnRequestType parseBaseAttributes(StartElement startElement) throws ParsingException {\n super.parseRequiredAttributes(startElement);\n AuthnRequestType authnRequest = new AuthnRequestType(id, issueInstant);\n // Let us get the attributes\n super.parseBaseAttributes(startElement, authnRequest);\n\n Attribute assertionConsumerServiceURL = startElement.getAttributeByName(new QName(\n JBossSAMLConstants.ASSERTION_CONSUMER_SERVICE_URL.get()));\n if (assertionConsumerServiceURL != null) {\n String uri = StaxParserUtil.getAttributeValue(assertionConsumerServiceURL);\n authnRequest.setAssertionConsumerServiceURL(URI.create(uri));\n }\n\n Attribute assertionConsumerServiceIndex = startElement.getAttributeByName(new QName(\n JBossSAMLConstants.ASSERTION_CONSUMER_SERVICE_INDEX.get()));\n if (assertionConsumerServiceIndex != null)\n authnRequest.setAssertionConsumerServiceIndex(Integer.parseInt(StaxParserUtil\n .getAttributeValue(assertionConsumerServiceIndex)));\n\n Attribute protocolBinding = startElement.getAttributeByName(new QName(JBossSAMLConstants.PROTOCOL_BINDING.get()));\n if (protocolBinding != null)\n authnRequest.setProtocolBinding(URI.create(StaxParserUtil.getAttributeValue(protocolBinding)));\n\n Attribute providerName = startElement.getAttributeByName(new QName(JBossSAMLConstants.PROVIDER_NAME.get()));\n if (providerName != null)\n authnRequest.setProviderName(StaxParserUtil.getAttributeValue(providerName));\n\n Attribute forceAuthn = startElement.getAttributeByName(new QName(JBossSAMLConstants.FORCE_AUTHN.get()));\n if (forceAuthn != null) {\n authnRequest.setForceAuthn(Boolean.parseBoolean(StaxParserUtil.getAttributeValue(forceAuthn)));\n }\n\n Attribute isPassive = startElement.getAttributeByName(new QName(JBossSAMLConstants.IS_PASSIVE.get()));\n if (isPassive != null) {\n authnRequest.setIsPassive(Boolean.parseBoolean(StaxParserUtil.getAttributeValue(isPassive)));\n }\n\n Attribute attributeConsumingServiceIndex = startElement.getAttributeByName(new QName(\n JBossSAMLConstants.ATTRIBUTE_CONSUMING_SERVICE_INDEX.get()));\n if (attributeConsumingServiceIndex != null)\n authnRequest.setAttributeConsumingServiceIndex(Integer.parseInt(StaxParserUtil\n .getAttributeValue(attributeConsumingServiceIndex)));\n\n return authnRequest;\n }",
"se.mejsla.camp.mazela.network.common.protos.MazelaProtocol.AuthenticateRequest getAuthenticationRequest();",
"private AuthzDecisionQuery extractQueryFromRequest(HttpServletRequest request) throws IOException, \r\n XMLStreamException, \r\n XmlProcessingException {\r\n\r\n InputStream is = request.getInputStream();\r\n XMLInputFactory xif = XMLInputFactory.newInstance();\r\n XMLStreamReader reader = xif.createXMLStreamReader(is);\r\n StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder(reader);\r\n\r\n QName qName = null;\r\n\r\n try {\r\n qName = new QName(SAMLP_NS, \"AuthzDecisionQuery\");\r\n OMElement authzDecisionQuery = \r\n builder.getSOAPEnvelope().getBody().getFirstChildWithName(qName);\r\n checkNotNull(authzDecisionQuery);\r\n qName = new QName(null, \"ID\");\r\n OMAttribute id = authzDecisionQuery.getAttribute(qName);\r\n checkNotNull(id);\r\n qName = new QName(null, \"Resource\");\r\n OMAttribute resource = authzDecisionQuery.getAttribute(qName);\r\n checkNotNull(resource);\r\n qName = new QName(SAML_NS, \"Subject\");\r\n OMElement subject = \r\n authzDecisionQuery.getFirstChildWithName(qName);\r\n checkNotNull(subject);\r\n qName = new QName(SAML_NS, \"NameID\");\r\n OMElement nameId = subject.getFirstChildWithName(qName);\r\n checkNotNull(nameId);\r\n qName = new QName(SAML_NS, \"Action\");\r\n OMElement action = authzDecisionQuery.getFirstChildWithName(qName);\r\n checkNotNull(action);\r\n qName = new QName(null, \"Namespace\");\r\n OMAttribute actionNamespace = action.getAttribute(qName);\r\n checkNotNull(actionNamespace);\r\n\r\n AuthzDecisionQuery query = \r\n new AuthzDecisionQuery(id.getAttributeValue().trim(), \r\n resource.getAttributeValue().trim(), \r\n nameId.getText().trim(), \r\n action.getText().trim(), \r\n actionNamespace.getAttributeValue().trim());\r\n return query;\r\n } catch (NullPointerException ex) {\r\n throw new XmlProcessingException(qName + \r\n \" not found while processing SAML AuthzDecisionQuery request\");\r\n } catch (Exception ex) {\r\n throw new XmlProcessingException(qName + \r\n \" not found while processing SAML AuthzDecisionQuery request\", \r\n ex);\r\n }\r\n\r\n }",
"private MessageContext createMessageContext(HttpRequest request) {\n\n MessageContext msgContext = new MessageContext();\n msgContext.setMessageID(UIDGenerator.generateURNString());\n\n // There is a discrepency in what I thought, Axis2 spawns a new threads to\n // send a message if this is TRUE - and I want it to be the other way\n msgContext.setProperty(MessageContext.CLIENT_API_NON_BLOCKING, Boolean.FALSE);\n msgContext.setConfigurationContext(cfgCtx);\n if (isHttps) {\n msgContext.setTransportOut(cfgCtx.getAxisConfiguration()\n .getTransportOut(Constants.TRANSPORT_HTTPS));\n msgContext.setTransportIn(cfgCtx.getAxisConfiguration()\n .getTransportIn(Constants.TRANSPORT_HTTPS));\n msgContext.setIncomingTransportName(Constants.TRANSPORT_HTTPS);\n } else {\n msgContext.setTransportOut(cfgCtx.getAxisConfiguration()\n .getTransportOut(Constants.TRANSPORT_HTTP));\n msgContext.setTransportIn(cfgCtx.getAxisConfiguration()\n .getTransportIn(Constants.TRANSPORT_HTTP));\n msgContext.setIncomingTransportName(Constants.TRANSPORT_HTTP);\n }\n msgContext.setProperty(Constants.OUT_TRANSPORT_INFO, this);\n // the following statement causes the soap session services to be failing - ruwan \n // msgContext.setServiceGroupContextId(UUIDGenerator.getUUID());\n msgContext.setServerSide(true);\n msgContext.setProperty(\n Constants.Configuration.TRANSPORT_IN_URL, request.getRequestLine().getUri());\n\n // http transport header names are case insensitive \n Map<String, String> headers = new TreeMap<String, String>(new Comparator<String>() {\n @Override\n public int compare(String o1, String o2) {\n return o1.compareToIgnoreCase(o2);\n }\n });\n \n for (Header header : request.getAllHeaders()) {\n headers.put(header.getName(), header.getValue());\n }\n msgContext.setProperty(MessageContext.TRANSPORT_HEADERS, headers);\n\n // find the remote party IP address and set it to the message context\n if (conn instanceof HttpInetConnection) {\n HttpInetConnection inetConn = (HttpInetConnection) conn;\n InetAddress remoteAddr = inetConn.getRemoteAddress();\n if (remoteAddr != null) {\n msgContext.setProperty(\n MessageContext.REMOTE_ADDR, remoteAddr.getHostAddress());\n msgContext.setProperty(\n NhttpConstants.REMOTE_HOST, NhttpUtil.getHostName(remoteAddr));\n remoteAddress = remoteAddr.getHostAddress();\n }\n }\n\n msgContext.setProperty(RequestResponseTransport.TRANSPORT_CONTROL,\n new HttpCoreRequestResponseTransport(msgContext));\n\n msgContext.setProperty(ServerHandler.SERVER_CONNECTION_DEBUG,\n conn.getContext().getAttribute(ServerHandler.SERVER_CONNECTION_DEBUG));\n\n msgContext.setProperty(NhttpConstants.NHTTP_INPUT_STREAM, is);\n msgContext.setProperty(NhttpConstants.NHTTP_OUTPUT_STREAM, os);\n\n return msgContext;\n }",
"public void processRequest(PSRequest request)\n {\n Document doc = request.getInputDocument();\n Element root = null;\n if ( (doc == null) ||\n ((root = doc.getDocumentElement()) == null) )\n {\n Object[] args = { ms_RequestCategory, ms_RequestType, ms_RequestDTD };\n createErrorResponse(\n request, new PSIllegalArgumentException(\n IPSCatalogErrors.REQ_DOC_MISSING, args));\n return;\n }\n\n // verify this is the appropriate request type\n if (!ms_RequestDTD.equals(root.getTagName()))\n {\n Object[] args = { ms_RequestDTD, root.getTagName() };\n createErrorResponse(\n request, new PSIllegalArgumentException(\n IPSCatalogErrors.REQ_DOC_INVALID_TYPE, args));\n return;\n }\n\n Document retDoc = PSXmlDocumentBuilder.createXmlDocument();\n root = PSXmlDocumentBuilder.createRoot(retDoc, (ms_RequestDTD + \"Results\"));\n \n /* some day, convert this to use JDK 1.2 package info instead of\n * hardcoded classes\n */\n com.percussion.security.IPSSecurityProviderMetaData meta;\n\n int providerType = PSSecurityProvider.SP_TYPE_BETABLE;\n if ( PSSecurityProvider.isSupportedType( providerType ))\n {\n meta = new com.percussion.security.PSBackEndTableProviderMetaData();\n addProviderDefinition(\n doc, root, meta.getName(), providerType, meta.getFullName(),\n meta.getDescription(), meta.getConnectionProperties());\n }\n\n providerType = PSSecurityProvider.SP_TYPE_DIRCONN;\n if ( PSSecurityProvider.isSupportedType( providerType ))\n {\n meta = new com.percussion.security.PSDirectoryConnProviderMetaData();\n addProviderDefinition(\n doc, root, meta.getName(), providerType, meta.getFullName(),\n meta.getDescription(), meta.getConnectionProperties());\n }\n\n providerType = PSSecurityProvider.SP_TYPE_WEB_SERVER;\n if ( PSSecurityProvider.isSupportedType( providerType ))\n {\n meta = new com.percussion.security.PSWebServerProviderMetaData();\n addProviderDefinition(\n doc, root, meta.getName(), providerType, meta.getFullName(),\n meta.getDescription(), meta.getConnectionProperties());\n }\n\n providerType = PSSecurityProvider.SP_TYPE_RXINTERNAL;\n if(PSSecurityProvider.isSupportedType( providerType ))\n {\n meta = new com.percussion.security.PSWebServerProviderMetaData();\n addProviderDefinition(\n doc, root, PSSecurityProvider.XML_FLAG_SP_INTERNAL, providerType,\n ms_provFullName, ms_rxInternalDesc, null);\n } \n\n // and send the result to the caller\n sendXmlData(request, retDoc);\n }",
"@Override\n protected SOAPMessage createSoapMessage(Object request) throws SpmlException {\n try {\n // create the message without any WSSE header\n SOAPMessage message = super.createSoapMessage(request);\n // now add the WSSE headers => simple username and password\n SOAPEnvelope envelope = message.getSOAPPart().getEnvelope();\n SOAPHeader header = envelope.getHeader();\n SOAPElement security = header.addChildElement(\"Security\", \"wsse\", \"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\");\n SOAPElement usernameToken = security.addChildElement(\"UsernameToken\", \"wsse\");\n usernameToken.addAttribute(new QName(\"xmlns:wsu\"), \"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\");\n SOAPElement usernameEl = usernameToken.addChildElement(\"Username\", \"wsse\");\n usernameEl.addTextNode(username);\n SOAPElement passwordEl = usernameToken.addChildElement(\"Password\", \"wsse\");\n passwordEl.setAttribute(\"Type\", \"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText\");\n passwordEl.addTextNode(password);\n return message;\n } catch (DOMException | SOAPException e) {\n throw new SpmlException(e);\n }\n }",
"public void validateWsFederationAuthenticationRequest(final RequestContext context) {\n val service = wsFederationCookieManager.retrieve(context);\n LOGGER.debug(\"Retrieved service [{}] from the session cookie\", service);\n\n val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(context);\n val wResult = request.getParameter(WRESULT);\n LOGGER.debug(\"Parameter [{}] received: [{}]\", WRESULT, wResult);\n if (StringUtils.isBlank(wResult)) {\n LOGGER.error(\"No [{}] parameter is found\", WRESULT);\n throw new IllegalArgumentException(\"Missing parameter \" + WRESULT);\n }\n LOGGER.debug(\"Attempting to create an assertion from the token parameter\");\n val rsToken = wsFederationHelper.getRequestSecurityTokenFromResult(wResult);\n val assertion = wsFederationHelper.buildAndVerifyAssertion(rsToken, configurations, service);\n if (assertion == null) {\n LOGGER.error(\"Could not validate assertion via parsing the token from [{}]\", WRESULT);\n throw new IllegalArgumentException(\"Could not validate assertion via the provided token\");\n }\n LOGGER.debug(\"Attempting to validate the signature on the assertion\");\n if (!wsFederationHelper.validateSignature(assertion)) {\n val msg = \"WS Requested Security Token is blank or the signature is not valid.\";\n LOGGER.error(msg);\n throw new IllegalArgumentException(msg);\n }\n buildCredentialsFromAssertion(context, assertion, service);\n }",
"@Override\n public Authentication authenticate(Authentication authentication) {\n if (!(authentication instanceof KerberosServiceRequestToken)) {\n return null;\n }\n\n Bus cxfBus = getBus();\n IdpSTSClient sts = new IdpSTSClient(cxfBus);\n sts.setAddressingNamespace(\"http://www.w3.org/2005/08/addressing\");\n if (tokenType != null && tokenType.length() > 0) {\n sts.setTokenType(tokenType);\n } else {\n sts.setTokenType(WSConstants.WSS_SAML2_TOKEN_TYPE);\n }\n sts.setKeyType(HTTP_DOCS_OASIS_OPEN_ORG_WS_SX_WS_TRUST_200512_BEARER);\n sts.setWsdlLocation(getWsdlLocation());\n sts.setServiceQName(new QName(namespace, wsdlService));\n sts.setEndpointQName(new QName(namespace, wsdlEndpoint));\n\n sts.getProperties().putAll(properties);\n if (use200502Namespace) {\n sts.setNamespace(HTTP_SCHEMAS_XMLSOAP_ORG_WS_2005_02_TRUST);\n }\n\n if (lifetime != null) {\n sts.setEnableLifetime(true);\n sts.setTtl(lifetime.intValue());\n }\n\n return handleKerberos((KerberosServiceRequestToken)authentication, sts);\n }",
"public InquiryDietaRequest()\r\n\t{\r\n\r\n\t}",
"private AuthenticationVector loadAuthVector(DiameterMessage requestMessage)\n throws DiameterException{\n \t\n // AuthenticationVector authenticationVector = null;\n // AVP authVectorAVP =\n // avpLookUp(\n // requestMessage, AVPCodes._SIP_AUTH_DATA_ITEM, true, Vendor.V3GPP);\n //\n // AVP sipAuthorization =\n // authVectorAVP.findChildAVP(\n // AVPCodes._SIP_AUTHORIZATION, true, Vendor.V3GPP);\n //\n // if (sipAuthorization != null)\n // {\n // authenticationVector =\n // new AuthenticationVector(sipAuthorization.data);\n // }\n //\n // return authenticationVector;\n return new AuthenticationVector(Constants.AuthScheme.AUTH_SCHEME_AKAv1.getBytes());\n }",
"public ServiceRequest() {\n super();\n this.addNamespaceToRequest = true;\n }",
"public SAMLCredential processResponse(BasicSAMLMessageContext context) throws SAMLException, org.opensaml.xml.security.SecurityException, ValidationException {\r\n\r\n AuthnRequest request = null;\r\n SAMLObject message = context.getInboundSAMLMessage();\r\n \r\n\r\n // Verify type\r\n if (!(message instanceof Response)) {\r\n log.debug(\"Received response is not of a Response object type\");\r\n throw new SAMLException(\"Error validating SAML response. Received response is not of a Response object type\");\r\n }\r\n Response response = (Response) message;\r\n log.debug(\"Processing saml response\");\r\n // Verify status\r\n if (!StatusCode.SUCCESS_URI.equals(response.getStatus().getStatusCode().getValue())) {\r\n String[] logMessage = new String[2];\r\n logMessage[0] = response.getStatus().getStatusCode().getValue();\r\n StatusMessage message1 = response.getStatus().getStatusMessage();\r\n if (message1 != null) {\r\n logMessage[1] = message1.getMessage();\r\n }\r\n log.debug(\"Received response has invalid status code and is not success code\", logMessage);\r\n throw new SAMLException(\"SAML status is not success code\");\r\n }\r\n\r\n\r\n // Verify signature of the response if present\r\n if (response.getSignature() != null) {\r\n \tlog.debug(\"Verifying Response signature\");\r\n boolean validsig= verifySignature(response.getSignature(), context.getPeerEntityId());\r\n if(!validsig){\r\n \t throw new SAMLException(\"Response signature did not validate. User will not be logged in.\");\r\n }\r\n }\r\n\r\n // Verify issue time\r\n DateTime time = response.getIssueInstant();\r\n if (!isDateTimeSkewValid(DEFAULT_RESPONSE_SKEW, time, \"Response\")) {\r\n log.debug(\"Response issue time is either too old or with date in the future: \" + time.toString());\r\n throw new SAMLException(\"Error validating SAML response. Response issue time is either too old or a date in the future.\");\r\n }\r\n\r\n // Verify response to field if present, set request if correct\r\n if (response.getInResponseTo() != null) {\r\n RequestAbstractType requestType = protocolCache.retreiveMessage(response.getInResponseTo());\r\n if (requestType == null) {\r\n log.debug(\"InResponseToField doesn't correspond to sent message\", response.getInResponseTo());\r\n throw new SAMLException(\"Error validating SAML response. InResponseToField doesn't correspond to sent message.\");\r\n } else if (requestType instanceof AuthnRequest) {\r\n request = (AuthnRequest) requestType;\r\n } else {\r\n log.debug(\"Sent request was of different type then received response\", response.getInResponseTo());\r\n throw new SAMLException(\"Error validating SAML response. Sent request was of different type then received response.\");\r\n }\r\n }\r\n\r\n // Verify destination\r\n if (response.getDestination() != null) {\r\n SPSSODescriptor localDescriptor = (SPSSODescriptor) context.getLocalEntityRoleMetadata();\r\n\r\n // Check if destination is correct on this SP\r\n List<AssertionConsumerService> services = localDescriptor.getAssertionConsumerServices();\r\n boolean found = false;\r\n for (AssertionConsumerService service : services) {\r\n \tlog.debug(\"Response Destination: \" + response.getDestination());\r\n \tlog.debug(\"Service location retrieved: \" + service.getLocation());\r\n \tlog.debug(\"Inbound SAML Protocol: \" + context.getInboundSAMLProtocol());\r\n \tlog.debug(\"Service binding: \" + service.getBinding());\r\n if (response.getDestination().equals(service.getLocation()) &&\r\n context.getInboundSAMLProtocol().equals(service.getBinding())) {\r\n found = true;\r\n break;\r\n }\r\n }\r\n if (!found) {\r\n log.debug(\"Destination of the response was not the expected value\", response.getDestination());\r\n throw new SAMLException(\"Error validating SAML response Destination of the response was not the expected value.\");\r\n }\r\n }\r\n\r\n // Verify issuer\r\n if (response.getIssuer() != null) {\r\n Issuer issuer = response.getIssuer();\r\n verifyIssuer(issuer, context);\r\n }\r\n\r\n Assertion subjectAssertion = null;\r\n \r\n //RKM if we have encrpted assertions decrypt and process them otherwise assertions aren't encrypted and \r\n //verify normally\r\n if(response.getEncryptedAssertions().size()>0){\r\n // Verify assertions\r\n \r\n subjectAssertion = handleEncryptedAssertions(context, request,\r\n\t\t\t\tresponse, subjectAssertion);\r\n }else{\r\n \tsubjectAssertion = handleRegularAssertions(context, request,\r\n \t\t\t\tresponse, subjectAssertion);\r\n }\r\n //END RKM\r\n // Make sure that at least one assertion contains authentication statement and subject with bearer cofirmation\r\n if (subjectAssertion == null) {\r\n log.debug(\"Response doesn't contain authentication statement\");\r\n throw new SAMLException(\"Error validating SAML response Response doesn't contain authentication statement.\");\r\n }\r\nlog.debug(\"Assertion correctly handled and retrieved\");\r\nlog.debug(\"Creating SAMLCedential from subject name and assertion\");\r\n return new SAMLCredential(subjectAssertion.getSubject().getNameID(), subjectAssertion, context.getPeerEntityMetadata().getEntityID());\r\n }",
"public MalformedRequestException()\n {\n super();\n }",
"void request(com.forest.ape.server.persistence.Request request) throws IOException {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n DataOutputStream oa = new DataOutputStream(baos);\n oa.writeLong(request.sessionId);\n oa.writeInt(request.cxid);\n oa.writeInt(request.type);\n if (request.request != null) {\n request.request.rewind();\n int len = request.request.remaining();\n byte b[] = new byte[len];\n request.request.get(b);\n request.request.rewind();\n oa.write(b);\n }\n oa.close();\n BasicPacket qp = new BasicPacket(Type.DATA, -1, peer.getId(), baos.toByteArray());\n writePacket(qp, true);\n// BasicPacket qp = new BasicPacket(Leader.REQUEST, -1, baos\n// .toByteArray(), request.authInfo);\n// \n }",
"public void recvMessage(String FQDN, DiameterMessage requestMessage){\n \t\n if (requestMessage.commandCode == Constants.Command.MAR){\n counter++;\n LOGGER.debug(\"entering\");\n LOGGER.debug(FQDN);\n\n try {\n AVP resultCode = null;\n PublicIdentity publicIdentity = loadPublicIdentity(requestMessage);\n \n LOGGER.info(\"MAR of User: \"+ publicIdentity.getIdentity() + \" is being processed\"); \n \n URI privateUserIdentity = loadPrivateUserIdentity(requestMessage);\n Long numberOfAuthVectors = loadNumberOfAuthVectors(requestMessage);\n AuthenticationVector authenticationVector = loadAuthVector(requestMessage);\n\n String scscfName = new String(avpLookUp(requestMessage, Constants.AVPCode.CX_SERVER_NAME, true, Constants.Vendor.V3GPP).data);\n CxAuthDataResponse authDataResponse = null;\n authDataResponse = operations.cxAuthData(publicIdentity, privateUserIdentity, numberOfAuthVectors, authenticationVector, scscfName);\n \n if (authDataResponse == null){\n throw new UnableToComply();\n }\n\n DiameterMessage responseMessage = diameterPeer.newResponse(requestMessage);\n \n \t\t/* vendor-specific app id */\n AVP vendorSpecificApplicationID = new AVP(Constants.AVPCode.VENDOR_SPECIFIC_APPLICATION_ID, true, Constants.Vendor.DIAM);\n AVP vendorID = new AVP(Constants.AVPCode.VENDOR_ID, true, Constants.Vendor.DIAM);\n vendorID.setData(Constants.Vendor.V3GPP);\n vendorSpecificApplicationID.addChildAVP(vendorID);\n AVP applicationID = new AVP(Constants.AVPCode.AUTH_APPLICATION_ID, true, Constants.Vendor.DIAM);\n applicationID.setData(Constants.Application.CX);\n vendorSpecificApplicationID.addChildAVP(applicationID);\n responseMessage.addAVP(vendorSpecificApplicationID);\n \t\t\n \t\t/* auth-session-state, no state maintained */\n AVP authenticationSessionState = new AVP(Constants.AVPCode.AUTH_SESSION_STATE, true, Constants.Vendor.DIAM);\n authenticationSessionState.setData(1);\n responseMessage.addAVP(authenticationSessionState);\n \n /* add authentication data items */\n saveAuthData(authDataResponse, responseMessage);\n\n /* Add the result code */\n resultCode = getResultCodeAVP(authDataResponse.getResultCode(), authDataResponse.resultCodeIsBase());\n responseMessage.addAVP(resultCode);\n \n diameterPeer.sendMessage(FQDN, responseMessage);\n }\n catch (DiameterException e){\n LOGGER.warn(this, e);\n sendDiameterException(FQDN, requestMessage, e);\n }\n catch (Exception e){\n LOGGER.error(this, e);\n sendUnableToComply(FQDN, requestMessage);\n }\n }\n }",
"com.openmdmremote.harbor.HRPCProto.AuthRequest getAuthrequest();",
"public InvokeCompetenceRequestMessage() {\n super(ACLMessage.REQUEST);\n }",
"public interface AuthenticationRequest {\n\n /**\n * The result of an authentication attempt.\n */\n public static enum Status {\n\n Success, Continue, Failure, None, Not_Applicable\n }\n\n /**\n * What to do with the previously authenticated users session.\n */\n public static enum ManageAction {\n\n None, Clear\n }\n\n /**\n * Get the context-path.\n * @return The context-path for the current request.\n */\n String getContextPath();\n\n /**\n * Get the HttpServletRequest for the current request.\n *\n * @return The HttpServletRequest instance for the current request.\n */\n HttpServletRequest getHttpServletRequest();\n\n /**\n * Get the HttpServletResponse for the current request.\n *\n * @return The HttpServletResponse instance for the current request.\n */\n HttpServletResponse getHttpServletResponse();\n\n /**\n * Get the HTTP-Parameter with given name.\n *\n * @param name The name of the parameter to return.\n * @return The value of the parameter.\n */\n String getParameter(String name);\n\n /**\n * Get a map containing all request attributes.\n * Changes to this map will be reflected in the request attributes.\n *\n * @return A map representing all request attributes.\n */\n Map<String, Object> getRequestMap();\n\n /**\n * Get the request-path.\n * @return Get the complete path of the current request, starting after\n * the context-path and excluding any parameters.\n */\n String getRequestPath();\n\n /**\n * Get the ServletContext for the current request.\n *\n * @return The ServletContext instance for the current request.\n */\n ServletContext getServletContext();\n\n /**\n * Get a map containing all session attributes.\n * Changes to this map will be reflected in the session attributes.\n *\n * @return A map representing all session attributes.\n */\n Map<String, Object> getSessionMap();\n\n /**\n * Get a map containing all application attributes.\n * Changes to this map will be reflected in the application attributes.\n *\n * @return A map representing all application attributes.\n */\n Map<String, Object> getApplicationMap();\n\n /**\n * This map can be used to store values across authentication-requests.\n *\n * @return A map for storing authentication values.\n */\n Map<String, Object> getAuthenticationMap();\n\n /**\n * Get whether authentication is mandatory for the current request.\n * If authentication is not mandatory the authenticator can still return\n * Success to signal that the resource should be served anyways.\n *\n * @return If authentication is mandatory for the requested resource.\n */\n boolean isMandatory();\n\n}",
"protected void processRequest(HttpServletRequest request, \r\n HttpServletResponse response) throws ServletException, \r\n IOException {\r\n logger.debug(\"AuthzDecisionQuery received\");\r\n\r\n response.setContentType(\"text/xml;charset=utf-8\");\r\n\r\n //set Authorization class\r\n try {\r\n setAuthorizationClass();\r\n } catch (ValveConfigurationException e) {\r\n logger.error(\"Configuration error when setting Authorization instance: \" + \r\n e);\r\n }\r\n\r\n String buildStatus = SAML_STATUS_CODE_SUCCESS;\r\n\r\n AuthzDecisionQuery query = null;\r\n\r\n try {\r\n query = extractQueryFromRequest(request);\r\n } catch (XmlProcessingException ex) {\r\n logger.error(\"Bad input XML string - will respond \" + \r\n SAML_STATUS_CODE_REQUESTER, ex);\r\n buildStatus = SAML_STATUS_CODE_REQUESTER;\r\n } catch (Exception ex) {\r\n logger.error(\"Bad input XML string - unable to respond\", ex);\r\n throw new ServletException(ex);\r\n }\r\n\r\n String decisionResult = SAML_DECISION_INDETERMINATE;\r\n if (query != null) {\r\n try {\r\n decisionResult = getDecision(request, response, query);\r\n } catch (Exception ex) {\r\n logger.error(\"Problems getting decision - will respond \" + \r\n SAML_STATUS_CODE_RESPONDER, ex);\r\n buildStatus = SAML_STATUS_CODE_RESPONDER;\r\n }\r\n\r\n } else {\r\n query = new AuthzDecisionQuery();\r\n }\r\n\r\n PrintWriter out = response.getWriter();\r\n\r\n logger.debug(\"AuthzDecisionQuery received with ID=\\\"\" + query.getId() + \r\n \"\\\"\" + \" for accessing resource=\\\"\" + \r\n query.getResource() + \"\\\"\" + \" by subject=\\\"\" + \r\n query.getSubject() + \"\\\"\" + \" with action=\\\"\" + \r\n query.getAction() + \"\\\"\" + \" (namespace=\\\"\" + \r\n query.getActionNamespace() + \"\\\")\" + \r\n \", responding decision=\\\"\" + decisionResult + \"\\\"\");\r\n\r\n try {\r\n buildResponse(buildStatus, out, query, decisionResult);\r\n } catch (Exception ex) {\r\n logger.error(\"Problems generating SOAP response - unable to respond\", \r\n ex);\r\n throw new ServletException(ex);\r\n }\r\n\r\n out.close();\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
calculates average based on given sum and count | private void calculateAverage()
{
average = ((double)(sum))/((double)(count));
} | [
"double AverageAllPrimeNumInRange(int sumOfPrimeNum, int countOfPrimeNum) {\n\t\treturn (double)sumOfPrimeNum/countOfPrimeNum;\n\t}",
"double average() {\n\t\tdouble total = this.sum();\n\t\tdouble count = this.count();\n\t\tdouble average = total / count;\n\t\treturn average;\n\t}",
"private float calcAvg() {\n\t\tfloat sum = 0;\n\t\tfor (Integer a : gradesOfExam)\n\t\t\tsum += a;\n\t\tsum /= gradesOfExam.size();\n\t\treturn sum;\n\t}",
"private double averageCalculator(ArrayList<Double> list) {\n int listSize = list.size(); //the average of this list will be calculated.\n double runningTotal = 0;\n for (int i = 0; i < listSize; i++) {\n runningTotal += list.get(i); //add all together.\n }\n return (runningTotal / listSize); //divide by size of list.\n }",
"public double calculateAverage(List<Integer> list) {\n double sum = 0;\n double avg = 0.0;\n try {\n if (list.isEmpty()) {\n throw new Exception(\"Empty List\");\n }\n\n //loop for values to calculate average\n for (Integer mark : list) {\n sum = sum + mark;\n }\n avg = sum / list.size();\n\n } catch (Exception e) {\n avg = 0.0;\n }\n return avg;\n }",
"public Double calcAverage(){\n double total = 0;\n for(int i = 0; i < grades.size(); i++){\n total += grades.get(i);\n }\n return total / grades.size(); \n }",
"private void mean() {\n\t\tthis.mean = sum / count;\n\t}",
"public Double computeAverage(){\n\t\tdouble total = 0; //double used to keep total value of elements in arr to determine average\n\t\t\n\t\tfor(int i = 0; i < arr.length; i++)//loop through array and add the total\n\t\t{\n\t\t\ttotal += arr[i].doubleValue(); //add current value of element in arr to total's value\n\t\t}\n\t\t\n\t\tDouble result = total/arr.length; //returns the average as a Double\n\t\t\n\t\treturn result;\n\t}",
"private double calcAvgX(List<Business> business) {\n\t\tdouble avg = 0.0;\n\t\tint count = 0;\n\t\tfor (int i = 0; i < business.size(); i++) {\n\t\t\tavg += business.get(i).getPrice();\n\t\t\tcount++;\n\t\t}\n\n\t\treturn avg / count;\n\t}",
"public static double findAverage(ArrayList<Integer> numbers){\n double avg=0;\n\n for(int i=0; i<numbers.size(); i++)\n avg += numbers.get(i);\n\n avg = avg/(double)numbers.size();\n return avg;\n }",
"public static int getAverage(ArrayList<Double> arr) {\n double avg = 0;\n for (double num : arr) {\n avg += num;\n }\n avg /= arr.size();\n if (avg % 1 >= 0.5) //if remainder is more than .5, round up.\n return (int) avg + 1;\n else\n return (int) avg;\n }",
"private void calculateAverages(){\n for (int i=0; i<40; i=i+4){\n totalGoalsScored1 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsScored1 = totalGoalsScored1/numberItems;\n //Total and average scored goals of team 2\n for (int i=2; i<40; i=i+4){\n totalGoalsScored2 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsScored2 = totalGoalsScored2/numberItems;\n //Total and average received goals of team 1\n for (int i=1; i<40; i=i+4){\n totalGoalsReceived1 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsReceived1 = totalGoalsReceived1/numberItems;\n //Total and average received goals of team 2\n for (int i=3; i<40; i=i+4){\n totalGoalsReceived2 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsReceived2 = totalGoalsReceived2/numberItems;\n }",
"default double average(int n) {\n\t\tint i = 0;\n\t\tdouble sum = 0;\n\t\twhile(i < n && hasNext()) {\n\t\t\tsum += next();\n\t\t\ti++;\n\t\t}\n\t\t\n\t\tif(i == 0) {\n\t\t\treturn 0;\n\t\t}else {\n\t\t\treturn sum / i;\n\t\t}\n\t}",
"private static int getAverage(ArrayList<Integer> inList) \n\t{\n\t\tint add = 0; \n\t\tint mean = 0; \n\t\tfor(int pos = 0; pos < inList.size(); ++pos)\n\t\t{\n\t\t\tadd = add + inList.get(pos);\n\t\t\t\n\t\t}\n\t\t\n\t\tmean = add/inList.size(); \n\t\t\n\t\treturn mean; \n\t\t\n\t}",
"private double calcAverage(int startIndex, int endIndex) {\n\t\t\n\t\t// total for the scores\n\t\tdouble total = 0;\n\t\t\n\t\t// loop between indexes and add the scores\n\t\tfor (int i = startIndex; i < endIndex; i++) \n\t\t\ttotal += scores.get(i);\n\t\t\n\t\t// return the average\n\t\treturn total / (endIndex - startIndex);\n\t}",
"default double average() {\n\t\tint i = 0;\n\t\tdouble sum = 0;\n\t\twhile(hasNext()) {\n\t\t\tsum += next();\n\t\t\ti++;\n\t\t}\n\t\tif(i == 0) {\n\t\t\treturn 0;\n\t\t}else {\n\t\t\treturn sum / i;\n\t\t}\n\t}",
"public int findAverage(int arr[]) {\n return findSum(arr) / arr.length;\n }",
"double calcAverage(){\r\n\t\tdouble average=0;\r\n\t\tfor (int i=0;i<10;++i){\r\n\t\t\taverage+=marks[i];\r\n\t\t}\r\n\t\taverage/=10;\r\n\t\treturn average;\r\n\t}",
"public void GetAvg (int [] arr){\r\n int sum = 0;\r\n for (int x: arr) {\r\n sum += x;\r\n }\r\n System.out.println(sum/arr.length);\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new solution from the neighbourhood of the current solution by randomly taking or leaving one item | private Solution getNeighbourSolution(int size) {
Solution solution = new Solution(currentSol);
// Choose a random item to take/leave
int index = generator.nextInt(size);
solution.set(index, Math.abs(currentSol.get(index) - 1));
return solution;
} | [
"@Override\n\tpublic Solution getRandomNeighbor(Solution solution){\n\t\tSolution n = solution.duplicate();\n\t\tObject[] values = n.getValues();\n\t\tint[] idxs = choiceDimensionsForPerturb();\n\t\tfor (int i = 0; i < idxs.length; ++i){\n\t\t\tint idx = idxs[i];\n\t\t\tvalues[idx] = perturb(idx, (Double) values[idx]);\n\t\t}\n\t\tn.setValues(values);\n\t\t\n\t\treturn n;\n\t}",
"public Solution constructRandomSolution();",
"@Override\n public KPMPSolution randomNextNeighbour() {\n random = new Random(Double.doubleToLongBits(Math.random()));\n List<KPMPSolutionWriter.PageEntry> edgePartition = bestSolution.getEdgePartition().stream().map(KPMPSolutionWriter.PageEntry::clone).collect(toCollection(ArrayList::new));\n KPMPSolution neighbourSolution = new KPMPSolution(bestSolution.getSpineOrder(), edgePartition, bestSolution.getNumberOfPages());\n int randomIndex = random.nextInt(edgePartition.size());\n edge = edgePartition.get(randomIndex);\n originalPageIndex = edge.page;\n do {\n newPageIndex = random.nextInt(neighbourSolution.getNumberOfPages());\n } while (newPageIndex == originalPageIndex);\n edgePartition.get(randomIndex).page = newPageIndex;\n return neighbourSolution;\n }",
"public Move<? super SolutionType> getRandomMove(SolutionType solution, Random rnd);",
"public Node goClimbingRandomly() {\n\t\tNode workingNode = hillClimber.getInitialState();\n\t\tthis.initialState = workingNode;\n\t\tint heuristic = workingNode.getHeuristic();\n\t\t\t\t\n\t\twhile(heuristic!=0){\n\t\t\tNode baseClimber = hillClimber.goClimbing();\n\t\t\theuristic = baseClimber.getHeuristic();\n\t\t\tif(heuristic!=0){ \n\t\t\t\thillClimber = new HillClimbing();\n\t\t\t}else{\n\t\t\t\tworkingNode = baseClimber;\n\t\t\t}\n\t\t}\n\t\treturn workingNode;\n\t}",
"public void newRandomPuzzle() {\r\n // Start with the goal state\r\n state = goal.copy();\r\n HashSet<PuzzleState> visitedStates = new HashSet<PuzzleState>();\r\n visitedStates.add(state.copy());\r\n System.out.println(state);\r\n \r\n Vector<PuzzleState> aStarSolution = null;\r\n int numMovesLeft = this.minMoves;\r\n while (numMovesLeft > 0) {\r\n for (int move = 0; move < numMovesLeft; move++) {\r\n // Get all the possible next states\r\n Vector<PuzzleState> nextStates = possibleNextStates(state);\r\n \r\n // Randomly pick a new state until it is not one we have seen before\r\n PuzzleState next;\r\n do {\r\n next = nextStates.get(rand.nextInt(nextStates.size()));\r\n } while (visitedStates.contains(next));\r\n \r\n // Update the state and add it to the set of visited states\r\n state = next;\r\n visitedStates.add(state.copy());\r\n System.out.println(\"New state:\");\r\n System.out.println(state);\r\n }\r\n aStarSolution = aStarSearch();\r\n int minMovesAStar = aStarSolution.size();\r\n numMovesLeft = this.minMoves - minMovesAStar;\r\n System.out.println(\"num moves left: \" + numMovesLeft);\r\n }\r\n solution = aStarSolution;\r\n }",
"public void randomSolution() {\r\n\t\tint literalValue;\r\n\r\n\t\tfor(int i=0; i<this.getSolutionSize(); i++) {\r\n\t\t\tliteralValue = (int) (Math.random()*10)%2;\r\n\r\n\t\t\tthis.solution.set(i, ((i+1) * (literalValue == 0 ? -1 : 1)));\r\n\t\t}\r\n\t}",
"protected int[] getNeighbourSolution(int[] solution){\n int randomIndex1 = random.nextInt(solution.length - 1);\n int randomIndex2 = random.nextInt(solution.length - 1);\n\n return getNeighbourSolution(solution, randomIndex1, randomIndex2);\n }",
"@Override\n public SubsetMove getRandomMove(SubsetSolution solution, Random rnd) {\n // get set of candidate IDs for addition (fixed IDs are discarded)\n Set<Integer> addCandidates = getAddCandidates(solution);\n // compute number of additions\n int curNumAdd = numAdditions(addCandidates, solution);\n // return null if no additions are possible\n if(curNumAdd == 0){\n return null;\n }\n // pick random IDs to add to selection\n Set<Integer> add = SetUtilities.getRandomSubset(addCandidates, curNumAdd, rnd);\n // create and return move\n return new GeneralSubsetMove(add, Collections.emptySet());\n }",
"private Assignment randomNeighbour(Assignment oldAssignment) {\n\t\tRandom random = new Random();\n\t\tAssignment assignment = new Assignment(oldAssignment);\n\n\t\tVehicle vehicleFrom;\n\t\tVehicleAssignment vehicleAssignment;\n\t\tdo {\n\t\t\tvehicleFrom = vehicles.get(random.nextInt(vehicles.size()));\n\t\t\tvehicleAssignment = assignment.get(vehicleFrom);\n\t\t} while (vehicleAssignment.size() <= 0);\n\n\t\tint index = random.nextInt(vehicleAssignment.size());\n\t\tTask task = vehicleAssignment.removeTask(index);\n\n\t\tVehicle vehicleTo = vehicles.get(random.nextInt(vehicles.size()));\n\t\tvehicleAssignment = assignment.get(vehicleTo);\n//\t\tindex = random.nextInt(vehicleAssignment.size() + 1);\n//\t\tint index2 = random.nextInt(vehicleAssignment.size() - index + 1) + index + 1;\n//\n//\t\t// check for validity\n//\t\tint[] loadArray = load(vehicleAssignment);\n//\t\tboolean spaceLeft = true;\n//\t\tfor (int i = index; i < index2; i++) {\n//\t\t\tif (loadArray[i] > vehicleTo.capacity() - task.weight) {\n//\t\t\t\tspaceLeft = false;\n//\t\t\t\tbreak;\n//\t\t\t}\n//\t\t}\n//\t\tif (spaceLeft) {\n//\t\t\tvehicleAssignment.add(index, taskToPickup.get(task));\n//\t\t\tvehicleAssignment.add(index2, taskToDelivery.get(task));\n//\t\t\treturn assignment;\n//\t\t}\n\n\t\t// precompute the space left after each action\n\t\tint weight = task.weight;\n\t\tint[] spaceLeft = new int[vehicleAssignment.size() + 2];\n\t\tspaceLeft[0] = vehicleTo.capacity();\n\t\tfor (int j = 0; j < vehicleAssignment.size(); j++) {\n\t\t\tif (vehicleAssignment.get(j).actionType == PublicAction.ActionType.PICKUP) {\n\t\t\t\tspaceLeft[j + 1] = spaceLeft[j] - vehicleAssignment.get(j).task.weight;\n\t\t\t} else { // delivery\n\t\t\t\tspaceLeft[j + 1] = spaceLeft[j] + vehicleAssignment.get(j).task.weight;\n\t\t\t}\n\t\t}\n\t\tspaceLeft[spaceLeft.length - 1] = weight;\n\n\t\tint index1 = 0, index2 = 1;\n\t\tint p = 1;\n\t\tint stop = 0;\n\t\tfor (int i = 0; i < spaceLeft.length - 1; i++) {\n\t\t\tif (spaceLeft[i] < weight) {\n\t\t\t\tfor (int k = stop; k < i; k++) {\n\t\t\t\t\tfor (int l = k; l <= i; l++) {\n\t\t\t\t\t\tif (random.nextDouble() < 1d / p) {\n\t\t\t\t\t\t\tindex1 = k;\n\t\t\t\t\t\t\tindex2 = l+1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tp++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstop = i + 1;\n\t\t\t}\n\t\t}\n\t\tfor (int k = stop; k < spaceLeft.length - 1; k++) {\n\t\t\tfor (int l = k; l < spaceLeft.length - 1; l++) {\n\t\t\t\tif (random.nextDouble() < 1d / p) {\n\t\t\t\t\tindex1 = k;\n\t\t\t\t\tindex2 = l+1;\n\t\t\t\t}\n\t\t\t\tp++;\n\t\t\t}\n\t\t}\n\n\t\tvehicleAssignment.add(index1, taskToPickup.get(task));\n\t\tvehicleAssignment.add(index2, taskToDelivery.get(task));\n\t\treturn assignment;\n\t}",
"public void mutate(Solution solution) {\n int size = solution.values.length;\n int first = random.nextInt(size-1);\n int second = first + random.nextInt(size-first);\n\n int firstCopy = solution.values[first];\n solution.values[first] = solution.values[second];\n solution.values[second] = firstCopy;\n }",
"private static Point GetRandomNeighbour(Point current)\n {\n List<Cell> neighbours = new ArrayList<Cell>();\n\n int cX = current.X;\n int cY = current.Y;\n\n //right\n if (cX + 1 <= Size - 1)\n {\n neighbours.add(cells[cX + 1][cY]);\n }\n //left\n if (cX - 1 >= 0)\n {\n neighbours.add(cells[cX - 1][ cY]);\n }\n //Upper\n if (cY - 1 >= 0)\n {\n neighbours.add(cells[cX][cY - 1]);\n }\n //Lower\n if (cY + 1 <= Size - 1)\n {\n neighbours.add(cells[cX][cY + 1]);\n }\n\n\n //Declare and initialize a new list called toRemove\n //We then run a foreach loop that iterates over every Cell in neighbours\n //If Cell n is already visited, add it to toRemove list\n List<Cell> toRemove = new ArrayList<>();\n\n for (Cell n : neighbours)\n {\n if (n.Visited)\n {\n toRemove.add(n);\n }\n }\n //After the foreach loop, remove all cells in neighbours that matches the cells in toRemove\n //We need to do it this way because Java doesn't like to change a list while we iterate over it\n neighbours.removeAll(toRemove);\n\n //Check if neighbours list is empty, if not then return a randomly chosen neighbour\n if (neighbours.size() > 0)\n {\n return neighbours.get(RandomNum.Next(0, neighbours.size())).Point;\n }\n\n return null;\n }",
"public void generateSolution() {\n\n\t\tCard p = people.get((int) (Math.random() * 6));\n\t\tsolution.add(p);\n\n\t\tCard w = weapons.get((int) (Math.random() * 6));\n\t\tsolution.add(w);\n\n\t\tCard r = rooms.get((int) (Math.random() * 6));\n\t\tsolution.add(r);\n\n\t}",
"public void randomMove(){\n ArrayList<Hole> availableHoles = availableMoves(nextToPlay);\n int holeIndex = (int)(Math.random() * (((availableHoles.size()-1) - 0) + 1)) + 0;\n ArrayList<Korgool> korgools = availableHoles.get(holeIndex).getKoorgools();\n while(korgools.size() == 0){\n holeIndex = (int)(Math.random() * (((availableHoles.size()-1) - 0) + 1)) + 0;\n korgools = availableHoles.get(holeIndex).getKoorgools();\n }\n redistribute(availableHoles.get(holeIndex).getHoleIndex());\n }",
"public Coordinate getRandomGoal() {\n\t\tRandom rand = new Random();\n\t\tint n = rand.nextInt(currentMap.size());\n\t\tint i = 0;\n\t\tfor (Coordinate c : this.currentMap.keySet()) {\n\t\t\tif (currentMap.get(c).isType(MapTile.Type.ROAD) && i > currentMap.size()/2) {\n\t\t\t\ttargetPoint = c;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn targetPoint;\n\t}",
"private void selectSolution()\n {\n Collections.shuffle(locations);\n Collections.shuffle(suspects);\n Collections.shuffle(weapons);\n \n //chose 1 card from each list for the solution\n solution.add(suspects.get(0));\n solution.add(weapons.get(0));\n solution.add(locations.get(0));\n }",
"private static Solution generateRandomStartSolution(Instance instance) {\n int bound = 2;\n int n = instance.getSize();\n Solution solution = new Solution(instance);\n Random random = new Random();\n\n for (int i = 0; i < n; i++) {\n solution.set(i, random.nextInt(bound));\n }\n\n return solution;\n }",
"public void randomlyDrop(Item item) {\n inventory.removeItem(item);\n\n Direction[] directions = Direction.values();\n Random random = new Random();\n int randomDirection = random.nextInt(directions.length);\n Square randomSquare = getCurrentSquare().getNeighbour(directions[randomDirection]);\n while (randomSquare == null || randomSquare.isObstructed()) {\n randomDirection = random.nextInt(directions.length);\n randomSquare = getCurrentSquare().getNeighbour(directions[randomDirection]);\n }\n\n randomSquare.addItem(item);\n\n }",
"public void MoveRandom(){\n Asteroid a = (Asteroid) neighbors.get(0);\n a.RemoveNeighbor(this);\n Place neighbor = a.GetRandomNeighbor();\n neighbor.AddNeighbor(this);\n \n neighbors.remove(a);\n neighbors.add(neighbor);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get IoT Defender Settings. | IotDefenderSettingsModel get(); | [
"@java.lang.Override\n public google.maps.fleetengine.v1.DeviceSettings getDeviceSettings() {\n return deviceSettings_ == null ? google.maps.fleetengine.v1.DeviceSettings.getDefaultInstance() : deviceSettings_;\n }",
"IotDefenderSettingsList list();",
"public google.maps.fleetengine.v1.DeviceSettings getDeviceSettings() {\n if (deviceSettingsBuilder_ == null) {\n return deviceSettings_ == null ? google.maps.fleetengine.v1.DeviceSettings.getDefaultInstance() : deviceSettings_;\n } else {\n return deviceSettingsBuilder_.getMessage();\n }\n }",
"@java.lang.Override\n public google.maps.fleetengine.v1.DeviceSettingsOrBuilder getDeviceSettingsOrBuilder() {\n return getDeviceSettings();\n }",
"com.google.apps.alertcenter.v1beta1.Settings getSettings();",
"com.openmdmremote.harbor.HRPCProto.Settings getSettings();",
"public google.maps.fleetengine.v1.DeviceSettings.Builder getDeviceSettingsBuilder() {\n \n onChanged();\n return getDeviceSettingsFieldBuilder().getBuilder();\n }",
"public boolean[] getSettings() {\n return Global.getSettings();\n }",
"public Map<String, String> getSettings();",
"java.lang.String getOpfSettings();",
"com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings getLoggingSettings();",
"@Method\n public native NSDictionary<NSString, NSObject> getDevSettings ();",
"@Nullable\n public IosWiFiConfiguration get() throws ClientException {\n return send(HttpMethod.GET, null);\n }",
"public static SystemSetting getSystemSettingManager() {\n return HitvManager.getInstance().getSystemSetting();\n }",
"@GetMapping(\"/api/gamesessions/settings\")\n public GameSessionSettings getDefaultSessionSettings() {\n GameSessionSettings settings = gameSessionSettingsDao.findDefaultSettings();\n return settings;\n }",
"public String settings() {\n return this.settings;\n }",
"@NotNull\n public Map<String, String> getSettings() {\n return settings;\n }",
"public PacketEventsSettings getSettings() {\n return settings;\n }",
"private int getDifficultySettings() {\n\t\tSharedPreferences settings = getSharedPreferences(Constants.SETTINGS, 0);\n\t\tint diff = settings.getInt(Constants.DIFFICULTY, Constants.MEDIUM);\n\t\treturn diff;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds all player instances from the provided list to the playerList. Values: A player in this game. | public Builder addAllPlayer(List<String> playerList) {
checkListForNull(playerList);
game.playerList.addAll(playerList);
return this;
} | [
"public void setPlayersList(ArrayList<Player> playersList) {\n this.playersList = playersList;\n }",
"public void addToPlayerlist(ServerPlayer player) {\r\n players.add(player);\r\n }",
"public void setPlayers(List<Player> players) {\n this.players = players;\n }",
"public void addPlayer(Player player) {\n playerList.add(player);\n }",
"private void updatePlayerList() {\n players = world.getPlayers(EntityPlayer.class,\n player ->\n player != null\n && player.getDistance(pos.getX(), pos.getY(), pos.getZ()) < RADIUS + 1\n && player.posY < pos.getY() + 3);\n }",
"public void setPlayers(ArrayList<Player> players) {\n this.players = players;\n }",
"public void getPlayers(LinkedList<Player> playerList) throws SQLException {\n\n // create and execute the a stored procedure through a callable sql statement\n rs = conn.prepareCall(\"{call spGetPlayers}\").executeQuery();\n\n // loop through the returned records and create Players from the records\n // to add to the passed in list of players\n while(rs.next()) {\n playerList.add(new Player(rs.getInt(1),\n rs.getString(2),\n rs.getString(3),\n rs.getString(4),\n rs.getString(5),\n rs.getInt(6),\n rs.getInt(7),\n rs.getInt(8),\n rs.getInt(9),\n rs.getInt(10),\n rs.getInt(11)));\n\n // DEBUG:\n System.out.println(((Player) playerList.getLast()).getName() + \" loaded \\n\");\n }\n\n rs.close();\n }",
"@Before\n public void initializePlayersList(){\n players.add(p1);\n players.add(p2);\n players.add(p3);\n players.add(p4);\n }",
"public Cheater(ArrayList<Player> playerList) {\n\t\tthis.playerList = playerList;\n\t}",
"public void storePlayers(ArrayList<Player> players){\n\t\tthis.players=players;\n\t}",
"public PlayerList()\n {\n players = new ArrayList<Player>();\n }",
"public void setThePlayers(List<Player> thePlayers) {\n\t\tthis.thePlayers = thePlayers;\n\t}",
"public void setActivePlayers(ArrayList<Player> lstPlayers) {\n\t\tgameState.setPlayers(lstPlayers);\n\t}",
"public void initializePlayers(){\r\n allPlayers = new ArrayList<Player>();\r\n currentPlayerIndex = 0;\r\n Player redPlayer = new Player(1, new Location(2, 2), Color.RED);\r\n Player bluePlayer = new Player(2, new Location(4, 2), Color.BLUE);\r\n Player whitePlayer = new Player(3, new Location(2, 4), Color.WHITE);\r\n Player yellowPlayer = new Player(4, new Location(4, 4), Color.YELLOW);\r\n allPlayers.add(redPlayer);\r\n allPlayers.add(bluePlayer);\r\n allPlayers.add(whitePlayer);\r\n allPlayers.add(yellowPlayer);\r\n }",
"protected void newPlayerList() {\n int len = getPlayerCount();\n mPlayerStartList = new PlayerStart[ len ];\n for(int i = 0; i < len; i++) {\n mPlayerStartList[i] = new PlayerStart( 0.f, 0.f );\n }\n }",
"private void updatePlayerList() \n\t{\n\t\tplayerStatus.clear();\n\n\t\tfor(Player thisPlayer: players) // Add the status of each player to the default list model.\n\t\t{\n\t\t\tplayerStatus.addElement(thisPlayer.toString());\n\t\t}\n\n\t}",
"List<Player> getPlayers();",
"public ArrayList<Player> getAllPlayers(){\n\t\tArrayList<Player> list = new ArrayList<Player>();\n\t\tlist.addAll(_playersLobby);\n\t\tlist.addAll(_playersGame);\n\t\treturn list;\n\t}",
"public void addDefaultPlayers() {\n Player player1 = new Player(\"Karel\", R.drawable.icon1);\n playerId1 = playerList.size();\n player1.setId(playerId1);\n playerList.add(player1);\n\n Player player2 = new Player(\"Piet\", R.drawable.icon2);\n playerId2 = playerList.size();\n player2.setId(playerId2);\n playerList.add(player2);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test Case ID: TC2788_GenerateMobileEQReportUsingCopyFunctionalityWithAssessmentSurveys Test Description: Generate Mobile EQ reports using copy functionality with Assessment surveys Script: Customer has Mobile EQ and Assessment licenses; Mobile EQ and Assessment surveys exist for customer; Customer has at least one EQ report with EQ surveys only Log into the UI; Navigate to the EQ Reports page (NOT Facility EQ Reports page); Click on Copy button of above EQ Report& Add at least one Assessment survey and click OK; Download the EQ Table PDF and EQ View PDF Results: In the Survey Selector section of the Copy EQ Report page, the Survey Mode Filter should include EQ, Standard and Assessment (depending on licensing, Rapid Response, Operator and Manual may also be among the choices); The report should generate successfully The EQ Table PDF should have the correct surveys listed along with line segments and indications (if any); The EQ View PDF should show the correct line segments as drawn by the user | @Ignore /*SUR-293 to track the issue in this test*/
@UseDataProvider(value = EQReportDataProvider.EQ_REPORT_PAGE_ACTION_DATA_PROVIDER_TC2788, location = EQReportDataProvider.class)
public void TC2788_GenerateMobileEQReportUsingCopyFunctionalityWithAssessmentSurveys(
String testCaseID, Integer userDataRowID, Integer reportDataRowID1, Integer reportDataRowID2) throws Exception {
Log.info("\nRunning TC2788_GenerateMobileEQReportUsingCopyFunctionalityWithAssessmentSurveys ...");
loginPageAction.open(EMPTY, NOTSET);
loginPageAction.login(EMPTY, getUserRowID(userDataRowID));
/*
* workercommon JobProcessor.process_next_job Job failed 09A4FD8D-88B1-2195-1B8D-39E262F37688: array of sample points is empty
*/
eqReportsPageAction.open(EMPTY, getReportRowID(reportDataRowID1));
createNewReport(eqReportsPageAction, getReportRowID(reportDataRowID1));
eqReportsPageAction.waitForReportGenerationToComplete(EMPTY, getReportRowID(reportDataRowID1));
eqReportsPageAction.clickOnCopyButton(EMPTY, getReportRowID(reportDataRowID1));
ReportCommonEntity report = eqReportsPageAction.fillWorkingDataForReports(getReportRowID(reportDataRowID2));
assertTrue(eqReportsPageAction.getEQReportsPage().isEQSurveyModeShown());
assertTrue(eqReportsPageAction.getEQReportsPage().isStandardSurveyModeShown());
assertTrue(eqReportsPageAction.getEQReportsPage().isAssessmentSurveyModeShown());
eqReportsPageAction.getEQReportsPage().addMultipleSurveysToReport(report);
eqReportsPageAction.getEQReportsPage().addReport();
eqReportsPageAction.waitForReportGenerationToComplete(EMPTY, getReportRowID(reportDataRowID1));
eqReportsPageAction.openComplianceViewerDialog(EMPTY, getReportRowID(reportDataRowID1));
eqReportsPageAction.clickOnViewerPDF(EMPTY, getReportRowID(reportDataRowID1));
eqReportsPageAction.waitForPDFDownloadToComplete(EMPTY, getReportRowID(reportDataRowID1));
eqReportsPageAction.clickOnReportViewerView(EMPTY, getReportRowID(reportDataRowID1));
eqReportsPageAction.waitForViewDownloadToComplete(EMPTY, getReportRowID(reportDataRowID1));
assertTrue(eqReportsPageAction.verifySSRSDrivingSurveyTableInfo(EMPTY, getReportRowID(reportDataRowID1)));
assertTrue(eqReportsPageAction.verifySSRSImagesWithBaselines(EMPTY, getReportRowID(reportDataRowID1)));
assertTrue(eqReportsPageAction.verifyViewsImagesWithBaselines_Static(EMPTY, getReportRowID(reportDataRowID1)));
} | [
"@Test\n\t@UseDataProvider(value = EQReportDataProvider.EQ_REPORT_PAGE_ACTION_DATA_PROVIDER_TC2419, location = EQReportDataProvider.class)\n\tpublic void TC2419_MobileEQReportsWithAnalyticsSurveys(\n\t\t\tString testCaseID, Integer userDataRowID, Integer reportDataRowID1, Integer reportDataRowID2) throws Exception {\n\t\tLog.info(\"\\nRunning TC2419_MobileEQReportsWithAnalyticsSurveys ...\");\n\n\t\tloginPageAction.open(EMPTY, NOTSET);\n\t\tloginPageAction.login(EMPTY, getUserRowID(userDataRowID));\n\t\teqReportsPageAction.open(EMPTY, getReportRowID(reportDataRowID1));\n\n\t\teqReportsPage.openNewReportPage();\n\t\tassertTrue(eqReportsPage.isAllSurveyModeShown());\n\t\tassertTrue(eqReportsPage.isManualSurveyModeShown());\n\t\tassertTrue(eqReportsPage.isStandardSurveyModeShown());\n\t\tassertTrue(eqReportsPage.isOperatorSurveyModeShown());\n\t\tassertTrue(eqReportsPage.isAnalyticsSurveyModeShown());\n\t\tassertTrue(eqReportsPage.isRapidResponseSurveyModeShown());\n\t\tassertTrue(eqReportsPage.isEQSurveyModeShown());\n\t\teqReportsPageAction.fillAndCreateNewReport(getReportRowID(reportDataRowID1),false);\n\t\tassertTrue(eqReportsPageAction.waitForReportGenerationToComplete(EMPTY, getReportRowID(reportDataRowID1)));\n\t\teqReportsPageAction.openComplianceViewerDialog(EMPTY, getReportRowID(reportDataRowID1));\n\t\teqReportsPageAction.clickOnViewerPDF(EMPTY, getReportRowID(reportDataRowID1));\n\t\tassertTrue(eqReportsPageAction.waitForPDFDownloadToComplete(EMPTY, getReportRowID(reportDataRowID1)));\n\t\teqReportsPageAction.clickOnReportViewerView(EMPTY, getReportRowID(reportDataRowID1));\n\t\tassertTrue(eqReportsPageAction.waitForViewDownloadToComplete(EMPTY, getReportRowID(reportDataRowID1)));\n\t\tassertTrue(eqReportsPageAction.verifyViewsImagesWithBaselines(\"FALSE\", getReportRowID(reportDataRowID1)));\n\t\tassertTrue(eqReportsPageAction.verifyAllSSRSTableInfos(EMPTY, reportDataRowID1));\n\t\teqReportsPageAction.clickOnCloseReportViewer(EMPTY, getReportRowID(reportDataRowID1));\n\t}",
"@Test ()\r\n\r\n\tpublic void Sprint6_US405_TC1251() throws RowsExceededException, BiffException, WriteException, IOException, InterruptedException \r\n\t{\r\n\t\t/*Start-Variable Deceleration*/\r\n\t\tHSSFSheet manualInvoiceNewPageSheet = ReadTestData.getTestDataSheet(\"Sprint6_US405_TC1251\", \"Object1\");\r\n\t\tString wrinId = ReadTestData.getTestData(manualInvoiceNewPageSheet, \"EnterQuickSearchWithSuggestionsForManualPurchases\");\r\n\t\tString vendor = ReadTestData.getTestData(manualInvoiceNewPageSheet, \"Vendor\");\r\n\t\tString storeId=GlobalVariable.StoreId;\r\n\t\tString userId = GlobalVariable.userId;\r\n\t\t/*End-Variable Deceleration*/\r\n\t\tHomePage homePage=PageFactory.initElements(driver, HomePage.class);\r\n\t\tManualInvoiceNewPage manualInvoiceNewPage=PageFactory.initElements(driver, ManualInvoiceNewPage.class);\r\n\t\t//Navigate to Manual Purchases page\r\n\t\tPurchasesPage purchaselandingpage=homePage.selectUser(userId).selectLocation(storeId).navigateToInventoryManagement().goToPurchaseLandingPage();\r\n\t\t//click on Enter Manual Purchase button\r\n\t\tpurchaselandingpage.EnterManualPurchase_BT.click();\r\n\t\t//select manual vendor 'xyz' from vendor DDList\r\n\t\tmanualInvoiceNewPage.selectAVendorFromDropdown(vendor);\r\n\t\t//Search the sample WRIN ID: on \"Enter Quick Search With Suggestions for Manual Purchases:\" and select it\r\n\t\tmanualInvoiceNewPage.searchAndSelectARawItem(wrinId);\r\n\t\t//validate wrin id is added to manual purchase\r\n\t\tif(driver.findElement(By.xpath(\"//table[@id='invoice_tbl']/tbody/tr/td[2]\")).getText().contains(wrinId))\r\n\t\t{\r\n\t\t\tReporter.reportPassResult(browser, \"Sprint6_US405_TC1251\", \"wRIN id should be added to manual purchase\", \"Pass\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tReporter.reportTestFailure(browser, \"Sprint6_US405_TC1251\", \"Sprint6_US405_TC1251\", \"wRIN id should be added to manual purchase\", \"Fail\");\r\n\t\t\tAbstractTest.takeSnapShot(\"Sprint6_US405_TC1251\");\r\n\r\n\t\t}\t\r\n\r\n\r\n\t}",
"@Test\n\t\t\t\t\tpublic void TC640DADD_87(){\n\t\t\t\t\t\tReporter.log(\"Verify that when uploading Attached 0 - Default Mode on Device Headphone tuning, the complete profile will contain above tuning in Asset table with Product Type ''DTS:X Ultra''\");\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t1. Log into DTS portal as a DTS user\n\t\t\t\t\t\t2. Navigate to \"Apps & Devices\" page\n\t\t\t\t\t\t3. Click “Add App or Device� link\n\t\t\t\t\t\t4. Fill valid value into all required fields\n\t\t\t\t\t\t5. Leave the Product Type panel as “DTS:X Ultra�\n\t\t\t\t\t\t6. Select Device Headphone in “Audio Route� dropdown list\n\t\t\t\t\t\t7. Select “Default Mode� in “Content Modes� dropdown list\n\t\t\t\t\t\t8. Click on \"Select file\" button in \"Custom Tuning\" section\n\t\t\t\t\t\t9. Upload the valid custom tuning DTSCS file\n\t\t\t\t\t\tVP: Verify that the valid tuning DTSCS file is uploaded successfully\n\t\t\t\t\t\t10. Click \"Save\" link\n\t\t\t\t\t\t11. Click \"Publish\" link\n\t\t\t\t\t\t12. Download “Complete Profile�\n\t\t\t\t\t\tVP: The complete profile have name: \"Device Headphone Settings\" with type “Attached 0�\n\t\t\t\t\t\t */\n\t\t\t\t\t\t// 1. Log into DTS portal as a DTS user successfully\t\n\t\t\t\t\t\tloginControl.login(SUPER_USER_NAME, SUPER_USER_PASSWORD);\n\t\t\t\t\t\t// 2. Navigate to \"Apps & Devices\" page\t\n\t\t\t\t\t\tappDeviceControl.click(PageHome.LINK_APP_DEVICES);\n\t\t\t\t\t\t// 3. Click \"Add App or Device\" link\t\n\t\t\t\t\t\tappDeviceControl.click(DeviceList.CREATE_NEW_DEVICE);\n\t\t\t\t\t\t// 4. Fill valid value into all required fields with choosing eagle version 2.0.\n\t\t\t\t\t\t// 5. Leave the Product Type panel as ''DTS:X Ultra''\n\t\t\t\t\t\tHashtable<String, String> appDevice = TestData.appDevicePublishEagleV2();\n\t\t\t\t\t\tappDevice.remove(\"save\");\n\t\t\t\t\t\tappDeviceControl.createNewDevice(DeviceEdit.getHash(), appDevice);\n\t\t\t\t\t\t// 6. Select Device Headphone in “Audio Route� dropdown list\n\t\t\t\t\t\tappDeviceControl.selectOptionByName(DeviceEdit.PRODUCT_TYPE, DeviceEdit.Product_Types.HPX_High.getType());\n\t\t\t\t\t\tappDeviceControl.selectOptionByName(DeviceEdit.AUDIO_ROUTE_TYPE, DeviceEdit.routes.Device_Headphone.getName());\n\t\t\t\t\t\t// 7. Select “Attached 0 - Default Mode� in “Content Modes� dropdown list\n\t\t\t\t\t\tappDeviceControl.selectOptionByName(DeviceEdit.AUDIO_ROUTE, DeviceEdit.Content_Modes_Hig.Attached_0_Default_Mode.getName());\n\t\t\t\t\t\t// 8. Click on \"Select file\" button in \"Custom Tuning\" section\n\t\t\t\t\t\t// 9. Upload the valid custom tuning DTSCS file\n\t\t\t\t\t\tappDeviceControl.uploadTuningAppDevice(DeviceEdit.ADD_CUSTOM_TUNING, AddEditProductModel.FileUpload.Device_Headphone_Attach0_Eagle2_0.getName());\n\t\t\t\t\t\tappDeviceControl.click(DeviceEdit.NO_IMAGES);\n\t\t\t\t\t\t// 10. Click \"Save\" link\n\t\t\t\t\t\tappDeviceControl.click(DeviceEdit.SAVE);\n\t\t\t\t\t\t// 11. Publish above device\n\t\t\t\t\t\tappDeviceControl.click(DeviceInfo.PUBLISH);\n\t\t\t\t\t\tString device_UUID = appDeviceControl.getTextByXpath(DeviceInfo.DTS_TRACKING_ID);\n\t\t\t\t\t\t// 11. Download the complete profile\t\n\t\t\t\t\t\tAssert.assertTrue(appDeviceControl.downloadFile(DeviceInfo.COMPLETE_PROFILE_LINK));\n\t\t\t\t\t\t// VP: Verify that the Complete Profile did not have route ''AR_OUT_DEVICE_ACCESSORY''\n\t\t\t\t\t\tAssert.assertTrue(appDeviceControl.checkRouteFile(device_UUID, \"AR_OUT_DEVICE_ACCESSORY\"));\n\t\t\t\t\t\tAssert.assertTrue(appDeviceControl.checkTypeFile(device_UUID, \"attached0\"));\n\t\t\t\t\t\tappDeviceControl.doDelete(DeviceInfo.DELETE);\n\t\t\t\t\t}",
"@Test\n\t\t\t\t\tpublic void TC640DADD_89(){\n\t\t\t\t\t\tReporter.log(\"Verify that when uploading Attached 0 - Default Mode on Device Headphone tuning, the complete profile will contain above tuning in Asset table with Product Type '''DTS Audio Processing''\");\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t1. Log into DTS portal as a DTS user\n\t\t\t\t\t\t2. Navigate to \"Apps & Devices\" page\n\t\t\t\t\t\t3. Click “Add App or Device� link\n\t\t\t\t\t\t4. Fill valid value into all required fields\n\t\t\t\t\t\t5. Leave the Product Type panel as “'DTS Audio Processing�\n\t\t\t\t\t\t6. Select Device Headphone in “Audio Route� dropdown list\n\t\t\t\t\t\t7. Select “Default Mode� in “Content Modes� dropdown list\n\t\t\t\t\t\t8. Click on \"Select file\" button in \"Custom Tuning\" section\n\t\t\t\t\t\t9. Upload the valid custom tuning DTSCS file\n\t\t\t\t\t\tVP: Verify that the valid tuning DTSCS file is uploaded successfully\n\t\t\t\t\t\t10. Click \"Save\" link\n\t\t\t\t\t\t11. Click \"Publish\" link\n\t\t\t\t\t\t12. Download “Complete Profile�\n\t\t\t\t\t\tVP: The complete profile have name: \"Device Headphone Settings\" with type “Attached 0�\n\t\t\t\t\t\t */ /*cannot do this testcase due to channging profile with DTS Audio Processing*/\n/*\t\t\t\t\t\t// 1. Log into DTS portal as a DTS user successfully\t\n\t\t\t\t\t\tloginControl.login(SUPER_USER_NAME, SUPER_USER_PASSWORD);\n\t\t\t\t\t\t// 2. Navigate to \"Apps & Devices\" page\t\n\t\t\t\t\t\tappDeviceControl.click(PageHome.LINK_APP_DEVICES);\n\t\t\t\t\t\t// 3. Click \"Add App or Device\" link\t\n\t\t\t\t\t\tappDeviceControl.click(DeviceList.CREATE_NEW_DEVICE);\n\t\t\t\t\t\t// 4. Fill valid value into all required fields with choosing eagle version 2.0.\n\t\t\t\t\t\t// 5. Leave the Product Type panel as ''DTS Audio Processing''\n\t\t\t\t\t\tHashtable<String, String> appDevice = TestData.appDeviceDTSPublishAudioProcessing();\n\t\t\t\t\t\tappDevice.remove(\"save\");\n\t\t\t\t\t\tappDeviceControl.createNewDevice(DeviceEdit.getHash(), appDevice);\n\t\t\t\t\t\t// 6. Select Device Headphone in “Audio Route� dropdown list\n\t\t\t\t\t\tappDeviceControl.selectOptionByName(DeviceEdit.PRODUCT_TYPE, DeviceEdit.Product_Types.HPX_Low.getType());\n\t\t\t\t\t\tappDeviceControl.selectOptionByName(DeviceEdit.AUDIO_ROUTE_TYPE, DeviceEdit.routes.Device_Headphone.getName());\n\t\t\t\t\t\t// 7. Select “Attached 0 - Default Mode� in “Content Modes� dropdown list\n\t\t\t\t\t\tappDeviceControl.selectOptionByName(DeviceEdit.AUDIO_ROUTE, DeviceEdit.Content_Modes.Mode_Default.getType());\n\t\t\t\t\t\t// 8. Click on \"Select file\" button in \"Custom Tuning\" section\n\t\t\t\t\t\t// 9. Upload the valid custom tuning DTSCS file\n\t\t\t\t\t\tappDeviceControl.uploadTuningAppDevice(DeviceEdit.ADD_CUSTOM_TUNING, AddEditProductModel.FileUpload.Device_Headphone_Default_Mode_Eagle2_0.getName());\n\t\t\t\t\t\tappDeviceControl.click(DeviceEdit.NO_IMAGES);\n\t\t\t\t\t\t// 10. Click \"Save\" link\n\t\t\t\t\t\tappDeviceControl.click(DeviceEdit.SAVE);\n\t\t\t\t\t\t// 11. Publish above device\n\t\t\t\t\t\tappDeviceControl.click(DeviceInfo.PUBLISH);\n\t\t\t\t\t\tString device_UUID = appDeviceControl.getTextByXpath(DeviceInfo.DTS_TRACKING_ID);\n\t\t\t\t\t\t// 11. Download the complete profile\t\n\t\t\t\t\t\tAssert.assertTrue(appDeviceControl.downloadFile(DeviceInfo.COMPLETE_PROFILE_LINK));\n\t\t\t\t\t\t// VP: Verify that the Complete Profile did not have route ''AR_OUT_DEVICE_ACCESSORY''\n\t\t\t\t\t\tAssert.assertTrue(appDeviceControl.checkRouteFile(device_UUID, \"AR_OUT_DEVICE_ACCESSORY\"));\n\t\t\t\t\t\tAssert.assertTrue(appDeviceControl.checkTypeFile(device_UUID, \"default\"));\n\t\t\t\t\t\tappDeviceControl.doDelete(DeviceInfo.DELETE);*/\n\t\t\t\t\t}",
"@Test(description = \"FP-TC-1229_System doesn't allow creating duplicate subject number using the same attribute\", groups = {\n\t\t\t\" \" })\n\n\tpublic void FPTC_1229_verifySystemDoesntAllowCreatingDuplicateSubjectNumberUsingTheSameAttribute() {\n\n\t\treportLog(\"1.1: Login in to application\");\n\t\tdashBoardPage = loginPage.loginInApplication(AT_PRODSiteCoordinator, AT_Password);\n\n\t\treportLog(\"1.2: Navigate to study navigator\");\n\t\tstudyNavigatorDashBoardPage = dashBoardPage.selectHorizontalUpperNavMenuItem(StudyDashBoardPage.class, Constants.NavigateText, Constants.StudyText);\n\t\tstudyNavigatorDashBoardPage.selectStudy(studyName,Constants.ATAssignedRater_10);\n\n\t\treportLog(\"1.4:Subject List page is visible\");\n\t\tstudyNavigatorDashBoardPage.verifySubjectListIsOpened();\n\n\t\treportLog(\"1.5:Option to add new subject is visible \");\n\t\tstudyNavigatorDashBoardPage.verifyAddSubjectBtnIsDisplayed();\n\n\t\treportLog(\"1.6:Pr#3, Pr#4 and Pr#5 are visible\");\n\t\tstudyNavigatorDashBoardPage.verifySubjectIsDisplayedInSubjectList(subjectWithScreeningNumber);\n\t\tstudyNavigatorDashBoardPage.verifySubjectIsDisplayedInSubjectList(subjectWithRandomNumber);\n\t\tstudyNavigatorDashBoardPage.verifySubjectIsDisplayedInSubjectList(subjectWithTempId);\n\n\t\treportLog(\"2.1:Edit the Subject of Pr#3\");\n\t\tstudyNavigatorDashBoardPage.searchFilterValueByColumnNameAndValue(Constants.StudyDashBoard_columnName_Subject,subjectWithScreeningNumber);\n\t\tsubjectDetailPage = studyNavigatorDashBoardPage.clickOnSearchedSubject(subjectWithScreeningNumber);\n\t\tsubjectDetailPage.clickOnSubjectEdtingIcon();\n\n\t\treportLog(\"2.3:Add Randomization# = Randomization# of Pr#4\");\n\t\tsubjectDetailPage.inputRandomNumber(subjectWithRandomNumber);\n\t\tsubjectDetailPage.clickOnSaveBtn();\n\n\t\treportLog(\"2.4:Subject can't be updated System displays message indicating that the subject with same name already exists\");\n\t\tsubjectDetailPage.verifyErrorMessage(SubjectsModuleConstants.editDuplicaterandomizationErrorMessage);\n\t\tsubjectDetailPage.closeErrorMessage();\n\t\tsubjectDetailPage.clickOnCancelBtn();\n\t\tsubjectDetailPage.navigateBack();\n\n\t\treportLog(\"3.1:Edit the Subject of Pr#4\");\n\t\tstudyNavigatorDashBoardPage.searchFilterValueByColumnNameAndValue(Constants.StudyDashBoard_columnName_Subject,subjectWithRandomNumber);\n\t\tsubjectDetailPage = studyNavigatorDashBoardPage.clickOnSearchedSubject(subjectWithRandomNumber);\n\t\tsubjectDetailPage.clickOnSubjectEdtingIcon();\n\n\t\treportLog(\"3.2:Add Screening# = Screening# of Pr#3\");\n\t\tsubjectDetailPage.clearScreeningInp();\n\t\tsubjectDetailPage.inputScreeningNumber(Constants.ScreeningNumber);\n\t\tsubjectDetailPage.clickOnSaveBtn();\n\n\t\treportLog(\"3.3:Subject can't be updated System displays message indicating that the subject with same name already exists\");\n\t\tsubjectDetailPage.verifyErrorMessage(SubjectsModuleConstants.editDuplicateScreeningErrorMessage);\n\t\tsubjectDetailPage.closeErrorMessage();\n\t\tsubjectDetailPage.clickOnCancelBtn();\n\t\t\n\t\treportLog(\"4.1:Edit the Subject of Pr#4 and add Temporary ID = Temporary ID of Pr#5\");\n\t\tsubjectDetailPage.clickOnSubjectEdtingIcon();\n\t\tsubjectDetailPage.clearScreeningInp();\n\t\tsubjectDetailPage.inputTemporaryID(Constants.TempIDNumber);\n\t\tsubjectDetailPage.clickOnSaveBtn();\n\t\t\n\t\treportLog(\"4.2:Subject can't be updated System displays message indicating that the subject with same name already exists\");\n\t\tsubjectDetailPage.verifyErrorMessage(SubjectsModuleConstants.editDuplicateTemporaryIDErrorMessage);\n\t\tsubjectDetailPage.closeErrorMessage();\n\t\tsubjectDetailPage.clickOnCancelBtn();\n\t\tsubjectDetailPage.navigateBack();\n\n\t\treportLog(\"5.1:Edit the Subject of Pr#5 and add Screening# = Screening# of Pr#3\");\n\t\tstudyNavigatorDashBoardPage.searchFilterValueByColumnNameAndValue(Constants.StudyDashBoard_columnName_Subject,subjectWithTempId);\n\t\tsubjectDetailPage = studyNavigatorDashBoardPage.clickOnSearchedSubject(subjectWithTempId);\n\t\tsubjectDetailPage.clickOnSubjectEdtingIcon();\n\t\tsubjectDetailPage.inputScreeningNumber(Constants.ScreeningNumber);\n\t\tsubjectDetailPage.clickOnSaveBtn();\n\n\t\treportLog(\"5.2:Subject can't be updated System displays message indicating that the subject with same name already exists\");\n\t\tsubjectDetailPage.verifyErrorMessage(SubjectsModuleConstants.editDuplicateScreeningErrorMessage);\n\t\tsubjectDetailPage.closeErrorMessage();\n\t\tsubjectDetailPage.clickOnCancelBtn();\n\t\tsubjectDetailPage.navigateBack();\n\n\t\treportLog(\"6.1:Select the option to add new subject\");\n\t\tstudyNavigatorDashBoardPage.clickOnAddSubjectBTN();\n\n\t\treportLog(\"6.2:Add new subject screen is visible\");\n\t\tstudyNavigatorDashBoardPage.verifyAddSubjectPopUpIsDisplayed();\n\n\t\treportLog(\"6.3:Screening#, Randomization# and TemporaryID fields are visible\");\n\t\tstudyNavigatorDashBoardPage.verifyScreeningNumberRandomizationTempIdIsDisplayed();\n\n\t\treportLog(\"7.1:\tTry to create the subject with : - Temporary ID = Temporary ID of Pr#5\");\n\t\tstudyNavigatorDashBoardPage.inputTemporaryID(Constants.TempIDNumber);\n\t\tstudyNavigatorDashBoardPage.selectSubjectLanguage(studyLanguage);\n\t\tstudyNavigatorDashBoardPage.clickOnSaveBTN();\n\n\t\treportLog(\"7.2:Subject can't be updated System displays message indicating that the subject with same name already exists\");\n\t\tstudyNavigatorDashBoardPage.verifyHeaderErrorText(SubjectsModuleConstants.newDuplicateTemporaryIdErrorMessage);\n\t\tstudyNavigatorDashBoardPage.closeHeaderErrorMessage();\n\t\tstudyNavigatorDashBoardPage.clickOnCancelBTN();\n\n\t\treportLog(\"8.1:\tRepeat Step#7 with Temporary ID = Screening Number of Pr#3\");\n\t\tstudyNavigatorDashBoardPage.clickOnAddSubjectBTN(AT_PRODSiteCoordinatorUserName);\n\t\tstudyNavigatorDashBoardPage.inputTemporaryID(Constants.ScreeningNumber);\n\t\tstudyNavigatorDashBoardPage.selectSubjectLanguage(studyLanguage);\n\t\tstudyNavigatorDashBoardPage.clickOnSaveBTN();\n\n\t\treportLog(\"8.2:Subject can be created\");\n\t\tsubjectDetailPage.verifyNewSubjectDetailPage();\n\n\t\treportLog(\"Setting up The Pre-Requisite\");\n\t\tsubjectDetailPage.deleteSubject();\n\n\t\treportLog(\"9.1:\tRepeat Step#7 with Screening Number = Screening Number of Pr#3\");\n\t\tstudyNavigatorDashBoardPage.clickOnAddSubjectBTN(AT_PRODSiteCoordinatorUserName);\n\t\tstudyNavigatorDashBoardPage.inputScreeningNum(Constants.ScreeningNumber);\n\t\tstudyNavigatorDashBoardPage.selectSubjectLanguage(studyLanguage);\n\t\tstudyNavigatorDashBoardPage.clickOnSaveBTN();\n\n\t\treportLog(\"9.2:Subject can't be created - System displays message indicating that the subject with same name already exists\");\n\t\tstudyNavigatorDashBoardPage.verifyHeaderErrorText(SubjectsModuleConstants.newDuplicateScreeningErrorMessage);\n\t\tstudyNavigatorDashBoardPage.closeHeaderErrorMessage();\n\t\tstudyNavigatorDashBoardPage.clickOnCancelBTN();\n\n\t\treportLog(\"10.1:Repeat Step#7 with Screening Number = Temporary ID of Pr#5\");\n\t\tstudyNavigatorDashBoardPage.clickOnAddSubjectBTN(AT_PRODSiteCoordinatorUserName);\n\t\tstudyNavigatorDashBoardPage.inputScreeningNum(Constants.TempIDNumber);\n\t\tstudyNavigatorDashBoardPage.selectSubjectLanguage(studyLanguage);\n\t\tstudyNavigatorDashBoardPage.clickOnSaveBTN();\n\n\t\treportLog(\"10.2:Subject can be created\");\n\t\tsubjectDetailPage.verifyNewSubjectDetailPage();\n\n\t\treportLog(\"Setting up The Pre-Requisite\");\n\t\tsubjectDetailPage.deleteSubject();\n\n\t\treportLog(\"11.1:Repeat Step#7 with Randomization Number = Randomization Number of Pr#4\");\n\t\tstudyNavigatorDashBoardPage.clickOnAddSubjectBTN(AT_PRODSiteCoordinatorUserName);\n\t\tstudyNavigatorDashBoardPage.inputScreeningNum(\"675\");\n\t\tstudyNavigatorDashBoardPage.inputRandomizationNum(subjectWithRandomNumber);\n\t\tstudyNavigatorDashBoardPage.selectSubjectLanguage(studyLanguage);\n\t\tstudyNavigatorDashBoardPage.clickOnSaveBTN();\n\n\t\treportLog(\"11.2:Subject can't be created - System displays message indicating that the subject with same name already exists\");\n\t\tstudyNavigatorDashBoardPage.verifyHeaderErrorText(SubjectsModuleConstants.newDuplicaterandomizationErrorMessage);\n\t\tstudyNavigatorDashBoardPage.closeHeaderErrorMessage();\n \t\tstudyNavigatorDashBoardPage.clickOnCancelBTN();\n\n\t\treportLog(\"12.1:Repeat Step#7 with Randomization Number = Screening Number of Pr#5\");\n\t\tstudyNavigatorDashBoardPage.clickOnAddSubjectBTN(AT_PRODSiteCoordinatorUserName);\n\t\tstudyNavigatorDashBoardPage.inputRandomizationNum(subjectWithScreeningNumber);\n\t\tstudyNavigatorDashBoardPage.inputScreeningNum(\"890\");\n\t\tstudyNavigatorDashBoardPage.selectSubjectLanguage(studyLanguage);\n\t\tsubjectDetailPage = studyNavigatorDashBoardPage.clickOnSaveBTN();\n\n\t\treportLog(\"12.2:Subject can be created\");\n\t\tsubjectDetailPage.verifyNewSubjectDetailPage();\n\n\t\treportLog(\"Setting up The Pre-Requisite\");\n\t\tsubjectDetailPage.deleteSubject();\n\n\t\treportLog(\"12.3: Logout from the application\");\n\t\tloginPage.logoutApplication();\n\n\t\treportLog(\"12.4: Verify user is logout\");\n\t\tloginPage.verifyUserLogout();\n\n\t}",
"@Test(groups = { \"survey-creation\", \"all-tests\", \"key-tests\" })\r\n public void successfullyUpdateAndVerifySurveyMappings() throws Exception {\r\n\r\n String number = driver.getTimestamp();\r\n String surveyName = number + \"UpdateAndVerifySurveyMappings\";\r\n String statusOption1Updated = \"Sent\";\r\n String statusOption2Updated = \"Responded\";\r\n\r\n log.startTest( \"LeadEnable: Verify that survey mappings can be successfully updated\" );\r\n try {\r\n\r\n // Log And Go to Survey Page\r\n loginToSend().goToSurveyPage().sfdcSurvey.createSurveyAndTypeSurveyName( surveyName )\r\n .checkLogResponseInCRM()\r\n .selectSurveyFolders( surveyType3, sfdcCampaign3 ).sfdcQuestion.editFTQAndMapItToEmail( false )\r\n .editMCquestionAndMapItToLeadSource( true )\r\n .addFTQAndMapItToLastName( false );\r\n\r\n // Go Back to the Survey Page\r\n log.startStep( \"Go Back to the Survey Page\" );\r\n driver.click( \"//a[contains(text(), 'Content')]\", driver.timeOut );\r\n driver.waitForPageToLoad();\r\n driver.waitForAjaxToComplete( driver.ajaxTimeOut );\r\n log.endStep();\r\n\r\n log.startStep( \"Verify that the check the 'Log responses in your CRM system' checkbox is present\" );\r\n log.endStep( verifyLogResponseInCRM() );\r\n\r\n Thread.sleep( 1000 );\r\n send.sfdcSurvey.sfdcQuestion.editQuestionType( FTcontactField.EMAIL.question )\r\n .enterQuestion( FTcontactField.LASTNAME.question )\r\n .mapFTQuestionToContactField( FTcontactField.LASTNAME.conntactFiled )\r\n .updateQuestion();\r\n\r\n send.sfdcSurvey.sfdcQuestion.editQuestionType( FTcontactField.LASTNAME.question )\r\n .enterQuestion( FTcontactField.EMAIL.question )\r\n .mapFTQuestionToContactField( FTcontactField.EMAIL.conntactFiled )\r\n .updateQuestion();\r\n\r\n send.sfdcSurvey.sfdcQuestion.editQuestionType( MCcontactFiled.LEADSOURCE.question )\r\n .enterQuestion( MCcontactFiled.SALUTATION.question );\r\n send.sfdcSurvey.sfdcQuestion.mapMCQuestionToContactField( MCcontactFiled.SALUTATION.name,\r\n MCcontactFiled.SALUTATION.option_1,\r\n MCcontactFiled.SALUTATION.option_2 );\r\n send.sfdcSurvey.sfdcQuestion.fillinMCQAnswers( MCcontactFiled.SALUTATION.option_1,\r\n MCcontactFiled.SALUTATION.option_2 );\r\n send.sfdcSurvey.sfdcQuestion.addMCQStatusOptions()\r\n .updateQuestion()\r\n .editQuestionType( FTcontactField.LASTNAME.question );\r\n\r\n log.resultStep( \"Verify that the Last Name drop down is selected for contact\" );\r\n log.endStep( driver.isValueSelected( \"#qTypetextSalesforceContactsField span\",\r\n FTcontactField.LASTNAME.conntactFiled ) );\r\n\r\n log.resultStep( \"Verify that the Last Name drop down is selected for lead\" );\r\n log.endStep( driver.isValueSelected( \"#qTypetextSalesforceLeadField span\",\r\n FTcontactField.LASTNAME.conntactFiled ) );\r\n\r\n send.sfdcSurvey.sfdcQuestion.cancelQuestion().editQuestionType( FTcontactField.EMAIL.question );\r\n\r\n log.resultStep( \"Verify that the 'Email' drop down is selected for contact\" );\r\n log.endStep( driver.isValueSelected( \"#qTypetextSalesforceContactsField span\",\r\n FTcontactField.EMAIL.conntactFiled ) );\r\n\r\n log.resultStep( \"Verify that the 'Email' drop down is selected for lead\" );\r\n log.endStep( driver.isValueSelected( \"#qTypetextSalesforceLeadField span\",\r\n FTcontactField.EMAIL.conntactFiled ) );\r\n\r\n //Verify the multiple choice question\r\n send.sfdcSurvey.sfdcQuestion.cancelQuestion()\r\n .editQuestionType( MCcontactFiled.SALUTATION.question );\r\n\r\n log.resultStep( \"Verify that the 'Salutation' contact field option is selected\" );\r\n log.endStep( driver.isValueSelected( \"#qTypemcSalesforceContactsField span\",\r\n MCcontactFiled.SALUTATION.name ) );\r\n\r\n log.resultStep( \"Verify that the 'Salutation' lead field option is selected\" );\r\n log.endStep( driver.isValueSelected( \"#qTypemcSalesforceLeadField span\",\r\n MCcontactFiled.SALUTATION.name ) );\r\n\r\n log.resultStep( \"Verify the 1st answer field\" );\r\n log.endStep( driver.isTextPresent( \"//input[@id='29374']\",\r\n MCcontactFiled.SALUTATION.option_1,\r\n driver.timeOut ) );\r\n\r\n log.resultStep( \"Verify the 2nd answer field\" );\r\n log.endStep( driver.isTextPresent( \"//input[@id='54119']\",\r\n MCcontactFiled.SALUTATION.option_2,\r\n driver.timeOut ) );\r\n\r\n log.resultStep( \"Verify the 1st status drop down\" );\r\n log.endStep( driver.isSelected( \"//select[@id='answerStatus-29374']\", statusOption1Updated ) );\r\n\r\n log.resultStep( \"Verify the 2nd status drop down\" );\r\n log.endStep( driver.isSelected( \"//select[@id='answerStatus-54119']\", statusOption2Updated ) );\r\n\r\n log.resultStep( \"Verify the 1st contact drop down\" );\r\n log.endStep( driver.isSelected( \"//select[@id='answerContact-29374']\",\r\n MCcontactFiled.SALUTATION.option_1 ) );\r\n\r\n log.resultStep( \"Verify the 2nd contact drop down\" );\r\n log.endStep( driver.isSelected( \"//select[@id='answerContact-54119']\",\r\n MCcontactFiled.SALUTATION.option_2 ) );\r\n\r\n log.resultStep( \"Verify the 1st lead drop down\" );\r\n log.endStep( driver.isSelected( \"//select[@id='answerLead-29374']\",\r\n MCcontactFiled.SALUTATION.option_2 ) );\r\n\r\n log.resultStep( \"Verify the 2nd lead drop down\" );\r\n log.endStep( driver.isSelected( \"//select[@id='answerLead-54119']\",\r\n MCcontactFiled.SALUTATION.option_2 ) );\r\n\r\n } catch( Exception e ) {\r\n log.endStep( false );\r\n throw e;\r\n }\r\n log.endTest();\r\n }",
"@Test\n\t\t\t\tpublic void TC640DADD_85(){\n\t\t\t\t\tReporter.log(\"Verify that when uploading Attached 0 - Default Mode on Device Headphone tuning, the offline DB will contain above tuning in Asset table with Product Type ''DTS:X Premium''\");\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t \t1. Log into DTS portal as a DTS user\n\t\t\t\t\t\t2. Navigate to \"Apps or Devices� page\n\t\t\t\t\t\t3. Click “Add App & Device� link\n\t\t\t\t\t\t4. Leave on Product Type combo box as ''DTS:X Premium''\n\t\t\t\t\t\t5. Fill valid value into all required fields\n\t\t\t\t\t\t6. Select Device Headphone in “Audio Route� dropdown list\n\t\t\t\t\t\t7. Select “Attached 0 - Default Mode� in “Content Modes� dropdown list\n\t\t\t\t\t\t8. Click on \"Select file\" button in \"Custom Tuning\" section\n\t\t\t\t\t\t9. Upload the valid custom tuning DTSCS file\n\t\t\t\t\t\tVP: Verify that the valid tuning DTSCS file is uploaded successfully\n\t\t\t\t\t\t10. Click \"Save\" link\n\t\t\t\t\t\t11. Click \"Publish\" link\n\t\t\t\t\t\t12. Refresh offline database\n\t\t\t\t\t\t13. Click \"Download Offline Database\" link\n\t\t\t\t\t\t14. Open the offline databse file by SQLite\n\t\t\t\t\t\t15. Navigate to Asset table in SQLite\n\t\t\t\t\t\tVP: Verify that Asset table will contain Attached 0 - Default Mode in Device Headphone tuning\n\t\t\t\t\t*/\n\t\t\t\t\t\n\t\t\t\t\t// 1. Log into DTS portal as a DTS user successfully\t\n\t\t\t\t\tloginControl.login(SUPER_USER_NAME, SUPER_USER_PASSWORD);\n\t\t\t\t\t// 2. Navigate to \"Apps & Devices\" page\t\n\t\t\t\t\tappDeviceControl.click(PageHome.LINK_APP_DEVICES);\n\t\t\t\t\t// 3. Click \"Add App or Device\" link\t\n\t\t\t\t\tappDeviceControl.click(DeviceList.CREATE_NEW_DEVICE);\n\t\t\t\t\t// 4. Fill valid value into all required fields with choosing eagle version 2.0.\n\t\t\t\t\t// 5. Leave the Product Type panel as ''DTS:X Premium''\n\t\t\t\t\tHashtable<String, String> appDevice = TestData.appDevicePublishEagleV2();\n\t\t\t\t\tappDevice.remove(\"save\");\n\t\t\t\t\tappDeviceControl.createNewDevice(DeviceEdit.getHash(), appDevice);\n\t\t\t\t\t// 6. Select Device Headphone in “Audio Route� dropdown list\n\t\t\t\t\tappDeviceControl.selectOptionByName(DeviceEdit.PRODUCT_TYPE, DeviceEdit.Product_Types.HPX_Medium.getType());\n\t\t\t\t\tappDeviceControl.selectOptionByName(DeviceEdit.AUDIO_ROUTE_TYPE, DeviceEdit.routes.Device_Headphone.getName());\n\t\t\t\t\t// 7. Select “Attached 0 - Default Mode� in “Content Modes� dropdown list\n\t\t\t\t\tappDeviceControl.selectOptionByName(DeviceEdit.AUDIO_ROUTE, DeviceEdit.Content_Modes_Hig.Attached_0_Default_Mode.getName());\n\t\t\t\t\t// 8. Click on \"Select file\" button in \"Custom Tuning\" section\n\t\t\t\t\t// 9. Upload the valid custom tuning DTSCS file\n\t\t\t\t\tappDeviceControl.uploadTuningAppDevice(DeviceEdit.ADD_CUSTOM_TUNING, AddEditProductModel.FileUpload.Device_Headphone_Attach0_Eagle2_0.getName());\n\t\t\t\t\tappDeviceControl.click(DeviceEdit.NO_IMAGES);\n\t\t\t\t\t// 10. Click \"Save\" link\n\t\t\t\t\tappDeviceControl.click(DeviceEdit.SAVE);\n\t\t\t\t\t// 11. Publish above device\n\t\t\t\t\tappDeviceControl.click(DeviceInfo.PUBLISH);\n\t\t\t\t\tString device_UUID = appDeviceControl.getTextByXpath(DeviceInfo.DTS_TRACKING_ID);\n\t\t\t\t\t// 12. Refresh offline database\n\t\t\t\t\tappDeviceControl.click(DeviceInfo.REFRESH_OFFLINE_DATABASE);\n\t\t\t\t\tappDeviceControl.selectConfirmationDialogOption(\"Refresh\");\n\t\t\t\t\t// 9. Click \"Download Offline Database\" link\n\t\t\t\t\tAssert.assertTrue(appDeviceControl.downloadFile(DeviceInfo.DOWNLOAD_DATABASE));\n\t\t\t\t\t// 10. Open the offline databse file by SQLite\n\t\t\t\t\t// 11. Navigate to Asset table in SQLite\n\t\t\t\t\t// VP: Verify that Asset table will contain Attached 0 - Default Mode in Device Headphone tuning\n\t\t\t\t\tSQLiteDbUtil sqlite = new SQLiteDbUtil(appDeviceControl.getOfflineDBName(device_UUID));\n\t\t\t\t\tArrayList<String> ColumnData = sqlite.getColumnData(\"select DTSCSAssetId from Product where Type = 'DeviceHeadphone' and SubType = 'Attached0'\", \"DTSCSAssetId\", null);\n\t\t\t\t\tfor (int i = 0; i < ColumnData.size(); i++) {\n\t\t\t\t\t\tAssert.assertTrue(appDeviceControl.getBinFile(appDeviceControl.getOfflineDBName(device_UUID), \"select Data from Asset where Type = 'TUNING' and Id = '\" + ColumnData.get(i).toString() + \"'\", \"Data\", device_UUID));\n\t\t\t\t\tappDeviceControl.doDelete(DeviceInfo.DELETE);\n\t\t\t\t}\n\t\t\t\t}",
"@Test\n\t\t\tpublic void TC640DADD_84(){\n\t\t\t\tReporter.log(\"Verify that when uploading Attached 0 - Default Mode on Device Headphone tuning, the offline DB will contain above tuning in Asset table with Product Type ''DTS:X Ultra''\");\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t \t1. Log into DTS portal as a DTS user\n\t\t\t\t\t2. Navigate to \"Apps or Devices� page\n\t\t\t\t\t3. Click “Add App & Device� link\n\t\t\t\t\t4. Leave on Product Type combo box as ''DTS:X Ultra''\n\t\t\t\t\t5. Fill valid value into all required fields\n\t\t\t\t\t6. Select Device Headphone in “Audio Route� dropdown list\n\t\t\t\t\t7. Select “Attached 0 - Default Mode� in “Content Modes� dropdown list\n\t\t\t\t\t8. Click on \"Select file\" button in \"Custom Tuning\" section\n\t\t\t\t\t9. Upload the valid custom tuning DTSCS file\n\t\t\t\t\tVP: Verify that the valid tuning DTSCS file is uploaded successfully\n\t\t\t\t\t10. Click \"Save\" link\n\t\t\t\t\t11. Click \"Publish\" link\n\t\t\t\t\t12. Refresh offline database\n\t\t\t\t\t13. Click \"Download Offline Database\" link\n\t\t\t\t\t14. Open the offline databse file by SQLite\n\t\t\t\t\t15. Navigate to Asset table in SQLite\n\t\t\t\t\tVP: Verify that Asset table will contain Attached 0 - Default Mode in Device Headphone tuning\n\t\t\t\t*/\n\t\t\t\t\n\t\t\t\t// 1. Log into DTS portal as a DTS user successfully\t\n\t\t\t\tloginControl.login(SUPER_USER_NAME, SUPER_USER_PASSWORD);\n\t\t\t\t// 2. Navigate to \"Apps & Devices\" page\t\n\t\t\t\tappDeviceControl.click(PageHome.LINK_APP_DEVICES);\n\t\t\t\t// 3. Click \"Add App or Device\" link\t\n\t\t\t\tappDeviceControl.click(DeviceList.CREATE_NEW_DEVICE);\n\t\t\t\t// 4. Fill valid value into all required fields with choosing eagle version 2.0.\n\t\t\t\t// 5. Leave the Product Type panel as ''DTS:X Ultra''\n\t\t\t\tHashtable<String, String> appDevice = TestData.appDevicePublishEagleV2();\n\t\t\t\tappDevice.remove(\"save\");\n\t\t\t\tappDeviceControl.createNewDevice(DeviceEdit.getHash(), appDevice);\n\t\t\t\t// 6. Select Device Headphone in “Audio Route� dropdown list\n\t\t\t\tappDeviceControl.selectOptionByName(DeviceEdit.PRODUCT_TYPE, DeviceEdit.Product_Types.HPX_High.getType());\n\t\t\t\tappDeviceControl.selectOptionByName(DeviceEdit.AUDIO_ROUTE_TYPE, DeviceEdit.routes.Device_Headphone.getName());\n\t\t\t\t// 7. Select “Attached 0 - Default Mode� in “Content Modes� dropdown list\n\t\t\t\tappDeviceControl.selectOptionByName(DeviceEdit.AUDIO_ROUTE, DeviceEdit.Content_Modes_Hig.Attached_0_Default_Mode.getName());\n\t\t\t\t// 8. Click on \"Select file\" button in \"Custom Tuning\" section\n\t\t\t\t// 9. Upload the valid custom tuning DTSCS file\n\t\t\t\tappDeviceControl.uploadTuningAppDevice(DeviceEdit.ADD_CUSTOM_TUNING, AddEditProductModel.FileUpload.Device_Headphone_Attach0_Eagle2_0.getName());\n\t\t\t\tappDeviceControl.click(DeviceEdit.NO_IMAGES);\n\t\t\t\t// 10. Click \"Save\" link\n\t\t\t\tappDeviceControl.click(DeviceEdit.SAVE);\n\t\t\t\t// 11. Publish above device\n\t\t\t\tappDeviceControl.click(DeviceInfo.PUBLISH);\n\t\t\t\tString device_UUID = appDeviceControl.getTextByXpath(DeviceInfo.DTS_TRACKING_ID);\n\t\t\t\t// 12. Refresh offline database\n\t\t\t\tappDeviceControl.click(DeviceInfo.REFRESH_OFFLINE_DATABASE);\n\t\t\t\tappDeviceControl.selectConfirmationDialogOption(\"Refresh\");\n\t\t\t\t// 9. Click \"Download Offline Database\" link\n\t\t\t\tAssert.assertTrue(appDeviceControl.downloadFile(DeviceInfo.DOWNLOAD_DATABASE));\n\t\t\t\t// 10. Open the offline databse file by SQLite\n\t\t\t\t// 11. Navigate to Asset table in SQLite\n\t\t\t\t// VP: Verify that Asset table will contain Attached 0 - Default Mode in Device Headphone tuning\n\t\t\t\tSQLiteDbUtil sqlite = new SQLiteDbUtil(appDeviceControl.getOfflineDBName(device_UUID));\n\t\t\t\tArrayList<String> ColumnData = sqlite.getColumnData(\"select DTSCSAssetId from Product where Type = 'DeviceHeadphone' and SubType = 'Attached0'\", \"DTSCSAssetId\", null);\n\t\t\t\tfor (int i = 0; i < ColumnData.size(); i++) {\n\t\t\t\t\tAssert.assertTrue(appDeviceControl.getBinFile(appDeviceControl.getOfflineDBName(device_UUID), \"select Data from Asset where Type = 'TUNING' and Id = '\" + ColumnData.get(i).toString() + \"'\", \"Data\", device_UUID));\n\t\t\t\tappDeviceControl.doDelete(DeviceInfo.DELETE);\n\t\t\t\t}\n\t\t\t}",
"public void TPSiteInspectionLetter_Application_Dev_plan() \n\t{\n\t\ttry{\n\n\t\t\tSCR_SiteInspectEmpName.add(mGetPropertyFromFile(\"tp_SiteInspectEmpNmdata\"));\n\t\t\tSCR_SiteInspectionEmpDate.add(mGetPropertyFromFile(\"tp_SiteInspectDatedata\"));\n\t\t\tif(!mGetPropertyFromFile(\"TypeOfExecution\").equalsIgnoreCase(\"individual\")){\n\t\t\t\t/*mAssert(SIL_appname.get(CurrentinvoCount), AppfullnmWdTitle.get(CurrentinvoCount), \"Actual Applicant name in site inspection letter is:::\"+SIL_appname.get(CurrentinvoCount) +\",Expected is:::\"+AppfullnmWdTitle.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_serviceName.get(CurrentinvoCount),ServiceNameforTownPlanning.get(CurrentinvoCount), \"Actual Service Name in site inspection letter is :::\"+SIL_serviceName.get(CurrentinvoCount) +\",Expected is:::\"+ServiceNameforTownPlanning.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_ApplicationNo.get(CurrentinvoCount), ApplicationNoforLandDev.get(CurrentinvoCount), \"Actual Application No in site inspection letter is :::\"+SIL_ApplicationNo.get(CurrentinvoCount) +\",Expected is :::\"+ApplicationNoforLandDev.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_ward1.get(CurrentinvoCount), ward.get(CurrentinvoCount), \"Actual Ward No is:::\"+SIL_ward1.get(CurrentinvoCount) +\",Expected is:::\"+ward.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_KhataNo.get(CurrentinvoCount), PlotKhasraNo.get(CurrentinvoCount), \"Actual Plot Khasara no is :::\"+SIL_KhataNo.get(CurrentinvoCount)+\",Expected is:::\"+PlotKhasraNo.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_maujano.get(CurrentinvoCount), MaujaNo.get(CurrentinvoCount), \"Actual Mauja No is :::\"+SIL_maujano.get(CurrentinvoCount) +\",Expected is:::\"+MaujaNo.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_plotkhasaranocs.get(CurrentinvoCount), KhataNo.get(CurrentinvoCount), \"Actual Khata No is:::\"+SIL_plotkhasaranocs.get(CurrentinvoCount) +\",Expected is:::\"+KhataNo.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_HoldingNo.get(CurrentinvoCount), HoldingNo.get(CurrentinvoCount), \"Actual Holding No is :::\"+SIL_HoldingNo.get(CurrentinvoCount) +\",Expected is:::\"+HoldingNo.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_Locality.get(CurrentinvoCount), Village.get(CurrentinvoCount), \"Actual Village/Mohalla is :::\"+SIL_Locality.get(CurrentinvoCount) +\",Expected is:::\"+Village.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_TojiNo.get(CurrentinvoCount), TojiNo.get(CurrentinvoCount), \"Actual Toji No is :::\"+SIL_TojiNo.get(CurrentinvoCount) +\",Expected is:::\"+TojiNo.get(CurrentinvoCount));*/\n\n\t\t\t}\n\n\t\t}\n\n\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tthrow new MainetCustomExceptions(\"Error in searchByVariousCriteria script\");\n\t\t}\n\t}",
"@Test\n\t\t\tpublic void TC640DADD_82(){\nReporter.log(\"Verify that Product Type is ''DTS:X Premium'' , when uploading Attached 0 - Default Mode on Device Headphone route, the offline DB will have a new entry in the Product table with Type and SubType data correctly\");\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t \t1. Log into DTS portal as a DTS user\n\t\t\t\t\t2. Navigate to \"Apps or Devices� page\n\t\t\t\t\t3. Click “Add App & Device� link\n\t\t\t\t\t4. Leave on Product Type combo box as ''DTS:X Premium''\n\t\t\t\t\t5. Fill valid value into all required fields\n\t\t\t\t\t6. Select Device Headphone in “Audio Route� dropdown list\n\t\t\t\t\t7. Select “Attached 0 - Default Mode� in “Content Modes� dropdown list\n\t\t\t\t\t8. Click on \"Select file\" button in \"Custom Tuning\" section\n\t\t\t\t\t9. Upload the valid custom tuning DTSCS file\n\t\t\t\t\tVP: Verify that the valid tuning DTSCS file is uploaded successfully\n\t\t\t\t\t10. Click \"Save\" link\n\t\t\t\t\t11. Click \"Publish\" link\n\t\t\t\t\t12. Refresh offline database\n\t\t\t\t\t13. Click \"Download Offline Database\" link\n\t\t\t\t\t14. Open the offline databse file by SQLite\n\t\t\t\t\t15. Navigate to Product table in SQLite\n\t\t\t\t\tVP: Verify that Product table display new entry with Type as “DeviceHeadphone� and SubType as “Attached0\n\t\t\t\t*/\n\t\t\t\t\n\t\t\t\t// 1. Log into DTS portal as a DTS user successfully\t\n\t\t\t\tloginControl.login(SUPER_USER_NAME, SUPER_USER_PASSWORD);\n\t\t\t\t// 2. Navigate to \"Apps & Devices\" page\t\n\t\t\t\tappDeviceControl.click(PageHome.LINK_APP_DEVICES);\n\t\t\t\t// 3. Click \"Add App or Device\" link\t\n\t\t\t\tappDeviceControl.click(DeviceList.CREATE_NEW_DEVICE);\n\t\t\t\t// 4. Fill valid value into all required fields with choosing eagle version 2.0.\n\t\t\t\t// 5. Leave the Product Type panel as ''DTS:X Premium''\n\t\t\t\tHashtable<String, String> appDevice = TestData.appDevicePublishEagleV2();\n\t\t\t\tappDevice.remove(\"save\");\n\t\t\t\tappDeviceControl.createNewDevice(DeviceEdit.getHash(), appDevice);\n\t\t\t\t// 6. Select Device Headphone in “Audio Route� dropdown list\n\t\t\t\tappDeviceControl.selectOptionByName(DeviceEdit.PRODUCT_TYPE, DeviceEdit.Product_Types.HPX_Medium.getType());\n/*\t\t\t\tappDeviceControl.selectOptionByName(DeviceEdit.AUDIO_ROUTE_TYPE, DeviceEdit.routes.Device_Headphone.getName());\n\t\t\t\t// 7. Select “Attached 0 - Default Mode� in “Content Modes� dropdown list\n\t\t\t\tappDeviceControl.selectOptionByName(DeviceEdit.AUDIO_ROUTE, DeviceEdit.Content_Modes_Hig.Attached_0_Default_Mode.getName());\n\t\t\t\t// 8. Click on \"Select file\" button in \"Custom Tuning\" section\n\t\t\t\t// 9. Upload the valid custom tuning DTSCS file\n\t\t\t\tappDeviceControl.uploadTuningAppDevice(DeviceEdit.ADD_CUSTOM_TUNING, AddEditProductModel.FileUpload.Device_Headphone_Attach0_Eagle2_0.getName());*/\n\t\t\t\tappDeviceControl.click(DeviceEdit.NO_IMAGES);\n\t\t\t\t// 10. Click \"Save\" link\n\t\t\t\tappDeviceControl.click(DeviceEdit.SAVE);\n\t\t\t\t// 11. Publish above device\n\t\t\t\tappDeviceControl.click(DeviceInfo.PUBLISH);\n\t\t\t\tString device_UUID = appDeviceControl.getTextByXpath(DeviceInfo.DTS_TRACKING_ID);\n\t\t\t\t// 12. Refresh offline database\n\t\t\t\tappDeviceControl.click(DeviceInfo.REFRESH_OFFLINE_DATABASE);\n\t\t\t\tappDeviceControl.selectConfirmationDialogOption(\"Refresh\");\n\t\t\t\t// 9. Click \"Download Offline Database\" link\n\t\t\t\tAssert.assertTrue(appDeviceControl.downloadFile(DeviceInfo.DOWNLOAD_DATABASE));\n\t\t\t\t// 10. Open the offline databse file by SQLite\n\t\t\t\t// 11. Navigate to Asset table in SQLite\n\t\t\t\t// VP: Verify that the tuning Blog data only include Eagle settings data 2.0\n\t\t\t\tSQLiteDbUtil sqlite = new SQLiteDbUtil(appDeviceControl.getOfflineDBName(device_UUID));\n\t\t\t\tArrayList<String> ColumnData = sqlite.getColumnData(\"select DTSCSAssetId from Product where Type = 'DeviceHeadphone' and SubType = 'Attached2'\", \"DTSCSAssetId\", null);\n\t\t\t\tAssert.assertTrue(ColumnData.size()>0);\n\t\t\t\tappDeviceControl.doDelete(DeviceInfo.DELETE);\n\t\t\t}",
"@Test\n\t@UseDataProvider(value = EQReportDataProvider.EQ_REPORT_PAGE_ACTION_DATA_PROVIDER_TC2407, location = EQReportDataProvider.class)\n\tpublic void TC2407_MobileEQReportsWithSurveyWithNoPeaks(\n\t\t\tString testCaseID, Integer userDataRowID, Integer reportDataRowID1, Integer reportDataRowID2) throws Exception {\n\t\tLog.info(\"\\nRunning TC2407_MobileEQReportsWithSurveyWithNoPeaks ...\");\n\n\t\tloginPageAction.open(EMPTY, NOTSET);\n\t\tloginPageAction.login(EMPTY, getUserRowID(userDataRowID));\n\t\teqReportsPageAction.open(EMPTY, getReportRowID(reportDataRowID1));\n\n\t\teqReportsPage.openNewReportPage();\n\t\teqReportsPageAction.fillAndCreateNewReport(getReportRowID(reportDataRowID1),false);\n\t\tassertTrue(eqReportsPageAction.waitForReportGenerationToComplete(EMPTY, getReportRowID(reportDataRowID1)));\n\t\teqReportsPageAction.openComplianceViewerDialog(EMPTY, getReportRowID(reportDataRowID1));\n\t\teqReportsPageAction.clickOnViewerPDF(EMPTY, getReportRowID(reportDataRowID1));\n\t\tassertTrue(eqReportsPageAction.waitForPDFDownloadToComplete(EMPTY, getReportRowID(reportDataRowID1)));\n\t}",
"@Test\n\t\t\tpublic void TC640DADD_80(){// The Device headphone already add on Default Audio route, so this case cannot be run due to change on ticketMPG-5927\n\t\t\t\tReporter.log(\"Verify that Device Headphone tuning is displayed correctly in Audio Route section with ''DTS Audio Processing'' option\");\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t \t1. Log into DTS portal as a DTS user\n\t\t\t\t\t2. Navigate to \"Apps or Devices� page\n\t\t\t\t\t3. Click “Add App & Device� link\n\t\t\t\t\t4. Leave on Product Type combo box as ''DTS Audio Processing''\n\t\t\t\t\t5. Fill valid value into all required fields\n\t\t\t\t\t6. Select Device Headphone in “Audio Route� dropdown list\n\t\t\t\t\t7. Select “Default Mode� in “Content Modes� dropdown list\n\t\t\t\t\t8. Click on \"Select file\" button in \"Custom Tuning\" section\n\t\t\t\t\t9. Upload the valid custom tuning DTSCS file\n\t\t\t\t\tVP: Verify that the valid tuning DTSCS file is uploaded successfully\n\t\t\t\t\t10. Click \"Save\" link\n\t\t\t\t\t11. Click \"Publish\" link\n\t\t\t\t\tVP: Verify that the custom tuning file “Attached 0 - Default Mode� is displayed in “Audio Route� section\n\t\t\t\t*/\n\t\t\t\t\n/*\t\t\t\t// 1. Log into DTS portal as a DTS user successfully\t\n\t\t\t\tloginControl.login(SUPER_USER_NAME, SUPER_USER_PASSWORD);\n\t\t\t\t// 2. Navigate to \"Apps & Devices\" page\t\n\t\t\t\tappDeviceControl.click(PageHome.LINK_APP_DEVICES);\n\t\t\t\t// 3. Click \"Add App or Device\" link\t\n\t\t\t\tappDeviceControl.click(DeviceList.CREATE_NEW_DEVICE);\n\t\t\t\t// 4. Fill valid value into all required fields with choosing eagle version 2.0.\n\t\t\t\t// 5. Leave the Product Type panel as ''DTS Audio Processing''\n\t\t\t\tHashtable<String, String> appDevice = TestData.appDevicePublishEagleV2();\n\t\t\t\tappDevice.remove(\"save\");\n\t\t\t\tappDeviceControl.createNewDevice(DeviceEdit.getHash(), appDevice);\n\t\t\t\t// 6. Select Device Headphone in “Audio Route� dropdown list\n\t\t\t\tappDeviceControl.selectOptionByName(DeviceEdit.PRODUCT_TYPE, DeviceEdit.Product_Types.HPX_Low.getType());\n\t\t\t\tappDeviceControl.selectOptionByName(DeviceEdit.AUDIO_ROUTE_TYPE, DeviceEdit.routes.Device_Headphone.getName());\n\t\t\t\t// 7. Select “Default Mode� in “Content Modes� dropdown list\n\t\t\t\tappDeviceControl.selectOptionByName(DeviceEdit.AUDIO_ROUTE, DeviceEdit.Content_Modes.Mode_Default.getType());\n\t\t\t\t// 8. Click on \"Select file\" button in \"Custom Tuning\" section\n\t\t\t\t// 9. Upload the valid custom tuning DTSCS file\n\t\t\t\tappDeviceControl.uploadTuningAppDevice(DeviceEdit.ADD_CUSTOM_TUNING, AddEditProductModel.FileUpload.Device_Headphone_Default_Mode_Eagle2_0.getName());\n\t\t\t\tappDeviceControl.click(DeviceEdit.NO_IMAGES);\n\t\t\t\t// 10. Click \"Save\" link\n\t\t\t\tappDeviceControl.click(DeviceEdit.SAVE);\n\t\t\t\t// 11. Publish above device\n\t\t\t\tappDeviceControl.click(DeviceInfo.PUBLISH);\n\t\t\t\t// VP: Verify that the custom tuning file is displayed in “Audio Route� section\n\t\t\t\tAssert.assertTrue(driver.findElement(By.partialLinkText(DeviceEdit.Content_Modes.Mode_1.getType())).isDisplayed());\n\t\t\t\tappDeviceControl.doDelete(DeviceInfo.DELETE);*/\n\t\t}",
"@Test\n\tpublic void TC041DAVD_12(){\n\t\tproductControl.addLog(\"ID : TC041DAVD_12: Verify that the 'Partner Actions' link is displayed in Step 2 : Marketing Approval of Publishing Process\");\n\t\t/*\n\t \t\t1. Log into DTS portal as a DTS user\n\t\t\t2. Navigate to \"Products\" page\n\t\t\t3. Select a published product from Products table\n\t\t\tVP. Verify that 040D product Detail page is displayed\n\t\t\t4. Click \"Add New Variant\" link in \"Model Actions\" module\n\t\t\tVP. The 052D Model Variant Edit page is displayed.\n\t\t\t5. Fill valid value into all requires fields\n\t\t\t6. Upload variant tuning file successfully\n\t\t\t7. Upload three size of product catalog images successfully\n\t\t\t8. Upload a file for marketing material successfully\n\t\t\t9. Click \"Save\" link\n\t\t\tVP: The 041D product Variant Detail page is displayed \n\t\t\t10. Go through Step 1: Tuning Approval and Step 2: Marketing Approval of Publishing Process successfully\n\t\t\tVP: Verify that the Publish button is enabled in step 3 of Publishing Process\n\t\t\t11. Click ´┐ŻPublish´┐Ż button\n\t\t*/\n\t\tloginControl.login(SUPER_USER_NAME, SUPER_USER_PASSWORD);\n\t\t// 2. Navigate to \"Products\" page\n\t\tproductControl.click(PageHome.linkAccessories);\n\t\t// 3. Select an product from Products table\n\t\tString productName = productControl.selectAnAccessory();\n\t\t/*\n\t\t * VP. Verify that 040D product Detail page is displayed\n\t\t */\n\t\tAssert.assertEquals(productControl.getTextByXpath(ProductDetailModel.TITLE_NAME), productName);\n\t\t// 4. Click \"Add New Variant\" link in \"Model Actions\" module\n\t\tproductControl.click(ProductDetailModel.ADD_VARIANT);\n\t\t/*\n\t\t * VP. The 052D Model Variant Edit page is displayed\n\t\t */\n\t\tAssert.assertTrue(productControl.isElementPresent(AddEditProductModel.VARIANT_TITLE));\n\t\t// 5. Fill valid value into all requires fields\n\t\t// 6. Upload variant tuning file successfully\n\t\t// 7. Upload three size of product catalog images successfully\n\t\t// 8. Upload a file for marketing material successfully\n\t\t// 9. Click \"Save\" link\n\t\tHashtable<String,String> data = TestData.variantData(true, true, true);\n\t\tproductControl.addVariant(AddEditProductModel.getVariantHash(), data);\n\t\t/*\n\t\t * VP: The 041D product Variant Detail page is displayed \n\t\t */\n\t\tAssert.assertEquals(productControl.getTextByXpath(VariantInfo.TITLE_NAME), data.get(\"name\"));\n\t\t// 10. Go through Step 1: Tuning Approval and Step 2: Marketing Approval of Publishing Process successfully\n\t\t// Approve tuning\n\t\tproductControl.click(VariantInfo.PARTNER_ACTIONS_STEP_1);\n\t\tproductControl.click(VariantInfo.APPROVE_TUNING);\n\t\t// Approve marketing\n\t\tproductControl.click(VariantInfo.PARTNER_ACTIONS_STEP_2);\n\t\tproductControl.click(VariantInfo.REQUEST_MARKETING_REVIEW);\n\t\tproductControl.click(VariantInfo.APPROVE_MARKETING);\n\t\t/*\n\t\t * VP: Verify that the Publish button is enabled in step 3 of Publishing Process\n\t\t */\n\t\tAssert.assertEquals(productControl.getAtributeValue(VariantInfo.PUBLISH, \"class\"), \"button button-warning\");\n\t\t// 11. Click ´┐ŻPublish´┐Ż button\n\t\tproductControl.click(VariantInfo.PUBLISH);\n\t\t/*\n\t\t * Verify that the product variant is published\n\t\t */\n\t\tAssert.assertEquals(productControl.getTextByXpath(VariantInfo.PUBLISHED_STATUS), \"Published\");\n\t}",
"@Test(groups = { \"survey-creation\", \"all-tests\", \"key-tests\" })\r\n public void successfullyRetainingFieldMapping() throws Exception {\r\n\r\n String number = driver.getTimestamp();\r\n String surveyName = number + \"RetainingFieldMapping\";\r\n String theme = \"Aqua\";\r\n\r\n log.startTest( \"LeadEnable: Verify that contact/lead fields retains their mappings after clicking again in the survey's content\" );\r\n try {\r\n // Log And Go to Survey Page\r\n loginToSend().goToSurveyPage().sfdcSurvey.createSurveyAndTypeSurveyName( surveyName )\r\n .checkLogResponseInCRM()\r\n .selectSurveyFolders( surveyType3, sfdcCampaign3 ).sfdcQuestion.editFTQAndMapItToEmail( false )\r\n .addFTQAndMapItToLastName( false );\r\n send.sfdcSurvey.saveAndSelectTheme( theme );\r\n\r\n log.startStep( \"Go back to the Survey\" );\r\n driver.click( \"//a[contains(text(), 'Content')]\", driver.timeOut );\r\n driver.waitForPageToLoad();\r\n driver.waitForAjaxToComplete( driver.ajaxTimeOut );\r\n log.endStep();\r\n\r\n log.startStep( \"Verify that the check the 'Log responses in your CRM system' checkbox is present\" );\r\n driver.waitForAjaxToComplete( driver.ajaxTimeOut );\r\n log.endStep( verifyLogResponseInCRM() );\r\n\r\n // Verify the 1st free text question \r\n Thread.sleep( 1000 );\r\n send.sfdcSurvey.sfdcQuestion.editQuestionType( FTcontactField.EMAIL.question );\r\n\r\n log.resultStep( \"Verify the Contact drop down '\" + FTcontactField.EMAIL.question\r\n + \"' is still retain 'Email' value\" );\r\n log.endStep( driver.isValueSelected( \"#qTypetextSalesforceContactsField span\",\r\n FTcontactField.EMAIL.conntactFiled ) );\r\n\r\n log.resultStep( \"Verify the Lead drop down '\" + FTcontactField.EMAIL.question\r\n + \"' is still retain 'Email' value\" );\r\n log.endStep( driver.isValueSelected( \"#qTypetextSalesforceLeadField span\",\r\n FTcontactField.EMAIL.conntactFiled ) );\r\n\r\n // Verify the 2nd free text question\r\n send.sfdcSurvey.sfdcQuestion.cancelQuestion().editQuestionType( FTcontactField.LASTNAME.question );\r\n\r\n log.resultStep( \"Verify the Contact drop down '\" + FTcontactField.LASTNAME.question\r\n + \"' is still retain 'Last Name' value\" );\r\n log.endStep( driver.isValueSelected( \"#qTypetextSalesforceContactsField span\",\r\n FTcontactField.LASTNAME.conntactFiled ) );\r\n\r\n log.resultStep( \"Verify the Lead drop down '\" + FTcontactField.LASTNAME.question\r\n + \"' is still retain 'Last Name' value\" );\r\n log.endStep( driver.isValueSelected( \"#qTypetextSalesforceLeadField span\",\r\n FTcontactField.LASTNAME.conntactFiled ) );\r\n\r\n } catch( Exception e ) {\r\n log.endStep( false );\r\n throw e;\r\n }\r\n log.endTest();\r\n }",
"@Test\n\tpublic void TC040DMS_03(){\n\t\tresult.addLog(\"ID : TC040DMS_03 : Verify that the Marketing statsus is changed to 'APPROVED' and its action is 'Revoke Marketing Approval' when DTS Marketing approve the marketing materials\");\n\t\t/*\n\t\t\tPre-Condition: The tuning state is approved.\n\t\t\t1. Log into DTS portal as a DTS user\n\t\t\t2. Navigate to \"Accessories\" page\n\t\t\t3. Select a accessory from accessories table which the tuning state is \"APPROVED\" and the marketing material is not uploaded yet.\n\t\t\tVP: Verify that the marketing status is \"UNSUBMITTED\"\n\t\t\t4. Upload a marketing material file\n\t\t\tVP: Verify that the \"Partner Actions\" link in step 2: Marketing Approval is displayed\n\t\t\t5. Expand the \"Partner Actions\" link in step 2 : Marketing Approval\n\t\t\t6. Click \"Request Marketing Review\" link\n\t\t\tVP:Marketing status is changed to \"PENDING DTS REVIEW\", the \"Approve Marketing\" and \"Declined Marketing\" links are also displayed \n\t\t\t7. Click \"Approve Marketing\" link\n\t\t */\n\t\t/*\n\t\t * Pre-Condition: The tuning state is approved\n\t\t */\n\t\t// Navigate to accessories page\n\t\thome.click(Xpath.LINK_PARTNER_ACCESSORIES);\n\t\t// Click Add Accessory link\n\t\thome.click(AccessoryMain.ADD_ACCESSORY);\n\t\t// Create accessory\n\t\tHashtable<String,String> data = TestData.accessoryTuning();\n\t\thome.addAccessoriesPartner(AddAccessory.getHash(), data);\n\t\t// Approve tuning\n\t\thome.click(AccessoryInfo.PARTNER_ACTIONS_STEP_1);\n\t\thome.click(AccessoryInfo.APPROVE_TUNING);\n\t\t/*\n\t\t * ****************************************************************\n\t\t */\n\t\t// 2. Navigate to \"Accessories\" page\n\t\thome.click(Xpath.linkAccessories);\n\t\t// 3. Select a accessory from accessories table which the tuning state is \"APPROVED\" and the marketing material is not uploaded yet.\n\t\thome.selectAnaccessorybyName(data.get(\"name\"));\n\t\t/*\n\t\t * VP: Verify that the marketing status is \"UNSUBMITTED\"\n\t\t */\n\t\tAssert.assertEquals(home.getTextByXpath(AccessoryInfo.MARKETING_STATUS), \"UNSUBMITTED\");\n\t\t// 4. Upload a marketing material file\n\t\thome.click(AccessoryInfo.EDIT_MODE);\n\t\thome.uploadFile(AddAccessory.ADD_MARKETING, Constant.AUDIO_ROUTE_FILE);\n\t\thome.clickOptionByIndex(AddAccessory.MARKETING_METERIAL_TYPE, 1);\n\t\thome.click(AddAccessory.SAVE);\n\t\t/*\n\t\t * VP: Verify that the \"Partner Actions\" link in step 2: Marketing Approval is displayed\n\t\t */\n\t\tAssert.assertTrue(home.isElementPresent(AccessoryInfo.PARTNER_ACTIONS_STEP_2));\n\t\t// 5. Expand the \"Partner Actions\" link in step 2: Marketing Approval\n\t\thome.click(AccessoryInfo.PARTNER_ACTIONS_STEP_2);\n\t\t// 6. Click \"Request Marketing Review\" link\n\t\thome.click(AccessoryInfo.REQUEST_MARKETING_REVIEW);\n\t\t/*\n\t\t * Verify that Marketing status is changed to \"PENDING DTS REVIEW\", the \"Approve Marketing\" and \"Declined Marketing\" links are also displayed\n\t\t */\n\t\tAssert.assertEquals(home.getTextByXpath(AccessoryInfo.MARKETING_STATUS), \"PENDING DTS REVIEW\");\n\t\tAssert.assertTrue(home.isElementPresent(AccessoryInfo.APPROVE_MARKETING));\n\t\tAssert.assertTrue(home.isElementPresent(AccessoryInfo.DECLINE_MARKETING));\n\t\t// 7. Click \"Approve Marketing\" link\n\t\thome.click(AccessoryInfo.APPROVE_MARKETING);\n\t\t/*\n\t\t * Verify that Marketing status is changed to \"APPROVED\" and its action is \"Revoke Marketing Approval\" \n\t\t */\n\t\tAssert.assertTrue(home.getTextByXpath(AccessoryInfo.MARKETING_STATUS).equalsIgnoreCase(AccessoryInfo.APPROVED));\n\t\tAssert.assertEquals(home.getTextByXpath(AccessoryInfo.MARKETING_ACTION), \"Revoke Marketing Approval\");\n\t\t// Delete product\n\t\thome.doDelete(AccessoryInfo.DELETE);\n\t}",
"@Test(enabled = true, priority = 1)\n\tpublic void PQRS_HardStop_ViewPastData_64() throws InterruptedException {\n\t\ttest = extent.startTest(\n\t\t\t\t\"Validate PQRS Measures and Hard Stop Messages and View Past data while creaing initial Note with PT provider\",\n\t\t\t\t\"Validate PQRS Measures and Hard Stop Messages and View Past data \" + \"*****Current Browser******\"\n\t\t\t\t\t\t+ CurrentBrowserName + \"*****Browser Version******\" + caps.getVersion());\n\t\ttest.assignCategory(\"Regression\", \"On\" + \" \" + CurrentBrowserName,\n\t\t\t\tthis.getClass().getPackage().getName().toString());\n\t\ttest.log(LogStatus.INFO, \"Browser started\");\n\t\ttry {\n\t\t\tCommons.logout(driver);\n\t\t\tCommons.logintoRevflow(driver, Commons.readPropertyValue(\"userPT\"), Commons.readPropertyValue(\"password\"));\n\t\t\tstrActualtext = EMRUtils.AddPatientPQRS(driver, \"PQRS65\" + new Random().nextInt(9999999), \"14/05/1952\", \"\"); // Added\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Patient\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// with\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// all\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fields\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// and\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Complete\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// case\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// with\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// insurance\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Medicare\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// FLR\n\t\t\ttest.log(LogStatus.INFO, \"Added a Patient with all fields and Complete case with insurance Medicare FLR\");\n\t\t\ttest.log(LogStatus.INFO,\n\t\t\t\t\t\"To Validate Alert Message when Do NOT enter any minutes and click Charge Capture\");\n\t\t\tCommons.waitForLoad(driver);\n\t\t\tEMRUtils.AddDataSpage(driver);\n\t\t\ttest.log(LogStatus.INFO, \"Added Data on S Page\");\n\t\t\tEMRUtils.AddDataApage(driver);\n\t\t\ttest.log(LogStatus.INFO, \"Added Data on A Page\");\n\t\t\tEMRUtils.AddDataPpage(driver);\n\t\t\ttest.log(LogStatus.INFO, \"Added Data on P Page\");\n\t\t\t// ******************TC-20*********************************\n\t\t\t// ********************CASE-1: Validate PQRS tab available with ONLY\n\t\t\t// the following measures displayed**************\n\t\t\t// 128,130,131,134,182,226,431\n\t\t\t// 2114594\n\t\t\tActionUtils.click(driver.findElement(By.xpath(\"//a[@href='#PQRS']\")));\n\t\t\tCommons.waitforElement(driver,\n\t\t\t\t\tBy.xpath(\n\t\t\t\t\t\t\t\"//div[@id='PQRS']//div[contains(@class,'relative PQRS')]//div[contains(@class,'panel-heading')]\"),\n\t\t\t\t\t60);\n\t\t\tactual = driver.findElements(By.xpath(\n\t\t\t\t\t\"//div[@id='PQRS']//div[contains(@class,'relative PQRS')]//div[contains(@class,'panel-heading')]\"));\n\t\t\tAssert.assertEquals(actual.size(), 8);\n\t\t\tSystem.out.println(\"PQRS Measures found:\" + actual.size());\n\t\t\ttest.log(LogStatus.INFO, \"PQRS Measures found:\" + actual.size());\n\t\t\ttest.log(LogStatus.INFO, \"Validating PQRS Measures Codes\");\n\t\t\tfor (WebElement we : actual) {\n\t\t\t\tSystem.out.println(we.getText());\n\t\t\t\ttest.log(LogStatus.INFO, we.getText());\n\t\t\t}\n\t\t\t// make sure you found the right number of elements\n\t\t\tString[] expected1 = { \"126\", \"127\", \"128\", \"130\", \"131\", \"154\", \"155\", \"182\" };\n\t\t\tfor (int i = 0; i < 8; i++) {\n\t\t\t\tAssert.assertTrue(actual.get(i).getText().trim().contains(expected1[i]));\n\t\t\t}\n\t\t\tCommons.screenshot();\n\t\t\tSystem.out.println(\"************Assertion-1 Pass*********\");\n\t\t\t// Charge Capture and Finalize Note with Procedure code 97003\n\t\t\ttest.log(LogStatus.INFO, \"Charge Capture and Finalize Note with Procedure code 97003\");\n\t\t\tActionUtils.click(driver.findElement(By.xpath(\"//a[contains(text(),'Charge Capture')]\")));\n\t\t\tCommons.waitForLoad(driver);\n\t\t\tCommons.waitforElement(driver, By.xpath(\"//*[@id='autosearchProcedureCodesChargeCapture']//input\"), 60);\n\t\t\tAPageUtils.addProcedureCode(driver, \"97003\");\n\t\t\tCommons.waitForLoad(driver);\n\t\t\tCommons.waitforElement(driver, By.xpath(\"//input[@name='handOnTreatmentMinutes']\"), 30);\n\t\t\tActionUtils.clear(driver.findElement(By.xpath(\"//input[@name='handOnTreatmentMinutes']\")));\n\t\t\tActionUtils.sendKeys(driver.findElement(By.xpath(\"//input[@name='handOnTreatmentMinutes']\")), \"15\");\n\t\t\tActionUtils.click(driver.findElement(By.xpath(\"//button[contains(.,'Validate Charges')]\")));\n\t\t\tSystem.out.println(\"Clicked on Validate Charge button\");\n\t\t\tCommons.waitforElement(driver, By.xpath(\"//button[contains(text(),'Sign and Finalize')]\"), 80);\n\t\t\t// CASE-2\n\t\t\t// go to charge capture > procedure code entry, enter 97003,\n\t\t\t// completed charge capture and click \"Sign and finalize\" on sign\n\t\t\t// note tab\n\t\t\ttry {\n\t\t\t\tdriver.findElement(By.xpath(\"//button[contains(text(),'Sign and Finalize')]\")).click();\n\t\t\t} catch (Exception e) {\n\t\t\t}\n\t\t\tCommons.waitforElement(driver, By.xpath(\"//*[@id='errorGridId']\"), 40);\n\t\t\tSystem.out.println(\"Triggred Hard Stop message\");\n\t\t\ttest.log(LogStatus.INFO, \"Triggred 5 Hard Stop message\");\n\t\t\tCommons.screenshot();\n\t\t\tSystem.out.println(\"Asserting Hard stop messages\");\n\t\t\t// Asserting 4 Error messages on Sing and Finalize screen\n\t\t\tactual = driver.findElements(By.xpath(\"//*[@id='errorGridId']//tbody/tr\"));\n\t\t\t// actual = actual.subList(0,6);\n\t\t\tAssert.assertEquals(actual.size(), 5);\n\t\t\tSystem.out.println(\"No of Error messages found:\" + actual.size());\n\t\t\ttest.log(LogStatus.INFO, \"No of Error messages found:\" + actual.size());\n\t\t\ttest.log(LogStatus.INFO, \"Validating hard Stop messages text\");\n\t\t\tfor (WebElement we : actual) {\n\t\t\t\tSystem.out.println(we.getText());\n\t\t\t\ttest.log(LogStatus.INFO, we.getText());\n\t\t\t}\n\t\t\t// make sure you found the right number of elements\n\t\t\tString[] expected2 = {\n\t\t\t\t\t\"When billing 97001, 97003, 97161, 97162, 97163, 97165, 97166, or 97167 PQRS measure 128 - BMI must be reported.\",\n\t\t\t\t\t\"When billing 97001, 97002, 97161, 97162, 97163, 97164, 97003, 97004, 97165, 97166, 97167, 97168, 97532, 92507, 92508, 92526, or 92626 PQRS measure 130 - Medications must be reported.\",\n\t\t\t\t\t\"When billing 97001, 97002, 97161, 97162, 97163, 97164, 97003, 97004, 97165, 97166, 97167, 97168, 97532, 92507, 92508, or 92526 PQRS measure 131 - Pain must be reported.\",\n\t\t\t\t\t\"When billing 97001, 97002, 97161, 97162, 97163, 97164, 97003, 97004, 97165, 97166, 97167, or 97168 PQRS measure 154 - Fall Risk Assessment must be reported.\",\n\t\t\t\t\t\"When billing 97001, 97002, 97161, 97162, 97163, 97164, 97003, 97004, 97165, 97166, 97167, or 97168 PQRS measure 182 - Functional Outcome Assessment must be reported\", };\n\t\t\tfor (int i = 0; i < 5; i++) {\n\t\t\t\tAssert.assertTrue(actual.get(i).getText().contains(expected2[i]));\n\t\t\t}\n\t\t\tSystem.out.println(\"************Assertion-2 Pass*********\");\n\t\t\tCommons.screenshot();\n\t\t\t// closing error pop up\n\t\t\tActionUtils.click(driver.findElement(By.xpath(\"//button[contains(@ng-click,'closeErrorPopup')]\")));\n\t\t\tActionUtils.click(driver.findElement(By.xpath(\"//a[contains(text(),'Charge Capture')]\")));\n\t\t\tCommons.waitForLoad(driver);\n\t\t\tCommons.waitforElement(driver, By.xpath(\"//*[@id='autosearchProcedureCodesChargeCapture']//input\"), 60);\n\t\t\ttest.log(LogStatus.INFO, \"Delete Existing proc code then Sign and finalize Note\");\n\t\t\tActionUtils.click(driver.findElement(By.xpath(\"//a[contains(text(),'Charge Capture')]\")));\n\t\t\tCommons.waitForLoad(driver);\n\t\t\tCommons.waitforElement(driver, By.xpath(\"//*[@id='autosearchProcedureCodesChargeCapture']//input\"), 60);\n\t\t\t// Remove Existing Proc code\n\t\t\tActionUtils.click(driver.findElement(\n\t\t\t\t\tBy.xpath(\"(//input[contains(@ng-click,'selectAllProcedureCodes(list,isCheck)')])[1]\")));\n\t\t\tCommons.waitforElement(driver, By.xpath(\"//button[contains(text(),'Delete Procedure Code')]\"), 30);\n\t\t\tdriver.findElement(By.xpath(\"//button[contains(text(),'Delete Procedure Code')]\")).click();\n\t\t\tCommons.waitForLoad(driver);\n\t\t\t// APageUtils.addProcedureCode(driver,\"97003\");\n\t\t\tCommons.waitForLoad(driver);\n\t\t\tCommons.waitforElement(driver, By.xpath(\"//input[@name='handOnTreatmentMinutes']\"), 30);\n\t\t\tActionUtils.clear(driver.findElement(By.xpath(\"//input[@name='handOnTreatmentMinutes']\")));\n\t\t\tActionUtils.sendKeys(driver.findElement(By.xpath(\"//input[@name='handOnTreatmentMinutes']\")), \"15\");\n\t\t\tActionUtils.click(driver.findElement(By.xpath(\"//button[contains(.,'Validate Charges')]\")));\n\t\t\tSystem.out.println(\"Clicked on Validate Charge button\");\n\t\t\tCommons.waitforElement(driver, By.xpath(\"//button[contains(text(),'Sign and Finalize')]\"), 80);\n\t\t\tActionUtils.click(driver.findElement(By.xpath(\"//button[contains(text(),'Sign and Finalize')]\")));\n\t\t\tCommons.waitForLoad(driver);\n\t\t\tCommons.waitforElement(driver, By.xpath(\"//*[@id='Diagnosis']/div[contains(text(),'Report List')]\"), 380);\n\t\t\t// Add Addendum and go to PQRS and add G-codes\n\t\t\tCommons.waitForLoad(driver);\n\t\t\tCommons.waitforElement(driver, By.xpath(\"//input[@value='Add Addendum']\"), 30);\n\t\t\tActionUtils.click(driver.findElement(By.xpath(\"//input[@value='Add Addendum']\")));\n\t\t\tSystem.out.println(\"Clicked on Add addendum button\");\n\t\t\tCommons.waitForLoad(driver);\n\t\t\tCommons.waitforElement(driver, By.xpath(\"//input[@value='Create Note']\"), 50);\n\t\t\tCommons.scrollElementinotView(driver.findElement(By.xpath(\"//textarea[@name='addendumStatement']\")),\n\t\t\t\t\tdriver);\n\t\t\tActionUtils.sendKeys(driver.findElement(By.xpath(\"//textarea[@name='addendumStatement']\")),\n\t\t\t\t\t\"Test PQRS G codes\");\n\t\t\tCommons.waitforElement(driver, By.xpath(\"//input[@value='Create Note']\"), 30);\n\t\t\tCommons.waitForLoad(driver);\n\t\t\tCommons.waitForElementToBeClickable(driver, driver.findElement(By.xpath(\"//input[@value='Create Note']\")),\n\t\t\t\t\t30);\n\t\t\tActionUtils.click(driver.findElement(By.xpath(\"//input[@value='Create Note']\")));\n\t\t\tSystem.out.println(\"Clicked on Create Note button for addendum\");\n\t\t\tCommons.waitForLoad(driver);\n\t\t\tCommons.waitforElement(driver, By.xpath(\"//a[contains(.,'Charge Capture')]\"), 80);\n\t\t\t// Navigate to PQRS\n\t\t\t// 2130104\n\t\t\tCommons.waitforElement(driver, By.xpath(\"//a[@data-ng-click='redirectToPlan()']\"), 30);\n\t\t\tActionUtils.click(driver.findElement(By.xpath(\"//a[@data-ng-click='redirectToPlan()']\")));\n\t\t\tCommons.waitForLoad(driver);\n\t\t\tCommons.waitforElement(driver, By.xpath(\"//div[contains(text(),'Treatment Schedule')]\"), 140);\n\t\t\tActionUtils.click(driver.findElement(By.xpath(\"//a[@href='#PQRS']\")));\n\t\t\tSystem.out.println(\"Navigated to P page\");\n\t\t\t// Add G codes to PQRS measures.\n\t\t\t// 2129659\n\t\t\tCommons.waitforElement(driver,\n\t\t\t\t\tBy.xpath(\"(//div[@id='PQRS']//span[contains(@class,'glyphicon glyphicon-plus')])[1]\"), 30);\n\t\t\t// Add measures 128\n\t\t\tActionUtils.click(driver.findElement(\n\t\t\t\t\tBy.xpath(\"(//div[@id='PQRS']//span[contains(@class,'glyphicon glyphicon-plus')])[3]\")));\n\t\t\tCommons.ExistandDisplayElement(driver, By.xpath(\"//option[@label='G8421 - BMI NOT CALCULATED']\"), 10);\n\t\t\tActionUtils.click(driver.findElement(By.xpath(\"//option[@label='G8421 - BMI NOT CALCULATED']\")));\n\t\t\t// Verify Drop down values in Measures 128\n\t\t\tAssert.assertTrue(Commons.waitforElement(driver,\n\t\t\t\t\tBy.xpath(\"//option[@label='G8420 - CALCULATED BMI WITHIN NORMAL PARAMETERS AND DOCUMENTED']\"), 10));\n\t\t\tAssert.assertTrue(Commons.waitforElement(driver,\n\t\t\t\t\tBy.xpath(\n\t\t\t\t\t\t\t\"//option[@label='G8417 - Calculated BMI above normal parameters and a follow-up plan was documented']\"),\n\t\t\t\t\t10));\n\t\t\tAssert.assertTrue(Commons.waitforElement(driver,\n\t\t\t\t\tBy.xpath(\n\t\t\t\t\t\t\t\"//option[@label='G8418 - Calculated BMI below normal parameters and a follow-up plan was documented']\"),\n\t\t\t\t\t10));\n\t\t\tAssert.assertTrue(\n\t\t\t\t\tCommons.waitforElement(driver, By.xpath(\"//option[@label='G8422 - NOT ELIGIBLE FOR BMI']\"), 10));\n\t\t\tAssert.assertTrue(Commons.waitforElement(driver,\n\t\t\t\t\tBy.xpath(\n\t\t\t\t\t\t\t\"//option[@label='G8938 - BMI IS CALCULATED, BUT PATIENT NOT ELIGIBLE FOR FOLLOW-UP PLAN']\"),\n\t\t\t\t\t10));\n\t\t\tAssert.assertTrue(\n\t\t\t\t\tCommons.waitforElement(driver, By.xpath(\"//option[@label='G8421 - BMI NOT CALCULATED']\"), 10));\n\t\t\tAssert.assertTrue(Commons.waitforElement(driver,\n\t\t\t\t\tBy.xpath(\n\t\t\t\t\t\t\t\"//option[@label='G8419 - Calculated BMI outside normal parameters, no follow up plan documented']\"),\n\t\t\t\t\t10));\n\t\t\tActionUtils.click(driver.findElement(By.xpath(\"//div[@id='PQRS']//div[contains(text(),'128 - Body Mass Index')]//span[contains(@class,'glyphicon-minus')]\")));\n\t\t\t// Add measures 130\n\t\t\tActionUtils.click(driver.findElement(\n\t\t\t\t\tBy.xpath(\"(//div[@id='PQRS']//span[contains(@class,'glyphicon glyphicon-plus')])[4]\")));\n\t\t\tCommons.ExistandDisplayElement(driver,\n\t\t\t\t\tBy.xpath(\"//option[@label='G8427 - VERIFIED AND DOCUMENTED MEDICATIONS']\"), 10);\n\t\t\tActionUtils.click(\n\t\t\t\t\tdriver.findElement(By.xpath(\"//option[@label='G8427 - VERIFIED AND DOCUMENTED MEDICATIONS']\")));\n\t\t\tAssert.assertTrue(Commons.waitforElement(driver,\n\t\t\t\t\tBy.xpath(\"//option[@label='G8427 - VERIFIED AND DOCUMENTED MEDICATIONS']\"), 10));\n\t\t\tAssert.assertTrue(Commons.waitforElement(driver,\n\t\t\t\t\tBy.xpath(\"//option[@label='G8430 - DOC NOT ELIGIBLE FOR MEDS ASSESSMENT']\"), 10));\n\t\t\tAssert.assertTrue(Commons.waitforElement(driver,\n\t\t\t\t\tBy.xpath(\"//option[@label='G8428 - MEDICATIONS NOT DOCUMENTED (REASON UNSPECIFIED)']\"), 10));\n\t\t\tActionUtils.click(driver.findElement(By.xpath(\"//div[@id='PQRS']//div[contains(text(),'130')]//span[contains(@class,'glyphicon-minus')]\")));\n\t\t\t// Add measures 131\n\t\t\tActionUtils.click(driver.findElement(\n\t\t\t\t\tBy.xpath(\"(//div[@id='PQRS']//span[contains(@class,'glyphicon glyphicon-plus')])[5]\")));\n\t\t\tCommons.ExistandDisplayElement(driver,\n\t\t\t\t\tBy.xpath(\"//option[@label='G8732 - NO DOCUMENTATION OF PAIN ASSESSMENT, REASON NOT GIVEN']\"), 10);\n\t\t\tActionUtils.click(driver.findElement(\n\t\t\t\t\tBy.xpath(\"//option[@label='G8732 - NO DOCUMENTATION OF PAIN ASSESSMENT, REASON NOT GIVEN']\")));\n\t\t\tActionUtils.click(driver.findElement(By.xpath(\"//div[@id='PQRS']//div[contains(text(),'131')]//span[contains(@class,'glyphicon glyphicon-minus')]\")));\n\t\t\t// Add measures 154\n\t\t\tActionUtils.click(driver.findElement(\n\t\t\t\t\tBy.xpath(\"(//div[@id='PQRS']//span[contains(@class,'glyphicon glyphicon-plus')])[6]\")));\n\t\t\tCommons.ExistandDisplayElement(driver,\n\t\t\t\t\tBy.xpath(\"//option[@label='1101F-8P - FALLS STATUS NOT DOCUMENTED']\"), 10);\n\t\t\tActionUtils\n\t\t\t\t\t.click(driver.findElement(By.xpath(\"//option[@label='1101F-8P - FALLS STATUS NOT DOCUMENTED']\")));\n\t\t\tActionUtils.click(driver.findElement(By.xpath(\"//div[@id='PQRS']//div[contains(text(),'154')]//span[contains(@class,'glyphicon glyphicon-minus')]\")));\n\t\t\t// Add measures 182\n\t\t\tActionUtils.click(driver.findElement(\n\t\t\t\t\tBy.xpath(\"(//div[@id='PQRS']//span[contains(@class,'glyphicon glyphicon-plus')])[8]\")));\n\t\t\tCommons.ExistandDisplayElement(driver,\n\t\t\t\t\tBy.xpath(\n\t\t\t\t\t\t\t\"//option[@label='G8541 - FUNCTIONAL OUTCOME ASSESSMENT USING A STANDARDIZED TOOL NOT DOCUMENTED, REASON NOT GIVEN']\"),\n\t\t\t\t\t10);\n\t\t\tActionUtils.click(driver.findElement(By.xpath(\n\t\t\t\t\t\"//option[@label='G8541 - FUNCTIONAL OUTCOME ASSESSMENT USING A STANDARDIZED TOOL NOT DOCUMENTED, REASON NOT GIVEN']\")));\n\t\t\tActionUtils.click(driver.findElement(By.xpath(\"//div[@id='PQRS']//div[contains(text(),'182')]//span[contains(@class,'glyphicon glyphicon-minus')]\")));\n\t\t\t// Charge Capture and finalize note\n\t\t\ttest.log(LogStatus.INFO, \"Charge Capture and Finalize Note with Procedure code 97161\");\n\t\t\tActionUtils.click(driver.findElement(By.xpath(\"//a[contains(text(),'Charge Capture')]\")));\n\t\t\tCommons.waitForLoad(driver);\n\t\t\tCommons.waitforElement(driver, By.xpath(\"//*[@id='autosearchProcedureCodesChargeCapture']//input\"), 60);\n\t\t\tAPageUtils.addProcedureCode(driver, \"97161\");\n\t\t\tCommons.waitForLoad(driver);\n\t\t\tCommons.waitforElement(driver, By.xpath(\"//input[@name='handOnTreatmentMinutes']\"), 30);\n\t\t\tActionUtils.clear(driver.findElement(By.xpath(\"//input[@name='handOnTreatmentMinutes']\")));\n\t\t\tActionUtils.sendKeys(driver.findElement(By.xpath(\"//input[@name='handOnTreatmentMinutes']\")), \"15\");\n\t\t\tActionUtils.click(driver.findElement(By.xpath(\"//button[contains(.,'Validate Charges')]\")));\n\t\t\tSystem.out.println(\"Clicked on Validate Charge button\");\n\t\t\tCommons.waitforElement(driver, By.xpath(\"//*[@id='EvaluationProcCodeMessagePopUp']//input[@value='Yes']\"),\n\t\t\t\t\t60);\n\t\t\tCommons.screenshot();\n\t\t\tActionUtils.click(\n\t\t\t\t\tdriver.findElement(By.xpath(\"//*[@id='EvaluationProcCodeMessagePopUp']//input[@value='Yes']\")));\n\t\t\tCommons.waitforElement(driver, By.xpath(\"//button[contains(text(),'Sign and Finalize')]\"), 80);\n\t\t\tActionUtils.click(driver.findElement(By.xpath(\"//button[contains(text(),'Sign and Finalize')]\")));\n\t\t\tCommons.waitForLoad(driver);\n\t\t\tCommons.waitforElement(driver, By.xpath(\"//*[@id='Diagnosis']/div[contains(text(),'Report List')]\"), 380);\n\t\t\tAPageUtils.createfollowUpNewNote(driver);\n\t\t\t// go to the pqrs tab, click \"display past data\"\n\t\t\t// Navigate to PQRS\n\t\t\tCommons.waitForLoad(driver);\n\t\t\tCommons.waitforElement(driver, By.xpath(\"//a[@data-ng-click='redirectToPlan()']\"), 90);\n\t\t\tActionUtils.click(driver.findElement(By.xpath(\"//a[@data-ng-click='redirectToPlan()']\")));\n\t\t\tCommons.waitForLoad(driver);\n\t\t\tCommons.waitforElement(driver, By.xpath(\"//div[contains(text(),'Treatment Schedule')]\"), 40);\n\t\t\tActionUtils.click(driver.findElement(By.xpath(\"//a[@href='#PQRS']\")));\n\t\t\tSystem.out.println(\"Navigated to P page\");\n\t\t\tActionUtils.click(driver.findElement(By.xpath(\"//*[@id='PQRS']//button[contains(.,'View Past Data')]\")));\n\t\t\tCommons.waitforElement(driver, By.xpath(\"//th[contains(.,'Test of Measure')]\"), 80);\n\t\t\ttry {\n\t\t\t\t// Assert Past data Values\n\t\t\t\tAssert.assertTrue(\n\t\t\t\t\t\tdriver.findElement(By.xpath(\"//td[2]//label[contains(.,'G8421 - BMI NOT CALCULATED')]\"))\n\t\t\t\t\t\t\t\t.getText().contains(\"G8421\"));\n\t\t\t\tAssert.assertTrue(driver\n\t\t\t\t\t\t.findElement(\n\t\t\t\t\t\t\t\tBy.xpath(\"//td[2]//label[contains(.,'G8427 - VERIFIED AND DOCUMENTED MEDICATIONS')]\"))\n\t\t\t\t\t\t.getText().contains(\"G8427\"));\n\t\t\t\tAssert.assertTrue(driver\n\t\t\t\t\t\t.findElement(By\n\t\t\t\t\t\t\t\t.xpath(\"//td[2]//label[contains(.,'G8732 - NO DOCUMENTATION OF PAIN ASSESSMENT, REASON NOT GIVEN')]\"))\n\t\t\t\t\t\t.getText().contains(\"G8732\"));\n\t\t\t} catch (AssertionError e) {\n\t\t\t\tAssert.assertFalse(true, \"Unable to Verify View past tab data\" + Throwables.getStackTraceAsString(e));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tAssert.assertFalse(true, Throwables.getStackTraceAsString(e) + \"Test Sign and Finalize failed\");\n\t\t}\n\t}",
"@Test()\n\tpublic void rawItemActivity_US1893_TC3643_Operator() throws RowsExceededException,\n\t\t\tBiffException, WriteException, IOException, InterruptedException {\n\t\t/** Variable Section : **/\n\t\tAbstractTest.tcName=\"rawItemActivity_US1893_TC3643_Operator\";\n\t\tString password = LoginTestData.operator_SSO_Password;\n\t\tString userId = LoginTestData.operator_SSO_UserId;\n\t\tString storeId = LoginTestData.operatorStoreId;\n\t\tString samplewRINID = GlobalVariable.rawItem1;\n\t\tString stratDate=GlobalVariable.startDate;\n\t\tString endDate=GlobalVariable.endDate;\n\t\tString casePrice = \"11.0000\";\n\t\t/***********************************/\n\t\tHomePage homePage = PageFactory.initElements(driver, HomePage.class);\n\t\tRawItemActivityPage rawItemActivityPage = homePage.selectUserWithSSOLogin(userId, password).selectLocation(storeId)\n\t\t\t\t.goToRawItemActivityPage();\n\t\trawItemActivityPage.selectStartDate(stratDate).selectEndDate(endDate).searchAndSelectWRINID(samplewRINID);\n\t\tThread.sleep(5000);\n\t\trawItemActivityPage.Information_BT.click();\n\t\twait.until(ExpectedConditions.visibilityOf(rawItemActivityPage.RawItemInformation_Title));\n\t\tSystem.out.println(\"checked \"+rawItemActivityPage.RawItemInformation_popUp_ManualPurchase_CB.getAttribute(\"checked\"));\n\t\tif(rawItemActivityPage.RawItemInformation_popUp_ManualPurchase_CB.getAttribute(\"checked\") == null){\n\t\t\trawItemActivityPage.RawItemInformation_popUp_ManualPurchase_CB.click();\n\t\t}\n\t\tSelect listDropDown = new Select(rawItemActivityPage.RawItemInformation_popUp_Frequency_DD);\n\t\tString selectedList = listDropDown.getOptions().get(1).getText();\n\t\tlistDropDown.selectByIndex(1);\n\t\tSelect glAccountDropDown = new Select(rawItemActivityPage.RawItemInformation_popUp_GLAccount_DD);\n\t\tString selectedglAccount = glAccountDropDown.getOptions().get(1).getText();\n\t\tglAccountDropDown.selectByIndex(1);\n\t\tSelect vendorDropDown = new Select(rawItemActivityPage.RawItemInformation_popUp_PrimaryVendor_DD);\n\t\tString selectedVendor = vendorDropDown.getOptions().get(1).getText();\n\t\tvendorDropDown.selectByIndex(1);\n\t\trawItemActivityPage.RawItemInformation_popUp_CasePrice_TB.sendKeys(Keys.chord(Keys.CONTROL, \"a\"),casePrice);\n\t\trawItemActivityPage.RawItemInformation_Title.click();\n\t\trawItemActivityPage.RawItemInformation_popUp_Submit_BT.click();\n\t\twait.until(ExpectedConditions.visibilityOf(rawItemActivityPage.RawItemInformation_ConfirmationPopUp_Yes_BT)).click();\n\t\tif(Base.isElementDisplayed(rawItemActivityPage.RawItemInformation_popUp_ChangesSaved_Confirmation_MSG)){\n\t\t\tReporter.reportPassResult(\n\t\t\t\t\tbrowser,\n\t\t\t\t\t\"Operator should be able to view success message on submitting the raw item information\",\n\t\t\t\t\t\"Pass\");\n\t\t} else {\n\t\t\tReporter.reportTestFailure(\n\t\t\t\t\tbrowser,\n\t\t\t\t\t\"Operator should be able to view success message on submitting the raw item information\",\n\t\t\t\t\t\"Fail\");\n\t\t\tAbstractTest.takeSnapShot();\n\t\t}\n\t\trawItemActivityPage.Information_BT.click();\n\t\twait.until(ExpectedConditions.visibilityOf(rawItemActivityPage.RawItemInformation_Title));\n\t\tif(rawItemActivityPage.getSelectedOptionFromDropDown(listDropDown).equals(selectedList)\n\t\t\t\t& rawItemActivityPage.getSelectedOptionFromDropDown(glAccountDropDown).equals(selectedglAccount)\n\t\t\t\t& rawItemActivityPage.getSelectedOptionFromDropDown(vendorDropDown).equals(selectedVendor)\n\t\t\t\t& rawItemActivityPage.RawItemInformation_popUp_CasePrice_TB.getAttribute(\"value\").contains(casePrice)){\n\t\t\tReporter.reportPassResult(\n\t\t\t\t\tbrowser,\n\t\t\t\t\t\"Operator should be able to save raw item information\",\n\t\t\t\t\t\"Pass\");\n\t\t} else {\n\t\t\tReporter.reportTestFailure(\n\t\t\t\t\tbrowser,\n\t\t\t\t\t\"Operator should be able to save raw item information\",\n\t\t\t\t\t\"Fail\");\n\t\t\tAbstractTest.takeSnapShot();\n\t\t}\n\t}",
"@Test()\r\n\tpublic void sprint10_US1046_TC1804() throws RowsExceededException,\r\n\t\t\tBiffException, WriteException, IOException, InterruptedException {\r\n\t\t/** Variable Section : **/\r\n\t\tManualVendorsPage manualVendorsPage;\r\n\t\tString password = LoginTestData.operator_SSO_Password;\r\n\t\tString userId = LoginTestData.operator_SSO_UserId;\r\n\t\tString randomNum = String.valueOf(Base.generateNdigitRandomNumber(4));\r\n\t\tString newVendorName = \"Testauto\" + randomNum;\r\n\t\t/***********************************/\r\n\t\tHomePage homePage = PageFactory.initElements(driver, HomePage.class);\r\n\t\t// Navigate to Manual Vendor page\r\n\t\tmanualVendorsPage = homePage.selectUserWithSSOLogin(userId, password).navigateToInventoryManagement().goToManualVendorsPage();\r\n\t\twait.until(ExpectedConditions.visibilityOf(manualVendorsPage.AddVendor_BT));\r\n\t\t// Create a new vendor\r\n\t\tmanualVendorsPage.createANewVendor(newVendorName, randomNum);\r\n\t\t//click on edit button for the vendor\r\n\t\tmanualVendorsPage.editVendor_BT(newVendorName).click();\r\n\t\twait.until(ExpectedConditions.visibilityOf(manualVendorsPage.EditVendorDetails_Title));\r\n\t\t//click on delete button\r\n\t\twait.until(ExpectedConditions.elementToBeClickable(manualVendorsPage.Delete_BT)).click();\r\n\t\t//click on submit button\r\n\t\twait.until(ExpectedConditions.elementToBeClickable(manualVendorsPage.DeleteVendorConfirmationPopUp_No_BT)).click();\r\n\t\tThread.sleep(4000);\r\n\t\tmanualVendorsPage.restoreManualVendor(newVendorName);\r\n\t\t// verify that operator is able to restore deleted manual vendor\r\n\t\tif (Base.isElementDisplayed(manualVendorsPage.VendorName_Row(newVendorName))) {\r\n\t\t\tReporter.reportPassResult(\r\n\t\t\t\t\tbrowser,\"sprint10_US1046_TC1804\",\r\n\t\t\t\t\t\"User should be able to view the manual vendor=x restored.\",\r\n\t\t\t\t\t\"Pass\");\r\n\t\t} else {\r\n\t\t\tReporter.reportTestFailure(\r\n\t\t\t\t\tbrowser,\"sprint10_US1046_TC1804\",\"sprint10_US1046_TC1804\",\r\n\t\t\t\t\t\"User should be able to view the manual vendor=x restored.\",\r\n\t\t\t\t\t\"Fail\");\r\n\t\t\tAbstractTest.takeSnapShot(\"sprint10_US1046_TC1804\");\r\n\t\t}\r\n\t}",
"@Test\n\t\t\tpublic void TC640DADD_70(){// This testcase cannot be run due to complete profife on DTS Audio Processing donot have device headphones.\n\t\t\t\tReporter.log(\"Verify that complete profile with eagle version 2.0 is displayed correctly when remove one mode on Device Headphone tuning in Audio Route section and product type ''DTS Audio Processing''\");\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t \t1. Log into DTS portal as a DTS user\n\t\t\t\t\t2. Navigate to \"Apps or Devices� page\n\t\t\t\t\t3. Click “Add App & Device� link\n\t\t\t\t\t4. Fill valid value into all required fields with choosing eagle version 2.0.\n\t\t\t\t\t5. Leave the Product Type panel as ''DTS Audio Processing''\n\t\t\t\t\t6. Select Device Headphone route in “Audio Route� dropdown list\n\t\t\t\t\t7. Select “mode� in “Content Modes� dropdown list\n\t\t\t\t\t8. Repeat step 6 and 7 for 'mode2'' and ''mode3''\n\t\t\t\t\t9. Upload the valid custom tuning DTSCS file\n\t\t\t\t\t10. Click “Save� link\t\t\t\t\n\t\t\t\t\t11. Publish above device\n\t\t\t\t\t12. Click to ''Update Info''\n\t\t\t\t\t13. Remove ''mode1'' on Audio route\n\t\t\t\t\t14. Click \"Save\" link\n\t\t\t\t\t15. Click \"Publish\" link\n\t\t\t\t\t16. Download the complete profile\n\t\t\t\t\t17. Open file Complete Profile\n\t\t\t\t\tVP: Verify that complete profile NOT have Type as ''mode1''\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// 1. Log into DTS portal as a DTS user successfully\t\n\t\t\t\tloginControl.login(SUPER_USER_NAME, SUPER_USER_PASSWORD);\n\t\t\t\t// 2. Navigate to \"Apps & Devices\" page\t\n\t\t\t\tappDeviceControl.click(PageHome.LINK_APP_DEVICES);\n\t\t\t\t// 3. Click \"Add App or Device\" link\t\n\t\t\t\tappDeviceControl.click(DeviceList.CREATE_NEW_DEVICE);\n\t\t\t\t// 4. Fill valid value into all required fields with choosing eagle version 2.0.\n\t\t\t\t// 5. Leave the Product Type panel as ''DTS Audio Processing''\n\t\t\t\t// 6. Select Device Headphone route in “Audio Route� dropdown list\n\t\t\t\t// 7. Select “Attached 2� in “Content Modes� dropdown list\n\t\t\t\t// 8. Repeat step 6 and 7 for attach3, attach4,attach5,attach6,attach7,attach8\n\t\t\t\t// 9. Upload the valid custom tuning DTSCS file\n\t\t\t\t// 10. Click “Save� link\n\t\t\t\tHashtable<String, String> appDevice = TestData.appDevicePublishEagleV2();\n\t\t\t\tappDevice.remove(\"save\");\n\t\t\t\tappDeviceControl.createNewDevice(DeviceEdit.getHash(), appDevice);\n\t\t\t\tappDeviceControl.selectOptionByName(DeviceEdit.PRODUCT_TYPE, DeviceEdit.Product_Types.HPX_Low.getType());\n\t\t\t\tappDeviceControl.selectOptionByName(DeviceEdit.AUDIO_ROUTE_TYPE, DeviceEdit.routes.Device_Headphone.getName());\n\t\t\t\tappDeviceControl.selectOptionByName(DeviceEdit.AUDIO_ROUTE, DeviceEdit.Content_Modes.Mode_1.getType());\n\t\t\t\tappDeviceControl.uploadTuningAppDevice(DeviceEdit.ADD_CUSTOM_TUNING,AddEditProductModel.FileUpload.Device_Headphone_Mode1_Eagle2_0.getName());\n\t\t\t\t// Select “mode2�\n\t\t\t\tappDeviceControl.selectOptionByName(DeviceEdit.AUDIO_ROUTE_TYPE, DeviceEdit.routes.Device_Headphone.getName());\n\t\t\t\tappDeviceControl.selectOptionByName(DeviceEdit.AUDIO_ROUTE, DeviceEdit.Content_Modes.Mode_2.getType());\n\t\t\t\tappDeviceControl.uploadTuningAppDevice(DeviceEdit.ADD_CUSTOM_TUNING,AddEditProductModel.FileUpload.Device_Headphone_Mode2_Eagle2_0.getName());\n\t\t\t\t// Select “mode3�\n\t\t\t\tappDeviceControl.selectOptionByName(DeviceEdit.AUDIO_ROUTE_TYPE, DeviceEdit.routes.Device_Headphone.getName());\n\t\t\t\tappDeviceControl.selectOptionByName(DeviceEdit.AUDIO_ROUTE, DeviceEdit.Content_Modes.Mode_3.getType());\n\t\t\t\tappDeviceControl.uploadTuningAppDevice(DeviceEdit.ADD_CUSTOM_TUNING,AddEditProductModel.FileUpload.Device_Headphone_Mode3_Eagle2_0.getName());\n\t\t\t\tappDeviceControl.click(DeviceEdit.SAVE);\n\t\t\t\t// 11. Publish above device\n\t\t\t\tappDeviceControl.click(DeviceInfo.PUBLISH);\n\t\t\t\t// 12. Click to ''Update Info''\n\t\t\t\tappDeviceControl.click(DeviceInfo.CREATE_NEW_VERSION);\n\t\t\t\t// appDeviceControl.getTextByXpath(DeviceEdit.SWITCH_PRODUCT_TYPE).contains(DeviceEdit.requires.Switch_Product_Type.getName());\n\t\t\t\tappDeviceControl.selectConfirmationDialogOption(\"OK\");\n\t\t\t\t// 13. Remove ''mode1'' on Audio route\n\t\t\t\tappDeviceControl.getAtributeValue(DeviceEdit.UPLOADED_CUSTOM_TUNNING_NAME, \"href\").contains(AddEditProductModel.FileUpload.Device_Headphone_Mode1_Eagle2_0.getName().replaceAll(\".dtscs\", \"\"));\n\t\t\t\tappDeviceControl.isElementPresent(DeviceEdit.DELETE_CUSTOM_TUNNING_ICON);\n\t\t\t\tappDeviceControl.doDelete(DeviceEdit.DELETE_CUSTOM_TUNNING_ICON);\n\t\t\t\t// 14. Click \"Save\" link\n\t\t\t\tappDeviceControl.click(DeviceEdit.SAVE);\n\t\t\t\t// 15. Click \"Publish\" link\n\t\t\t\tappDeviceControl.click(DeviceInfo.PUBLISH);\n\t\t\t\tString DTS_ID = appDeviceControl.getTextByXpath(DeviceInfo.DTS_TRACKING_ID);\n\t\t\t\t// 16. Download the complete profile\n\t\t\t\tAssert.assertTrue(appDeviceControl.downloadFile(DeviceInfo.COMPLETE_PROFILE_LINK));\n\t\t\t\t// 17. Open file Complete Profile\n\t\t\t\t// VP: Verify that complete profile NOT have Type as ''mode1''\n\t\t\t\tAssert.assertFalse(appDeviceControl.checkTypeFile(DTS_ID, \"mode1\"));\t\n\t\t\t\tappDeviceControl.doDelete(DeviceInfo.DELETE);*/\n\t\t\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
a method to zero the current login attempts | public void zeroConsecutiveLoginAttempts(){
consecutiveLoginAttempts = 0;
} | [
"void resetLoginAttempts(String username);",
"public void resetAttempts() {\r\n\t\tif (attempts != null && attempts.intValue() > 0) {\r\n\t\t\tattempts = 0;\r\n\t\t}\r\n\t}",
"int getNumberOfLoginAttempts()\r\n\t{\r\n\t\treturn 0;\r\n\t}",
"User resetLoginAttempts(Long id);",
"public void resetAttackAttempts() {\r\n\t\tattackAttempts = 0;\r\n\t}",
"public final static void ResetCount() {\r\n\t\tpasswordCount = 0;\r\n\t}",
"@Transactional\n @Override\n public void resetFailAttempts(String login) {\n try {\n User user = userRepository.findUserByLogin(login);\n user.setAttempts(0);\n user.setLockedTill(0);\n user.setLastModified(null);\n } catch (Exception e) {\n logger.error(\"Failed to resetFailAttempts() \" + e);\n }\n\n }",
"public int getAttempts(){\n\t\treturn consecutiveLoginAttempts;\t\n\t}",
"public void resetAccessCount()\r\n\t{\n\t\tAccess = 0;\r\n\t}",
"int getLoginTimes();",
"void incrementLoginAttempts(String username);",
"BigInteger getLoginRetries();",
"public int getLoginAttempts() {\n return loginAttempts;\n }",
"public void resetMovementAttempts() {\r\n\t\tmovementAttempts = 0;\r\n\t}",
"private void tryAutomaticLogin() {\n lastSelectedUserInt = (prefUsers.getInt(currentUser, -1));\n Log.d(\"Sovellus\", \"Last Current user tested: \" + lastSelectedUserInt);\n if (lastSelectedUserInt >= 0) {\n\n long timeTrying = System.currentTimeMillis();\n\n loginTimes.add(timeTrying);\n\n if (loginTimes.size() < 2) {\n automaticLoginSuccess();\n } else {\n long lastLogin = loginTimes.get(loginTimes.size() - 2);\n\n if (timeTrying - lastLogin < 1200) {\n automaticLoginFailed();\n } else {\n automaticLoginSuccess();\n }\n }\n } else {\n Log.d(\"Sovellus\", \"Testing automatic login failed. No valid lastSelectedUser\");\n }\n }",
"private void resetTriesRemaining() {\n triesLeft[0] = tryLimit;\n }",
"public void resetTries() {\n this.tries = 0;\n }",
"@Test(expected = ExcessiveAttemptsException.class)\n public void testLoginAttemptLimitReached() {\n LoginAttemptHandler handler = createHandler(2, 2);\n UsernamePasswordToken token = new UsernamePasswordToken(\"hansolo\", \"hobbo\");\n\n handler.beforeAuthentication(token);\n handler.onUnsuccessfulAuthentication(token, new SimpleAuthenticationInfo());\n handler.beforeAuthentication(token);\n handler.onUnsuccessfulAuthentication(token, new SimpleAuthenticationInfo());\n handler.beforeAuthentication(token);\n }",
"public void resetFailedCount() {\n this.failedCount = 0;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
if user add name Arabic 30 char | @Test(priority = 7)
public void IfUseAddNameArabicThirty() {
addNewOfferPage.AddTextInOfferNameArabic("TeeeeeeeeeTeeeeeeeeeTeeeeeeeee");
addNewOfferPage.ClickToSave();
driver.navigate().refresh();
} | [
"@Test(priority = 3)\n public void IfUseAddNameArabicSpaces() {\n addNewOfferPage.AddTextInOfferNameArabic(\" \");\n addNewOfferPage.ClickToSave();\n Assert.assertTrue(addNewOfferPage.errorMsgNameAr.getText().contains(\"This field is required\"));\n driver.navigate().refresh();\n }",
"private void setUsername(String name){\n StringBuilder sb = new StringBuilder(name.toLowerCase());\n for(int i = 0; i<sb.length(); i++){\n String s = \" \";\n char c = s.charAt(0);\n if(sb.charAt(i) == c){\n sb.delete(1,i+1);\n }\n }\n this.username = sb.toString();\n }",
"@Test(priority = 5)\n public void IfUseAddNameArabicMore() {\n addNewOfferPage.AddTextInOfferNameArabic(\"TeeeeeeeeeTeeeeeeeeeTeeeeeeeeee\");\n addNewOfferPage.ClickToSave();\n Assert.assertTrue(addNewOfferPage.errorMsgNameAr.getText().contains(\"This field shouldn’t contain more than 30 characters\"));\n driver.navigate().refresh();\n }",
"private void setUsername(String name) {\n username = name.toLowerCase().charAt(0) + name.substring(name.indexOf(\" \") + 1).toLowerCase();\n }",
"private String getNameFromUser() {\n\t\t// use this value until more code written\n\t\t//이름 입력 받기\n\t\tString fullName;\n\t\tdo {\n\t\t\tSystem.out.print(\"Enter name: \");\n\t\t\tfullName=scanner.nextLine();\n\t\t\tif(fullName.length() >28) {\n\t\t\t\tSystem.out.print(\"이름이 28자 보다 많습니다\\n\");\n\t\t\t}\n\t\t\t\n\t\t\tif(fullName.indexOf(\" \") == -1) {\n\t\t\t\tSystem.out.print(\"공백이 없습니다\\n\");\n\t\t\t}\n\t\t}while(fullName.length() >28 || (fullName.indexOf(\" \") == -1));\n\t\t\n\t\treturn fullName;\n\t}",
"@Test(priority = 9)\n public void IfUseAddNameEnglishSpaces() {\n addNewOfferPage.AddTextInOfferNameEnglish(\" \");\n addNewOfferPage.ClickToSave();\n Assert.assertTrue(addNewOfferPage.errorMsgNameEn.getText().contains(\"This field is required\"));\n driver.navigate().refresh();\n }",
"@Test(priority = 4)\n public void IfUseAddNameArabicLess() {\n addNewOfferPage.AddTextInOfferNameArabic(\"Te\");\n addNewOfferPage.ClickToSave();\n Assert.assertTrue(addNewOfferPage.errorMsgNameAr.getText().contains(\"This field shouldn’t be less than 3 characters\"));\n driver.navigate().refresh();\n }",
"private void checkIfRedName(TextField nameTextField, KeyEvent event) {\n\n final Tooltip tooltip = new Tooltip();\n tooltip.setText(\"Enter the name \");\n nameTextField.setTooltip(tooltip);\n\n nameTextField.textProperty().addListener((observable, oldValue, newValue) -> {\n if (!newValue.matches(\"\\\\sa-zA-Z*\")) {\n nameTextField.setText(newValue.replaceAll(\"[^\\\\sa-zA-Z]\", \"\")); // Allows only wirte a letters!\n }\n });\n\n\n }",
"@Test(priority = 11)\n public void IfUseAddNameEnglishMore() {\n addNewOfferPage.AddTextInOfferNameEnglish(\"TeeeeeeeeeTeeeeeeeeeTeeeeeeeeee\");\n addNewOfferPage.ClickToSave();\n Assert.assertTrue(addNewOfferPage.errorMsgNameEn.getText().contains(\"This field shouldn’t contain more than 30 characters\"));\n driver.navigate().refresh();\n }",
"private static String expandUmlauts(String name) {\n return name.toLowerCase().replace(\"ä\", \"ae\").replace(\"ö\", \"oe\").replace(\"ü\", \"ue\");\n }",
"private void newUserLetter() {\n nbTry++;\n displayInfo();\n checkLetter(KeyboardUtils.readCharacter(\"Try a letter please : \").toUpperCase(Locale.getDefault()));\n }",
"public String validateName(String name) {\n if (name == null && name.length() == 0)\n name = \"Anonymous\";\n if (name.length() < 16) {\n if (players.containsKey(name)) {\n return addNumberToName(name, 1);\n } else\n return name;\n } else\n return \"\";\n }",
"public void setUsername(String name) {\n String[] nameArray = name.split(\" \");\n userName = nameArray[0].substring(0, 1) + nameArray[1];\n userName = userName.toLowerCase();\n }",
"protected void createUserName() {\n username = name + surname;\n }",
"public void registerplayerName()\n { \n boolean repeat = true;\n while (repeat)\n {\n playerName = getUserStringInput(\"Please input your name\");\n if (playerName.trim().length() >= 3 && playerName.trim().length() <= 10)\n {\n String playName = playerName;\n setPlayerName(playName);\n repeat = false;\n }\n else\n {\n System.out.println(\"Sorry, you enter incorrect,please input between 3 to 10 characters\");\n repeat = true;\n }\n }\n }",
"@Test(priority = 10)\n public void IfUseAddNameEnglishLess() {\n addNewOfferPage.AddTextInOfferNameEnglish(\"Te\");\n addNewOfferPage.ClickToSave();\n Assert.assertTrue(addNewOfferPage.errorMsgNameEn.getText().contains(\"This field shouldn’t be less than 3 characters\"));\n driver.navigate().refresh();\n }",
"private void setTextByLanguage(){\n\t\tuserName = \"username\";\n\t}",
"private boolean checkName(String _name)\n\t{\n\t\tif(_name.length() > 0)\n\t\t{\n\t\t\tif( _name.length() <= 10)\n\t\t\t{\n\t\t\t\tfor(int i = 0; i < _name.length(); i++)\n\t\t\t\t{\n\t\t\t\t\tif(!Character.isAlphabetic(_name.charAt(i)) && !(_name.charAt(i) == ' '))\n\t\t\t\t\t\treturn false;\t\t\t\t\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}",
"private static boolean isValidNameChar(char c) {\n\t\tint value = (int)c;\n\t\tif ((90 >= value && value >= 65) || (122 >= value && value >= 97) || (57 >= value && value >= 48) || (value == 95)) {\n\t\t\treturn true;\n\t\t}else\n\t\t\treturn\tfalse;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the categoryLevel value for this CategoryT. | public void setCategoryLevel(int categoryLevel) {
this.categoryLevel = categoryLevel;
} | [
"public void setCatLevel(int value) {\n this.catLevel = value;\n }",
"public void setLvlCategory(Short lvlCategory) {\r\n this.lvlCategory = lvlCategory;\r\n }",
"public static synchronized void setLoggingLevel(String category, Level level) {\r\n String prefix = getLoggingPrefix(category);\r\n SETTINGS.setProperty(prefix + category, level.toString());\r\n if (\"rootLogger\".equals(category)) {\r\n Logger.getRootLogger().setLevel(level);\r\n } else {\r\n Logger.getLogger(category).setLevel(level);\r\n }\r\n }",
"void setLevel(Level level);",
"public void setLevel(int level)\n {\n levelLabel.setText(\"Level: \" + level);\n }",
"public void setLevel(Level mLevel) {\n this.level = mLevel;\n level.increaseChamberCount();\n }",
"void setCategoryThreshold(C category, double threshold);",
"public void setLevel(LogLevel level)\r\n\t{\r\n\t\tthis.level = level;\r\n\t}",
"public void setLevel(String level)\n {\n levelLabel.setText(\"Level: \" + level);\n }",
"public void setThreshold(String level) {\n\t\tthis.hierarchy.setThreshold(level);\n\t}",
"public void setCurrentLevel(Level level) {\r\n this.currentLevel = level;\r\n }",
"public int getCategoryLevel() {\n return categoryLevel;\n }",
"private void setKittyLevel(int value) {\n \n kittyLevel_ = value;\n }",
"public void setkLevel(String kLevel) {\n this.kLevel = kLevel == null ? null : kLevel.trim();\n }",
"public void setClassLevel(Integer classLevel) {\r\n this.classLevel = classLevel;\r\n }",
"public Short getLvlCategory() {\r\n return lvlCategory;\r\n }",
"public void setLevel(int aLevel, Context context){\n this.level = aLevel;\n writeFile(context);\n }",
"public void setCategoryId(Number value) {\n setAttributeInternal(CATEGORYID, value);\n }",
"private void setLevel(float level)\n\t{\n\t\trole.level = level;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add dependency between requests | public void addDependency(ExtractedRequest r) {
this.dependencies.add(r.id);
} | [
"protected void addDependencies(MRSubmissionRequest request) {\n // Guava\n request.addJarForClass(ThreadFactoryBuilder.class);\n }",
"private void addRequest(InstanceRequest request) {\r\n\t\t\r\n\t}",
"void addDependency(T dependency);",
"void addDependsOnMe(DependencyItem dependency);",
"public void addRequest(Request req) {\n\n }",
"public void addDependency( Dependency dependency )\n {\n getDependencies().add( dependency );\n }",
"protected void addWaitingRequest(Request request) {\n myWaitingRequests.add(request);\n }",
"public void addDependency(String dependency)\n {\n dependencies.addElement(dependency);\n }",
"public void addDependable(Item item){\n dependables.add(item);\n }",
"void addDependencies(List<Dependency> dependencies);",
"void addDependency(Integer baseOptId, Integer dependentOptId) throws\n InconsistentOptionDependency, CycleInOptionsDependencyException;",
"protected void addDependency(Task dependency) throws BusinessRule1Exception, DependencyCycleException, BusinessRule2Exception{\r\n\t\tif(!this.satisfiesBusinessRule2Proposed(dependency))\r\n\t\t\tthrow new BusinessRule2Exception(\"Adding this dependency would violate BusinessRule2, probably because it's state is Failed\");\r\n\t\tthis.getContext().doAddDependency(dependency);\r\n\t}",
"public void addRequest(Request request) {\n\t\trequests.add(request);\n\t}",
"void trackDependency(DependencyNode node);",
"void addDependency(T primary, T secondary);",
"@Override\n public Request addRequest(Request request) {\n return generalInfo.addRequest(request);\n }",
"Dependency createDependency();",
"public boolean isNewDependency(Dependency dependency) {\n // your code here\n return false;\n }",
"public void setDepend (Depend depend)\n {\n this.depend = depend;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Notify loadcomments result to UI for updating UI | @Override
protected void notifyDataLoadResult(
LoadDataParams loadDataParams,
LoadDataResult<PostComment> result) {
EventBus.getDefault().post(
new LoadCommentsResultEvent(loadDataParams, result));
} | [
"private void loadComments(ArrayList<Comment> comments) {\r\n\t\t\tif (comments == null) {\r\n\t\t\t\tLog.d(\"help\", \"Comments returned null!\");\r\n\t\t\t\tcommentsView.addView(CommentView.noResultsView(getActivity().getApplicationContext()));\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor (Comment comment : comments) {\r\n\t\t\t\tLog.d(\"help\", \"Loading comment: \" + comment.toString());\r\n\t\t\t\tcommentsView.addView(comment.toView(getActivity().getApplicationContext()).display());\r\n\t\t\t}\r\n\t\t}",
"public void setCommentsChanged() {\n\t\tcommentsChanged = true;\n\t\tupdateActivity();\n\t}",
"public void notifyUpdated() {\n // Thread to update adapter after an operation\n Runnable doUpdateGUIList = new Runnable() {\n public void run() {\n users.clear();\n users.addAll(searchResult);\n usersViewAdapter.notifyDataSetChanged();\n }\n };\n runOnUiThread(doUpdateGUIList);\n }",
"void onFetchReviews();",
"void displayAllComments();",
"private void updateLiveComment(String comment) {\n MainActivity mainActivity = (MainActivity) this.getContext();\n mainActivity.setLiveComment(comment);\n }",
"private void loadComments(String selectedTopic, String selectedCluster, String selectedCompany, String selectedRadioButton, String searchedAfterDate) {\n\n jEditorPane_Comments.setText(htmlSnippet()[0] + QueryBuilding.createCommentsList(selectedTopic, selectedCluster, selectedCompany, selectedRadioButton, searchedAfterDate) + htmlSnippet()[1]);\n jEditorPane_Comments.setCaretPosition(0);\n\n }",
"public void fetchCalls() {\n cancelFetch();\n invalidate();\n fetchNewCalls();\n fetchOldCalls();\n }",
"void update(Comment comment);",
"void onCommentCanceled();",
"private void displayProductComment() {\n WooCommerceService service = ServiceGenerator.createService(WooCommerceService.class);\n final Call<ProductReviewsResponse> productReviewsResponseCall = service.getProductReviewsById(productId);\n productReviewsResponseCall.enqueue(new Callback<ProductReviewsResponse>() {\n @Override\n public void onResponse(Call<ProductReviewsResponse> call, Response<ProductReviewsResponse> response) {\n ProductReviewsResponse productReviewsResponse = response.body();\n List<ProductReview> productReviews = productReviewsResponse.getProductReviews();\n recyclerViewAdapter = new CommentAdapter(productReviews);\n recyclerView.setAdapter(recyclerViewAdapter);\n }\n\n @Override\n public void onFailure(Call<ProductReviewsResponse> call, Throwable t) {\n Log.e(\"ERROR\", t.getMessage());\n }\n });\n }",
"public void onCommentAdded(String comment) {\n\n NewCommentRequest request = new NewCommentRequest();\n request.setClimbId(climb.getClimbId());\n request.setUsername(mainUser.getUserName());\n request.setCommmentText(comment);\n\n DateTime now = DateTime.now(DateTimeZone.UTC);\n request.setDate(now.getMillis());\n\n final Call<Boolean> addCommentCall = ApiManager.getClamberService().addComment(climb.getClimbId(), request);\n addCommentCall.enqueue(new Callback<Boolean>() {\n @Override\n public void onResponse(Call<Boolean> call, Response<Boolean> response) {\n\n if (response.body()) {\n Log.d(TAG, \"Successfully Added Comment\");\n } else {\n Log.d(TAG, \"Unable to add comment\");\n }\n }\n\n @Override\n public void onFailure(Call<Boolean> call, Throwable t) {\n Log.d(TAG, \"Unable to add comment\", t);\n }\n });\n Comment newComment = new Comment();\n newComment.setClimbId(climb.getClimbId());\n newComment.setComment(comment);\n newComment.setDate(request.getDate());\n newComment.setUserName(mainUser.getUserName());\n\n comments.add(0, newComment);\n adapter.notifyDataSetChanged();\n noCommentsText.setVisibility(View.INVISIBLE);\n }",
"public void refreshRequestListDisplay() {\n setPanelText(requestsToStringForDisplay());\n }",
"private void getCommentFromUM(long sinceTime)\r\n {\r\n mSocialService.getComments(this, new SocializeListeners.FetchCommetsListener() {\r\n @Override\r\n public void onStart() {\r\n }\r\n\r\n @Override\r\n public void onComplete(int status, List<UMComment> comments, SocializeEntity se) {\r\n if (status == 200) //ok\r\n {\r\n \tmCommentCount = se.getCommentCount();\r\n Debug.d(\"comments size = \" + comments.size());\r\n if (!comments.isEmpty()) {\r\n if (comments.size() > 0) {\r\n mComments.addAll(comments);\r\n if(mComments.size() < COMMENT_DEFAULT_COUNT && mCommentCount >= 10) {\r\n \tgetCommentFromUM(mComments.get(mComments.size() - 1).mDt);\r\n }\r\n updateComment();\r\n if(mComments.size() < COMMENT_DEFAULT_COUNT) {\r\n \tmCommentListView.noLoadDate();\r\n } else {\r\n \tmCommentListView.hasLoadDate();\r\n }\r\n showNoComments(false);\r\n }\r\n } else {\r\n Toast.makeText(CommentActivity.this, R.string.no_more_comment, Toast.LENGTH_SHORT).show();\r\n mCommentListView.noLoadDate();\r\n if(mComments.size() == 0) {\r\n \tshowNoComments(true);\r\n }\r\n }\r\n } else if (status == -104) {\r\n getCommentFromUM(-1);\r\n mCommentCount = 0;\r\n }\r\n }\r\n }, sinceTime);\r\n }",
"public void notifyDataLoaded() {\n getDataLoadManager().setDataLoaded(true);\n getDataLoadManager().notifyPageLoaded();\n }",
"public void getCommentsByClimb(int climbId) {\n ConnectivityManager connectivityManager = (ConnectivityManager) getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();\n if (networkInfo != null && networkInfo.isConnected()) {\n Call<List<Comment>> commentsCall = ApiManager.getClamberService().getComments(climbId);\n commentsCall.enqueue(new Callback<List<Comment>>() {\n @Override\n public void onResponse(Call<List<Comment>> call, Response<List<Comment>> response) {\n if (response.code() == 200) {\n List<Comment> commentsList = response.body();\n comments.addAll(commentsList);\n if (comments.isEmpty()) {\n noCommentsText.setVisibility(View.VISIBLE);\n }\n\n } else {\n Log.d(TAG, \"Non 200 response code returned - check server\");\n }\n\n adapter.notifyDataSetChanged();\n }\n\n @Override\n public void onFailure(Call<List<Comment>> call, Throwable t) {\n Log.d(TAG, \"Failure when attempting to return comments for climb\", t);\n\n }\n });\n\n } else {\n Toast.makeText(getContext(), R.string.no_internet_connection, Toast.LENGTH_SHORT).show();\n }\n }",
"public void receiveResultretrieveAllForComment(\n org.eclipse.mylyn.targetprocess.modules.services.CommentServiceStub.RetrieveAllForCommentResponse result\n ) {\n }",
"private void displayContact(){\n if(success){\n dataAdapter.notifyDataSetChanged();\n }\n }",
"@Override\n public void run() {\n Log.d(\"ChatActivity\", \"Fetched new messages\");\n MessageDataSource.fetchMessagesAfter(ContactDataSource.getCurrentUser().getPhoneNumber(),\n mRecipient,\n mLastMessageDate,\n ChatActivity.this);\n mHandler.postDelayed(this, 2000);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Redo the last n undone commands. Do nothing if n is zero or negative. | public void redoUndoneCommands(int n) {
// TODO: Also three lines of code
for(int i=0;i<n;i++)
redoUndoneCommand();
} | [
"public void redoUndoneCommands(int n) {\r\n for(int i = 0; i < n; i++) redoUndoneCommand();\r\n }",
"public void undoCommands(int n) {\r\n \tfor(int i = 0; i < n; i++) undoCommand();\r\n }",
"public void undoCommands(int n) {\r\n \t// TODO: Three lines of code, if you use undoCommand\r\n for(int i=0;i<n;i++){\r\n undoCommand();\r\n }\r\n }",
"void performUndo(int count) throws Exception;",
"void redo(int num) throws RedoException;",
"public void redo() {\n if (undoCount > 0) {\n commandProcessor.redo();\n undoCount--;\n }\n }",
"public void redo() {\n\t\tif (moveList.size() == 0 || moveListIndex > moveList.size()-2) throw new RuntimeException(\"No moves to redo\");\n\n\t\tredoLastMove();\n\t\tredoLastMove();\n\t}",
"public static void redo () {\r\n\t\tCommand cmd = redoCommands.pop();\r\n\t\tcmd.redo();\r\n\t\tundoCommands.push(cmd);\r\n\t}",
"public void redoUndoneCommand() {\r\n // TODO: Fix me!!!\r\n try {\r\n char c=redo.pop();\r\n //redo.push(c);\r\n if(c=='c'){\r\n super.rotateClockwise();\r\n }\r\n if(c=='r'){\r\n super.rotateCounterClockwise();\r\n }\r\n if(c=='m'){\r\n super.moveForward();\r\n }\r\n } catch (Exception e) {\r\n System.out.println(e.getMessage());\r\n }\r\n }",
"@Override\n public void undo() {\n for (int i = commands.size()-1; i >= 0; i--) {\n commands.get(i).undo();\n }\n }",
"public void redo() {\n if (!future.isEmpty()) {\n Command c = future.get(0);\n c.redo();\n future.remove(0);\n history.add(0, c);\n }\n }",
"void redoLastUndoneMove();",
"public void undoLast() {\t\t\n\t\tCommand command = undoStack.pop();\n\t\tcommand.undo();\n\t}",
"void reduceUndo(){\n this.undo--;\n }",
"public void undoAll() {\r\n\t\tListIterator<Command> it = stack.listIterator(stack.size());\r\n\r\n\t\twhile (it.hasPrevious())\r\n\t\t\ttry {\r\n\t\t\t\tit.previous().undo();\r\n\t\t\t} catch (Exception ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t}",
"public void redoUndoneCommand() {\r\n try{\r\n Character c = stk2.pop();\r\n if(c == 'R') super.rotateClockwise();\r\n if(c == 'L') super.rotateCounterClockwise();\r\n if(c == 'F') super.moveForward();\r\n } catch (Exception ex){\r\n }\r\n }",
"void redoPreviousAction() throws NothingToRedoException;",
"public synchronized void undo(){\n int index_of_last_operation = instructions.size() - 1;\n if (index_of_last_operation >= 0){\n instructions.remove(index_of_last_operation);\n }\n }",
"void undoableSequence(Runnable cmd);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new HoverCamera3D object. | public HoverCamera3D(int zoom, int focus, Object3D target, int panAngle) {
super(zoom, focus);
// TODO Auto-generated constructor stub
} | [
"public HoverCamera3D() {\r\n\t\tsuper(1, 1, null);\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}",
"public HoverCamera3D(int zoom) {\r\n\t\tsuper(1, 1, null);\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}",
"public HoverCamera3D(int zoom, int focus, Object3D target) {\r\n\t\tsuper(1, 1, null);\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}",
"public HoverCamera3D(int zoom, int focus) {\r\n\t\tsuper(1, 1, null);\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}",
"public HoverCamera3D(int zoom, int focus, Object3D target, int panAngle, \r\n\t\t\t\t\t\t int tiltAngle, int distance) {\r\n\t\tsuper(zoom, focus);\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}",
"public static final PS3 create(int index){\n if( !libraryLoaded() ){\n System.out.println(\"PS3-ERROR: cannot create camera, dll not loaded\");\n return null;\n }\n \n PS3_Library.GUID guid = LIBRARY.CLEyeGetCameraUUID( index );\n if( guid.Data1 == 0){\n System.out.println(\"PS3-ERROR: index(\"+index+\") is not valid\");\n return null;\n }\n return new PS3(index, guid);\n }",
"private void initCamera() {\n mCamera3D = new FirstPersonCamera(0, 70, -160);\n\n //enable 3D projection\n mCamera3D.initializePerspective();\n\n mCamera3D.setMovementConstrainY(new Vector2f(-50, 100));\n\n //increase movement speed\n mCamera3D.setMovementSpeed(10);\n mCamera2D = new Camera2D();\n }",
"public ViewerPosition3D()\n {\n }",
"static public Input3D createInput3D(){\r\n\r\n\t\tInput3D ret = null;\r\n\r\n\t\t// return null; // use this to switch off 3D input\r\n\t\t//return new InputLeo3D(); //use this for Leonar3do input\r\n\r\n\t\tlong time = System.currentTimeMillis();\r\n\r\n\t\t// check for realsense\r\n\t\ttry {\r\n\t\t\tret = new InputIntelRealsense3D();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// no realsense camera\r\n\t\t\tret = null;\r\n\t\t\tLog.debug(e.getMessage());\r\n\t\t}\r\n\r\n\t\tApp.debug(\"============ checking 3D input time: \"\r\n\t\t\t\t+ (System.currentTimeMillis() - time) + \" ms\");\r\n\r\n\t\treturn ret;\r\n\r\n\t\t// use this for intel realsense\r\n\t\t// input\r\n\t\t// return new InputZSpace3D(); // use this for zspace\r\n\t}",
"public org.openxmlformats.schemas.drawingml.x2006.main.CTScene3D addNewScene3D()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTScene3D target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTScene3D)get_store().add_element_user(SCENE3D$4);\n return target;\n }\n }",
"private OrthographicCamera createCamera() {\n float ratio = ((float) Gdx.graphics.getHeight() / (float)Gdx.graphics.getWidth());\n OrthographicCamera camera = new OrthographicCamera(VIEWPORT_WIDTH / PIXEL_TO_METER, VIEWPORT_WIDTH / PIXEL_TO_METER * ratio);\n\n camera.position.set(camera.viewportWidth / 2f, camera.viewportHeight / 2f, 0);\n camera.update();\n\n return camera;\n }",
"private void createComponent3D(GraphicsConfiguration graphicsConfiguration,\n boolean yawChangeSupported,\n boolean pitchChangeSupported,\n boolean scaleChangeSupported,\n boolean transformationsChangeSupported) {\n if (Boolean.getBoolean(\"com.eteks.sweethome3d.j3d.useOffScreen3DView\")) {\n GraphicsConfigTemplate3D gc = new GraphicsConfigTemplate3D();\n gc.setSceneAntialiasing(GraphicsConfigTemplate3D.PREFERRED);\n try {\n // Instantiate JCanvas3DWithNotifiedPaint inner class by reflection\n // to be able to run under Java 3D 1.3\n this.component3D = (Component)Class.forName(ModelPreviewComponent.class.getName() + \"$JCanvas3DWithNotifiedPaint\").\n getConstructor(ModelPreviewComponent.class, GraphicsConfigTemplate3D.class).newInstance(this, gc);\n } catch (ClassNotFoundException ex) {\n throw new UnsupportedOperationException(\"Java 3D 1.5 required to display an offscreen 3D view\");\n } catch (Exception ex) {\n throw new UnsupportedOperationException(ex);\n }\n } else {\n this.component3D = Component3DManager.getInstance().getOnscreenCanvas3D(graphicsConfiguration,\n new Component3DManager.RenderingObserver() {\n public void canvas3DPreRendered(Canvas3D canvas3d) {\n }\n\n public void canvas3DPostRendered(Canvas3D canvas3d) {\n }\n\n public void canvas3DSwapped(Canvas3D canvas3d) {\n ModelPreviewComponent.this.canvas3DSwapped();\n }\n });\n }\n this.component3D.setBackground(new Color(0xE5E5E5));\n\n // Layout 3D component\n this.component3DPanel.setLayout(new GridLayout());\n this.component3DPanel.add(this.component3D);\n this.component3D.setFocusable(false);\n addMouseListeners(this.component3D, yawChangeSupported, pitchChangeSupported, scaleChangeSupported, transformationsChangeSupported);\n }",
"public DraggableCameraPortal(int x, int y, int w, int h, Camera c){\n\tsuper(x, y, w, h, c);\n }",
"public Point3D(double a, double b, double c)\n\t{\n\t\tx = new Coordinate(a);\n\t\ty = new Coordinate(b);\n\t\tz = new Coordinate(c);\n\t}",
"public Camera() {\n this(new Vector3f(0, 35, 0), new Vector3f(0, 0, 0));\n }",
"public CameraNode (Camera pkCamera)\r\n {\r\n m_spkCamera = pkCamera;\r\n if (m_spkCamera != null)\r\n {\r\n Local.SetTranslate(m_spkCamera.GetLocation());\r\n Local.SetRotate( new Matrix3f(m_spkCamera.GetDVector(),\r\n m_spkCamera.GetUVector(),m_spkCamera.GetRVector(),true));\r\n }\r\n }",
"public Point3D()\n {\n this.x = this.y = this.z = 0f;\n }",
"public Point3d( double x, double y, double z )\n {\n this( false, x, y, z );\n }",
"private void createCameraSource() {\n\n int facing = CameraSource.CAMERA_FACING_FRONT;\n\n // If there's no existing cameraSource, create one.\n if (cameraSource == null) {\n cameraSource = new CameraSource(this, graphicOverlay);\n }\n\n CameraSource.setFacing(facing);\n cameraSource.setMachineLearningFrameProcessor(\n new FaceDetectorProcessor(this, defaultOptions));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Whether the controller service persists state. | @ApiModelProperty(example = "null", value = "Whether the controller service persists state.")
public Boolean getPersistsState() {
return persistsState;
} | [
"public boolean isPersisted() {\n return systemId!=NOT_PERSISTED;\n }",
"public boolean isPersisted() {\n return (buffer == null || buffer.isPersisted());\n }",
"public boolean saveInStore() {\n return this.saveInStore(false);\n }",
"@Override\n public boolean isPersistent() {\n return claims.get(PERSISTENT) == Boolean.TRUE;\n }",
"public boolean isPersisted()\n {\n return qcid != -1;\n }",
"boolean isPersistOnUserDataChanged();",
"@Override\n\tpublic boolean isChanged()\n\t{\n\t\treturn !isSaved;\n\t}",
"public boolean isSevered() {\n\t\treturn isSevered;\n\t}",
"public boolean getIsPersistent() {\n return this.persistent;\n }",
"public boolean isCanMaintain() {\r\n return canMaintain;\r\n }",
"public boolean isPersistable() {\n\t\treturn isPersistable;\n\t}",
"public Boolean getSavedOnce() {\n return savedOnce;\n }",
"boolean isPermanent() {\n return permanent;\n }",
"public boolean isPermanent()\n {\n return permanent;\n }",
"boolean isUsePersist();",
"public boolean isDirty() {\n \treturn !originalState.equals(currentState);\n }",
"public boolean isPersisted() {\n\t\treturn getUidPk() > 0;\n\t}",
"public boolean isNotPersisted() {\n return notPersisted;\n }",
"public boolean notifyIfStateChangedFromSaved();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Writes row list to file. | private void writeRowListToFile(List<String> rowList, String filePath) {
try (BufferedWriter fileWriter = new BufferedWriter(new FileWriter(filePath))) {
for (String row : rowList) {
fileWriter.write(row);
}
} catch (IOException e) {
LOGGER.error(e.getMessage());
}
} | [
"public static void writeTsv(List<List<String>> rows, String filename) throws IOException \n\t{ \n\t FileWriter fileWriter = new FileWriter(filename);\n\t PrintWriter printWriter = new PrintWriter(fileWriter);\n\t \n\t\t// print row and columns\n\t\tfor (List<String> r : rows) {\n\t\t\tfor (String s : r) {\n\t\t\t\tprintWriter.print(s + \"\\t\");\n\t\t\t}\n\t\t\tprintWriter.print(\"\\n\");\n\t\t}\n\t printWriter.close();\n\t}",
"void write(FileMakingRowWriter writer) throws IOException, SQLException;",
"void writeRecordsToFile(List<IRecord> recordList) throws IOException;",
"public void writePatientsToFile()\n {\n try\n {\n FileWriter myWriter = new FileWriter(filePath);\n //For all elements in the arraylist, write the current element's csvFormat string to the file, and then newline\n for(PatientEntry a : patientList)\n {\n myWriter.write(a.csvFormat);\n myWriter.write('\\n');\n }\n myWriter.close();\n }\n catch (IOException e)\n {\n System.out.println(\"Error in writing to file\");\n e.printStackTrace();\n }\n }",
"@Override\n public void write(List<String[]> listOfLines, String outputFile) {\n try {\n BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(new File(outputFile)));\n for (String[] line : listOfLines) {\n StringBuilder builder = new StringBuilder();\n for (String item : line) {\n builder.append(item);\n builder.append(COMMA);\n }\n bufferedWriter.write(builder.toString() + System.lineSeparator());\n }\n bufferedWriter.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"static void writeFile(File file, String path, ArrayList<String> list) {\n try {\n // Create a new BufferedWrite to write to the file\n BufferedWriter writer = new BufferedWriter(new FileWriter(new File(path), false));\n // For every item in the list, write it to the file and then add a line break\n for (String item : list) {\n writer.write(item);\n writer.newLine();\n }\n writer.close();\n }\n catch (FileNotFoundException f) {\n readFile(file, path, list);\n writeFile(file, path, list);\n }\n catch (IOException e) {\n Report.error(e.getMessage());\n }\n }",
"public void writeFile() {\r\n\t\twriteFile(lines);\r\n\t}",
"private void writeData(){\n try {\n File file = new File(\"records.txt\"); //declaring the path of the file\n\n if (file.createNewFile()){\n System.out.println(\"File is created!\");\n }else{\n System.out.println(\"File already exists.\");\n }\n\n FileWriter fw = new FileWriter(file.getAbsoluteFile());\n BufferedWriter bw = new BufferedWriter(fw);\n\n //rows\n for (int i = 0; i < table.getRowCount(); i++) {\n\n for (int j = 0; j < table.getColumnCount(); j++) {\n String value = (String) table.getModel().getValueAt(i, j);\n if ((value == null || \"null\".equals(value))) {\n value = \"\";\n }\n bw.write(value + \";\"); //write the contents to the file\n }\n bw.write(\"/\");\n bw.newLine();\n }\n bw.close();\n fw.close();\n System.out.println(\"Files written.\");\n\n } catch (IOException e2) {\n System.out.println(e2);\n }\n }",
"private static void writeRow(PrintStream out, String[] row) {\n for (int i = 0; i < row.length; i++)\n assert row[i].indexOf(',') < 0; // quoting not supported here\n\n out.println(Stream.of(row).collect(Collectors.joining(\",\")).toString());\n }",
"public void outputByRows(String filename) throws IOException {\n BufferedWriter rowsWriter = new BufferedWriter(new FileWriter(new File(filename)));\n for (int i = 0; i < this.numRows; i++) {\n for (int j = 0; j < this.rows[i].length; j++) {\n if (j > 0) {\n rowsWriter.write(\" \");\n }\n // Add 1 to get back 1-indexing\n rowsWriter.write(Integer.toString(this.rows[i][j] + 1));\n }\n rowsWriter.newLine();\n }\n rowsWriter.close();\n }",
"public void writeRecord(List<OutputRecord> outputRecord);",
"public void write(File f, List<CircuitElm> elements);",
"void fileWrite() {\r\n try {\r\n FileWriter fw = new FileWriter(fileout);\r\n BufferedWriter bw = new BufferedWriter(fw);\r\n for(int i = 0; i < results.size(); i++) {\r\n bw.write(results.get(i));\r\n bw.newLine();\r\n }\r\n bw.close();\r\n }\r\n catch(IOException ex) {\r\n System.out.println(\r\n \"Error reading file '\"\r\n + \"mpa3.in\" + \"'\");\r\n }\r\n }",
"private static void WriteToFile(AccountList list){\r\n\t\ttry {\r\n\t\t FileOutputStream fos = new FileOutputStream (\"list.txt\");\r\n\t\t ObjectOutputStream oos = new ObjectOutputStream(fos);\r\n\t\t oos.writeObject(list);\r\n\t\t fos.close();\r\n\t\t\t} \r\n\t\tcatch (Exception e) {\r\n\t\t System.out.println(e); \r\n\t\t}\r\n\t}",
"static void writeLinesToFile(List<String> lines, File filename) throws Exception {\n FileWriter fileHandler;\n \n fileHandler = new FileWriter(filename);\n for (String line:lines) {\n fileHandler.write(line + \"\\n\");\n }\n fileHandler.close(); \n }",
"public void writeToFile(ArrayList<ItemData> list) throws IOException, WritingToStorageException {\n\t\tstartWriteMode();\n\t\tif (!isWriting()) {\n\t\t\tthrow new WritingToStorageException(\"write mode cannot be started\");\n\t\t}\n\t\tfor (ItemData item : list) {\n\t\t\twrite(item);\n\t\t}\n\t\tstopWriteMode();\n\t}",
"private void writeStock() throws VendingDaoPersistenceException {\n \n PrintWriter out;\n File f = new File(getClass().getClassLoader().getResource(\"inventory.txt\").getFile());\n try {\n out = new PrintWriter(new FileWriter(f));\n } catch (IOException e) {\n throw new VendingDaoPersistenceException(\"Could not save stock data.\", e);\n }\n\n \n for (Item i : items) {\n out.println(i.getId() + DELIMITER + i.getName() + DELIMITER + i.getPrice()\n + DELIMITER + i.getQuantity());\n\n out.flush();\n }\n out.close();\n}",
"private void writeRow(RowData row, String tag) {\n\t\tStringBuilder builder = new StringBuilder(tag);\n\t\tboolean isFirst = true;\n\n\t\tfor (String value : row.getValues()) {\n\t\t\tif (isFirst) {\n\t\t\t\tisFirst = false;\n\t\t\t} else {\n\t\t\t\tbuilder.append(this.delimiter);\n\t\t\t}\n\n\t\t\tbuilder.append(value);\n\t\t}\n\n\t\tout.println(builder.toString());\n\t}",
"private static void writeToFileEmployees() throws IOException {\n FileWriter write = new FileWriter(path2, append);\n PrintWriter print_line = new PrintWriter(write);\n for (int i = 0; i < RegisteredEmployees.listOfEmployees.size(); i++) {\n ArrayList<Integer> list = RegisteredEmployees.getEmployeeList();\n Integer ID = list.get(i);\n textLine = String.valueOf(ID);\n print_line.printf(\"%s\" + \"%n\", textLine);\n }\n print_line.close();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the dxaColWidthWwd field for the TAP record. | public int getDxaColWidthWwd()
{
return field_30_dxaColWidthWwd;
} | [
"public void setDxaColWidthWwd( int field_30_dxaColWidthWwd )\n {\n this.field_30_dxaColWidthWwd = field_30_dxaColWidthWwd;\n }",
"public short getWWidth()\n {\n return field_9_wWidth;\n }",
"public short getWWidthAfter()\n {\n return field_12_wWidthAfter;\n }",
"public java.lang.String getWidth()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(WIDTH$20);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public short getWWidthBefore()\n {\n return field_11_wWidthBefore;\n }",
"public int getColumnWidth() {\n return properties.getInt(getID() + \".columnWidth\", 150);\n }",
"long getColumnWidthPixels();",
"public short getWWidthIndent()\n {\n return field_10_wWidthIndent;\n }",
"public final String getWidthAttribute() {\n return getAttributeValue(\"width\");\n }",
"public org.apache.xmlbeans.XmlString xgetWidth()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(WIDTH$20);\n return target;\n }\n }",
"public int getWidthNumOfBytes() {\n return widthNumOfBytes;\n }",
"public Integer getFieldWidth() {\n\t\treturn fieldWidth;\n\t}",
"public static int getFieldWidth() {\n return FIELD_WIDTH;\n }",
"org.apache.xmlbeans.XmlInt xgetWidth();",
"public int getDxaRTEWrapWidth()\n {\n return field_29_dxaRTEWrapWidth;\n }",
"public String getWidth() {\n return getStyle(\"width\");\n }",
"public int getWidth() {\n return tableau.getColumnDimension();\n }",
"public int getColumnWidth() {\n return COLUMN_WIDTH;\n }",
"public String getWidthAttribute() {\n if (wrapWidth) {\n return VALUE_WRAP_CONTENT;\n } else if (fillWidth) {\n //return mRule.getFillParentValueName();\n return VALUE_MATCH_PARENT;\n } else {\n return AndroidDesignerUtils.pxToDpWithUnits(myArea, bounds.width);\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the installation base directory. Currently used by info command only. | public Path getInstallBase() {
return installBase;
} | [
"String getInstallRoot();",
"public String getInstallRoot() {\n return installRoot != null ? installRoot.getAbsolutePath() : \".\";\n }",
"public static String getDefaultInstallDir() {\r\n\t\treturn defaultInstallDir;\r\n\t}",
"public static String getBaseDirectory() {\n\t\tString base = isLabComputer() ? CSLAB_DIR : \".\";\n\n\t\ttry {\n\t\t\tbase = Paths.get(base).toRealPath().toString();\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tbase = \".\";\n\t\t}\n\n\t\treturn base;\n\t}",
"Path installDirectory() {\n return installDirectory;\n }",
"static File getDistributionInstallationFolder() {\n return ProcessRunnerImpl.getDistRootPath();\n }",
"@Override\n public String getInstallPath()\n {\n return getVariable(INSTALL_PATH);\n }",
"public String getInstalledFileLocationStr() {\n\t\treturn Platform.getInstallLocation().getURL().getFile();\n\t}",
"Path scriptInstallDirectory();",
"public String getBasedir()\n {\n return basedir;\n }",
"String getInstallDir(String packRoot);",
"@Override\n public String getDefaultInstallPath()\n {\n return getVariable(DEFAULT_INSTALL_PATH);\n }",
"public static File getInstallationDirectory() {\n\n\t\tFile repo = getCurrentRepoDirectory();\n\t\tif (repo != null) {\n\t\t\t// development mode: either user-level or test machine\n\t\t\treturn repo;\n\t\t}\n\n\t\t// Assumption - in an installation the current user dir is /.../<Ghidra Install Dir>/Ghidra\n\n\t\tString currentDir = System.getProperty(\"user.dir\");\n\t\tMsg.debug(null, \"user.dir: \" + currentDir);\n\n\t\t// Assume that core library files are bundled in a jar file. Find the installation\n\t\t// directory by using the distributed jar file.\n\t\tFile jarFile = SystemUtilities.getSourceLocationForClass(SystemUtilities.class);\n\t\tif (jarFile == null || !jarFile.getName().endsWith(\".jar\")) {\n\t\t\tthrow new AssertException(\"Unable to determine the installation directory\");\n\t\t}\n\n\t\t// Assumption - jar file location follows this form:\n\t\t// <Installation Dir>/App Name/Module Group/Module Name/lib/file.jar\n\t\tList<String> parts = FileUtilities.pathToParts(jarFile.getAbsolutePath());\n\t\tint last = parts.size() - 1;\n\t\tint installDir = last - 5; // 5 folders above the filename (see above)\n\n\t\tString path = StringUtils.join(parts.subList(0, installDir + 1), File.separator);\n\t\treturn new File(path);\n\t}",
"public String getBaseDir() {\n return baseDir;\n }",
"protected File getBaseDir() {\n String basedir = System.getProperty(\"basedir\");\n if (basedir != null) {\n return new File(basedir);\n } else {\n return new File(\".\");\n }\n }",
"public File getBaseDir() {\n if (baseDir == null) {\n baseDir = new File(System.getProperty(\"basedir\", \".\"));\n }\n return baseDir;\n }",
"public String getBaseDirectory() {\n return this.baseDirectory;\n }",
"public File\n getRootDirectory()\n {\n String dir = (String) pProfile.get(\"RootInstallDirectory\");\n if(dir != null) \n return new File(dir);\n return null; \n }",
"Path installHomeDirectory();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the DirectoryLookupService to do the lookup. It is thread safe. | public DirectoryLookupService getLookupService(){
return lookupService;
} | [
"public static LdapApiService getSingleton()\n {\n if ( ldapCodecService == null )\n {\n initialize( null );\n }\n\n return ldapCodecService;\n }",
"public static SearchServiceManager getInstance() {\n\t\tif (instance == null) {\n\t\t\tinstance = new SearchServiceManager(ud.unique());\n\t\t\ttry {\n\t\t\t\tLogger.setup(\"ssm\");\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"Could not set up ssm logging\");\n\t\t\t}\n\t\t}\n\t\treturn instance;\n\t}",
"public LookupDao getLookupDao() {\n return lookupDao;\n }",
"public interface LookupManager {\n\n /**\n * Look up a service instance by the service name.\n *\n * It selects one instance from a set of instances for a given service based on round robin strategy.\n *\n * @param serviceName The Service name.\n * @return The ServiceInstance.\n * @throws ServiceException\n */\n public ServiceInstance lookupInstance(String serviceName);\n\n /**\n * Look up a list of service instances for a given service.\n *\n * It returns the complete list of the service instances.\n *\n * @param serviceName The Service name.\n * @return The ServiceInstance list.\n * @throws ServiceException\n */\n public List<ServiceInstance> lookupInstances(String serviceName);\n\n /**\n * Query for a service instance based on the service name and some filtering criteria on the service metadata.\n *\n * It returns a service instance from the service instance list based on round robin selection strategy.\n * The ServiceInstance list is of the specified Service.\n *\n * @param serviceName The Service name.\n * @param query The ServiceInstanceQuery for filtering the service instances.\n * @return The ServiceInstance.\n * @throws ServiceException\n */\n public ServiceInstance queryInstanceByName(String serviceName, ServiceInstanceQuery query);\n\n /**\n * Query for all the ServiceInstances of the specified Service, which satisfy the query criteria on the service metadata.\n *\n * It returns all ServiceInstances of specified Service that satisfy the ServiceInstanceQuery.\n * The ServiceInstance list is of the specified Service.\n *\n * @param serviceName The Service name.\n * @param query The ServiceInstanceQuery for filtering the service instances.\n * @return The ServiceInstance list.\n * @throws ServiceException\n */\n public List<ServiceInstance> queryInstancesByName(String serviceName, ServiceInstanceQuery query);\n\n /**\n * Query for one the ServiceInstances which satisfy the query criteria on the service metadata.\n *\n * It returns a service instance from the service instance list based on round robin selection strategy.\n * The ServiceInstance list have different Services.\n *\n * @param query The ServiceInstanceQuery for filtering the service instances.\n * @return The ServiceInstance list.\n * @throws ServiceException\n */\n public ServiceInstance queryInstanceByKey(ServiceInstanceQuery query);\n\n /**\n * Query for all the ServiceInstances which satisfy the query criteria on the service metadata.\n *\n * It returns all ServiceInstances of different Services which satisfy the query criteria.\n *\n * @param query The ServiceInstanceQuery for filtering the service instances.\n * @return The ServiceInstance list.\n * @throws ServiceException\n */\n public List<ServiceInstance> queryInstancesByKey(ServiceInstanceQuery query);\n\n /**\n * Get a ServiceInstance.\n *\n * It returns a ServiceInstances of the Service including the ServiceInstance of OperationalStatus DOWN.\n *\n * @param serviceName\n * the service name.\n * @param instanceId\n * the istanceId\n * @return\n * the ServiceInstance.\n * @throws ServiceException\n */\n public ServiceInstance getInstance(String serviceName, String instanceId);\n\n /**\n * Get all ServiceInstance List of the target Service, including the DOWN ServiceInstance.\n *\n * It will return all ServiceInstances of the Service including the ServiceInstance of OperationalStatus DOWN.\n *\n * @param serviceName\n * the service name.\n * @return\n * the ServiceInstance List.\n * @throws ServiceException\n */\n public List<ServiceInstance> getAllInstances(String serviceName);\n\n /**\n * Get all ServiceInstances of the specified Service, including the DOWN ServiceIntance,\n * which satisfy the query criteria on the service metadata.\n *\n * It filter all ServiceInstances of the specified Service including the ServiceInstance of OperationalStatus DOWN,\n * against the ServiceInstanceQuery.\n *\n * @param serviceName\n * the Service name.\n * @param query\n * the ServiceInstanceQuery.\n * @return\n * the ServiceInstance List.\n * @throws ServiceException\n */\n public List<ServiceInstance> getAllInstances(String serviceName, ServiceInstanceQuery query);\n\n /**\n * Get all the ServiceInstances, including the DOWN ServiceInstance, which satisfy the query criteria on the service metadata.\n *\n * It filters all ServiceInstances of different Services, including the DOWN ServiceInstance,\n * which satisfy the query criteria.\n *\n * @param query\n * the ServiceInstanceQuery criteria.\n * @return\n * the ServiceInstance List.\n * @throws ServiceException\n */\n public List<ServiceInstance> getAllInstancesByKey(ServiceInstanceQuery query);\n\n /**\n * Get the all ServiceInstances in the ServiceDirectory including the DOWN ServiceInstance.\n *\n * @return\n * the ServiceInstance List.\n * @throws ServiceException\n */\n public List<ServiceInstance> getAllInstances();\n\n /**\n * Add a NotificationHandler to the Service.\n *\n * This method can check the duplicate NotificationHandler for the serviceName, if the NotificationHandler\n * already exists in the serviceName, do nothing.\n *\n * Throw IllegalArgumentException if serviceName or handler is null.\n *\n * @param serviceName\n * the service name.\n * @param handler\n * the NotificationHandler for the service.\n * @throws ServiceException\n */\n public void addNotificationHandler(String serviceName, NotificationHandler handler);\n\n /**\n * Remove the NotificationHandler from the Service.\n *\n * Throw IllegalArgumentException if serviceName or handler is null.\n *\n * @param serviceName\n * the service name.\n * @param handler\n * the NotificationHandler for the service.\n * @throws ServiceException\n */\n public void removeNotificationHandler(String serviceName, NotificationHandler handler) ;\n}",
"protected InitialDirContext getDirContext(String lookupName) throws Exception\n\t{\n\t\n\t\t// try the configured servers first\n\t\tInitialDirContext ctx = null;\n\t\t\n\t\tLookup lu = LookupFactory.getFactory().getInstance(new Name(lookupName), Type.SRV);\n\t\tlu.setResolver(createExResolver(servers.toArray(new String[servers.size()]),2, 3)); // default retries is 3, limit to 2\n\t\t\n\t\tfinal Record[] retRecords = lu.run();\n\t\tif (retRecords != null && retRecords.length > 0) {\n\t\t\t\n\t\t\tString ldapURL = createLDAPUrl(retRecords);\n\t\t\t\n\t\t\tfinal Hashtable<String, String> env = new Hashtable<String, String>();\n\t\t\tenv.put(Context.INITIAL_CONTEXT_FACTORY, LDAP_FACTORY);\n\t\t\tenv.put(Context.PROVIDER_URL, ldapURL);\n\t\t\tenv.put(Context.SECURITY_AUTHENTICATION, \"none\");\n\t\t\tenv.put(LDAP_TIMEOUT, DEFAULT_LDAP_TIMEOUT);\n\t\t\tenv.put(\"java.naming.ldap.attributes.binary\", \"userCertificate, usercertificate\");\n\t\t\t\n\t\t\tctx = new InitialDirContext(env);\n\t\t}\n\t\t\n\t\treturn ctx;\n\t}",
"public DefaultTestServiceDirectoryManager getDefaultTestServiceDirectoryManager(){\n if(testManager == null){\n synchronized(this){\n if(testManager == null){\n testManager = new DefaultTestServiceDirectoryManager();\n testManager.start();\n }\n }\n }\n return testManager;\n }",
"protected Lookup createLookup() {\n return null;\n }",
"public final Lookup getLookup() {\n if (this.lookup == null) {\n Lookup lkp = createLookup();\n Lookup fixedContents;\n if (factory == null) {\n //unit tests\n fixedContents = Lookups.fixed (layer, this);\n } else {\n fixedContents = Lookups.fixed (layer, this, factory);\n }\n if (lkp == null) {\n this.lookup = fixedContents;\n } else {\n this.lookup = new ProxyLookup (fixedContents, lkp);\n }\n }\n return lookup;\n }",
"protected BeanManager lookupBeanManager()\n {\n BeanManager beanManager = null;\n\n beanManager = lookupBeanManagerCDIUtil();\n if(beanManager != null)\n {\n log.debug(\"Found BeanManager via CDI Util\");\n return beanManager;\n }\n\n throw new RuntimeException(\"Unable to lookup BeanManager.\");\n }",
"private FileEntryService getFileEntryService() {\r\n \tif (service == null) {\r\n \t\tservice = new FileEntryService();\r\n \t}\r\n \treturn service;\r\n }",
"public static synchronized ServiceLoader getInstance(){\n if(servLoad == null){\n servLoad = new ServiceLoader();\n }\n \n return servLoad;\n }",
"Lookup getLookup();",
"public static DNSFactory getInstance() {\n\t\tDNSFactory res = (DNSFactory) ServiceLoader\n\t\t\t\t.getService(DNSFactory.class.getName());\n\t\tif (res == null) {\n\t\t\tLOGGER.warn(\"getInstance: cannot get an available service for the API com.alcatel_lucent.as.service.dns.DNSFactory\");\n\t\t}\n\t\treturn res;\n\t}",
"protected Service resolveServiceFromAuthenticationRequest(final RequestContext context) {\n val ctxService = WebUtils.getService(context);\n return resolveServiceFromAuthenticationRequest(ctxService);\n }",
"public static LocatableService getService(String serviceName)\n throws UnknownServiceException,\n ServiceInstantiationException {\n log.debug(\"Locating service for \" + serviceName);\n\n //see if there is a initialized\n LocatableService service = (LocatableService) serviceMap.get(serviceName);\n\n if (service != null) {\n return service;\n } else {\n //get service for the first time\n String className = (String) serviceInfoMap.get(serviceName);\n log.debug(\"Found service \" + className);\n String interfaceName = (String) serviceInterfaceMap.get(serviceName);\n log.debug(\"Found service \" + interfaceName);\n\n if (className != null) {\n try {\n log.debug(\"Use classloader to find class: \" + interfaceName);\n Class theServiceInterface = Class.forName(interfaceName);\n log.debug(\"Use classloader to find class: \" + className); \n Class theDelegateClass = Class.forName(className);\n \t\t\t\t\t log.debug(\"Create a new instance of the loaded class.\");\n\t\t\t\t\t\t try {\n log.debug(\"Create a new instance of the loaded class.\");\n service = (LocatableService) theDelegateClass.newInstance();\n } catch (Exception e) {\n log.debug(\"Create a dynamic proxy for the loaded class.\");\n service = (LocatableService) Proxy.newProxyInstance(theServiceInterface.getClassLoader(), new Class[]{theServiceInterface, LocatableService.class}, (InvocationHandler) theDelegateClass.newInstance());\n }\n service.init();\n log.debug(\"The service was initialized\");\n serviceMap.put(serviceName, service);\n log.debug(\"The service was put in the map\");\n\n return service;\n } catch (Exception e) {\n log.error(\"Error instantiating the service\", e);\n throw new ServiceInstantiationException(e);\n }\n }\n\n throw new UnknownServiceException(\"Service not found:\" + serviceName);\n }\n }",
"public NumberLookupService getInstance() {\n return new JsonNumberLookupService();\n }",
"public OrganizationDirectoryService getOrganizationDirectoryService() {\n return directoryService;\n }",
"private void discoverSearchService()\n {\n new Thread()\n {\n public void run()\n {\n synchronized (userSearchEnabled) {\n List<DomainBareJid> serviceNames = null;\n try {\n serviceNames = searchManager.getSearchServices();\n } catch (NoResponseException | InterruptedException | NotConnectedException | XMPPErrorException e) {\n Timber.e(e, \"Failed to search for service names\");\n }\n if (!serviceNames.isEmpty()) {\n serviceName = serviceNames.iterator().next();\n setUserSearchEnabled(true);\n }\n else {\n setUserSearchEnabled(false);\n }\n }\n }\n }.start();\n }",
"public static MethodHandles.@NonNull Lookup lookup() {\n return LOOKUP;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the information about all the parsed classes. | public ClassInfo[] getClasses() {
return classes.toArray(new ClassInfo[classes.size()]);
} | [
"@NotNull\n List<? extends ClassInfo> getAllClasses();",
"@NotNull\n List<? extends ClassInfo> getClasses();",
"public Cursor getAllClasses() {\n\t\treturn myDataBase.rawQuery(\"SELECT * FROM class_info\", null);\n\t}",
"private ArrayList<String> getAllClasses() {\n ArrayList<String> classesNames = new ArrayList<>();\n String query = graphDBService\n .replaceBaseClassInRequest(SparqlQuery.GET_ALL_CLASSES.getQuery());\n graphDBService.sendRequest(query).forEach(b -> {\n classesNames.add(b.getValue(\"o\").stringValue().replace(BASE_URL, \"\"));\n });\n return classesNames;\n }",
"public void listClasses(){\r\n\t\r\n\t ExtendedIterator<OntClass> iterator = currentModel.listClasses();\r\n\t\t\r\n\t\tResource res = null;\r\n\t\t\r\n\t\tfor (; iterator.hasNext();) {\r\n\t\t\tres = (Resource) iterator.next();\r\n\t\t\tSystem.out.println(res.getLocalName());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"IType[] getAllClasses();",
"public ClassInfo getClassInfo (){\n return ClassLoaderInfo.getCurrentResolvedClassInfo(clsName);\n }",
"public List<String> getClasses(){\r\n\t\tList<String> classes = new ArrayList<String>();\r\n\t\tfor (XmlClass xmlClass : xmlJmapper.classes) \r\n\t\t\tclasses.add(xmlClass.name);\r\n\t\treturn classes;\r\n\t}",
"public List<String> getClassList() throws XWikiException\n {\n return this.xwiki.getClassList(getXWikiContext());\n }",
"private static MetaRoot parseAllClasses(Document allClassesDocument, URL urlContext) {\n // TODO: Very old Javadocs don't have ul to list their classes, but uses a table and <br>s: http://static.javadoc.io/org.springframework/spring/2.0.5/allclasses-frame.html\n // Half solved, the adapter (JDocAllClassesFetcher) is ready, but the JDocAllClassV6AndBelowFetcher still needs to be created\n\n // This is the fetcher that has to change depending on the Javadocs version, implement a strategy pick method\n final JDocAllClassesFetcher fetcher = new JDocAllClassesV7UpFetcher(allClassesDocument, urlContext);\n return fetcher.getAllClasses();\n }",
"public Collection getAllClasses() {\n MNamespace model =\n ProjectManager.getManager().getCurrentProject().getModel();\n return getAllClasses(model);\n }",
"Set<String> getClasses() {\n\t\treturn this.classes.keySet();\n\t}",
"public abstract Type[] getClasses();",
"public Iterator getClasses() {\r\n return m_listClasses.iterator();\r\n }",
"public Iterator<String> listAllClasses()\r\n\t{\r\n\t\treturn new ToStringIterator<String>(ONT_MODEL.listClasses().filterDrop( new Filter() {\r\n public boolean accept( Object o ) {\r\n return ((Resource) o).isAnon();\r\n }} )\r\n );\r\n\t}",
"public List<IclassItem> getClasses() {\n if(projectData!=null){\n return projectData.getClasses();\n }\n return new ArrayList<IclassItem>();\n }",
"Set<Class<?>> getAllClasses();",
"public static Value get_declared_classes(Env env)\n {\n return env.getDeclaredClasses();\n }",
"public Iterator<String> listAllandAnonClasses()\r\n\t{\r\n\t\treturn new ToStringIterator<String>(ONT_MODEL.listClasses());\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
namedFitler xxx = :_0 and yyy = :_1 | public SimplePlaceholderFilterImpl(String namedFitler, Object ...params)
{
Map<String,Object> namedParams = new HashMap<String, Object>();
int index = 0;
for(Object param : params )
{
namedParams.put("_"+index, param);
index++;
}
_init(namedFitler,namedParams,null,null,null);
} | [
"public interface ILocalFitParams {\n \n public void setY(double[] y);\n \n public double[] getY();\n \n public void setSig(double[] sig);\n \n public double[] getSig();\n \n public void setParams(double[] params);\n \n public double[] getParams();\n \n public void setYFitted(double[] yFitted); //TODO ARG not really a fit param\n \n public double[] getYFitted(); //TODO ARG not really a fit param\n}",
"public abstract ParamNumber getParamY();",
"public String getParameterFromY();",
"public interface XYMetadata extends Named {\n\n /**\n * the X units.\n * @return the X units\n */\n Units getXUnits();\n\n /**\n * the Y units\n * @return the Y units\n */\n Units getYUnits();\n\n /**\n * Java-identifier that is useful for identifying the data.\n * @return the name \n */\n String getXName();\n\n /**\n * Java-identifier that is useful for identifying the data.\n * @return the name \n */\n String getYName();\n\n /**\n * Human-consumable label for the data. This is a string \n * representation of the X dimension. In general, the this method returns \n * a string that \"textually represents\" this object. The result should \n * be a concise but informative representation that is easy for a person \n * to read.\n * @return the label\n */\n String getXLabel();\n\n /**\n * Human-consumable label for the data. This is a string \n * representation of the Y dimension. In general, the this method returns \n * a string that \"textually represents\" this object. The result should \n * be a concise but informative representation that is easy for a person \n * to read.\n * @return the label\n */\n String getYLabel();\n}",
"public void setY1( double y1 )\n {\n this.y1 = y1;\n }",
"static interface FittingFunction {\r\n\r\n /**\r\n * Returns the value of the function for the given array of parameter\r\n * values.\r\n */\r\n double evaluate(double[] argument);\r\n\r\n /**\r\n * Returns the number of parameters.\r\n */\r\n int getNumParameters();\r\n }",
"public static double[] fitToFunction(double[] x, double[] y, String fname)\n\t{\n\t\tNelderMeadSimplex simp = getSimplex(x, y, fname);\n\t\tChiSquared chisq = new ChiSquared(x, y, fname);\n\t\tPointComp comp = new PointComp();\n\t\tboolean done = false; //if the simplex holds its value for a greater number of steps than twice the dimension of the parameter space, \n\t\t//it will be regarded as done.\n\t\tint nstepsStuck = 0;\n\t\t\n\t\tdouble error = 0, lastError = Double.MAX_VALUE;\n\t\t\n\t\tdouble[] bestParam;\n\t\t\n\t\tbestParam = getMinParams(simp.getPoints(), chisq);\n\t\terror = chisq.value(bestParam);\n\t\t\n//\t\tArrayList<String> logLines = new ArrayList<String>();\n\t\t\n\t\tint nparams = ACM_CustomFunctions.getNParameters(fname);\n\t\t\n\t\tint i;\n\t\tfor (i = 0; i < MAX_ITERATIONS && !done; i++)\n\t\t{\n\t\t\tif (lastError == error) nstepsStuck++;\n\t\t\telse nstepsStuck = 0;\n\t\t\tlastError = error;\n\t\t\tsimp.iterate(chisq, comp);\n\t\t\t\n//\t\t\tbestParam = getMinParams(simp.getPoints(), comp);\n\t\t\tbestParam = getMinParams(simp.getPoints(), chisq);\n\t\t\terror = chisq.value(bestParam);\n\t\t\t\n//\t\t\tlogLines.add(\"\" + i + \"\\t\" + error + \"\\t\" + lastError);\n\t\t\tdone = nstepsStuck > nparams*2;\n\t\t}\n\t\t\n\t\tSystem.out.println(\" \" + i);\n\n//\t\tString[] log = new String [logLines.size()];\n//\t\tfor (i = 0; i < log.length; i++)\n//\t\t\tlog[i] = logLines.get(i);\n//\t\tColumnIO.writeLines(log, FileOps.selectSave(null).toString());\n\t\treturn bestParam;\n\t}",
"public String[] fitMethodNames();",
"int getIsFit();",
"boolean hasIsFit();",
"public void setFittedFuncts(ViewJComponentFunct[] functs) {\r\n fittedFunctions = functs;\r\n }",
"public YtemDefOJ(String ytemDefName) {\r\n this.ytemDefName = ytemDefName;\r\n }",
"public static final Fitter getFitter(FitModel fm, NoiseModel nm,\n\t\t\tFitAlgorithm fa) {\n\n //if (nm == NoiseModel.GAUSSIAN) {\n\t\t\tif (fm == FitModel.BALLSTICK) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new BallStickLM_Fitter(CL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new BallStickMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t} else if (fa == FitAlgorithm.MCMC) {\n\t\t\t\t\treturn new BallStickMCMC_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.BIZEPPELIN) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new BiZeppelinLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new BiZeppelinMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.ZEPPELINGDRCYLINDERS) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new ZeppelinGDRCylindersLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new ZeppelinGDRCylindersMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t}else if (fm == FitModel.ZEPPELINGDRCYLINDERSDOT) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new ZeppelinGDRCylindersDotLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new ZeppelinGDRCylindersDotMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (fm == FitModel.ZEPPELINGDRCYLINDERSSPHERE) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new ZeppelinGDRCylindersSphereLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new ZeppelinGDRCylindersSphereMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (fm == FitModel.ZEPPELINGDRCYLINDERSASTROSTICKS) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new ZeppelinGDRCylindersAstrosticksLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new ZeppelinGDRCylindersAstrosticksMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (fm == FitModel.ZEPPELINGDRCYLINDERSASTROCYLINDERS) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new ZeppelinGDRCylindersAstrocylindersLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new ZeppelinGDRCylindersAstrocylindersMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\telse if (fm == FitModel.BALLCYLINDER) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new BallCylinderLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new BallCylinderMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.ZEPPELINSTICK) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new ZeppelinStickLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new ZeppelinStickMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.ZEPPELINSTICKDIRECT) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new ZeppelinStickLM_DirectFitter(CL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t return new ZeppelinStickMultiRunLM_DirectFitter(CL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.ZEPPELINSTICKTORT) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new ZeppelinStickTortLM_Fitter(CL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t return new ZeppelinStickTortMultiRunLM_Fitter(CL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.ZEPPELINCYLINDER) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t return new ZeppelinCylinderLM_Fitter(CL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new ZeppelinCylinderMultiRunLM_Fitter(CL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.ZEPPELINCYLINDERDIRECT) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t return new ZeppelinCylinderLM_DirectFitter(CL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new ZeppelinCylinderMultiRunLM_DirectFitter(CL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.ZEPPELINCYLINDERTORT) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t return new ZeppelinCylinderTortLM_Fitter(CL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new ZeppelinCylinderTortMultiRunLM_Fitter(CL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.TENSORSTICK) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new TensorStickLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new TensorStickMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.TENSORCYLINDER) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new TensorCylinderLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new TensorCylinderMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse if (fm == FitModel.BALLSTICKDOT) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new BallStickDotLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new BallStickDotMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.BALLSTICKASTROSTICKS) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new BallStickAstrosticksLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new BallStickAstrosticksMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.BALLSTICKASTROCYLINDERS) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new BallStickAstrocylindersLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new BallStickAstrocylindersMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse if (fm == FitModel.ZEPPELINSTICKDOT) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new ZeppelinStickDotLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new ZeppelinStickDotMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.ZEPPELINSTICKSPHERE) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new ZeppelinStickSphereLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new ZeppelinStickSphereMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (fm == FitModel.ZEPPELINSTICKASTROSTICKS) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new ZeppelinStickAstrosticksLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new ZeppelinStickAstrosticksMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.ZEPPELINSTICKASTROCYLINDERS) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new ZeppelinStickAstrocylindersLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new ZeppelinStickAstrocylindersMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.TENSORSTICKDOT) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new TensorStickDotLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new TensorStickDotMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} \n\t\t\telse if (fm == FitModel.TENSORSTICKSPHERE) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new TensorStickSphereLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new TensorStickSphereMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\telse if (fm == FitModel.TENSORSTICKASTROSTICKS) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new TensorStickAstrosticksLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new TensorStickAstrosticksMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.TENSORSTICKASTROCYLINDERS) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new TensorStickAstrocylindersLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new TensorStickAstrocylindersMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.BALLCYLINDERDOT) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new BallCylinderDotLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new BallCylinderDotMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.ZEPPELINCYLINDERDOT) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new ZeppelinCylinderDotLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new ZeppelinCylinderDotMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}else if (fa == FitAlgorithm.MCMC) {\n\t\t\t\t\treturn new ZeppelinCylinderDotMCMC_GaussianFitter(CL_Initializer.imPars);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.ZEPPELINCYLINDERDOTDIRECT) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new ZeppelinCylinderDotLM_DirectFitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t return new ZeppelinCylinderDotMultiRunLM_DirectFitter(CL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.ZEPPELINCYLINDERDOTCSFDIRECT) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new ZeppelinCylinderDotCSF_LM_DirectFitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t return new ZeppelinCylinderDotCSF_MultiRunLM_DirectFitter(CL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.TENSORCYLINDERDOT) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new TensorCylinderDotLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new TensorCylinderDotMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.BALLCYLINDERASTROSTICKS) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new BallCylinderAstrosticksLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new BallCylinderAstrosticksMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.BALLCYLINDERASTROCYLINDERS) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new BallCylinderAstrocylindersLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new BallCylinderAstrocylindersMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} \n\t\t\telse if (fm == FitModel.BALLCYLINDERSPHERE) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new BallCylinderSphereLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new BallCylinderSphereMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t}else if (fm == FitModel.TENSORCYLINDERASTROSTICKS) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new TensorCylinderAstrosticksLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new TensorCylinderAstrosticksMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.TENSORCYLINDERASTROCYLINDERS) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new TensorCylinderAstrocylindersLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new TensorCylinderAstrocylindersMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.TENSORCYLINDERSPHERE) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new TensorCylinderSphereLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new TensorCylinderSphereMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.ZEPPELINCYLINDERASTROSTICKS) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new ZeppelinCylinderAstrosticksLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new ZeppelinCylinderAstrosticksMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.ZEPPELINCYLINDERASTROCYLINDERS) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new ZeppelinCylinderAstrocylindersLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new ZeppelinCylinderAstrocylindersMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t} else if (fm == FitModel.MMWMDBASIC) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new MMWMD_BasicLM_DirectFitter(CL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new MMWMD_BasicMultiRunLM_DirectFitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t} else if (fa == FitAlgorithm.MCMC) {\n\t\t\t\t\treturn new MMWMD_BasicMCMC_Fitter(CL_Initializer.imPars);\n\t\t\t\t}\n\n\t\t\t} else if (fm == FitModel.MMWMDINVIVO) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new MMWMD_InVivoLM_DirectFitter(CL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new MMWMD_InVivoMultiRunLM_DirectFitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t} else if (fa == FitAlgorithm.MCMC) {\n\t\t\t\t\treturn new MMWMD_InVivoMCMC_Fitter(CL_Initializer.imPars);\n\t\t\t\t}\n\n\t\t\t} else if (fm == FitModel.MMWMDFIXED) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n return new MMWMD_FixedLM_DirectFitter(CL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n return new MMWMD_FixedMultiRunLM_DirectFitter(CL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t} else if (fa == FitAlgorithm.MCMC) {\n\t\t\t\t\treturn new MMWMD_FixedMCMC_Fitter(CL_Initializer.imPars);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t else if (fm == FitModel.ZEPPELINCYLINDERSPHERE) {\n\t\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\t\treturn new ZeppelinCylinderSphereLM_Fitter(\n\t\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\t\treturn new ZeppelinCylinderSphereMultiRunLM_Fitter(\n\t\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\telse if (fm == FitModel.BALLGDRCYLINDERS) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new BallGDRCylindersLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new BallGDRCylindersMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (fm == FitModel.BALLGDRCYLINDERSDOT) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new BallGDRCylindersDotLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new BallGDRCylindersDotMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse if (fm == FitModel.BALLGDRCYLINDERSSPHERE) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new BallGDRCylindersSphereLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new BallGDRCylindersSphereMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (fm == FitModel.BALLGDRCYLINDERSASTROSTICKS) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new BallGDRCylindersAstrosticksLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new BallGDRCylindersAstrosticksMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (fm == FitModel.BALLGDRCYLINDERSASTROCYLINDERS) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new BallGDRCylindersAstrocylindersLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new BallGDRCylindersAstrocylindersMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (fm == FitModel.TENSORGDRCYLINDERS) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new TensorGDRCylindersLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new TensorGDRCylindersMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse if (fm == FitModel.TENSORGDRCYLINDERSDOT) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new TensorGDRCylindersDotLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new TensorGDRCylindersDotMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\telse if (fm == FitModel.TENSORGDRCYLINDERSSPHERE) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new TensorGDRCylindersSphereLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new TensorGDRCylindersSphereMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (fm == FitModel.TENSORGDRCYLINDERSASTROSTICKS) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new TensorGDRCylindersAstrosticksLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new TensorGDRCylindersAstrosticksMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (fm == FitModel.TENSORGDRCYLINDERSASTROCYLINDERS) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new TensorGDRCylindersAstrocylindersLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new TensorGDRCylindersAstrocylindersMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (fm == FitModel.BALLSTICKSPHERE) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new BallStickSphereLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new BallStickSphereMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (fm == FitModel.VERDICTCOLORECTAL) {\n\t\t\t\tif (fa == FitAlgorithm.LM) {\n\t\t\t\t\treturn new VERDICTcolorectalLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars);\n\t\t\t\t} else if (fa == FitAlgorithm.MULTIRUNLM) {\n\t\t\t\t\treturn new VERDICTcolorectalMultiRunLM_Fitter(\n\t\t\t\t\t\t\tCL_Initializer.imPars, CL_Initializer.samples, CL_Initializer.seed);\n\t\t\t\t}\n\t\t\t}\n \n //}\n\n\t\t\n\n\t\tthrow new LoggedException(\"no fitter available for combination of \"\n\t\t\t\t+ fm + \", \" + nm + \" and \" + fa);\n\n\t}",
"public void setYlName(String ylName) {\n this.ylName = ylName;\n }",
"public Fitting newFitting(double[] xs, double[]ys, int degree) {\n\n int n = xs.length;\n\n int m= degree + 1;\n\n double[] xtx = new double[m*m];\n double[] xty = new double[m];\n Fitting f = new Fitting(0, degree, xtx, xty);\n\n for(int i = 0; i < m*m; i++ ){\n f.xtx[i] = 0;\n }\n\n for (int i = 0; i < m; i++ ){\n f.xty[i] = 0;\n }\n\n for (int i = 0; i < n; i++) {\n f.Add(xs[i], ys[i]);\n }\n\n return f;\n }",
"@Test()\n public void testLongleyMultipleWithIntercept() {\n final String regressand = \"TOTEMP\";\n final double rho = -0.3634294908770692;\n final Array<String> regressors = Array.of(\"GNPDEFL\", \"GNP\", \"UNEMP\", \"ARMED\", \"POP\", \"YEAR\");\n final DataFrame<Year,String> frame = longley();\n final DataFrame<Integer,Integer> omega = createOmega(16, rho);\n\n frame.regress().gls(regressand, regressors, omega, true, model -> {\n\n System.out.println(model);\n\n Assert.assertEquals(model.getInterceptValue(Field.PARAMETER), -3797854.9015416, 0.001);\n Assert.assertEquals(model.getInterceptValue(Field.STD_ERROR), 670688.69930821, 0.0000001);\n Assert.assertEquals(model.getInterceptValue(Field.T_STAT), -5.66261949, 0.0000001);\n Assert.assertEquals(model.getInterceptValue(Field.P_VALUE), 0.00030861, 0.0000001);\n Assert.assertEquals(model.getInterceptValue(Field.CI_LOWER), -5315058.1466895, 0.0000001);\n Assert.assertEquals(model.getInterceptValue(Field.CI_UPPER), -2280651.6563937, 0.0000001);\n\n Assert.assertEquals(model.getBetaValue(\"GNPDEFL\", Field.PARAMETER), -12.76564544, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"GNPDEFL\", Field.STD_ERROR), 69.43080733, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"GNPDEFL\", Field.T_STAT), -0.1838614, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"GNPDEFL\", Field.P_VALUE), 0.85819798, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"GNPDEFL\", Field.CI_LOWER), -169.82904357, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"GNPDEFL\", Field.CI_UPPER), 144.29775269, 0.0000001);\n\n Assert.assertEquals(model.getBetaValue(\"GNP\", Field.PARAMETER), -0.03800132, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"GNP\", Field.STD_ERROR), 0.02624768, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"GNP\", Field.T_STAT), -1.44779736, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"GNP\", Field.P_VALUE), 0.1815954, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"GNP\", Field.CI_LOWER), -0.09737771, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"GNP\", Field.CI_UPPER), 0.02137506, 0.0000001);\n\n Assert.assertEquals(model.getBetaValue(\"UNEMP\", Field.PARAMETER), -2.18694871, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"UNEMP\", Field.STD_ERROR), 0.38239315, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"UNEMP\", Field.T_STAT), -5.71911057, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"UNEMP\", Field.P_VALUE), 0.00028728, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"UNEMP\", Field.CI_LOWER), -3.05198212, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"UNEMP\", Field.CI_UPPER), -1.32191531, 0.0000001);\n\n Assert.assertEquals(model.getBetaValue(\"ARMED\", Field.PARAMETER), -1.15177649, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"ARMED\", Field.STD_ERROR), 0.16525269, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"ARMED\", Field.T_STAT), -6.96978961, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"ARMED\", Field.P_VALUE), 0.0000654, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"ARMED\", Field.CI_LOWER), -1.52560405, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"ARMED\", Field.CI_UPPER), -0.77794893, 0.0000001);\n\n Assert.assertEquals(model.getBetaValue(\"POP\", Field.PARAMETER), -0.06805356, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"POP\", Field.STD_ERROR), 0.17642833, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"POP\", Field.T_STAT), -0.38572919, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"POP\", Field.P_VALUE), 0.70865648, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"POP\", Field.CI_LOWER), -0.46716218, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"POP\", Field.CI_UPPER), 0.33105506, 0.0000001);\n\n Assert.assertEquals(model.getBetaValue(\"YEAR\", Field.PARAMETER), 1993.95292851, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"YEAR\", Field.STD_ERROR), 342.63462757, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"YEAR\", Field.T_STAT), 5.8194729, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"YEAR\", Field.P_VALUE), 0.00025323, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"YEAR\", Field.CI_LOWER), 1218.85955153, 0.0000001);\n Assert.assertEquals(model.getBetaValue(\"YEAR\", Field.CI_UPPER), 2769.04630548, 0.0000001);\n\n Assert.assertEquals(model.getN(), 16);\n Assert.assertEquals(model.getRSquared(), 0.9991880200816362, 0.00000001);\n Assert.assertEquals(model.getRSquaredAdj(), 0.9986467001360635, 0.00000001);\n Assert.assertEquals(model.getDurbinWatsonStatistic(), 2.677871902537079, 0.0000001);\n\n return Optional.empty();\n });\n }",
"public IReportData setYValues(String yValues);",
"void fit(MultiDataSet dataSet);",
"public void setY1(final int y1) {\n this.y1 = y1;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ getMaxScore : int Returns the player's maximum score as an integer. | public int getMaxScore() {
return maxScore;
} | [
"public Integer getMaxScore() {\n return maxScore;\n }",
"public double getMaxScore(){\n\t\treturn this.maxScore;\n\t}",
"public int getHighestScore() {\n\t\treturn highestScore;\n\t}",
"public int getMaxScore() {\n\n\t\tint max = 0;\n\t\tfor (Player p : players) {\n\t\t\tif (p.hasPlayed) {\n\t\t\t\tint score = p.getHandOfCards().getScoreClosestTo21();\n\t\t\t\tif (score > max) {\n\t\t\t\t\tmax = score;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}",
"private int maxScore() {\n int max = 0;\n for (BettingBox bettingBox : playersBets_.values()) {\n if (bettingBox.getScore() > max)\n max = bettingBox.getScore();\n }\n return max;\n }",
"public int maxPlayersScore() {\n int max = 0;\n for (Map.Entry<String, BettingBox> playerBet : playersBets_.entrySet()) {\n // ContainsKey in case we want to support players leaving the table during the round\n if (this.getPlayers().containsKey(playerBet.getKey()) && this.getPlayers().get(playerBet.getKey()).getPlayerType() != PlayerType.DEALER) { // Just confirm that player is not a dealer, although no dealers are in this map\n if (playerBet.getValue().getScore() > max)\n max = playerBet.getValue().getScore();\n }\n }\n return max;\n }",
"static int getMaxScore() {\n return 2 * 3 * 2 * 4 + 2;\n }",
"public int saveMaxScore_GreenacresGame(int score) {\n\t\treturn saveMaxScore(score, GreenacresID);\n\t}",
"public void setMaxScore(Integer maxScore) {\n this.maxScore = maxScore;\n }",
"public int saveMaxScore_SkiGame(int score) {\n\t\treturn saveMaxScore(score, SkiID);\n\t}",
"public void countHighest (int score){\r\n\t\tif (score > highest){\r\n\t\t\thighest = score;\r\n\t\t}\r\n\t}",
"public int getHighestScore(QuizScore quizScore) throws ClassNotFoundException, SQLException\n {\t\n \tConnection con3 = null;\n \tPreparedStatement ps3 = null;\n \tResultSet rs3 = null;\n \t\n\t\tif(checkQuizScoreExistence(quizScore)){\n\t\t\tcon3 = db.getConnection();\n\t\t\tps3 = con3.prepareStatement(\"select MAX(score) from `hb_quiz_score_log` where user_id =? && employee_id = ?\");\n\t\t\tps3.setString(1, String.valueOf(quizScore.getUser().getId()));\n\t\t\tps3.setString(2, quizScore.getUser().getEmp_id());\n\t\t\trs3 = ps3.executeQuery();\n\t\t\t\n\t\t\twhile(rs3.next()){\n\t\t\t\tquizScore.setHighest_score(rs3.getInt(1));\n\t\t\t}\n\t\t\t\n\t\t\t rs3.close();\n\t\t\t ps3.close();\n\t\t\t con3.close();\n\t\t\t\n\t\t\treturn quizScore.getHighest_score();\n\t\t}else{\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t\n\t}",
"public int saveMaxScore_PlantesFerryGame(int score) {\n\t\treturn saveMaxScore(score, PlantesFerryID);\n\t}",
"public int saveMaxScore_AppleGame(int score) {\n\t\treturn saveMaxScore(score, AppleID);\n\t}",
"public int getBestScore() {\n\t\tInteger score = this.hand.countValue().lower(22);\n\t\tif(score!=null) {\n\t\t\treturn score;\n\t\t}\n\t\telse {\n\t\t\treturn this.hand.countValue().higher(21);\n\t\t}\n\t}",
"public int findHighestScore() {\n int highest = 0;\n for (int i = 0; i < allQuizTakers.size(); i++) {\n\n if (allQuizTakers.get(i).getScore(0).compareTo(highest) > 0) {\n highest = (int) allQuizTakers.get(i).getScore(0);\n }\n\n }\n return highest;\n }",
"public int getMaxRounds() {\n Statement stmt;\n String query = \"select max(rounds) as max_rounds from toptrumps.game \";\n\n int maxRounds = 0;\n try {\n stmt = connection.createStatement();\n ResultSet rs = stmt.executeQuery(query);\n while (rs.next()) {\n maxRounds = rs.getInt(\"max_rounds\");\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return maxRounds;\n }",
"public int getMax() { return max; }",
"public int getMinScore() {\n int min = Integer.MAX_VALUE;\n\n //TODO implement this\n\n return min;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Make sure the equals contract is obeyed | @Test
public void equalsContract()
{
EqualsVerifier.forClass(ExperienceChangedReport.class).verify();
} | [
"public void testEquals() {\n // TODO: implement test\n }",
"public void testEquals() {\n assertTrue(cone1.equals(cone1));\n assertFalse(cone1.equals(not));\n assertFalse(cone1.equals(addFlavor));\n assertTrue(cone1.equals(same));\n assertFalse(cone1.equals(diff));\n }",
"private static void checkEqualsAndHashCodeMethods(Object lhs, Object rhs,\n boolean expectedResult) {\n if ((lhs == null) && (rhs == null)) {\n Assert.assertTrue(\n \"Your check is dubious...why would you expect null != null?\",\n expectedResult);\n return;\n }\n\n if ((lhs == null) || (rhs == null)) {\n Assert.assertFalse(\n \"Your check is dubious...why would you expect an object \"\n + \"to be equal to null?\", expectedResult);\n }\n\n if (lhs != null) {\n assertEquals(expectedResult, lhs.equals(rhs));\n }\n if (rhs != null) {\n assertEquals(expectedResult, rhs.equals(lhs));\n }\n\n if (expectedResult) {\n String hashMessage =\n \"hashCode() values for equal objects should be the same\";\n Assert.assertTrue(hashMessage, lhs.hashCode() == rhs.hashCode());\n }\n }",
"public void testEquals()\n {\n // test passing null to equals returns false\n // (as specified in the JDK docs for Object)\n EthernetAddress x =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"equals(null) didn't return false\",\n x.equals((Object)null));\n \n // test passing an object which is not a EthernetAddress returns false\n assertFalse(\"x.equals(non_EthernetAddress_object) didn't return false\",\n x.equals(new Object()));\n \n // test a case where two EthernetAddresss are definitly not equal\n EthernetAddress w =\n new EthernetAddress(ANOTHER_VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == w didn't return false\",\n x == w);\n assertFalse(\"x.equals(w) didn't return false\",\n x.equals(w));\n\n // test refelexivity\n assertTrue(\"x.equals(x) didn't return true\",\n x.equals(x));\n \n // test symmetry\n EthernetAddress y =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"y.equals(x) didn't return true\",\n y.equals(x));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n \n // now we'll test transitivity\n EthernetAddress z =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertFalse(\"x == y didn't return false\",\n y == z);\n assertFalse(\"x == y didn't return false\",\n x == z);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"y.equals(z) didn't return true\",\n y.equals(z));\n assertTrue(\"x.equals(z) didn't return true\",\n x.equals(z));\n \n // test consistancy (this test is just calling equals multiple times)\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n }",
"private void checkEqualsIsConsistent(UnknownFieldSet set) {\n // Object should be equal to itself.\n assertThat(set.equals(set)).isTrue();\n\n // Object should be equal to a copy of itself.\n UnknownFieldSet copy = UnknownFieldSet.newBuilder(set).build();\n assertThat(copy).isEqualTo(set);\n assertThat(set).isEqualTo(copy);\n assertThat(set.hashCode()).isEqualTo(copy.hashCode());\n }",
"@Test\n\tpublic void testEqualsMethod() {\n\t\tEqualsVerifierUtil.testSubclass(getClassUnderTest());\n\t\tEqualsVerifierUtil.testClass(getClassUnderTest());\n\t}",
"@Test\n public void testEqualsReflexive() {\n assertEquals(testEqualsSame1, testEqualsSame1);\n }",
"@Test\r\n\tpublic void testEqualsObject() {\r\n\t\tassertFalse(nearlyIdenticalUser1.equals(nearlyIdenticalUser2));\r\n\t\tassertTrue(nearlyIdenticalUser1.equals(identicalUser));\r\n\t\tassertTrue(nearlyIdenticalUser1.equals(nearlyIdenticalUser1));\r\n\t}",
"@Test\n @SuppressWarnings(\"serial\")\n public void testEqualsAndHashcode() {\n final RoleImpl a = new RoleImpl(\"name\");\n final RoleImpl b = new RoleImpl(\"name\");\n final RoleImpl c = new RoleImpl(\"different name\");\n final RoleImpl d = new RoleImpl(\"name\") {\n };\n\n new EqualsTester(a, b, c, d);\n }",
"public abstract boolean canEqual(Object obj);",
"@Test\n public void equals() {\n Object nullObject = null;\n assertFalse(geneResult.equals(nullObject));\n assertFalse(geneResult.equals(new PathwayResults()));\n\n\n GeneResults otherGeneResult = new GeneResults();\n assertFalse(geneResult.equals(otherGeneResult));\n otherGeneResult.setSymbol(\"Symbol\");\n assertFalse(geneResult.equals(otherGeneResult));\n otherGeneResult.setGeneId(2L);\n assertFalse(geneResult.equals(otherGeneResult));\n otherGeneResult.setGeneId(1L);\n assertTrue(geneResult.equals(otherGeneResult));\n assertTrue(geneResult.equals(geneResult));\n }",
"@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object object = null;\r\n Order instance = new Order();\r\n boolean expResult = false;\r\n boolean result = instance.equals(object);\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 }",
"@Test\n\tpublic void testEquals() {\n\t\tPMUser user = new PMUser(\"Smith\", \"John\", \"jsmith@gmail.com\");\n\t\tPark a = new Park(\"name\", \"address\", user);\n\t\tPark b = new Park(\"name\", \"address\", user);\n\t\tPark c = new Park(\"name\", \"different address\", user);\n\t\tassertEquals(a, a);\n\t\tassertEquals(a, b);\n\t\tassertEquals(b, a);\n\t\tassertFalse(a.equals(c));\n\t}",
"@Test\n public void testEquals3() {\n System.out.println(\"equals\");\n\n Book book1 = new Book(\"Candide\", \"Toto\", 5.00f);\n Book book2 = new Book(\"L'Optimisme\", \"Toto\", 5.00f);\n boolean result = book1.equals(book2);\n \n assertFalse(result);\n }",
"@Test\n public void testEquals()\n {\n System.out.println(\"equals\");\n GeoCoord2D instance1 = new GeoCoord2D();\n GeoCoord2D instance2 = GeoCoord2D.fromDegrees(LAT_OXR, LON_OXR);\n GeoCoord2D instance3 = GeoCoord2D.fromDegrees(LAT_OXR, LON_OXR);\n GeoCoord2D instance4 = GeoCoord2D.fromDegrees(LAT_OXR+1, LON_OXR+1);\n boolean expect = false;\n boolean result = instance1.equals(instance2);\n assertEquals(expect, result);\n \n expect = true;\n result = instance2.equals(instance2);\n assertEquals(expect, result);\n\n expect = true;\n result = instance2.equals(instance3);\n assertEquals(expect, result);\n\n expect = false;\n result = instance3.equals(instance4);\n assertEquals(expect, result);\n }",
"@Test\n public void testEquals01() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n SocialNetwork sn = new SocialNetwork();\n boolean result = sn.equals(otherObject);\n assertTrue(result);\n }",
"@Test\n public void testEquals1() {\n System.out.println(\"equals\");\n\n Book book = new Book(\"Candide\", \"Toto\", 5.00f);\n boolean result = book.equals(book);\n \n assertTrue(result);\n }",
"@Test\n public void testEqualsObjectPositive() {\n\n final Vehicle vehicle5 = new Vehicle(1, \"Tesla\", \"V100\", true);\n\n // reflexive property is satisfied\n assertEquals(\"Equals failed - reflexive\", myVehicle, myVehicle);\n\n // if both Vehicle objects have the same vehicleID, name, VIN, and canRent values.\n assertEquals(\"Equals failed - value equality\", myVehicle, vehicle5);\n\n }",
"@Test\n public void testEquals02() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets (as xml) the "parts" attribute | public void xsetParts(org.apache.xmlbeans.XmlNMTOKENS parts)
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlNMTOKENS target = null;
target = (org.apache.xmlbeans.XmlNMTOKENS)get_store().find_attribute_user(PARTS$0);
if (target == null)
{
target = (org.apache.xmlbeans.XmlNMTOKENS)get_store().add_attribute_user(PARTS$0);
}
target.set(parts);
}
} | [
"public void setParts(java.util.List parts)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PARTS$0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(PARTS$0);\n }\n target.setListValue(parts);\n }\n }",
"void setPart(java.lang.String part);",
"void xsetPart(org.apache.xmlbeans.XmlString part);",
"public void setPart(java.lang.String part)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PART$2, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(PART$2);\n }\n target.setStringValue(part);\n }\n }",
"public void xsetPart(org.apache.xmlbeans.XmlNCName part)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlNCName target = null;\n target = (org.apache.xmlbeans.XmlNCName)get_store().find_element_user(PART$2, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlNCName)get_store().add_element_user(PART$2);\n }\n target.set(part);\n }\n }",
"public void setPart_number(String part_number);",
"public abstract void setPartOfSet(TagContent part)\r\n\t\t\tthrows TagFormatException;",
"public void setParts(KualiInteger parts) {\r\n this.parts = parts;\r\n }",
"@Override\n public void setPart_number(java.lang.String part_number) {\n _parts.setPart_number(part_number);\n }",
"public Builder setPart(net.runelite.client.party.Party.Part value) {\n copyOnWrite();\n instance.setPart(value);\n return this;\n }",
"@Schema(description = \"This is a string that defines a manufacturer-allocated part number assigned by the organization that manufactures the hardware item. This, in combination with the Model and the Vendor, identify different types of hardware items. The SerialNumber can then be used to differentiate between different instances of the same type of hardware item. This is a REQUIRED attribute.\")\r\n\r\n\r\n public String getPart() {\r\n return part;\r\n }",
"public void setPartToken(Token partToken) {\n this.partToken = partToken;\n }",
"public void setPart(Part part) {\n selectedPart = part;\n\n //Reference to Modules.Part for getters\n partIDField.setText(Integer.toString(part.getPartID()));\n partNameField.setText(part.getName());\n partInStockField.setText(Integer.toString(part.getInStock()));\n partPriceField.setText(Double.toString(part.getPrice()));\n partMinField.setText(Integer.toString(part.getMin()));\n partMaxField.setText(Integer.toString(part.getMax()));\n\n if (part instanceof InHousePart) {\n selectedInPart = (InHousePart) part;\n companyMachineLabel.setText(\"Machine ID\");\n inhouseRadioButton.selectedProperty().set(true);\n companyMachineField.setText(Integer.toString(selectedInPart.getMachineID()));\n } else {\n selectedOutPart = (OutsourcedPart) part;\n companyMachineLabel.setText(\"Company Name\");\n outsourcedRadioButton.selectedProperty().set(true);\n companyMachineField.setText(selectedOutPart.getCompanyName());\n }\n }",
"public void setPartName(String partName) {\n this.partName = new SimpleStringProperty(partName);\n }",
"public void setPartDesc(String partDesc){\n\t\t // store into the instance variable partDesc (i.e. this.partDesc) the value of the parameter partDesc\n\t\tthis.partDesc = partDesc;\n\t}",
"public Part[] getParts(){\n return parts;\r\n }",
"AttrAssignmentPart createAttrAssignmentPart();",
"public void setPart(final int aIndex, final String aKeyPart);",
"public final EObject rulePartElements() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_0=null;\r\n Token otherlv_1=null;\r\n EObject lv_option_2_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../de.nordakademie.mwi13a.team1.dependency/src-gen/de/nordakademie/mwi13a/team1/dependency/parser/antlr/internal/InternalDependency.g:182:28: ( (otherlv_0= 'Part:' ( (otherlv_1= RULE_STRING ) ) ( (lv_option_2_0= rulePartOptions ) ) ) )\r\n // ../de.nordakademie.mwi13a.team1.dependency/src-gen/de/nordakademie/mwi13a/team1/dependency/parser/antlr/internal/InternalDependency.g:183:1: (otherlv_0= 'Part:' ( (otherlv_1= RULE_STRING ) ) ( (lv_option_2_0= rulePartOptions ) ) )\r\n {\r\n // ../de.nordakademie.mwi13a.team1.dependency/src-gen/de/nordakademie/mwi13a/team1/dependency/parser/antlr/internal/InternalDependency.g:183:1: (otherlv_0= 'Part:' ( (otherlv_1= RULE_STRING ) ) ( (lv_option_2_0= rulePartOptions ) ) )\r\n // ../de.nordakademie.mwi13a.team1.dependency/src-gen/de/nordakademie/mwi13a/team1/dependency/parser/antlr/internal/InternalDependency.g:183:3: otherlv_0= 'Part:' ( (otherlv_1= RULE_STRING ) ) ( (lv_option_2_0= rulePartOptions ) )\r\n {\r\n otherlv_0=(Token)match(input,14,FOLLOW_14_in_rulePartElements362); \r\n\r\n \tnewLeafNode(otherlv_0, grammarAccess.getPartElementsAccess().getPartKeyword_0());\r\n \r\n // ../de.nordakademie.mwi13a.team1.dependency/src-gen/de/nordakademie/mwi13a/team1/dependency/parser/antlr/internal/InternalDependency.g:187:1: ( (otherlv_1= RULE_STRING ) )\r\n // ../de.nordakademie.mwi13a.team1.dependency/src-gen/de/nordakademie/mwi13a/team1/dependency/parser/antlr/internal/InternalDependency.g:188:1: (otherlv_1= RULE_STRING )\r\n {\r\n // ../de.nordakademie.mwi13a.team1.dependency/src-gen/de/nordakademie/mwi13a/team1/dependency/parser/antlr/internal/InternalDependency.g:188:1: (otherlv_1= RULE_STRING )\r\n // ../de.nordakademie.mwi13a.team1.dependency/src-gen/de/nordakademie/mwi13a/team1/dependency/parser/antlr/internal/InternalDependency.g:189:3: otherlv_1= RULE_STRING\r\n {\r\n\r\n \t\t\tif (current==null) {\r\n \t current = createModelElement(grammarAccess.getPartElementsRule());\r\n \t }\r\n \r\n otherlv_1=(Token)match(input,RULE_STRING,FOLLOW_RULE_STRING_in_rulePartElements382); \r\n\r\n \t\tnewLeafNode(otherlv_1, grammarAccess.getPartElementsAccess().getNamePartCrossReference_1_0()); \r\n \t\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n // ../de.nordakademie.mwi13a.team1.dependency/src-gen/de/nordakademie/mwi13a/team1/dependency/parser/antlr/internal/InternalDependency.g:200:2: ( (lv_option_2_0= rulePartOptions ) )\r\n // ../de.nordakademie.mwi13a.team1.dependency/src-gen/de/nordakademie/mwi13a/team1/dependency/parser/antlr/internal/InternalDependency.g:201:1: (lv_option_2_0= rulePartOptions )\r\n {\r\n // ../de.nordakademie.mwi13a.team1.dependency/src-gen/de/nordakademie/mwi13a/team1/dependency/parser/antlr/internal/InternalDependency.g:201:1: (lv_option_2_0= rulePartOptions )\r\n // ../de.nordakademie.mwi13a.team1.dependency/src-gen/de/nordakademie/mwi13a/team1/dependency/parser/antlr/internal/InternalDependency.g:202:3: lv_option_2_0= rulePartOptions\r\n {\r\n \r\n \t newCompositeNode(grammarAccess.getPartElementsAccess().getOptionPartOptionsParserRuleCall_2_0()); \r\n \t \r\n pushFollow(FOLLOW_rulePartOptions_in_rulePartElements403);\r\n lv_option_2_0=rulePartOptions();\r\n\r\n state._fsp--;\r\n\r\n\r\n \t if (current==null) {\r\n \t current = createModelElementForParent(grammarAccess.getPartElementsRule());\r\n \t }\r\n \t\tset(\r\n \t\t\tcurrent, \r\n \t\t\t\"option\",\r\n \t\tlv_option_2_0, \r\n \t\t\"PartOptions\");\r\n \t afterParserOrEnumRuleCall();\r\n \t \r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n leaveRule(); \r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
calculate bands calls all methods involved in updating the bands | public void updateBands() {
if (this.isFull()) {
calcInboundBand();
calcOutboudBand();
calcVisible();
}
} | [
"private void calculateStatistics() {\n minMaxVals = new MinMaxVals(nrSubbands);\n for (int time = 0; time < nrTimes; time++) {\n for (int sb = 0; sb < nrSubbands; sb++) {\n for (int ch = 0; ch < nrChannels; ch++) {\n if (initialFlagged[time][sb][ch]) {\n data[time][sb][ch] = 0.0f;\n } else {\n final float sample = data[time][sb][ch];\n minMaxVals.processValue(sample, sb);\n }\n }\n }\n }\n min = minMaxVals.getMin();\n scaleValue = minMaxVals.getMax() - min;\n }",
"void update(PriceBand priceBand);",
"@Override\n public void nextBand() {\n nextBandDone();\n }",
"public void calcInboundBand() {\n ArrayList<Range> redRegions = new ArrayList<>();\n for (Cycle cycle : normalizeCyclesIn()) {\n Range redRange = cycle.getRedAsRange();\n redRange.setEnd(redRange.getEnd() + GlobalVariables.startUpLoss.get());\n redRange.setStart(redRange.getStart() + GlobalVariables.extOfGreen.get());\n redRegions.add(redRange);\n redRegions.add(redRange.shift(GlobalVariables.cycleLen.get()));\n redRegions.add(redRange.shift(-GlobalVariables.cycleLen.get()));\n }\n //System.out.println(redRegions);\n Range greenRange = intersections.get(0).getCycleIn().getGreenAsRange();\n greenRange.setStart(greenRange.getStart() + GlobalVariables.startUpLoss.get());\n greenRange.setEnd(greenRange.getEnd() + GlobalVariables.extOfGreen.get());\n inboundBandRanges.setAll(greenRange.excludeAll(redRegions));\n for (int i = 0; i < inboundBandRanges.size(); i++) {\n inboundBandRanges.set(i, inboundBandRanges.get(i).shift(GlobalVariables.cycleLen.get()));\n }\n }",
"public void calcOutboudBand() {\n ArrayList<Range> redRegions = new ArrayList<>();\n for (Cycle cycle : normalizeCyclesOut()) {\n Range redRange = cycle.getRedAsRange();\n redRange.setEnd(redRange.getEnd() + GlobalVariables.startUpLoss.get());\n redRange.setStart(redRange.getStart() + GlobalVariables.extOfGreen.get());\n redRegions.add(redRange);\n redRegions.add(redRange.shift(GlobalVariables.cycleLen.get()));\n redRegions.add(redRange.shift(-GlobalVariables.cycleLen.get()));\n }\n Range greenRange = intersections.get(0).getCycleOut().getGreenAsRange();\n greenRange.setStart(greenRange.getStart() + GlobalVariables.startUpLoss.get());\n greenRange.setEnd(greenRange.getEnd() + GlobalVariables.extOfGreen.get());\n outboundBandRanges.setAll(greenRange.excludeAll(redRegions));\n }",
"@Override\n public void startBands() {\n bandIndex = 0;\n iterator.startBands();\n for (int skip=sourceBands[0]; --skip>=0;) {\n iterator.nextBand();\n }\n }",
"private void equalizerBandsInit(View eqcontainer) {\n\t\tFlog.d(TAG, \"equalizerBandsInit()-----begin\");\n\t\t// Initialize the N-Band Equalizer elements.\n\t\tmNumberEqualizerBands = ControlPanelEffect.getParameterInt(mContext,\n\t\t\t\tmCallingPackageName, mAudioSession,\n\t\t\t\tControlPanelEffect.Key.eq_num_bands);\n\t\tmEQPresetUserBandLevelsPrev = ControlPanelEffect.getParameterIntArray(\n\t\t\t\tmContext, mCallingPackageName, mAudioSession,\n\t\t\t\tControlPanelEffect.Key.eq_preset_user_band_level);\n\t\tfinal int[] centerFreqs = ControlPanelEffect.getParameterIntArray(\n\t\t\t\tmContext, mCallingPackageName, mAudioSession,\n\t\t\t\tControlPanelEffect.Key.eq_center_freq);\n\t\tfinal int[] bandLevelRange = ControlPanelEffect.getParameterIntArray(\n\t\t\t\tmContext, mCallingPackageName, mAudioSession,\n\t\t\t\tControlPanelEffect.Key.eq_level_range);\n\t\tmEqualizerMinBandLevel = bandLevelRange[0];\n\t\tfinal int mEqualizerMaxBandLevel = bandLevelRange[1];\n\n\t\tfor (int band = 0; band < mNumberEqualizerBands; band++) {\n\t\t\t// Unit conversion from mHz to Hz and use k prefix if necessary to\n\t\t\t// display\n\t\t\tfinal int centerFreq = centerFreqs[band] / 1000;\n\t\t\tfloat centerFreqHz = centerFreq;\n\t\t\tString unitPrefix = \"\";\n\t\t\tif (centerFreqHz >= 1000) {\n\t\t\t\tcenterFreqHz = centerFreqHz / 1000;\n\t\t\t\tunitPrefix = \"k\";\n\t\t\t}\n\t\t\t((TextView) eqcontainer\n\t\t\t\t\t.findViewById(Constant.EQViewElementIds[band][0]))\n\t\t\t\t\t.setText(format(\"%.0f \", centerFreqHz) + unitPrefix + \"Hz\");\n\t\t\tmEqualizerSeekBar[band] = (SeekBar) eqcontainer\n\t\t\t\t\t.findViewById(Constant.EQViewElementIds[band][1]);\n\t\t\tmEqualizerSeekBar[band].setMax(mEqualizerMaxBandLevel\n\t\t\t\t\t- mEqualizerMinBandLevel);\n\t\t\tmEqualizerSeekBar[band].setOnSeekBarChangeListener(this);\n\t\t}\n\n\t\t// Hide the inactive Equalizer bands.\n//\t\tfor (int band = mNumberEqualizerBands; band < Constant.EQUALIZER_MAX_BANDS; band++) {\n//\t\t\t// CenterFreq text\n//\t\t\teqcontainer.findViewById(Constant.EQViewElementIds[band][0])\n//\t\t\t\t\t.setVisibility(View.GONE);\n//\t\t\t// SeekBar\n//\t\t\teqcontainer.findViewById(Constant.EQViewElementIds[band][1])\n//\t\t\t\t\t.setVisibility(View.GONE);\n//\t\t}\n\n\t\t// TODO: get the actual values from somewhere\n\t\tTextView tv = (TextView) findViewById(R.id.maxLevelText);\n\t\ttv.setText(\"+15 dB\");\n\t\ttv = (TextView) findViewById(R.id.centerLevelText);\n\t\ttv.setText(\"0 dB\");\n\t\ttv = (TextView) findViewById(R.id.minLevelText);\n\t\ttv.setText(\"-15 dB\");\n\t\tequalizerUpdateDisplay();\n\t\tFlog.d(TAG, \"equalizerBandsInit()-----end\");\n\t}",
"public BandList getBands();",
"public List<Band> getAllBands();",
"public void setBandDims() {\n }",
"public synchronized void setBandCount(int count)\n { bandCount = count;\n }",
"public void setBand(boolean mod) {\n\n }",
"public void setBand(Band band) {\n this.band = band;\n }",
"void calculate()\n\t{\n\t\tItemContainer bankInventory = client.getItemContainer(InventoryID.BANK);\n\n\t\tif (bankInventory == null)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tItem[] items = bankInventory.getItems();\n\t\tint currentTab = client.getVar(Varbits.CURRENT_BANK_TAB);\n\n\t\tif (currentTab > 0)\n\t\t{\n\t\t\tint startIndex = 0;\n\n\t\t\tfor (int i = currentTab - 1; i > 0; i--)\n\t\t\t{\n\t\t\t\tstartIndex += client.getVar(TAB_VARBITS.get(i - 1));\n\t\t\t}\n\n\t\t\tint itemCount = client.getVar(TAB_VARBITS.get(currentTab - 1));\n\t\t\titems = Arrays.copyOfRange(items, startIndex, startIndex + itemCount);\n\t\t}\n\n\t\tif (items.length == 0 || !isBankDifferent(items))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tlog.debug(\"Calculating new bank value...\");\n\n\t\tgePrice = haPrice = 0;\n\n\t\tList<Integer> itemIds = new ArrayList<>();\n\n\t\t// Generate our lists (and do some quick price additions)\n\t\tfor (Item item : items)\n\t\t{\n\t\t\tint quantity = item.getQuantity();\n\n\t\t\tif (item.getId() <= 0 || quantity == 0)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (item.getId() == COINS_995)\n\t\t\t{\n\t\t\t\tgePrice += quantity;\n\t\t\t\thaPrice += quantity;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (item.getId() == PLATINUM_TOKEN)\n\t\t\t{\n\t\t\t\tgePrice += quantity * 1000L;\n\t\t\t\thaPrice += quantity * 1000L;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tfinal ItemComposition itemComposition = itemManager.getItemComposition(item.getId());\n\n\t\t\tif (config.showGE())\n\t\t\t{\n\t\t\t\titemIds.add(item.getId());\n\t\t\t}\n\n\t\t\tif (config.showHA())\n\t\t\t{\n\t\t\t\tint price = itemComposition.getPrice();\n\n\t\t\t\tif (price > 0)\n\t\t\t\t{\n\t\t\t\t\thaPrice += (long) Math.round(price * HIGH_ALCHEMY_CONSTANT) *\n\t\t\t\t\t\t(long) quantity;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Now do the calculations\n\t\tif (config.showGE() && !itemIds.isEmpty())\n\t\t{\n\t\t\tfor (Item item : items)\n\t\t\t{\n\t\t\t\tint itemId = item.getId();\n\t\t\t\tint quantity = item.getQuantity();\n\n\t\t\t\tif (itemId <= 0 || quantity == 0\n\t\t\t\t\t|| itemId == ItemID.COINS_995 || itemId == ItemID.PLATINUM_TOKEN)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tgePrice += (long) itemManager.getItemPrice(itemId) * quantity;\n\t\t\t}\n\t\t}\n\t}",
"public void setData() {\n ArrayList<Double> airPressure = new ArrayList<Double>();\n ArrayList<Double> insideTemp = new ArrayList<Double>();\n ArrayList<Double> insideHum = new ArrayList<Double>();\n ArrayList<Double> outsideTemp = new ArrayList<Double>();\n ArrayList<Double> windSpeed = new ArrayList<Double>();\n ArrayList<Double> avgWindSpeed = new ArrayList<Double>();\n ArrayList<Double> windDir = new ArrayList<Double>();\n ArrayList<Double> outsideHum = new ArrayList<Double>();\n ArrayList<Double> rainRate = new ArrayList<Double>();\n ArrayList<Double> uvLevel = new ArrayList<Double>();\n ArrayList<Double> battLevel = new ArrayList<Double>();\n ArrayList<Double> sunSet = new ArrayList<Double>();\n ArrayList<Double> sunRise = new ArrayList<Double>();\n ArrayList<Double> windChill = new ArrayList<Double>();\n ArrayList<Double> heatIndex = new ArrayList<Double>();\n ArrayList<Double> dewPoint = new ArrayList<Double>();\n if (!periodMeasurements.isEmpty()) {\n for (Measurement data : periodMeasurements) {\n airPressure.add(data.getBarometer());\n insideTemp.add(data.getInsideTemp());\n insideHum.add(data.getInsideHum());\n outsideTemp.add(data.getOutsideTemp());\n windSpeed.add(data.getWindSpeed());\n avgWindSpeed.add(data.getAvgWindSpeed());\n windDir.add(data.getWindDir());\n outsideHum.add(data.getOutsideHum());\n rainRate.add(data.getRainRate());\n uvLevel.add(data.getUvLevel());\n battLevel.add(data.getBattLevel());\n sunSet.add(data.GetSunSet());\n sunRise.add(data.GetSunRise());\n windChill.add(Calculations.windChill(data.getOutsideTemp(), data.getWindSpeed()));\n heatIndex.add(Calculations.heatIndex(data.getInsideTemp(), data.getInsideHum()));\n dewPoint.add(Calculations.dewPoint(data.getOutsideTemp(), data.getOutsideHum()));\n }\n SetAirPressure(airPressure);\n SetInsideTemp(insideTemp);\n SetInsideHum(insideHum);\n SetOutsideTemp(outsideTemp);\n SetWindSpeed(windSpeed);\n SetAvgWindSpeed(avgWindSpeed);\n SetWindDir(windDir);\n SetOutsideHum(outsideHum);\n SetRainRate(rainRate);\n SetUvLevel(uvLevel);\n SetBattLevel(battLevel);\n SetSunSet(sunSet);\n SetSunRise(sunRise);\n SetWindChill(windChill);\n SetHeatIndex(heatIndex);\n SetDewPoint(dewPoint);\n SetPreDefined(periodMeasurements);\n }\n }",
"private void handleBins() {\n\t\t\tfinal int n = getNbBins();\n\t\t\t//compute the number of empty, partially filled and closed bins\n\t\t\t//also compute the remaining space in each open bins\n\t\t\tfor (int b = 0; b < n; b++) {\n\t\t\t\tif(svars[b].isInstantiated()) {\n\t\t\t\t\t//we ignore closed bins\n\t\t\t\t\tif(loads[b].isInstantiatedTo(0)) nbEmpty++;\n\t\t\t\t\telse nbFull++;\n\t\t\t\t}else {\n\t\t\t\t\t//the bins is used by the modified lower bound\n\t\t\t\t\tbinsMLB.add(b);\n\t\t\t\t\tremainingSpace[b] += loads[b].getSup();\n\t\t\t\t\tcapacityMLB = Math.max(capacityMLB, remainingSpace[b]);\n\t\t\t\t\tif(svars[b].getKernelDomainSize()>0) {\n\t\t\t\t\t\t//partially filled\n\t\t\t\t\t\tnbSome++;\n\t\t\t\t\t\ttotalSizeCLB -= remainingSpace[b]; //fill partially filled bin before empty ones\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//still empty\n\t\t\t\t\t\tbinsCLB.add(remainingSpace[b]); //record empty bins to fill them later\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"private void initBands(int cropNum)\n {\n // get the min and max stage values\n double min = mStageData.getMinStage();\n double max = mStageData.getMaxStage();\n \n // round the values to the nearest 10th\n \n min = Math.rint(min*10)/10;\n max = Math.rint(max*10)/10;\n \n // determin the number of data bands\n int num = (int) ((max - min) * 10);\n \n // initalize the bands\n band = new ArrayList<DataBand>(num);\n \n // create databands between each 2 rounded values\n for(int i = 0; i < num; ++i)\n {\n // get the bounds values\n double val1 = bounds[i];\n double val2 = bounds[i+1];\n \n // get the areas for the bounds\n double a1 = mStageData.getAreaForStage(val1,0);\n double a2 = mStageData.getAreaForStage(val2,0);\n \n // determine the band area\n double acres = a2 - a1;\n \n // add the band if it has a non 0 area\n if ( acres > 0 )\n {\n DataBand data = new DataBand(cropNum,val1,val2,acres,getCropInfoTable());\n band.add(data);\n }\n }\n }",
"private void equalizerBandUpdate(final int band, final int level) {\n\t\tFlog.d(TAG, \"AffectActivity---equalizerBandUpdate()---start\");\n\t\tControlPanelEffect.setParameterInt(mContext, mCallingPackageName,\n\t\t\t\tmAudioSession, ControlPanelEffect.Key.eq_band_level, level,\n\t\t\t\tband);\n\t\tFlog.d(TAG, \"AffectActivity---equalizerBandUpdate()---end\");\n\t}",
"public void calculateAll(){\n this.calculateTotalSupportTypeQuality();\n this.calculateTotalSupportQuality();\n this.calculateTotalSupportCosts();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates an lookup for given lookup. This class just returns the object passed in, but subclasses can be different. | public Lookup createLookup (Lookup lookup); | [
"public static Lookup createLookup(ObjectDefinition objectDefinition) {\r\n\t\tLookup l = new Lookup(objectDefinition);\r\n\t\treturn l;\r\n\r\n\t}",
"protected Lookup createLookup() {\n return null;\n }",
"public static Lookup createLookup(InputStream objectDefinition) {\r\n\r\n\t\tLookup l = new Lookup(objectDefinition);\r\n\t\treturn l;\r\n\r\n\t}",
"Lookup getLookup();",
"public static MethodHandles.Lookup createLookup(Class<?> clazz, int mode)\n {\n return constructor.invokeWith(clazz, mode);\n }",
"Object lookup(FactoryInstance instanceInfo);",
"private void createLookup() {\r\n\t\tcreateLooupMap(lookupMap, objectdef, objectdef.getName());\r\n\t\tcreateChildIndex(childIndex, objectdef, objectdef.getName());\r\n\r\n\t}",
"public static TCObject lookupOrCreate(Object obj) {\n return getManager().lookupOrCreate(obj);\n }",
"public Object lookup(String name);",
"public final Lookup getLookup() {\n if (this.lookup == null) {\n Lookup lkp = createLookup();\n Lookup fixedContents;\n if (factory == null) {\n //unit tests\n fixedContents = Lookups.fixed (layer, this);\n } else {\n fixedContents = Lookups.fixed (layer, this, factory);\n }\n if (lkp == null) {\n this.lookup = fixedContents;\n } else {\n this.lookup = new ProxyLookup (fixedContents, lkp);\n }\n }\n return lookup;\n }",
"private static Lookup computeLookup(Class<?> type) throws Throwable {\n return (Lookup) LOOKUP_CONSTRUCTOR_MH.invokeExact(type);\n }",
"public static MethodHandles.@NonNull Lookup lookup() {\n return LOOKUP;\n }",
"public Lookup findLookup(String code, String lookupGroup, long lookupParentId);",
"public Lookup createInstancesLookup (InstanceContent ic);",
"protected Object localLookup( final Name name )\n throws NamingException\n {\n final Object value = doLocalLookup( name );\n\n // Call getObjectInstance for using any object factories\n try\n {\n final Name atom = name.getPrefix( 1 );\n return m_namespace.getObjectInstance( value, atom, this, getRawEnvironment() );\n }\n catch ( final Exception e )\n {\n final NamingException ne = new NamingException( \"getObjectInstance failed\" );\n ne.setRootCause( e );\n throw ne;\n }\n }",
"public T caseLookupElement(LookupElement object)\n {\n return null;\n }",
"private static Lookup _initLookup()\n {\n Optional<Project> optionalProject = ProjectUtility.findProjectFromActives(TopComponent.getRegistry());\n if (optionalProject.isPresent())\n return Lookups.fixed(optionalProject.get());\n return Lookups.fixed();\n }",
"protected void createLookupCache() {\n }",
"public static MethodHandles.Lookup createTrustedLookup(Class<?> clazz)\n {\n return constructor.invokeWith(clazz, - 1);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
end file constructor / Checks if a provider status assigned is valid and return true or false accordingly | @Override
public boolean isValidStatus(Status status) {
return status.isProvider()&& super.isValidStatus(status);
} | [
"boolean isSetCryptProvider();",
"public StatusProvider() {\n System.out.println(\"StatusProvider initialized\");\n }",
"private boolean initIsEligible() {\n if (!ProviderEligibilityChecker.isEligible(mContext, mId, mResolveInfo)) {\n return false;\n }\n if (!ConnectivityEligibilityChecker.isEligible(mContext, mId, mResolveInfo)) {\n return false;\n }\n if (!FeatureEligibilityChecker.isEligible(mContext, mId, mResolveInfo)) {\n return false;\n }\n if (!AccountEligibilityChecker.isEligible(mContext, mId, mResolveInfo)) {\n return false;\n }\n if (!DismissedChecker.isEligible(mContext, mId, mResolveInfo, mIgnoreAppearRule)) {\n return false;\n }\n if (!AutomotiveEligibilityChecker.isEligible(mContext, mId, mResolveInfo)) {\n return false;\n }\n return true;\n }",
"public ServiceProvider checkStatus(ServiceProvider serviceProvider) {\n\t\tserviceProvider = serviceProviderRepository.findOne(serviceProvider.getId());\n\t\tAmazonEC2Client ec2Client = new AmazonEC2Client(new ProfileCredentialsProvider(\"fisher\"));\n\t\tec2Client.setRegion(Region.getRegion(Regions.fromName(serviceProvider.getRegion())));\n\t\tDescribeInstanceStatusRequest statusRequest = new DescribeInstanceStatusRequest();\n\t\tstatusRequest.withInstanceIds(serviceProvider.getInstanceId());\n\t\tDescribeInstanceStatusResult result = ec2Client.describeInstanceStatus(statusRequest);\n\t\tif (!result.getInstanceStatuses().isEmpty()) {\n\t\t\tserviceProvider.setRunning(result.getInstanceStatuses().get(0).getInstanceState().getCode() == EC2_RUNNING_STATUS_CODE);\n\t\t\tLOG.info(\"Running status for \" + serviceProvider.getName() + \" is \" + serviceProvider.isRunning());\n\t\t} else {\n\t\t\tserviceProvider.setRunning(false);\n\t\t}\n\t\tserviceProvider.setLastChecked(LocalDateTime.now());\n\t\treturn serviceProvider;\n\t}",
"public boolean verifyProvider(String providerNumber) {\n\t\tboolean providerExists = operatorController.verifyProviderExists(providerNumber);\n\t\tif (!providerExists) {\n\t\t\tSystem.out.println(\"Invalid provider number! Provider does not exist. Returning to menu\");\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private boolean checkIsRcseActivated() {\n RcsSettings.createInstance(mContext);\n RcsSettings rcsSettings = RcsSettings.getInstance();\n boolean isActivated = false;\n if (rcsSettings != null) {\n long validity = rcsSettings.getProvisionValidity();\n String version = rcsSettings.getProvisioningVersion();\n Logger.d(TAG, \"isRcseActivated(),validity is \" + validity\n + \", version is \" + version);\n if ((version.equals(PROVISION_INFO_VERSION_ONE)\n && validity == PROVISION_INFO_VILIDITY_ONE)\n || (version.equals(PROVISION_INFO_VERSION_ZERO)\n && validity == PROVISION_INFO_VILIDITY_ZERO)) {\n isActivated = false;\n } else {\n isActivated = true;\n }\n } else {\n Logger.w(TAG, \"isRcseActivated(), rcsSettings is null\");\n }\n return isActivated;\n }",
"public CheckOk() {\n }",
"public MuellerDeStatusProvider() {\n super(\"3018\");\n }",
"public boolean isValidConfigType(){\r\n\t boolean isValidConfigType = false;\r\n\t if(thirdPartyProductProviderNetworkEnabled && thirdPartyProductProviderEnabled){\r\n\t\t isValidConfigType = true;\r\n\t }\r\n\t \r\n\t return isValidConfigType;\r\n }",
"public boolean isValid() {\n\t\tif(type == null || createdAt == null && updatedAt == null || loanId <= 0)\n\t\t\treturn false;\n\t\t\n\t\tswitch(type) {\n\t\tcase REDDIT:\n\t\t\tif(thread == null || reason != null || userId > 0)\n\t\t\t\treturn false;\n\t\t\tbreak;\n\t\tcase REDDITLOANS:\n\t\t\tif(thread != null || reason == null || userId <= 0)\n\t\t\t\treturn false;\n\t\t\tbreak;\n\t\tcase PAID_SUMMON:\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow new IllegalArgumentException(\"Unknown creation type \" + type.name());\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"private boolean checkProvider(WifiPoint wifiPoint) {\n if (filterProviderComboBox.getValue().equals(\"All\")) {\n return true;\n } else {\n return wifiPoint.getProvider().equals(filterProviderComboBox.getValue());\n }\n }",
"public boolean validateFromLov();",
"boolean isSetComplianceCheckResult();",
"protected int checkExistingOFAC_AVS()throws Exception {\n CommonUtilities.getLogger().log(LogLevel.getLevel(Constants.LOG_CONFIG),\n \"Method for checking Existing OFAC_AVS for card Number--->\" +\n requestObj.getExistingCard());\n int status = dbHandler.isExistingOFAC_AVSValid(requestObj.\n getExistingCard());\n CommonUtilities.getLogger().log(LogLevel.getLevel(Constants.LOG_CONFIG),\n \"Is Existing OFAC_AVS Valid --->\" +\n status);\n return status;\n }",
"@Override\r\n\tpublic boolean isBP_CC_Validated() \r\n\t{\t\t\r\n\t\t// Check if Business Partners credit status == Credit OK\r\n\t\tint C_BPartner_ID = getC_BPartner_ID();\r\n\t\tMBPartner bp = MBPartner.get(p_ctx, C_BPartner_ID);\r\n\t\tif (bp != null)\r\n\t\t{\r\n\t\t\tString creditStatus = bp.getSOCreditStatus();\r\n\t\t\tif (creditStatus != null && creditStatus.equals(MBPartner.SOCREDITSTATUS_CreditOK))\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\treturn super.isBP_CC_Validated();\r\n\t}",
"boolean hasRegistrationFailure();",
"boolean isSetComparesource();",
"public CheckAvailability() {\n initComponents();\n }",
"public boolean repOk(){\r\n if(username.equals(\"\")||password.equals(\"\")||balance< 20000){\r\n return false;\r\n }\r\n return true;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column ehr_contract.positive_salary | public BigDecimal getPositiveSalary() {
return positiveSalary;
} | [
"public BigDecimal getSalaryLower() {\n return salaryLower;\n }",
"public void setPositiveSalary(BigDecimal positiveSalary) {\n this.positiveSalary = positiveSalary;\n }",
"public String getSalary() {\n return salary;\n }",
"int getSalary();",
"@Override\n public double salary(){\n double salaryComp = 0.0;\n salaryComp = this.getEmployeeHours()*this.getEmployeeRate();\n if (salaryComp>50000){\n salaryComp=50000;\n }\n return salaryComp;\n }",
"public Integer getMinSalary() {\n return (Integer)getAttributeInternal(MINSALARY);\n }",
"public double getTotalSalary() {\n\t\treturn this.salary;\r\n\t}",
"public Integer getMinSalary() {\n return (Integer)getAttributeInternal(MINSALARY);\n }",
"public BigDecimal getSalaryUpper() {\n return salaryUpper;\n }",
"public double getExpectedSalary();",
"public BigDecimal getSalaryExpectation() {\n return salaryExpectation;\n }",
"@Override\n public double annualSalary(){\n double bonus = 0.00;\n\n if(currentStockPrice > 50){\n bonus = 30000;\n }\n\n return (super.annualSalary() + bonus);\n }",
"float getMonthlySalary();",
"@Basic(fetch = FetchType.EAGER, optional = false)\r\n @Column(name = \"LOYALTY_POINTS\", nullable = false, columnDefinition = \"INTEGER\")\r\n public Integer getLoyaltyPoints() {\r\n return this.loyaltyPoints;\r\n }",
"@Override\n abstract public double getSalary();",
"public double getBaseSalary(){ return baseSalary; }",
"public Number getSalary() {\r\n return (Number)getAttributeInternal(SALARY);\r\n }",
"public double salaryPay() {\n\t\treturn overtimePay() + getSalary();\n\t}",
"public float getAnnualSalary()\n {\n return annualSalary;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the cscl appointee master with the primary key or returns null if it could not be found. | @Override
public CsclAppointeeMaster fetchByPrimaryKey(long id_) {
return fetchByPrimaryKey((Serializable)id_);
} | [
"public CsclAppointeeMaster fetchByPrimaryKey(long id_);",
"@Override\n\tpublic CsclAppointeeMaster findByPrimaryKey(Serializable primaryKey)\n\t\tthrows NoSuchCsclAppointeeMasterException {\n\n\t\tCsclAppointeeMaster csclAppointeeMaster = fetchByPrimaryKey(primaryKey);\n\n\t\tif (csclAppointeeMaster == null) {\n\t\t\tif (_log.isDebugEnabled()) {\n\t\t\t\t_log.debug(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey);\n\t\t\t}\n\n\t\t\tthrow new NoSuchCsclAppointeeMasterException(\n\t\t\t\t_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey);\n\t\t}\n\n\t\treturn csclAppointeeMaster;\n\t}",
"public CsclAppointeeMaster findByPrimaryKey(long id_)\n\t\tthrows NoSuchCsclAppointeeMasterException;",
"public java.util.List<CsclAppointeeMaster> findByid_(long id_);",
"@Override\n\tpublic CsclAppointeeMaster findByPrimaryKey(long id_)\n\t\tthrows NoSuchCsclAppointeeMasterException {\n\n\t\treturn findByPrimaryKey((Serializable)id_);\n\t}",
"long getMasterId();",
"public long getMasterId() {\r\n return masterId_;\r\n }",
"public long getMasterId() {\r\n return masterId_;\r\n }",
"public synchronized String getMasterAddress() {\n int tried = 0;\n try {\n while (tried < mMaxTry) {\n if (mClient.checkExists().forPath(mLeaderPath) != null) {\n List<String> masters = mClient.getChildren().forPath(mLeaderPath);\n LOG.info(\"Master addresses: {}\", masters);\n if (masters.size() >= 1) {\n if (masters.size() == 1) {\n return masters.get(0);\n }\n\n long maxTime = 0;\n String leader = \"\";\n for (String master : masters) {\n Stat stat = mClient.checkExists().forPath(\n PathUtils.concatPath(mLeaderPath, master));\n if (stat != null && stat.getCtime() > maxTime) {\n maxTime = stat.getCtime();\n leader = master;\n }\n }\n LOG.info(\"The leader master: {}\", leader);\n return leader;\n }\n } else {\n LOG.info(\"{} does not exist ({})\", mLeaderPath, (++tried));\n }\n CommonUtils.sleepMs(LOG, Constants.SECOND_MS);\n }\n } catch (Exception e) {\n LOG.error(\"Error with zookeeper: {} message: {}\", mZookeeperAddress, e.getMessage());\n }\n\n return null;\n }",
"MasterType getMaster();",
"PrimaryKey getPrimarykey();",
"public MasterAccount getMasterAccount(int id){\r\n\t\tMasterAccount acc;\r\n\t\tfor(String s : accountArray){\r\n\t\t\tacc = FileParser.dataToMasterAccount(s);\r\n\t\t\tif(acc.getId() == id)\r\n\t\t\t\treturn acc;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public CsclAppointeeMaster fetchByisActive_First(\n\t\tBoolean isActive,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<CsclAppointeeMaster>\n\t\t\torderByComparator);",
"@Override\n\tpublic String getMaster() {\n\t\treturn coordinator.getStateMgr().getMasterMember().getInetSocketAddress().getHostName();\n\t}",
"@Override\n\tpublic CsclAppointeeMaster fetchByisActive_First(\n\t\tBoolean isActive,\n\t\tOrderByComparator<CsclAppointeeMaster> orderByComparator) {\n\n\t\tList<CsclAppointeeMaster> list = findByisActive(\n\t\t\tisActive, 0, 1, orderByComparator);\n\n\t\tif (!list.isEmpty()) {\n\t\t\treturn list.get(0);\n\t\t}\n\n\t\treturn null;\n\t}",
"public Long getMasterUid() {\n return masterUid;\n }",
"public CsclAppointeeMaster fetchByid__First(\n\t\tlong id_,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<CsclAppointeeMaster>\n\t\t\torderByComparator);",
"public static MasterData getMasterData() {\n return masterData;\n }",
"public java.lang.String getMasterAccountName() {\n return masterAccountName;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the value of the 'accountID' field | public Builder clearAccountID() {
fieldSetFlags()[2] = false;
return this;
} | [
"public Builder clearAccountID() {\n fieldSetFlags()[0] = false;\n return this;\n }",
"public void clearAccount(){\n this.account = null;\n }",
"void unsetAccountNumber();",
"public Builder clearAccountNumber() {\n fieldSetFlags()[0] = false;\n return this;\n }",
"public void clearAccountName() {\n genClient.clear(CacheKey.accountName);\n }",
"public Builder clearAccountAuthId() {\n accountAuthId = null;\n fieldSetFlags()[3] = false;\n return this;\n }",
"public void clearCashAdvanceCustomerIdentification() {\n genClient.clear(CacheKey.cashAdvanceCustomerIdentification);\n }",
"public void setAccountID(Long value) {\n this.accountID = value;\n }",
"public void removeAccount(int id) {\n\t}",
"public static synchronized void resetAccount(){\n acc = new Account();\n }",
"public void unsetLocalAccountNr()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(LOCALACCOUNTNR$4, 0);\n }\n }",
"private void clearFields(){\r\n\r\n acctBalanceField.clear();\r\n acctNameField.clear();\r\n\r\n\r\n }",
"public void clearCashAdvanceSerialNum() {\n genClient.clear(CacheKey.cashAdvanceSerialNum);\n }",
"public void setAccountID(java.lang.Object accountID) {\n this.accountID = accountID;\n }",
"public void unsetParentAccount()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(PARENTACCOUNT$64, 0);\n }\n }",
"public void setAccount_Id(java.lang.String account_Id) {\n this.account_Id = account_Id;\n }",
"public void unsetIsTestAccount()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(ISTESTACCOUNT$34, 0);\n }\n }",
"public void resetId()\r\n {\r\n this.id = null;\r\n }",
"public void setAccountID(java.lang.Integer accountID) {\n this.accountID = accountID;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a JSON string with the given error message. | private String getJSONError(String exception, String message) {
return "{\"error\":\""+exception+"\",\"message\":\""+message+"\"}";
} | [
"public String generateJsonErrorResponse(String message) {\n return String.format(\"{ \\\"errorMessage\\\" : \\\"%s\\\" }\", message);\n }",
"public String toJsonString() {\n JSONObject json = toJson();\n String jsonString;\n if (json == null)\n jsonString = \"{\\\"message\\\":\\\"unknown server error\\\"}\";\n else\n jsonString = toJson().toString();\n return jsonString;\n }",
"protected String exceptionToJson(Exception ex) {\n return getJsonString(\"ErrorMsg\", ex.getMessage());\n }",
"public JSONObject toJson() {\n JSONObject json = null;\n try {\n json = new JSONObject().put(\"message\", \"unknown server error\");\n } catch (JSONException e) {\n // TODO don't want error reporter creating more errors. use proper Logging....\n e.printStackTrace();\n }\n return json;\n }",
"java.lang.String getErrormessage();",
"public abstract String formatError(String message);",
"private String formatError(String message) {\n return \"error : \" + message;\n }",
"protected String messageToJson(String pMessage) {\n return getJsonString(\"Message\", pMessage);\n }",
"public JSONException syntaxError(String message) {\n return new JSONException(message + this.toString());\n }",
"public static String toErrorJsonString(BaseResponse base) {\n\t\treturn new Gson().toJson(base);\n\t}",
"java.lang.String getMsgjson();",
"public static QueryException jsonFormatError(final Object e) {\n return thrw(2, \"Invalid JSON syntax: '%s'\", e);\n }",
"@ExceptionHandler({MalformedJsonException.class})\n @ResponseBody\n @ResponseStatus(HttpStatus.BAD_REQUEST)\n public String handleException(final RuntimeException e) {\n return convertErrorAsJson(e.getMessage());\n }",
"public JSONException syntaxError(String message, Throwable causedBy) {\n return new JSONException(message + this.toString(), causedBy);\n }",
"private String getMessageJson(String username, String message) {\n\n StringBuilder jsonStringMessage = new StringBuilder();\n jsonStringMessage.append(\"{\\\"messageUser\\\":[\");\n jsonStringMessage.append(\"{\\\"\" + username + \"\\\":\\\"\" + message + \"\\\"}\");\n jsonStringMessage.append(\"]}\");\n return jsonStringMessage.toString();\n }",
"public String handleJsonValidationException() {\n\t\tServiceValidationException ex = (ServiceValidationException) this.getException();\n\t\tHttpServletResponse response = ServletActionContext.getResponse();\n\t\tresponse.setHeader(\"Cache-Control\", \"no-cache\");\n\t\tresponse.setHeader(\"Content-Type\", \"application/json; charset=utf-8\");\n\t\ttry {\n\t\t\tresponse.setStatus(409);\n\t\t\tresponse.getWriter().write(ex.getMessage());\n\t\t} catch (IOException e) {\n\t\t\tLOGGER.error(\"Error intentando escribir en el response\", e);\n\t\t}\n\n\t\treturn ERROR;\n\t}",
"public String handleJsonCommonException() {\n\t\tServiceCommonException ex = (ServiceCommonException) this.getException();\n\t\tHttpServletResponse response = ServletActionContext.getResponse();\n\t\tresponse.setHeader(\"Cache-Control\", \"no-cache\");\n\t\tresponse.setHeader(\"Content-Type\", \"application/json; charset=utf-8\");\n\t\ttry {\n\t\t\tif (CollectionUtils.isEmpty(ex.getValidationErrors())) {\n\t\t\t\tresponse.setStatus(500);\n\t\t\t\tresponse.getWriter().write(ex.getMessage());\n\t\t\t} else {\n\t\t\t\tresponse.setStatus(409);\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\tint index = 0;\n\t\t\t\tfor (ValidationError ve : ex.getValidationErrors()) {\n\t\t\t\t\tsb.append(ve.getErrorMessage());\n\t\t\t\t\tif (index < ex.getValidationErrors().size() - 1) {\n\t\t\t\t\t\tsb.append(\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\tindex++;\n\t\t\t\t}\n\t\t\t\tresponse.getWriter().write(sb.toString());\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tLOGGER.error(\"Error intentando escribir en el response\", e);\n\t\t}\n\n\t\treturn ERROR;\n\t}",
"private String buildAnInvalidJsonString() {\n String jsonString = \"{\\n\" + \" \\\"id\\\": 13,\\n\" + \" \\\"name\\\": \\\"FlowExecutionPickList\\\",\\n\" + \" \\\"code\\\": \\\"FlowExecutionPickList\\\",\\n\"\n + \" \\\"fields\\\": {},\\n\" + \" \\\"udfs\\\": []\\n\" + \"}\";\n return jsonString;\n }",
"public String toString() {\n return String.format(\"ERROR %s\", errorMessage);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor. Sets the (x,y) position and the deadband | public AutonPoint(double ax, double ay, double aDb)
{
x = ax;
y = ay;
deadband = aDb;
} | [
"public CarrierShip(int x, int y)\n {\n super(x,y);\n offset = 0;\n isSpawning = false;\n adjustPosition();\n }",
"public Position()\r\t{\r\t\txPosition = 0;\r\t\tyPosition = 0;\r\t}",
"public Dragon(int x, int y){\n\t\tsuper(x,y,'D');\n\t\tstate = State.AWAKE;\n\t}",
"public Drone(double x, double y) {\n GlobalEntityId++; //increment global ID\n mId = GlobalEntityId; //set this entity ID\n mX = x; //set x and y positions which were passed through\n mY = y;\n mImage = new Image(getClass().getResourceAsStream(\"drone.png\")); //set image\n mRadius = 25; //set size\n Random random = new Random();\n mAngle = random.nextInt(360); //set random starting angle\n mSpeed = 2; //set speed\n }",
"public Obstacle(int x, int y) {\n super(x, y);\n }",
"public TrafficLight(int x2, int y2)\n {\n x = x2;\n y = y2; \n }",
"public Coordinate(){\n this(0, 0, 0);\n }",
"public CarrierShape(int x,int y)\n {\n super(x,y);\n }",
"public Point2D()\n {\n this.x = this.y = 0f;\n }",
"public Ball(int x, int y)\r\n\t{\r\n\t\tsuper(x,y);\r\n\t\txSpeed = 3;\r\n\t\tySpeed = 1;\r\n\t}",
"public Road(int x, int y, int width, int height)\n {\n screenWidth = width;\n screenHeight = height;\n xTopLeft = x;\n yTopLeft = y;\n }",
"public Position(double x, double y) {\n setX(x);\n setY(y);\n }",
"public Ground(int x, int y)\n {\n // initialise instance variables\n xleft= x;\n ybottom= y;\n \n }",
"public MbCoordDpto() {\r\n \r\n }",
"public Defender(double x, double y) {\n\t\tsuper(x, y);\n\t\t// initially alive\n\t\tthis.isAlive = true;\n\t\t\n\t}",
"private RigidBody(Shape shape, final double x, final double y) {\n super(shape);\n com = new XPoint(x, y);\n }",
"public P2(){\n this.x = this.y = 0;\n }",
"public Vehicle(int x, int y)\n {\n next = null;\n xLeft = x;\n yTop = y;\n frontPoint = new Point2D.Double(x, y+10);\n rearPoint = new Point2D.Double(x+WIDTH-10, y+10);\n rect = new Rectangle(xLeft, yTop, HEIGHT, WIDTH);\n }",
"public Buildings(int toBeX, int toBeWidth,int toBeHeight){\n x = toBeX;\n w = toBeWidth;\n h = toBeHeight;\n y = 500-h;\n \n \n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Roundout Double to 3decimals return String | public String roundoutNumberToThree(double number) {
DecimalFormat f = new DecimalFormat("#.###");
return f.format(number); // this is String
} | [
"public static String formatDecimal3Places(double x) {\n double scaleFactor = 1000.0;\n return String.format(\"%.3f\", round(x * scaleFactor) / scaleFactor);\n }",
"public String roundoutRatioToThree(double numerator, double denominator ) {\n\t\t\tDecimalFormat f = new DecimalFormat(\"#.###\");\n\t\t\treturn f.format(numerator/denominator); // this is String\n\t\t}",
"private String doubleToString(double d, int places) {\n if (places < 0) places = 0;\n\n double factor = Math.pow(10,places);\n String s = \"\" + (double) (Math.round(d * factor)) / factor;\n\n if (places == 0) {\n return s.substring(0, s.length()-2);\n }\n\n while (s.length() - s.indexOf(\".\") < places+1) {\n s += \"0\";\n }\n\n return s;\n }",
"public static double dparm_round (double value) {\n\t\tdouble result = value;\n\t\ttry {\n\t\t\tresult = Double.parseDouble (String.format (Locale.US, \"%.2e\", value));\t// limit to 3 significant digits\n\t\t} catch (Exception e) {\n\t\t\tresult = value;\n\t\t}\n\t\treturn result;\n\t}",
"static String doubleToString(double value) {\n\t\t// convert it to a string with two decimals\n\t\tDecimalFormat format = new DecimalFormat();\n\t\tformat.setMinimumFractionDigits(0); \n\t\tformat.setMaximumFractionDigits(5); \n\t\treturn format.format(value);\n\t}",
"native public java.lang.String toFixed(double fractionDigits);",
"public static String roundStr(double x, int precision) {\r\n\t\tif (precision == 1) return nf1d.format(x);\r\n\t\tif (precision == 2) return nf2d.format(x);\r\n\t\tif (precision == 3) return nf3d.format(x);\r\n\t\r\n\t\tString p = \"\"; for (int i = 0; i < precision; i++) p += \"0\";\r\n\t\tNumberFormat nf = new DecimalFormat(\"0.\" + p);\r\n\t\treturn nf.format(x);\r\n\t}",
"private static String formattedDoubleToString(double x, int places) {\r\n\t\tString result = \"\";\r\n\t\tString stack = \"\";\r\n\t\tlong t;\r\n\r\n\t\t// put in a minus sign as needed\r\n\t\tif (x < 0.0)\r\n\t\t\tresult += \"-\";\r\n\r\n\t\t// put in a leading 0\r\n\t\tif (-1.0 < x && x < 1.0)\r\n\t\t\tresult += \"0\";\r\n\t\telse {\r\n\t\t\tt = (long) x;\r\n\t\t\tif (t < 0)\r\n\t\t\t\tt = -t;\r\n\r\n\t\t\twhile (t > 0) {\r\n\t\t\t\tstack = Long.toString(t % 10) + stack;\r\n\t\t\t\tt /= 10;}\r\n\t\t\tresult += stack;\r\n\t\t}\r\n\r\n\t\t// put the decimal, if needed\r\n\t\tif (places > 0) {\r\n\t\t\tresult += \".\";\r\n\r\n\t\t\t// put the appropriate number of decimals\r\n\t\t\tfor (int i = 0; i < places; i++) {\r\n\t\t\t\tx = Math.abs(x);\r\n\t\t\t\tx = 10.0 * (x - Math.floor(x));\r\n\t\t\t\tresult += Long.toString((long) x);}}\r\n\t\treturn result;\r\n\t}",
"public static String formatR(double number) {\r\n NumberFormat numberFormatter = NumberFormat.getNumberInstance();\r\n numberFormatter.setMinimumFractionDigits(2);\r\n return numberFormatter.format(Math2.round(number));\r\n //return Math2.round(number); \r\n }",
"protected String longToString3DigitFormat(long number) {\n\t\tdouble temp;\n\t\tNumberFormat formatter = new DecimalFormat(\"#.###\");\n\t\ttemp = number / 1000000.0;\n\t\treturn formatter.format(temp);\n\t}",
"public static String formatDouble(double value, int precision){\n\t\tString result;\n\t\tif(((int)value) > 9999 || ((int)value) < -9999){\n\t\t\tresult = new DecimalFormat(\"0.######E0\").format(value);\n\t\t}\n\t\telse\n\t\t\tresult = String.valueOf(roundDouble(value, precision));\n\t\treturn result == null ? \"-\" : result;\n\t}",
"private static String format(final double value) {\n final String tmp = \"\" + Math.floor(value * 1e5) * 1e-5;\n if(tmp.indexOf('e') >= 0) return tmp;\n final String str = tmp + \"00000\";\n final int dot = str.indexOf('.');\n return str.substring(0, Math.min(dot + 6, str.length()));\n }",
"public static String $(double value)\r\n \t{\r\n \t\tif (value < 0)\r\n\t\t{\r\n\t\t\tvalue = -value;\r\n\t\t\treturn String.format(\"($%4.2f)\", value); // round to 2 decimal places\r\n\t\t}\r\n\t\treturn String.format(\"$%4.2f\", value); // round to 2 decimal places\r\n \t}",
"static String double2String (Double a){\n String s = \"\"+a;\n String[] arr = s.split(\"\\\\.\");\n if (arr[1].length()==1) s+=\"0\";\n return s;\n }",
"public static double roundTwoDecimals(double d) { \n DecimalFormat twoDForm = new DecimalFormat(\"#.##\");\n return Double.parseDouble(\"\"+(twoDForm.format(d)));\n}",
"String format(double balance);",
"private int roundTo3(double n) {\n if (n > 0) {\n return 3*(int) (Math.ceil((n/3)));\n } else {\n return 3*(int) (Math.floor((n/3)));\n }\n }",
"protected String getDoubleAsFixedDecimal(final double value){\n\t\treturn DECIMAL_FORMAT.format(value);\n\t}",
"private static String formatDouble(final double value) {\n\t\treturn String.format(\"%.5f\", value);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Disconnects from the XenServer host. | public void disconnect() throws MonitorException
{
LOGGER.trace("Disconnecting from XenServer [{}]", connection.getSessionReference());
try
{
// Logout from hypervisor and end connection
Session.logout(connection);
connection.dispose();
connection = null;
}
catch (Exception ex)
{
throw new MonitorException("Could not disconnect from XenServer Hypervisor", ex);
}
} | [
"public void disconnect()\n\t{\n\t\tif (isConnected)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvimPort.logout(serviceContent.getSessionManager());\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tlogger.trace(\"Failed to logout esx: \" + host, e);\n\t\t\t}\n\t\t}\n\t\tisConnected = false;\n\t}",
"private void disconnect() {\n getConnectionService().disconnectHost();\n //Reset all variables\n cleanUpAfterDisconnect();\n }",
"public void disconnect(){\n\n\t\tserverConnection.disconnect();\n\t}",
"public void disconnect() {\n \t\tclient.disconnect();\n \t}",
"void disconnect() throws LxcException;",
"public void disconnect()\n\t{\n\t\tNetMessage objDisco = new NetMessage(\"Client.disconnect\");\n\t\tobjDisco.sendTo(this.serverConnection);\n\t}",
"public void disconnectClient() {\n pc.disconnectClient();\n }",
"public void disconnect() {}",
"public void disconnect() {\n commModule.disconnect();\n }",
"public void disconnectSSH(){\n\t log.info(\"Trying to disconnect to device \"+deviceIP+\" ...\\n\");\n\t session.disconnect();\n\t if(!session.isConnected())\n\t\t log.info(\"Successfully disconnected from device \"+deviceIP+\"\\n\");\n\t else\n\t\t log.error(\"Unable to disconnect to the device \"+deviceIP+\"\\n\");\n\t if(FETCHING_DATA_VIA_DATABASE){\n\t\t dbConnect.closeConnection();\n\t\t log.info(\"Successfully closed the database. \");\n\t }\n }",
"public void disconnect(){\n\t\tshutdown = true;\n\t\ttry{server.unRegister(this);}catch(Exception x){}\n\t\ttry{unexportObject(this, true);}catch(Exception x){}\n\t}",
"public void disconnect() throws DeviceException;",
"@DISPID(18) //= 0x12. The runtime will prefer the VTID if present\n @VTID(41)\n void closeOnDisconnect(\n int retval);",
"public void disconnect() throws SshException \n\t{\n\t\tsshconn.disconnect();\n\t\tisConnected = false;\n\t}",
"public void disconnect() \n {\n if (isConnected()) {\n try {\n connection.close();\n } catch (IOException ex) {\n Logger.getLogger(RobotClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }",
"public void disconnect() {\r\n\t\tif(session.isConnected()) {\r\n\t\t\tsession.disconnect();\r\n\t\t\tlog.info(\"Session terminated\");\r\n\t\t}\r\n\t}",
"public synchronized void close() {\n\t\t/**\n\t\t * DISCONNECT FROM SERVER\n\t\t */\n\t\tsrvDisconnect();\n\t}",
"public void disconnect() {\n try {\n client.disconnect(null, null);\n } catch (MqttException e) {\n Debug.logError(e, MODULE);\n }\n }",
"private void disconnect() {\n try {\n if(channel != null) {\n logger.info(\"Disconnecting from \" + config.host + \":\" + config.port);\n channel.close();\n channel.socket().close();\n channel = null;\n }\n } catch(Exception e) {\n logger.error(\"Error on disconnect: \", e);\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
=========================================================== Prints the maze grid. =========================================================== | public void print_maze () {
System.out.println();
for (int row=0; row < grid.length; row++) {
for (int column=0; column < grid[row].length; column++)
System.out.print (grid[row][column]);
System.out.println();
}
System.out.println();
} | [
"public void print_maze () {\r\n \r\n System.out.println();\r\n\r\n for (int row=0; row < grid.length; row++) {\r\n for (int column=0; column < grid[row].length; column++)\r\n System.out.print (grid[row][column]);\r\n System.out.println();\r\n }\r\n\r\n System.out.println();\r\n \r\n }",
"public void printMaze()\r\n\t{\r\n\t\tfor(int i = 0;i<maze.length;i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t\tfor(int j = 0;j<maze[0].length;j++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\tfor(int k = 0;k<maze[0][0].length;k++)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(maze[i][j][k]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"\");\r\n\t}",
"public void print()\n {\n // top border\n for (int col = 0; col < numCols; col++)\n {\n System.out.print(\"+\");\n System.out.print(\"---\");\n }\n System.out.println(\"+\");\n\n // one row at a time\n for (int row = 0; row < numRows; row++)\n {\n // the row of squares with vertical dividing walls\n for (int col = 0; col < numCols; col++)\n {\n // retrieve the square to be printed; this is what allows the\n // print() function to not care about how the squares are stored\n MazeSquare square = getMazeSquare(col, row);\n\n // left wall of a square\n if (square.hasLeftWall())\n {\n System.out.print(\"|\");\n }\n else\n {\n System.out.print(\" \");\n }\n\n System.out.print(\" \");\n\n // square with possible designation of start/finish\n if (col == startCol && row == startRow)\n {\n System.out.print(\"S\");\n }\n else if (col == endCol && row == endRow)\n {\n System.out.print(\"F\");\n }\n else if (square.getStatus())\n {\n System.out.print(\"*\");\n }\n else\n {\n System.out.print(\" \");\n }\n\n System.out.print(\" \");\n }\n System.out.println(\"|\"); // right-most wall\n\n // horizontal walls below the row just printed\n for (int col = 0; col < numCols; col++)\n {\n MazeSquare square = getMazeSquare(col, row);\n System.out.print(\"+\");\n if (square.hasBottomWall())\n System.out.print(\"---\");\n else\n System.out.print(\" \");\n }\n System.out.println(\"+\"); // right-most wall\n } // end for\n }",
"public void printMaze(){\r\n for (int i = 0; i < m_Maze.length; i++) {\r\n for (int j = 0; j < m_Maze[i].length; j++) {\r\n if (i == Start.getRowIndex() && j == Start.getColumnIndex()) {//startPosition\r\n System.out.print(\" \" + \"\\u001B[44m\" + \" \");\r\n } else if (i == End.getRowIndex() && j == End.getColumnIndex()) {//goalPosition\r\n System.out.print(\" \" + \"\\u001B[44m\" + \" \");\r\n } else if (m_Maze[i][j].getValue() == 1) System.out.print(\" \" + \"\\u001B[45m\" + \" \");\r\n else System.out.print(\" \" + \"\\u001B[107m\" + \" \");\r\n }\r\n System.out.println(\" \" + \"\\u001B[107m\");\r\n }\r\n }",
"void printGrid() {\n\t\tSystem.out.println();\n\t\tfor (int row = 0; row < moleGrid.length; row++) {\n\t\t\tfor (int col = 0; col < moleGrid[row].length; col++) {\n\t\t\t\tSystem.out.print(moleGrid[row][col] + \"\\t\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public void print(){\n for(int i=0; i<maze.length;i+=1) {\n for (int j = 0; j < maze[0].length; j += 1){\n if(i == start.getRowIndex() && j == start.getColumnIndex())\n System.out.print('S');\n else if(i == goal.getRowIndex() && j == goal.getColumnIndex())\n System.out.print('E');\n else if(maze[i][j]==1)\n System.out.print(\"█\");\n else if(maze[i][j]==0)\n System.out.print(\" \");\n\n\n }\n System.out.println();\n }\n }",
"public void printGrid(){\n\t\tfor(int i=0;i<getHeight();i++){\n\t\t\tfor(int j=0;j<getWidth();j++){\n\t\t\t\tif(grid[i][j]==null)\n\t\t\t\t\tSystem.out.print(\"- \");\n\t\t\t\telse if(getGrid(i,j).isPath())\n\t\t\t\t\tSystem.out.print(\"1 \");\n\t\t\t\telse if(getGrid(i,j).isScenery())\n\t\t\t\t\tSystem.out.print(\"0 \");\n\t\t\t\telse\n\t\t\t\t\tSystem.out.print(\"? \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"void printGrid() {\n\tfor(int i = 0; i< moleGrid.length;i++) {\t\t\n\t for(int j = 0; j < moleGrid.length; j++) {\t\t\t\t\n\t\tSystem.out.print(moleGrid[i][j]);\t\t// Print all the spots with moles\n\t }\n\t System.out.println(\" \");\n\t}\n\n }",
"public void printDebugMaze() {\n\t\tSystem.out.println(width);\n\t\tSystem.out.println(height);\n\n\t\tfor (int y = 0; y < height; y++) {\n\t\t\tfor (int x = 0; x < width; x++) {\n\t\t\t\tSystem.out.print(maze[x][y]);\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}",
"public void print() {\n for (int i = 0; i < maze.length; i++) {\n for (int j = 0; j < maze[0].length; j++) {\n if (start_position.equals(i, j))\n System.out.print('S');\n else if (goal_position.equals(i, j))\n System.out.print('E');\n else\n System.out.print(maze[i][j]);\n if (j != maze[0].length - 1)\n System.out.print(' ');\n }\n System.out.println();\n }\n }",
"public void logMaze() {\r\n\t\tmazeMap = getMap();\r\n\t\tString maze;\r\n\t\tfor(int i = 0; i< ROWS; i++) {\r\n\t\t\tmaze = \"{\";\r\n\t\t\tfor(int j = 0; j < COLS; j++) {\r\n\t\t\t\tmaze = maze + mazeMap[i][j];\r\n\t\t\t\tif( j < COLS-1) {\r\n\t\t\t\t\tmaze = maze + \",\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(maze + \"}\");\r\n\t\t}\r\n\t}",
"public void print(){\r\n maze.print();\r\n }",
"public void printGrid()\n\t{\n\t\tfor(int i = 0; i < numRows; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < numColumns; j++)\n\t\t\t{\n\t\t\t\tif(grid[i][j] == null)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"[ ]\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(grid[i][j]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"\\n\");\t\t\t\n\t\t}\n\t\tSystem.out.println(\"\\n\\n\");\n\t}",
"public void printGrid() {\n for (int i = 0; i < Params.EDGE; i++) {\n for (int j = 0; j < Params.EDGE; j++) {\n Patch patch = grid[i][j];\n Daisy daisy = patch.getDaisy();\n if (daisy != null) {\n if (daisy.getType() == Daisy.DaisyType.BLACK) {\n System.out.print(\"\\u25CF\");\n } else {\n System.out.print(\"\\u25CB\");\n }\n System.out.printf(\"%3.0f|\", patch.getTemperature());\n } else {\n System.out.printf(\" %3.0f|\", patch.getTemperature());\n }\n }\n System.out.println();\n }\n System.out.println();\n }",
"public void printMaze(int current) {\n\t\tfor(int r = 0; r < mazeSizeX; r++) {\n\t\t\tfor(int c = 0; c < mazeSizeY; c++) {\n\t\t\t\tif (r == getX(current) && c == getY(current))\n\t\t\t\t\tSystem.out.print(\"*\\t\");\n\t\t\t\telse\n\t\t\t\t\tSystem.out.print(visited[r][c] + \"\\t\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public void printGridAsChild()\n\t{\n\t\tfor ( int y = 0; y < height; y++)\n\t\t{\n\t\t\tSystem.out.print( \"\\t\" );\n\t\t\tfor ( int x = 0; x < width; x++ )\n\t\t\t{\n\t\t\t\t// If x & y are the same as the empty tile coordinates, print empty tile\n\t\t\t\tif ( x == x0 && y == y0 ) System.out.print( \" \" );\n\t\t\t\t// Else print element of grid\n\t\t\t\telse System.out.print( grid[x][y] + \" \" );\n\t\t\t}\n\t\t\tSystem.out.print( \"\\n\" );\n\t\t}\n\t\tSystem.out.print( \"\\n\" );\n\t}",
"public void printGrid();",
"public static void printMaze(Maze maze, PrintWriter out) {\n\t\tout.println(\"Graph Size: \" + maze.numberOfRows);\n\t\tout.println(\"MAZE:\");\n\t\tfor (Cell[] row: maze.mazeAsArray) {\n\t\t\t// Print the top walls for all cells with '+' for corners\n\t\t\tout.print(\"+\");\n\t\t\tfor (Cell c: row) {\n\t\t\t\tif (c.getNorthWall())\n\t\t\t\t\tout.print(\"-\");\n\t\t\t\telse\n\t\t\t\t\tout.print(\" \");\n\t\t\t\tout.print(\"+\");\n\t\t\t}\n\t\t\tout.println();\n\t\t\t\n\t\t\t// Print the left and right walls for all cells\n\t\t\tout.print(\"|\");\n\t\t\tfor (Cell c: row) {\n\t\t\t\tout.print(\" \");\n\t\t\t\tif (c.getEastWall())\n\t\t\t\t\tout.print(\"|\");\n\t\t\t\telse\n\t\t\t\t\tout.print(\" \");\n\t\t\t}\n\t\t\tout.println();\n\t\t}\n\t\t\n\t\t// Print the bottom walls for the last row of cells with '+' for corners\n\t\tout.print(\"+\");\n\t\tfor (Cell c: maze.mazeAsArray[maze.numberOfRows - 1]) {\n\t\t\tif (c.getSouthWall())\n\t\t\t\tout.print(\"-\");\n\t\t\telse\n\t\t\t\tout.print(\" \");\n\t\t\tout.print(\"+\");\n\t\t}\n\t\tout.println();\n\t}",
"private void printMaze(char[][] maze, int count){\n System.out.println(\"-------------------Movement-\"+count+\"--------------\");\n for (int i=0; i < maze.length; i++){\n for (int j=0; j < maze[0].length; j++) {\n System.out.print((char)maze[i][j]);\n System.out.print(\" \");\n }\n System.out.println();\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the products corresponding to the given identifier | Product getProduct(String identifier) throws ProductNotFoundException; | [
"public Product getProductByID(int id);",
"Product getProduct(long id);",
"Product get(final String id);",
"@RequestMapping(value = \"/products/{id}\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n public Product getProductById(@PathVariable(\"id\") String productId) {\n List<Product> products = productService.listAll();\n // List<Product> products = new ArrayList<>();\n // repository.findAll().forEach(products::add); //fun with Java 8\n int prodId = Integer.parseInt(productId);\n\n for (Product prd : products) {\n if (prd.getId() == prodId) {\n return prd;\n }\n }\n\n return null;\n }",
"public static Product lookUpProduct(int id) {\n Product returnedProductSearch = null;\n for (Product product : allProducts){\n if(product.getId() == id){\n returnedProductSearch = product;\n }\n }\n return returnedProductSearch;\n }",
"Product getProductById(Long id);",
"public Product readProduct(int id);",
"List<Item> queryItem(String productid);",
"Product getProductById(Integer productId);",
"public java.util.List<Product> findByProductId(long productId);",
"Collection<Product> findAllProductsByStoreId(Long id);",
"public Product getProductById(int id){\n return productDao.getProductById(id);\n }",
"sigma.software.leovegas.drugstore.api.protobuf.Proto.ProductDetailsItem getProducts(int index);",
"hipstershop.Demo.Product getProducts(int index);",
"public static synchronized List fetchProductList(){\n \t StringBuffer sql = new StringBuffer();\n \t sql.append(\"select identifier, name from cyberconnector.products;\");\n \t ResultSet rs = DataBaseOperation.query(sql.toString());\n \t List productlist = new ArrayList();\n \t try{\n \t\t while(rs.next()){\n \t\t\t String id = rs.getString(\"identifier\");\n \t\t\t String name = rs.getString(\"name\");\n \t\t String[] aproduct = {id, name};\n \t\t productlist.add(aproduct);\n \t }\n \t }catch(Exception e){\n \t\t throw new RuntimeException(e.getLocalizedMessage());\n \t }finally{\n \t\t DataBaseOperation.closeConnection();\n \t }\n \t return productlist;\n }",
"public Product getProductFromId(Integer prodId) throws BackendException;",
"private List<Product> extractProducts() {\r\n\t\t//load products from hidden fields\r\n\t\tif (this.getListProduct() != null){\r\n\t\t\tfor(String p : this.getListProduct()){\r\n\t\t\t\tProduct product = new Product();\r\n\t\t\t\tproduct.setId(Long.valueOf(p));\r\n\t\t\t\tthis.products.add(product);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn this.products;\r\n\t}",
"public ProductA getProduct(int id) {\n for (ProductA p : products){\n if (p.getProductId() == id) {\n return p;\n }\n }\n return null;\n }",
"private List<ProductView> fetchProducts(String developerId) {\n LOG.debug(\"Enter. developerId: {}.\", developerId);\n\n List<Product> products = productService.getByDeveloperId(developerId);\n\n List<ProductView> result = ProductMapper.toView(products);\n\n List<String> productIds = products.stream().map(Product::getId).collect(Collectors.toList());\n\n Map<String, List<ProductDataView>> productDataViews =\n restClient.getProductData(developerId, productIds);\n\n mergeProductData(result, productDataViews);\n\n cacheApplication.cacheProducts(developerId, result);\n\n LOG.trace(\"Product: {}.\", result);\n LOG.debug(\"Exit. product size: {}.\", result.size());\n\n return result;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Receives game window controller object | public void getGameWindow(GameWindowController gwc) {
gameWindowController = gwc;
} | [
"public MainWndController getController()\n {\n return controller;\n }",
"GameController makeGameController(LobbyController lobbyController);",
"public GameController getController() {\n return controller;\n }",
"void passController(GUIHandler controller){\n this.controller = controller;\n }",
"private Controller() {\n\t\tthis.gui = GUI.getInstance();\n\t\tthis.gui.setController(this);\n\t}",
"public static GameController getGameController() {\n\t\treturn controller;\n\t}",
"public static void init(long window, ApplicationController controller){\n //**********************************Set GLFW event callbacks*************************************\n //Processes events related to raw keyboard input. Does not respect keyboard layout\n glfwSetKeyCallback(window, keyCallback = new GLFWKeyCallback() {\n @Override\n public void invoke(long window, int key, int scancode, int action, int mods) {\n controller.pressKey(key, action);\n }\n });\n\n //Processes events related to OS processed typed input. Respects keyboard layout and characters created by multiple key presses,\n //Only the final character which would appear in a text document is processed. Tabs and newline characters are not considered\n glfwSetCharCallback(window, charCallback = new GLFWCharCallback() {\n @Override\n public void invoke(long window, int codepoint) {\n controller.type(codepoint);\n }\n });\n\n //Processes events related to scrolling, supports two dimensional scroll wheels, does not track position\n glfwSetScrollCallback(window, scrollCallback = new GLFWScrollCallback() {\n @Override\n public void invoke(long window, double xoffset, double yoffset) {\n controller.scroll(yoffset);\n }\n });\n\n //Processes events related to clicking any of the mouse buttons\n glfwSetMouseButtonCallback(window, mouseButtonCallback = new GLFWMouseButtonCallback() {\n @Override\n public void invoke(long window, int button, int action, int mods) {\n controller.click(window, button, action);\n }\n });\n\n //Processes events related to moving the mouse, xpos and ypos are the position in pixels in the window from the top left to the bottom right\n glfwSetCursorPosCallback(window, cursorPosCallback = new GLFWCursorPosCallback() {\n @Override\n public void invoke(long window, double xpos, double ypos) {\n controller.moveMouse(window, xpos, ypos);\n }\n });\n\n //Processes changes to the size of the window, either generated by function or by user interaction\n glfwSetFramebufferSizeCallback(window, framebufferSizeCallback = new GLFWFramebufferSizeCallback() {\n @Override\n public void invoke(long window, int width, int height) {\n //In windows if width or height are set to zero certain elements will be unable to be reset\n if (width > 0 && height > 0) {\n controller.setFrameBufferSize(width, height);\n }\n }\n });\n }",
"int getController() {\n \t return owner;\n }",
"public interface AuxWindowComponent extends RootPaneContainer {\n /**\n * \n * @return The AuxWindow model object associated with this UI Component\n */\n public AuxWindow getAuxWindow();\n \n // The methods below are concepts from other core.windows classses and were\n // added to this interface to provide easy access without having to cast\n \n /**\n * @return The desktop component embedded in this UI Component\n */\n public Component getDesktopComponent();\n \n /**\n * Set the desktop component embedded in this UI Component\n * \n * @param desktop \n */\n public void setDesktop(Component desktop);\n \n /**\n * @return The View Controller for this UI Component\n */\n public Controller getController();\n \n /**\n * Change the visibility of this UI Component\n * \n * @param isVisible \n */\n public void setVisible(boolean isVisible);\n \n /**\n * @return If this UI Component is visible\n */\n public boolean isVisible();\n \n /**\n * Add a Component listener to this UI Component\n * @param listener \n */\n public void addComponentListener(ComponentListener listener);\n \n /**\n * Remove a Component listener from this UI Component\n * @param listener \n */\n public void removeComponentListener(ComponentListener listener);\n \n /**\n * Set the bounds of this UI Component\n * @param bounds \n */\n public void setBounds(Rectangle bounds);\n}",
"public RenderWindow getWindow() { return window; }",
"public void newController(){\n if(game==null){\n newGame();\n }\n this.controller = new Controller(game);\n }",
"public interface Controller {\n\n\t/**\n\t * Get the View associated with the particular device mode\n\t * @return The associated View\n\t */\n\tpublic View getView();\n\t\n\t/**\n\t * Register the model to manipulate\n\t * @param model Model being manipulated\n\t */\n\tpublic void register(Model model);\n\t\n\t\n\tpublic void onLButtonPress(MouseEvent e, int buttonNum);\n\t\n\tpublic void onRButtonPress(MouseEvent e, int buttonNum);\n\t\n\tpublic void onOKButtonPress(MouseEvent e);\n\t\n\tpublic void onOnOffButtonPress(MouseEvent e);\n\t\n\tpublic void onMatrixButtonPress(MouseEvent e, int buttonColumn, int buttonRow);\n\t\n\t\n}",
"public interface Window {\n /**\n *\n * This will be called when immediately after the Screen initializes the Window, and will allow the developer to\n * preprocess any information that the window needs (i.e. hotkey dictionaries).\n */\n void onCreate();\n\n /**\n *\n * This will be called by the\n * @return non-null panel containing the window.\n */\n JPanel getPanel();\n}",
"public GameController getGameController() {\n return gameController;\n }",
"public abstract TargetWindowT getSideInputWindow(BoundedWindow mainWindow);",
"public interface GameWindowComponent {\n\t/**\n\t * Called by the GameWindow to render the component.\n\t * @param g The Graphics context of the GameWindow.\n\t * @param refreshArea Called when the component must refresh the specified area due to it possibly being overlapped.\n\t * @return The area within the GUI that was updated. If no graphical update took place, then the returned Area shall be empty.\n\t * This return value is crucial for the GameWindow to know which areas were updated so that the front buffer or display can reflect\n\t * the changes made on the back buffer. WARNING: If null is returned, then a NullPointerException will likely occur.\n\t */\n\tpublic Area render(Graphics2D g, Area refreshArea);\n\t/**\n\t * Adds common Java listeners to the GameWindow for the GameWindowComponent to handle its own defined input events.\n\t * This method will be called by the GameWindow when adding a GameWindowComponent to it.\n\t * @param parent The GameWindow to add the listeners to.\n\t */\n\tpublic void addListenersTo(GameWindow parent);\n\t/**\n\t * Removes common Java listeners from the GameWindow that were previously added for this GameWindowComponent.\n\t * This method will be called by the GameWindow when removing a GameWindowComponent from it.\n\t * @param parent The GameWindow object to remove the listeners from.\n\t */\n\tpublic void removeListenersFrom(GameWindow parent);\n}",
"private REKiTWindow myWindow() {\n return (REKiTWindow)mainWindow;\n }",
"private Window getWindow() {\r\n return root.getScene().getWindow();\r\n }",
"protected ScoreWindow myWindow() {\n return (ScoreWindow) mainWindow;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sends a request to Location Services to start sending location of the Android device periodically. | private void startPeriodicUpdates() {
mDeviceLocationClient.requestLocationUpdates(mDeviceLocationRequest, this);
} | [
"private void startPeriodicUpdates() {\n\t \t\tmLocationClient.requestLocationUpdates(mLocationRequest, this);\r\n\t \t \r\n\t \t }",
"private void requestLocation(){\n Log.d(TAG, \"requestLocation: -----------\");\n request = TencentLocationRequest.create()\n .setInterval(3*1000)\n .setAllowCache(true)\n .setRequestLevel(4);\n locationManager = TencentLocationManager.getInstance(this);\n error = locationManager.requestLocationUpdates(request, this);\n }",
"private void startLocationUpdates() {\n if (ActivityCompat.checkSelfPermission(mAppContext.getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(mAppContext.getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n\n LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient, mLocationRequest, mLocationListener);\n\n Logger.i(TAG, \"Periodic updates requested\");\n }",
"private void startLocationTracker() {\n AlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n PendingIntent pendingIntent = PendingIntent.getBroadcast(this, 0, intent, 0);\n alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, Calendar.getInstance().getTimeInMillis(),\n LocationProvider.FIVE_MINUTES, pendingIntent);\n }",
"public void StartLocationService() {\n GPSStartEvent event = new GPSStartEvent(200);\n bus.post(event);\n }",
"private void requestLocationUpdates(){\n locationRequest=new LocationRequest();\n locationRequest.setInterval(10000);\n locationRequest.setFastestInterval(5000);\n locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n\n int permission = ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION);\n if (permission == PackageManager.PERMISSION_GRANTED) {\n client.requestLocationUpdates(locationRequest,locationCallback, Looper.myLooper());\n }\n }",
"private void startLocationUpdates() {\r\n try {\r\n TimeUnit.SECONDS.sleep(3);\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n mFusedLocationClient.requestLocationUpdates(getLocationRequest(), mLocationCallback, Looper.getMainLooper());\r\n mMap.setMyLocationEnabled(true);\r\n }",
"protected void startBroadcastLocation() {\n AlarmManager manager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n int interval = 5000;\n\n manager.setInexactRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis(), interval, pendingIntent);\n Toast.makeText(this, \"Alarm Set\", Toast.LENGTH_SHORT).show();\n }",
"public void startGettingLocation() {\n\t\tLog.i(TAG, \"startGettingLocation\");\n\n\t\tif (mTimer != null) {\n\t\t\tmTimer.cancel();\n\t\t\tmTimer = null;\n\t\t}\n\n\t\tmTimer = new Timer();\n\t\tmTimer.schedule(new TimerTask() {\n\t\t\tpublic void run() {\n\t\t\t\tpostDealFailResult();\n\t\t\t}\n\t\t}, 50000);\n\n\t\tdoGetLocation();\n\t}",
"private void startLocationUpdates() {\n Log.d(LOG_TAG, \"startLocationUpdates() called\");\n fusedLocationClient.requestLocationUpdates(locationRequest, locationCallback, Looper.getMainLooper());\n }",
"public void startUpdateLocation()\n {\n if(!Utility.isMyServiceRunning(LocationUpdateService.class,this)){\n Intent startIntent = new Intent(this, LocationUpdateService.class);\n startIntent.setAction(AppConstants.ACTION.STARTFOREGROUND_ACTION);\n startService(startIntent);\n }\n }",
"private void togglePeriodicLocationUpdates() {\n\t\tif (!mRequestingLocationUpdates) {\n\n\t\t\tmRequestingLocationUpdates = true;\n\n\t\t\t// Starting the location updates\n\t\t\tstartLocationUpdates();\n\n\t\t\tLog.d(TAG, \"Periodic location updates started!\");\n\n\t\t} else {\n\n\t\t\tmRequestingLocationUpdates = false;\n\n\t\t\t// Stopping the location updates\n\t\t\tstopLocationUpdates();\n\n\t\t\tLog.d(TAG, \"Periodic location updates stopped!\");\n\t\t}\n\t}",
"private void SendBroadcastLocation() {\n Intent locationBroadcast = new Intent();\n locationBroadcast.putExtra(Constants.INTENT_LOCATION, mCurrentLocation);\n locationBroadcast.putExtra(Constants.INTENT_LAST_UPDATED_TIME, mLastUpdateTime);\n Log.d(Constants.SENDING_BROADCAST, Constants.SENDING_BROADCAST);\n locationBroadcast.setAction(CUSTOM_INTENT);\n sendBroadcast(locationBroadcast);\n }",
"private void requestLocationUpdates(){\n if(googleApiClient.isConnected()){\n try{\n setLocationRequest();\n LocationServices.FusedLocationApi.requestLocationUpdates(googleApiClient, locationRequest, this);\n } catch (SecurityException ex) {\n Log.e(TAG, \"requestLocationUpdates: no permissions\", ex);\n }\n }\n }",
"private void startLocationUpdates() {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mProviderClient.requestLocationUpdates(mLocationRequest,\n mLocationCallback, Looper.myLooper());\n updateUI_DB();\n }",
"private void updateLocation() {\n Location mLastLocation = LocationServices.FusedLocationApi\n .getLastLocation(googleApiClient);\n\n LocationManager locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n\n if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)){\n if (mLastLocation != null) {\n long currentTimeMillis = System.currentTimeMillis();\n Time nextUpdateTime = new Time();\n nextUpdateTime.set(currentTimeMillis);\n float batteryPct = 1;\n try {\n Intent batteryIntent = registerReceiver(null, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));\n //The javadoc specifies that the registerReceiver handles the null pointer\n // caused due to absence of a sticky intent to handle the request.\n //We handle it by returning the batteryPct as -1 to avoid exception from stopping the code\n int level = batteryIntent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);\n int scale = batteryIntent.getIntExtra(BatteryManager.EXTRA_SCALE, -1);\n batteryPct = level / (float)scale;\n\n } catch (NullPointerException e){\n //Although bad practice to have an empty catch block, it's needed in a service.\n }\n\n sendStatus(String.valueOf(mLastLocation.getLatitude()),\n String.valueOf(mLastLocation.getLongitude()),\n String.valueOf(currentTimeMillis/1000),\n String.valueOf(batteryPct),\n getUserId());\n }\n }else{\n Toast.makeText(this, getResources().getString(R.string.gps_off), Toast.LENGTH_SHORT).show();\n Intent gpsOptionsIntent = new Intent(\n android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS);\n gpsOptionsIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(gpsOptionsIntent);\n }\n }",
"private void startService() \n {\n Intent serviceIntent = new Intent(GetLocation.this, LocationService.class);\n Log.d(TAG, \"Start Location service\");\n startService(serviceIntent);\n }",
"@Override\n public void onLocationChanged(Location location)\n {\n\n gpsLocations.add(location);\n\n Intent locationIntent = new Intent(\"locationData\");\n\n double alt = location.getAltitude();\n double latitude = location.getLatitude();\n double longitude = location.getLongitude();\n\n Calendar calendar = Calendar.getInstance();\n long now = calendar.getTimeInMillis();\n calendar.set(Calendar.HOUR_OF_DAY, 0);\n calendar.set(Calendar.MINUTE, 0);\n calendar.set(Calendar.SECOND, 0);\n calendar.set(Calendar.MILLISECOND, 0);\n\n long passed = now - calendar.getTimeInMillis();\n long secondsSinceMidnight = passed / 1000;\n\n // Only calculate speed if there's more than two markers to calculate speed from\n double speed = 0;\n if(mapPosistions.size() >= 2){\n speed = calcSpeedMetresPerSecond();\n }\n\n // the reason I store so many values in this object is to avoid computation needing to\n // take place on the activities end\n GoogleMapPos currentLocation = new GoogleMapPos(_id, alt, latitude, longitude, speed, secondsSinceMidnight);\n\n mapPosistions.add(currentLocation);\n\n // broadcast to other components\n locationIntent.putExtra(\"Location\", currentLocation);\n\n locationIntent.setAction(LocationManagementService.RECEIVE_LOCATION);\n serviceContext.sendBroadcast(locationIntent);\n _id++;\n }",
"private void enableRequestLocationUpdate() {\n mLocationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,\n 1000 * 10, 10, mLocationListener);\n mLocationManager.requestLocationUpdates(\n LocationManager.NETWORK_PROVIDER, 1000 * 10, 10,\n mLocationListener);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GENFIRST:event_btnclearActionPerformed TODO add your handling code here: | private void btnclearActionPerformed(java.awt.event.ActionEvent evt) {
try
{
clearForm();
}
catch(Exception e)
{
e.printStackTrace();
}
} | [
"private void btnClearActionPerformed(java.awt.event.ActionEvent evt) {\n clear();\n }",
"private void btn_clearActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_clearActionPerformed\n clearValues();\n }",
"private void btnClearActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnClearActionPerformed\n clearFields();\n }",
"private void clear_btn_regisActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_clear_btn_regisActionPerformed\n clear();\n }",
"private void clearEditActionPerformed(java.awt.event.ActionEvent evt) {\n \n }",
"private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton8ActionPerformed\n clearText();\n }",
"public void setClearButton (ActionEvent event) {\n textBox.clear();\n }",
"private void clearButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_clearButtonActionPerformed\n textArea.setText(null);\n }",
"private void jButton_ClearActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_ClearActionPerformed\n //Clear all user entered inputs from the grid.\n myTable.clear(START_EDITABLE_ROW, END_EDITABLE_ROW, START_EDITABLE_COL, END_EDITABLE_COL);\n }",
"private void btn_clearAllActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_clearAllActionPerformed\n \n //Code to remove all selected items \n txt_inDate.setDate(null);\n txt_iniId.setText(\"\");\n cbo_iniName.setSelectedItem(0);\n txt_inQty.setText(\"\");\n }",
"private void btn_clearitemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_clearitemActionPerformed\n //Code to remove only item detailsdsfsdf\n txt_iniId.setText(\"\");\n cbo_iniName.setSelectedItem(0);\n txt_inQty.setText(\"\");\n }",
"public void pressClearButton(ActionEvent event) {\n titleTextBox.clear();\n descriptionTextBox.clear();\n locationTextBox.clear();\n typeTextBox.clear();\n startTimeTextBox.clear();\n endTimeTextBox.clear();\n contactComboBox.getSelectionModel().clearSelection();\n customerComboBox.getSelectionModel().clearSelection();\n userComboBox.getSelectionModel().clearSelection();\n apptDatePicker.getEditor().clear();\n\n }",
"private void btClearActionPerformed(java.awt.event.ActionEvent evt) {\n if(tbphieuphat.isEnabled())\n txMaPM.setText(\"\");\n /*if(EditOrSearch==0){\n tf.setText(\"\");\n txSoLuongMax.setText(\"\");\n txDonGiaMax.setText(\"\");\n }*/\n txMaPM.setText(\"\");\n txTongTien.setText(\"\");\n }",
"private void btnClearAllActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnClearAllActionPerformed\n Calculations.reset();\n txtDisplay.setText(\"0.0\");\n }",
"private void btn_LimpiarActionPerformed(java.awt.event.ActionEvent evt) {\n clean();\n }",
"private void clearBtnMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clearBtnMousePressed\n clearBtn.setBackground(Color.decode(\"#1e5837\"));\n }",
"public void clickClearButton() {\r\n\t\tthis.btnClSearch.click();\r\n\t}",
"private void clearJMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_clearJMenuItemActionPerformed\n //reset arrayLists\n namesArray = new ArrayList<>();\n tempArray = new ArrayList<>();\n edgeArray = new ArrayList<>();\n graph = null;\n \n loadJList();\n timePassed = 0;\n //reset displayed values\n \n pathJTextArea.setText(\"\");\n costJTextField.setText(\"\");\n timeJTextField.setText(\"\");\n bruteForceJRadioButton.setSelected(true);\n checkEnabled();\n }",
"private void btnResetActionPerformed(java.awt.event.ActionEvent evt) {\n reset(); \n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a single vendor user based on id | @GetMapping("/get/vendor/{id}")
public ResponseEntity getSingleUserVendor(@PathVariable(value="id") Integer id, @RequestHeader(value="User-Data") String userData) {if (!hasAccess(userData))
return buildResponse(new ApiError(HttpStatus.FORBIDDEN, "You do not have access.", "You do not have the proper clearance."));
ArrayList<Vendor> vendors = userService.getSingleUserVendor(id);
// no users found
if (vendors == null || vendors.isEmpty()) {
return new ResponseEntity<>(vendors, HttpStatus.NOT_FOUND);
}
return new ResponseEntity<>(vendors, HttpStatus.OK);
} | [
"PlatformUser getPlatformUser(UUID id);",
"public static Vendor getVendorByCustomId(User p_userQuerying, String id)\n throws EnvoyServletException\n {\n try\n {\n return ServerProxy.getVendorManagement().getVendorByCustomId(\n p_userQuerying, id);\n }\n catch (Exception e)\n {\n throw new EnvoyServletException(e);\n }\n }",
"User selectById(String uid);",
"public User get(String id);",
"SysUserinfo selectByPrimaryKey(String id);",
"AmigoUser getById(Long id);",
"@Override\n public TechGalleryUser getUser(final Long id) throws NotFoundException {\n TechGalleryUser userEntity = userDao.findById(id);\n // if user is null, return a not found exception\n if (userEntity == null) {\n throw new NotFoundException(i18n.t(\"No user was found.\"));\n } else {\n return userEntity;\n }\n }",
"public User getUser(Long id) {\n LOG.info(\"Retrieving user.\", id);\n return userRepository.findOne(id);\n }",
"public static Vendor getVendor(long id) throws EnvoyServletException\n {\n try\n {\n return ServerProxy.getVendorManagement().getVendorById(id);\n }\n catch (Exception e)\n {\n throw new EnvoyServletException(e);\n }\n }",
"User getRegisteredUserById(Long id) {\n log.info(\"Getting user by id {}\", id);\n User user = userRepository.findById(id);\n if (user == null)\n throw new ItemNotFoundException(\"User is not found!\");\n return user;\n }",
"private User getUser(int id) {\n\n for (User user : this.users\n ) {\n if (user.getUserNumber() == id) return user;\n }\n return null;\n }",
"UserEntity getExistingUser(Long userId) throws UserException;",
"@Transactional(readOnly = true)\n public Optional<ClientUser> findOne(Long id) {\n log.debug(\"Request to get ClientUser : {}\", id);\n return clientUserRepository.findById(id);\n }",
"ChannelUser selectByPrimaryKey(Integer id);",
"User find(long id);",
"public User findUserFromId(String userId){\r\n return null;\r\n }",
"public User getUser(long id) {\n\t\tUser user = null;\n\t\t\n\t\tString queryString = \n\t\t\t \"PREFIX sweb: <\" + Config.NS + \"> \" +\n\t\t\t \"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> \" +\n\t\t\t \"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \" +\n\t\t\t \"PREFIX foaf: <http://xmlns.com/foaf/0.1/>\" +\n\t\t\t \"select * \" +\n\t\t\t \"where { \" +\n\t\t\t \t\"?user sweb:id \" + id + \".\" +\n\t\t\t \"} \\n \";\n\n\t Query query = QueryFactory.create(queryString);\n\t \n\t QueryExecution qe = QueryExecutionFactory.create(query, this.model);\n\t ResultSet results = qe.execSelect();\n\t \n\t while(results.hasNext()) {\n\t \tQuerySolution solution = results.nextSolution() ;\n\t Resource currentResource = solution.getResource(\"user\");\n\n\t user = this.buildUserFromResource(currentResource);\n\t \n\t user.setTweets(this.getTweetsByUserId(id));\n\t user.setVisited(this.getVenuesVisitedByUserId(id));\n\t user.setInContact(this.getInContactForUserId(id));\n\t }\n\t \n\t return user;\n\t}",
"PeerUser selectByPrimaryKey(Integer id);",
"@GetMapping(\"/p-v-app-users/{id}\")\n @Timed\n public ResponseEntity<PVAppUserDTO> getPVAppUser(@PathVariable String id) {\n log.debug(\"REST request to get PVAppUser : {}\", id);\n PVAppUser pVAppUser = pVAppUserRepository.findOne(id);\n PVAppUserDTO pVAppUserDTO = pVAppUserMapper.toDto(pVAppUser);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(pVAppUserDTO));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the declared access rights for the specified Node for the given principalId. | AccessRights getDeclaredAccessRightsForPrincipal(Node node, String principalId) throws InternalException; | [
"AccessRights getEffectiveAccessRightsForPrincipal(Node node, String principalId) throws InternalException;",
"Map<Principal, AccessRights> getDeclaredAccessRights(Node node) throws InternalException;",
"AccessRights getDeclaredAccessRightsForPrincipal(Session session, String absPath, String principalId) throws InternalException;",
"Map<Principal, AccessRights> getEffectiveAccessRights(Node node) throws InternalException;",
"AccessRights getEffectiveAccessRightsForPrincipal(Session session, String absPath, String principalId) throws InternalException;",
"Map<Principal, AccessRights> getDeclaredAccessRights(Session session, String absPath) throws InternalException;",
"public List<RoleAccessPermission> getMenuAccessPermissions(long roleId) {\n\t\ttry {\n\t\t\tString queryString = \"FROM RoleAccessPermission WHERE roleId = \" + roleId + \" AND subMenuId = 0\";\n\t\t\tQuery query = sessionFactory.getCurrentSession().createQuery(queryString);\n\t\t\treturn query.list();\n\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Exception in getMenuAccessPermissions:\" + ExceptionUtils.getStackTrace(e));\n\t\t}\n\n\t\treturn null;\n\t}",
"Node getPrincipal();",
"Map<Principal, AccessRights> getEffectiveAccessRights(Session session, String absPath) throws InternalException;",
"public NodeList getManagedAuthorities(Element regNode) {\n log.debug(\"start getManagedAuthorityID\");\n NodeList nl = regNode.getElementsByTagNameNS(\"*\",\"ManagedAuthority\");\n if(nl.getLength() == 0) {\n nl = regNode.getElementsByTagNameNS(\"*\",\"managedAuthority\");\n }\n return nl;\n }",
"boolean canReadAccessControl(Node node);",
"Set<Long> getAccessibleProjectIds(Set<Long> principalIds,\r\n\t\t\tACCESS_TYPE read);",
"Collection<String> getPermissions(IRI webId);",
"public List<RoleAccessPermission> getSubMenuAccessPermissions(long roleId) {\n\t\ttry {\n\t\t\tString queryString = \"FROM RoleAccessPermission WHERE roleId = \" + roleId + \" AND subMenuId > 0\";\n\t\t\tQuery query = sessionFactory.getCurrentSession().createQuery(queryString);\n\t\t\treturn query.list();\n\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Exception in getSubMenuAccessPermissions:\" + ExceptionUtils.getStackTrace(e));\n\t\t}\n\t\treturn null;\n\t}",
"private boolean hasPermission(Principal principal, Long id) {\n return loggedInUser(principal).getId().equals(id) || loggedInUser(principal).isAdmin();\n }",
"private List<Principal> principalOf(JsonNode principalNodes) {\n List<Principal> principals = new LinkedList<Principal>();\n\n if (principalNodes.asText().equals(\"*\")) {\n principals.add(Principal.All);\n return principals;\n }\n\n Iterator<Map.Entry<String, JsonNode>> mapOfPrincipals = principalNodes\n .fields();\n String schema;\n JsonNode principalNode;\n Entry<String, JsonNode> principal;\n Iterator<JsonNode> elements;\n while (mapOfPrincipals.hasNext()) {\n principal = mapOfPrincipals.next();\n schema = principal.getKey();\n principalNode = principal.getValue();\n\n if (principalNode.isArray()) {\n elements = principalNode.elements();\n while (elements.hasNext()) {\n principals.add(createPrincipal(schema, elements.next()));\n }\n } else {\n principals.add(createPrincipal(schema, principalNode));\n }\n }\n\n return principals;\n }",
"SerializablePrivilege[] getSupportedPrivileges(Node node) throws InternalException;",
"Accessions getAccessions();",
"public IPermission[] getPermissionsForPrincipal (\n IAuthorizationPrincipal principal,\n String owner,\n String activity,\n String target)\n throws AuthorizationException;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if Library Parse run Subscriber return book correctly throws a parse exception if an invalid bookId or catches an InstantiationException if a new subscriber cannot be created. | public static boolean testLibraryParseRunSubscriberReturnBookCommand() {
boolean test = false;// boolean test set to false because must throw a ParseException to be
// true
try {
// creates an new ExceptionalLibrary and a new Subscriber
ExceptionalLibrary lib = new ExceptionalLibrary("Madison", "Gus", "abc");
Subscriber scrib = new Subscriber("Gus", 1111, "Madison", "765432890");
lib.addBook("Python", "Gary"); // adds a new book for bookID to be one
String[] commands = new String[3]; // commands to be passed into Library parse run
// Subscriber methods
commands[1] = "a"; // invalid string bookId to be parsed by parseBookId
lib.parseRunSubscriberCheckoutBookCommand(commands, scrib); // adds a book to check out
// book so it can be
// returned
lib.parseRunSubscriberReturnBookCommand(commands, scrib); // attempts to remove a book
} catch (ParseException e) {
test = true; // test passes if catches a parseException
System.out.println("Caught parse exception: Test passed");
} catch (InstantiationException e) {
test = false; // if subscriber can't be created catches InstantiationException
System.out.println("Error: couldnt create new Subscriber");
}
return test;
} | [
"public static boolean testparseRunSubscriberCheckoutBookCommand() {\n boolean test = false; // test set to false because must throw a ParseException to be\n // true\n try {\n // creates a new ExceptionalLibary and subscriber to be able to test method\n ExceptionalLibrary lib = new ExceptionalLibrary(\"Madison\", \"gus\", \"abc\");\n Subscriber scrib = new Subscriber(\"Gus\", 1111, \"Madison\", \"765432890\");\n String[] commands = new String[2]; // checks number of elements of the commands\n commands[1] = \"wordsnotBookid\"; // invalid bookID\n lib.parseRunSubscriberCheckoutBookCommand(commands, scrib); // checks if throws a\n // parseException with\n // invalid bookID\n } catch (ParseException e) {\n test = true; // test is true if catches a parseException from invalid bookID\n System.out.println(\"Caught parseException: test passed\");\n } catch (InstantiationException e) {\n test = false; // test fails if caught InstantiationException because it couldn't create\n // a new subscriber\n System.out.println(\"Caught InstantiationExceptioon, couldnt create new subscriber\");\n }\n return test;\n }",
"public static boolean testLibraryParseRunSubscriberReturnBookCommand() {\n // Creates a new instance of library\n ExceptionalLibrary madisonLibrary = new ExceptionalLibrary(\"Madison, WI\", \"april\", \"abc\");\n\n\n // Invalid input\n String[] commands = {};\n\n\n try {\n Subscriber subscriber = new Subscriber(\"Jake\", 1234, \"CloverHill\", \"6082123434\");\n madisonLibrary.parseRunSubscriberReturnBookCommand(commands, subscriber);\n\n } catch (ParseException e) {\n // Should catch the exception\n } catch (InstantiationException e) {\n return false;\n }\n\n // Invalid input\n String[] commands1 = {\"3\", \"a\"};\n\n\n try {\n Subscriber subscriber = new Subscriber(\"Jake\", 1234, \"CloverHill\", \"6082123434\");\n madisonLibrary.parseRunSubscriberReturnBookCommand(commands1, subscriber);\n\n } catch (ParseException e) {\n // Should catch the exception\n } catch (InstantiationException e) {\n return false;\n }\n\n // If Passes all tests then it returns true\n return true;\n }",
"public static boolean testparseBookId() {\n boolean test = false; // test set to false because must throw a ParseException to be\n // true\n try {\n // creates a new ExceptionLibrary to check if parseException thrown from parse bookId\n ExceptionalLibrary lib = new ExceptionalLibrary(\"Madison\", \"Gus\", \"abc\");\n String bookId = \"1s\"; // invalid bookId that should throw parseException\n int errorOffset = 1;\n lib.parseBookId(bookId, errorOffset);\n } catch (ParseException e) {\n test = true; // test passes if catches a parse Exception from invalid bookId\n System.out.println(\"Caught parse exception: test passed\");\n }\n return test;\n }",
"public static boolean testParseBookID() {\n // Creates a new instance of library\n ExceptionalLibrary madisonLibrary = new ExceptionalLibrary(\"Madison, WI\", \"april\", \"abc\");\n\n // Tests a Valid Example\n String s = \"5\";\n int errorOffset = 1;\n\n try {\n madisonLibrary.parseBookId(s, errorOffset);\n\n } catch (ParseException e) {\n return false;\n }\n\n // Tests an invalid Example\n s = \"smf\";\n\n try {\n madisonLibrary.parsePinCode(s, errorOffset);\n\n } catch (ParseException e) {\n // Supposed to catch the exception\n }\n\n // If Passes all tests then it returns true\n return true;\n }",
"@Override\n public void checkValidParameters(Book book) throws Exception {\n if (book.getPrice() <= 0) {\n throw new Exception(PRICE_EXCEPTION);\n }\n\n if (book.getCount() < 0) {\n throw new Exception(COUNT_EXCEPTION);\n }\n\n if (book.getTitle().equals(\"\")) {\n throw new Exception(TITLE_EXCEPTION);\n }\n\n if (book.getAuthor().equals(\"\")) {\n throw new Exception(AUTHOR_EXCEPTION);\n }\n\n if (book.getEdition().equals(\"\")) {\n throw new Exception(EDITION_EXCEPTION);\n }\n\n if (book.getPublisher().equals(\"\")) {\n throw new Exception(PUBLISHER_EXCEPTION);\n }\n\n if (!isNote(book.getNote())) {\n throw new Exception(NOTE_EXCEPTION);\n }\n\n if (book.getYear() > Calendar.getInstance().get(Calendar.YEAR)) {\n throw new Exception(YEAR_EXCEPTION);\n }\n }",
"@Test(expected = IllegalArgumentException.class)\n\tpublic void testBookWithEmptyUserID() throws Exception {\n\t\tbookingManagement.book(\"\", Arrays.asList(room1.getId()), validStartDate, validEndDate);\n\t}",
"@Test\n\tpublic void testBook() throws Exception {\n\t\tString createdReservationID = bookingManagement.book(USER_ID, Arrays.asList(room1.getId()),\n\t\t\t\tvalidStartDate, validEndDate);\n\t\t// a reservation must be returned\n\t\tassertNotNull(\"Reservation id is null\", createdReservationID);\n\t\tassertFalse(\"Reservation id is emtpy\", createdReservationID.isEmpty());\n\t\t// check if returned reservation is correct\n\t\tReservation createdReservation = bookingManagement.getReservation(createdReservationID);\n\t\tassertNotNull(\"Reservation of returned id was not found\", createdReservation);\n\n\t\tassertEquals(USER_ID, createdReservation.getBookingUserId());\n\n\t\tassertEquals(1, createdReservation.getBookedFacilityIds().size());\n\t\tassertTrue(createdReservation.getBookedFacilityIds().contains(room1.getId()));\n\t\tassertEquals(validStartDate, createdReservation.getStartTime());\n\t\tassertEquals(validEndDate, createdReservation.getEndTime());\n\t}",
"public MediaServiceResult validateBook(Book toCheck) {\n if (\n toCheck.getAuthor() == null \n || toCheck.getAuthor().length() == 0 \n || toCheck.getTitle() == null \n || toCheck.getTitle().length() == 0 \n || toCheck.getIsbn() == null \n || toCheck.getIsbn().length() == 0\n ) {\n return MediaServiceResult.MissingField;\n }\n \n //CHECKSTYLE:OFF\n final boolean isIsbnValid =\n toCheck.getIsbn().length() == 17 //13 digits + 4 dashes\n && toCheck.getIsbn().matches(\"([0-9]+-){4}[0-9]\")\n && isChecksumValid(toCheck.getIsbn().replaceAll(\"-\", \"\"));\n //CHECKSTYLE:ON\n\n if (!isIsbnValid) {\n return MediaServiceResult.IsbnInvalid;\n }\n \n return MediaServiceResult.Ok;\n }",
"@Test(expected = IllegalArgumentException.class)\n\tpublic void testBookWithNullUserID() throws Exception {\n\t\tbookingManagement.book(null, Arrays.asList(room1.getId()), validStartDate, validEndDate);\n\t}",
"public static BBBEPubBook loadBook(Context context, Book book) {\n String filePath = book.file_path;\n char[] encryptionKey = null;\n\n if (book.enc_key != null) {\n encryptionKey = EncryptionUtil.decryptEncryptionKey(book.enc_key);\n }\n\n // Load the ePub book\n BBBEPubBook epub = null;\n try {\n epub = BBBEPubFactory.getInstance().createFromURL(context, filePath, encryptionKey);\n } catch (BBBEPubException e) {\n LogUtils.e(TAG, e.getMessage(), e);\n\n // See Bug ALA-1810\n // This is potentially a serious problem that we don't currently understand why it happens so frequently.\n // So we log any information that might be useful to help us resolve the problem in the future.\n StringBuilder debugInfo = new StringBuilder();\n debugInfo.append(\"loadBook (ISBN=\" + book.isbn + \") FAILED: \" + filePath);\n File file = new File(filePath);\n\n if (file != null) {\n if (file.exists()) {\n debugInfo.append(\" FILE EXISTS size = \" + file.getTotalSpace() + \" can read = \" + file.canRead());\n } else {\n debugInfo.append(\" ***FILE DOES NOT EXIST***\");\n\n File parentFile = file.getParentFile();\n // Check if the parent directory exists\n if (parentFile != null && parentFile.exists()) {\n debugInfo.append(\" PARENT DIRECTORY DOES EXIST\");\n } else {\n debugInfo.append(\" ***PARENT DOES NOT EXIST***\");\n\n // Check if the books directory exists\n File externalFilesDir = context.getExternalFilesDir(null);\n\n if (externalFilesDir != null && externalFilesDir.exists()) {\n debugInfo.append(\" EXTERNAL FILES DIR DOES EXIST and can read = \" + externalFilesDir.canRead());\n } else {\n debugInfo.append(\" ***EXTERNAL FILES DIR DOES NOT EXIST***\");\n }\n }\n }\n }\n\n Crashlytics.log(\"Invalid epub :\"+ debugInfo.toString());\n Crashlytics.logException(e);\n }\n return epub;\n }",
"boolean isBookAvailable(int bookId) {\n\t\t\n\t\t// checks if the books id is valid\n\t\tif (!this.isBookIdValid(bookId)) {\n\t\t\treturn false; \n\t\t}\n\t\t\n\t\t// checks if the book is not taken \n\t\tif(this.bookShelf[bookId].currentBorrowerId == -1) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// the book is taken \n\t\treturn false;\n\t}",
"private boolean insertBook(Book book, boolean replaceExisting) {\n \tassert book != null;\n \tassert _xsdFilePath != null && !_xsdFilePath.isEmpty();\n \tassert _libFilePath != null && !_libFilePath.isEmpty();\n \tassert _schemaFactory != null;\n \tassert _loggerHelper != null;\n \t\n \tString xmlToValidate = libraryNodeStringFromBook(book);\n \tassert xmlToValidate != null && !xmlToValidate.isEmpty();\n \t\n \tboolean result = validateXmlStringWithSchema(xmlToValidate, _xsdFilePath);\n \t_loggerHelper.logInfo(result ? \"Insertion validation passed\" : \"Insertion validation failed\");\n \t\n \tif(result) {\n \t\ttry {\n \t\t\tFile f = new File(_libFilePath);\n \t\tFileInputStream fis = new FileInputStream(f);\n \t\tbyte[] ba = new byte[(int)f.length()]; \n \t\tfis.read(ba); \t\n \t\tfis.close();\n \t\t\n \t\tVTDGen vg = new VTDGen(); \n \t\tvg.setDoc(ba); \n \t\tvg.parse(false); \n \t\tVTDNav vn = vg.getNav(); \n \t\t\n \t\tXMLModifier xm = new XMLModifier();\n \t\txm.bind(vn);\n \t\t\n \t\t// Check if book already exists\n \t\tvn.toElement(VTDNav.ROOT);\n \t\tString isbn = book.getAttributes().getISBN();\n \t\tif (vn.toElement(VTDNav.FIRST_CHILD, \"Book\")) {\n \t\tdo {\n \t\t\tint i = vn.getAttrVal(\"ISBN\");\n \t\t\tif (i!=-1 && vn.toString(i).equals(isbn)) {\n \t\t\t\t_loggerHelper.logWarning(\"Book with given ISBN \\\"\" + isbn + \"\\\" arelady exists\");\n \t\t\t\t\n \t\t\t\t// TODO: Get rid of empty tabs after replacing\n \t\t\t\tif (replaceExisting) {\n \t\t\t\t\t_loggerHelper.logWarning(\"Book with ISBN \\\"\" + isbn + \"\\\" will be replaced\");\n \t\t\t\t\txm.remove();\n \t\t\t\t} else {\n \t\t\t\t\treturn false;\n \t\t\t\t}\n \t\t\t}\n \t\t} while (vn.toElement(VTDNav.NEXT_SIBLING, \"Book\"));\n \t}\n \t\t\n \t\tvn.toElement(VTDNav.ROOT);\n \t\t// TODO: Replace hard-coded nesting level number\n \t\txm.insertAfterHead(identXmlStringWithTabs(\"\\n\" + book.toXML(), 1)); \n \t\t\n \t\t// Insert book authors if they don't exists\n \t\tfor (Author author : book.getAuthorList()) {\n \t\t\tboolean exists = false;\n \t\t\tString authorId = author.getIdent();\n \t\t\tvn.toElement(VTDNav.ROOT);\n \t\t\tif (vn.toElement(VTDNav.FIRST_CHILD, \"Author\")) {\n \t\tdo {\n \t\t\tint i = vn.getAttrVal(\"ident\");\n \t\t\tif (i!=-1 && vn.toString(i).equals(authorId)) {\n \t\t\t\t// If author with given ident already exists, skip\n \t\t\t\t// Note: We are assuming idents are unique for given first-last-name pair\n \t\t\t\texists = true;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t} while (vn.toElement(VTDNav.NEXT_SIBLING, \"Author\"));\n \t}\n \t\t\t\n \t\t\tif (!exists) {\n \t\t\t\tvn.toElement(VTDNav.ROOT);\n \t\tvn.toElement(VTDNav.LAST_CHILD, \"Book\");\n \t\txm.insertAfterElement(identXmlStringWithTabs(\"\\n\" + author.toXML(), 1)); \n \t\t\t}\n \t\t}\n \t\t\n \t\txm.output(new FileOutputStream(_libFilePath));\n \t\t \n \t\treturn true;\n \t\t\n \t} catch (Exception e) { \n \t\t_loggerHelper.logError(e.getMessage());\n return false;\n \t}\n \t} else {\n \t\treturn false;\n \t}\n }",
"BookDoesNotExistException() {\n\t\tSystem.out.println(\"This book does not exist in the records.\");\n\t}",
"@Test\n\tpublic void insertbookTest() throws ParseException, SQLException {\n\n\t\ttry {\n\t\t\tbookService.save(book);\n\t\t\tBook insertedBook= bookService.findBookByISBN(book.getISBN());\n\t\t\tassertEquals(book.getAuthor(), insertedBook.getAuthor());\n\t\t\tassertEquals(book.getTitle(), insertedBook.getTitle());\n \n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (JAXBException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\n\t}",
"@Test\n public void testAvailableBookNotBought() {\n Library library = makeLibrary();\n Book book = new Book(\"A New World Power\", Arrays.asList(\"Steve Hawks\", \"Thomas King\"), 2000);\n\n assertTrue(\"book should not be found in library\", !library.isAvailable(new BookCopy(book)));\n }",
"public static boolean testLibraryParseRunLibrarianCheckoutBookCommand() {\n boolean test = false; // boolean test set to false because must throw a ParseException to be\n // true\n try {\n // creates a new Exceptional Library\n ExceptionalLibrary lib = new ExceptionalLibrary(\"Madison\", \"Gus\", \"abc\");\n String[] commands = new String[3]; // commands to pass throughout the parameters\n commands[1] = \"201900000987761\"; // invalid cardBarCode\n commands[2] = \"1\"; // bookId to correctly check if it parses the string\n lib.parseRunLibrarianCheckoutBookCommand(commands);\n } catch (ParseException e) {\n test = true; // if ParseException caught test is true and passed\n System.out.println(\"Caught parse exception: test passed\");\n }\n return test;\n }",
"@Test(expected = IllegalArgumentException.class)\n\tpublic void testBookWithNullStart() throws Exception {\n\t\tbookingManagement.book(USER_ID, Arrays.asList(room1.getId()), null, validEndDate);\n\t}",
"private boolean addBook(final Book book,final User user) throws BookLendingException {\n\t\tlogger.debug(\"Adding a new book \" + book.getBookName());\n\t\ttry {\n\t\t\tif (null != user && null != book) {\n\t\t\t\treturn insertBookDetails(book, user);\n\t\t\t} else {\n\t\t\t\tlogger.error(\"user or book is null \");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tlogger.error(\"error inserting the document \" + ex.getMessage());\n\t\t\tthrow new BookLendingException(\"1008\", \"Error inserting the book\");\n\t\t}\n\t}",
"@Test(expected = FacilityNotFoundException.class)\n\tpublic void testBookFacilityIDDoesNotExist() throws Exception {\n\t\tbookingManagement\n\t\t\t\t.book(USER_ID, Arrays.asList(\"some id that does not exist\"), validStartDate, validEndDate);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of verificaPossibilidade method, of class UsucapiaoJudicialFamiliar. | @Test
public void testVerificaPossibilidade0() {
String result = usucapiao.verificaRequisitos();
assertEquals("false", result);
} | [
"@Test\r\n public void testVerificaPossibilidade8() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n usucapiao.setPosseIninterrupta(true);\r\n usucapiao.setBemComumCasal(true);\r\n usucapiao.setCompanheiroAbandonou(true);\r\n usucapiao.setRegistroDeOutroImovel(true);\r\n usucapiao.setTamanhoTerreno(250);\r\n usucapiao.setPrazo(1);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"possivel-depois\", result);\r\n }",
"@Test\r\n public void testVerificaPossibilidade2() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }",
"@Test\r\n public void testVerificaPossibilidade7() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n usucapiao.setPosseIninterrupta(true);\r\n usucapiao.setBemComumCasal(true);\r\n usucapiao.setCompanheiroAbandonou(true);\r\n usucapiao.setRegistroDeOutroImovel(true);\r\n usucapiao.setTamanhoTerreno(251);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }",
"@Test\r\n public void testVerificaPossibilidade9() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n usucapiao.setPosseIninterrupta(true);\r\n usucapiao.setBemComumCasal(true);\r\n usucapiao.setCompanheiroAbandonou(true);\r\n usucapiao.setRegistroDeOutroImovel(true);\r\n usucapiao.setTamanhoTerreno(250);\r\n usucapiao.setPrazo(2);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"possivel-agora\", result);\r\n }",
"@Test\r\n public void testVerificaPossibilidade4() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n usucapiao.setPosseIninterrupta(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }",
"@Test\r\n\tpublic void CT03ConsultarLivroComRaNulo() {\r\n\t\ttry {\r\n\t\t\t// cenario\r\n\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\tUsuario usuario;\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comRA_nulo();\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tassertEquals(\"RA inválido\", e.getMessage());\r\n\t\t}\r\n\t}",
"@Test\r\n\tpublic void testDevePermitirCadastraUsuario() throws Exception {\r\n\t\tcontrole.cadastraUsuario(\"bruno1\", \"1\", \"bruno1\", \"projetada I\", \"bruno1@gmail.com\");\r\n\t\t\r\n\t}",
"public void testADroitsUtilisateur() {\n System.out.println(\"aDroitsUtilisateur\");\n String pnomUtilisateur = \"\";\n String pnomDroits = \"\";\n Boolean expResult = null;\n Boolean result = Utilisateur.aDroitsUtilisateur(pnomUtilisateur, pnomDroits);\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 }",
"@Test\n public void testVerifyNome() {\n System.out.println(\"verifyNome\");\n boolean expResult = true;\n boolean result = uv.verifyNome(u);\n assertEquals(expResult, result);\n }",
"@Then(\"^o usuario se loga no aplicativo cetelem$\")\n\tpublic void verificaSeUsuarioLogadoComSucesso() throws Throwable {\n\t\tAssert.assertTrue(login.validaSeLoginSucesso());\n\n\t}",
"@Test\r\n\tpublic void testPujarMenor() throws OperacionNoPermitidaException {\r\n\t\tassertEquals(false, _pr2.pujar(9f,null));\r\n\t}",
"@Test\n\tpublic void TC090PUI_11(){\n\t\t\n\n\t\tresult.addLog(\"ID : TC090PUI_11 : Verify that the site privileges table in 090P User Info page is read only\");\n\t\t\n\n\t\t/*\n\t\tPre-condition: partner user has \"Add and Manage Users\" rights.\n\n\t\t\t1. Navigate to DTS portal\n\t\t\t2. Log into DTS portal as a partner user successfully\n\t\t\t3. Click \"Users\" tab\n\t\t\t4. Select a user from users table\n\t\t\t5. Verify that 090P User Info page is displayed\n\t\t\t6. Try to edit the user's site privileges table\n\t\t*/\n\t\t\n\n\t\t// 3. Click \"Users\" tab\n\t\thome.click(Xpath.LINK_PARTNER_USER);\n\t\tArrayList<PartnerUserInfo> users = home.getPartnerUsers(PartnerListUser.TBODY);\n\t\t// 4. Select a user from users table\n\t\tresult = home.selectRowAt(PartnerListUser.TBODY, 0, PartnerUserMgmt.EDIT);\n\t\tAssert.assertEquals(\"Pass\", result.getResult());\n\t\t// 5. Verify that 090P User Info page is displayed \n\t\tresult = home.checkPartnerUserInfo(users.get(0), PartnerUserMgmt.getElementsInfo());\n\t\tAssert.assertEquals(\"Pass\", result.getResult());\n\t\t/*\n\t\t The user's site privileges table is uneditable.\n\t\t */\n\t\tAssert.assertFalse(home.canEdit(PartnerUserMgmt.SITE_PRIVILEGES));\t\n\t}",
"public void testCheckUser() {\r\n\t\t// TODO Auto-generated method stub\r\n\r\n\t}",
"@Test\r\n\tpublic void CT01ConsultarUsuario_com_sucesso() {\r\n\t\t// cenario\r\n\t\tUsuario usuario = ObtemUsuario.comDadosValidos();\r\n\t\tUsuario resultadoObtido = null;\r\n\t\tDAOFactory mySQLFactory = DAOFactory.getDAOFactory(DAOFactory.MYSQL);\r\n\t\tIUsuarioDAO iUsuarioDAO = mySQLFactory.getUsuarioDAO();\r\n\t\t// acao\r\n\t\tresultadoObtido = iUsuarioDAO.consulta(usuario.getRa());\r\n\t\t// verificacao\r\n\t\tassertTrue(resultadoObtido.equals(usuario));\r\n\t}",
"@Test\n\tpublic void testComprobarEstudianteExcepcion(){\n\t\ttry{\n\t\t\tusuario = \"alsk\";\n\t\t\tpassword = \"sd\";\n\t\t\tboolean encontrado= LoginEstudiante.comprobarEstudiante(usuario, password);\n\t\t\tfail();\n\t\t}catch(Excepciones e){\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}",
"@Test\n public void testCheckIfAvaible() throws Exception {\n System.out.println(\"checkIfAvaible\");\n String username = \"\";\n CreateUser instance = new CreateUser();\n boolean expResult = false;\n boolean result = instance.checkIfAvaible(username);\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 }",
"@Test\n public void testIsLicencia() {\n System.out.println(\"isLicencia\");\n Usuario instance = new Usuario();\n boolean expResult = false;\n boolean result = instance.isLicencia();\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 }",
"public void testModifierUtilisateur() {\n System.out.println(\"modifierUtilisateur\");\n Utilisateur putilisateur = null;\n boolean expResult = false;\n boolean result = Utilisateur.modifierUtilisateur(putilisateur);\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 }",
"@Test\n\tpublic void testIngresarDatosUsuario() {\n\t\tSystem.out.println(\"ingresarDatosUsuario\");\n\t\tctrlUsuarios.ingresarDatosUsuario(null, true);\n\t\tctrlUsuarios.ingresarDatosUsuario(null, false);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get realms configuration file (either based on yanel configuration or based on environment variable) | private File getRealmsConfigFile(String yanelConfigurationFilename) throws ConfigurationException {
// 1.) Getting realms.xml from environment variable YANEL_REALMS_HOME
java.util.Map<String, String> env = System.getenv();
for (java.util.Map.Entry envEntry : env.entrySet()) {
if (((String) envEntry.getKey()).equals("YANEL_REALMS_HOME")) {
File yanelRealmsHome = new File((String) envEntry.getValue());
if (yanelRealmsHome.isDirectory()) {
File envRealmsConfigFile = new File(yanelRealmsHome, "realms.xml");
if (envRealmsConfigFile.isFile()) {
log.warn("Use environment variable YANEL_REALMS_HOME '" + yanelRealmsHome + "' in order to load realms configuration.");
return envRealmsConfigFile;
} else {
log.warn("No realms configuration found: " + envRealmsConfigFile.getAbsolutePath());
}
break;
}
}
}
// 2.) Getting realms.xml from user home directory or rather hidden yanel directory inside user home directory
log.debug("User home directory: " + System.getProperty("user.home"));
File userHomeDotYanelRealmsConfigFile = new File(System.getProperty("user.home") + "/.yanel", "realms.xml");
if (userHomeDotYanelRealmsConfigFile.isFile()) {
log.warn("DEBUG: Use hidden folder inside user home directory: " + userHomeDotYanelRealmsConfigFile.getParentFile().getAbsolutePath());
return userHomeDotYanelRealmsConfigFile;
} else {
log.warn("No realms configuration found inside hidden folder at user home directory: " + userHomeDotYanelRealmsConfigFile.getAbsolutePath());
}
File userHomeRealmsConfigFile = new File(System.getProperty("user.home"), "realms.xml");
if (userHomeRealmsConfigFile.isFile()) {
log.warn("DEPRECATED: Use user home directory: " + System.getProperty("user.home"));
return userHomeRealmsConfigFile;
} else {
log.warn("No realms configuration found within user home directory: " + userHomeRealmsConfigFile.getAbsolutePath());
}
// 3.) Getting realms.xml from http://tomcat.apache.org/tomcat-5.5-doc/config/context.html#Environment_Entries
String envEntryPath = "java:comp/env/yanel/realms-config-file";
try {
javax.naming.InitialContext ic = new javax.naming.InitialContext();
if (ic.lookup(envEntryPath) != null) {
log.warn("realms.xml set as environment entry: " + (String) ic.lookup(envEntryPath));
return new File((String) ic.lookup(envEntryPath));
} else {
log.info("No enviroment entry '" + envEntryPath + "' set.");
}
} catch (Exception e) {
log.info("No enviroment entry '" + envEntryPath + "' set.");
}
// 4.) Getting realms.xml from yanel.xml
YANEL_CONFIGURATION_FILE = yanelConfigurationFilename;
if (RealmManager.class.getClassLoader().getResource(YANEL_CONFIGURATION_FILE) == null) {
log.warn("No such configuration file '" + YANEL_CONFIGURATION_FILE + "' in classpath, hence use default filename: " + Yanel.DEFAULT_CONFIGURATION_FILE);
YANEL_CONFIGURATION_FILE = Yanel.DEFAULT_CONFIGURATION_FILE;
}
File realmsConfigFile = null;
if (RealmManager.class.getClassLoader().getResource(YANEL_CONFIGURATION_FILE) != null) {
if (YANEL_CONFIGURATION_FILE.endsWith(".xml")) {
try {
URI configFileUri = new URI(RealmManager.class.getClassLoader().getResource(YANEL_CONFIGURATION_FILE).toString());
yanelConfigFile = new File(configFileUri.getPath());
} catch (Exception e) {
String errorMsg = "Failure while reading configuration: " + e.getMessage();
log.error(errorMsg, e);
throw new ConfigurationException(errorMsg, e);
}
try {
DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
Configuration config;
config = builder.buildFromFile(yanelConfigFile);
realmsConfigFile = new File(config.getChild("realms-config").getAttribute("src"));
} catch (Exception e) {
String errorMsg = "Failure while reading configuration: " + e.getMessage();
log.error(errorMsg, e);
throw new ConfigurationException(errorMsg, e);
}
if (!realmsConfigFile.isAbsolute()) {
realmsConfigFile = FileUtil.file(yanelConfigFile.getParentFile().getAbsolutePath(),
realmsConfigFile.toString());
}
} else if (YANEL_CONFIGURATION_FILE.endsWith("properties")) {
propertiesURL = RealmManager.class.getClassLoader()
.getResource(YANEL_CONFIGURATION_FILE);
if (propertiesURL == null) {
String errMessage = "No such resource: " + YANEL_CONFIGURATION_FILE;
log.error(errMessage);
throw new ConfigurationException(errMessage);
}
Properties props = new Properties();
try {
props.load(propertiesURL.openStream());
// use URLDecoder to avoid problems when the filename contains spaces, see
// http://bugzilla.wyona.com/cgi-bin/bugzilla/show_bug.cgi?id=5165
File propsFile = new File(URLDecoder.decode(propertiesURL.getFile()));
realmsConfigFile = new File(props.getProperty("realms-config"));
if (!realmsConfigFile.isAbsolute()) {
realmsConfigFile = FileUtil.file(propsFile.getParentFile()
.getAbsolutePath(), realmsConfigFile.toString());
}
} catch (IOException e) {
log.error(e.getMessage(), e);
throw new ConfigurationException("Could not load realms configuration file: " + propertiesURL);
}
} else {
log.error(YANEL_CONFIGURATION_FILE + " has to be either '.xml' or '.properties'");
}
} else {
log.error("No such configuration file in classpath: " + YANEL_CONFIGURATION_FILE);
}
if (realmsConfigFile == null) {
throw new ConfigurationException("Realms configuration file could not be determined!");
}
return realmsConfigFile;
} | [
"public String getRealmsConfigurationFile() {\n if (_realmsConfigFile != null && _realmsConfigFile.exists()) {\n return _realmsConfigFile.getAbsolutePath();\n } else {\n log.error(\"Either no realms configuration file was set or it does not exist: \" + _realmsConfigFile);\n return null;\n }\n }",
"private static String getConfigFile() {\n\n final String sPath = getUserFolder();\n\n return sPath + File.separator + \"sextante.settings\";\n\n }",
"java.lang.String getConfigFile();",
"public File getConfigurationFile();",
"String getSystemConfigurationSrc();",
"public String getConfigurationFile() {\n return YANEL_CONFIGURATION_FILE;\n }",
"@Override\n\tpublic String getConfigFile() {\n\t\treturn \"config/system.properties\";\n\t}",
"String getConfigsPathFile();",
"public File getWrapperConfFile()\n {\n return getConfFile( getConfiguration().getWrapperConfName() );\n }",
"private static void fetchConfig() {\n //This file contains the javax.mail config properties mentioned above.\n Path path = Paths.get(\"D:\\\\mailSetup.txt\");\n try (InputStream input = Files.newInputStream(path)) {\n MailServerConfig.load(input);\n }\n catch (IOException ex){\n System.err.println(\"Cannot open and load mail server properties file.\");\n }\n }",
"public String getAMConfigDirectory();",
"private File getDefaultConfig() {\n Log.d(LOG_TAG, \"Getting default config from \" + context.getFilesDir() + \"/config.scfg\");\n File[] configFiles = SCFileUtilities.findFilesByExtension(context.getFilesDir(), \"config.scfg\");\n if (configFiles.length > 0) {\n return configFiles[0];\n }\n else {\n Log.w(LOG_TAG, \"No default config file found in internal storage directory.\");\n }\n return null;\n }",
"private static File determineConfigurationFile(CommandLine optionLine)\n {\n String config = optionLine.getOptionValue(Environment.CONFIG); //$NON-NLS-1$\n if (StringUtils.isEmpty(config)) {\n return new File(ApplicationFactory.DEFAULT_CONFIGURATION_FILENAME); //$NON-NLS-1$\n }\n return new File(config);\n }",
"private File loadFileFromConfigDir(String name) {\n //need the module.path - when the plugin is used as inplace.\n String modulePath = System.getProperty(\"module.path\");\n String configPath;\n if (modulePath != null) configPath = modulePath + \"/grails-app/conf/\" + name;\n else configPath = \"grails-app/conf/\" + name;\n return new File(configPath);\n }",
"public static SystemConfig get() {\r\n try (BufferedReader reader = new BufferedReader(\r\n new InputStreamReader(INSTANCE.getConfigFile().openStream()))){\r\n String json = \"\", line;\r\n while ((line = reader.readLine()) != null) {\r\n json += line;\r\n }\r\n return INSTANCE.getGson().fromJson(json, SystemConfig.class);\r\n } catch (IOException ex) {\r\n LOG.info(ex.getCause().getMessage());\r\n throw new FileOperationException(ex.getCause().getMessage(), ex);\r\n }\r\n }",
"private String getPropertyFileLocation() {\n\t\tString loc = \"\";\n\t\tif (System.getProperty(\"jboss.server.config.dir\") != null) {\n\t\t\tloc = System.getProperty(\"jboss.server.config.dir\");\n\t\t} else if (System.getProperty(\"catalina.home\") != null) {\n\t\t\tloc = System.getProperty(\"catalina.home\") + \"/conf\";\n\t\t}\n\t\treturn FilenameUtils.concat(loc, PROPERTIES_FILENAME);\n\t}",
"public String readConfiguration(String path);",
"private static void readConfig() {\n confDir = System.getProperty(PRIVATE_CONF_JS7_PARAM_CONFDIR);\n Properties props = new Properties();\n if (confDir != null && !confDir.isEmpty()) {\n props.put(PRIVATE_CONF_JS7_PARAM_CONFDIR, confDir);\n // original file without substitution\n toUpdate = ConfigFactory.parseFile(Paths.get(confDir).resolve(PRIVATE_FOLDER_NAME).resolve(PRIVATE_CONF_FILENAME).toFile(), PARSE_OPTIONS).resolve(RESOLVE_OPTIONS);\n // Config to substitute\n Config defaultConfigWithConfDir = ConfigFactory.parseProperties(props, PARSE_OPTIONS).resolve();\n // file with substituted values\n resolved = ConfigFactory.parseFile(Paths.get(confDir).resolve(PRIVATE_FOLDER_NAME).resolve(PRIVATE_CONF_FILENAME).toFile(), PARSE_OPTIONS)\n .withFallback(defaultConfigWithConfDir).resolve();\n }\n }",
"public static String getConfig(String param) {\n /*\n String ret=\"\";\n Properties properties = new Properties();\n try {\n properties.load(getClass().getClassLoader().getResourceAsStream(getNameFileConfig()));\n } catch (IOException e) {\n myLog.error(\"Error: \");\n }\n return ret;\n */\n\n\t\tString ret=\"\";\n\t\tFileInputStream fis;\n\t Properties property = new Properties();\n\t\ttry {\n\t fis = new FileInputStream(nameFileConfig);\n\t property.load(fis);\n\t ret = property.getProperty(param);\n\t\t} catch (IOException e) {\n\t \tmyLog.error(\"File: \" + nameFileConfig + \" is not exist\" + e.toString());\n\t }\n\t\treturn ret;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Copying routines (advance both srcPos and destPos) | private void copy(int numBytes) {
for (int i = 0; i < numBytes; i++) {
dest[destPos + i] = src[srcPos + i];
}
srcPos += numBytes;
destPos += numBytes;
} | [
"public static void copy(IIntsReader src, int srcPos, IIntsMutable dest, \n\t\t\tint destPos, int len, int mem) {\n\t\tassert srcPos + len <= src.size();\n\t\tassert destPos + len <= dest.size();\n\t\t\n\t\tfinal int capacity = mem >>> 3;\n\t\tif (capacity == 0) {\n\t\t\tfor (int i = 0; i < len; ++i) {\n\t\t\t\tdest.set(destPos++, src.get(srcPos++));\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t// use bulk operations\n\t\t\tlong[] buf = new long[Math.min(capacity, len)];\n\t\t\tint remaining = 0;\n\t\t\t\n\t\t\twhile (len > 0) {\n\t\t\t\tfinal int read = src.get(srcPos, buf, remaining, Math.min(len, buf.length - remaining));\n\t\t\t\tassert read > 0;\n\t\t\t\t\n\t\t\t\tsrcPos += read;\n\t\t\t\tlen -= read;\n\t\t\t\tremaining += read;\n\t\t\t\t\n\t\t\t\tfinal int written = dest.set(destPos, buf, 0, remaining);\n\t\t\t\tassert written > 0;\n\t\t\t\t\n\t\t\t\tdestPos += written;\n\t\t\t\tif (written < remaining) {\n\t\t\t\t\tSystem.arraycopy(buf, written, buf, 0, remaining - written);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tremaining -= written;\n\t\t\t}\n\t\t\t\n\t\t\twhile (remaining > 0) {\n\t\t\t\tfinal int written = dest.set(destPos, buf, 0, remaining);\n\t\t\t\tremaining -= written;\n\t\t\t}\n\t\t}\n\t}",
"void copy(int offset, int size);",
"public static void copy(byte[] src, int srcOffset, byte[] dest, int destOffset) {\r\n\t\tcopy(src, srcOffset, dest, destOffset, src.length - srcOffset);\r\n\t}",
"Position copyOf();",
"private void sequencerCopyPattern(int src, int dst) {\r\n\t\tfor (int x = 0; x < (this.monome.sizeX); x++) {\r\n\t\t\tfor (int y = 0; y < 15; y++) {\r\n\t\t\t\tint x_src = x + (src * (this.monome.sizeX));\r\n\t\t\t\tint x_dst = x + (dst * (this.monome.sizeX));\r\n\t\t\t\tsequence[bank][x_dst][y] = sequence[bank][x_src][y];\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"void copyOffsetPosition (DVector3 pos);",
"public abstract void copyFrom(TerminalPanel oterm, int numRows,\n int numCols, int startY, int startX,\n int destY, int destX);",
"protected abstract Vector4d doSourceDrag(Node source,\n Vector3d pos, Vector4d copy);",
"public static void copy(byte[] src, int srcOffset, byte[] dest, int destOffset, int length) {\r\n\t\tjava.lang.System.arraycopy(src, srcOffset, dest, destOffset, length);\r\n\t}",
"private static native boolean _doSystemArraycopy (Object src, int srcIdx,\n Object dst, int dstIdx, int cnt);",
"private void copyFromWindow(int start, int len, byte[] dest, int destoff){\n \tif (start + len < this.window.length) {\n \t\tSystem.arraycopy(this.window, start, dest, 0+destoff, len);\n \t} else {\n \t\tSystem.arraycopy(this.window, start, dest, 0+destoff, this.window.length - start);\n \t\tSystem.arraycopy(this.window, 0, dest, this.window.length - start + destoff, len - (this.window.length - start) );\n \t\t\n \t}\n }",
"public static void copy(byte[] src, int srcOffset, ByteBuffer dest, int destOffset, int length) {\n long destAddress = destOffset;\n Object destBase = null;\n if (dest.isDirect()) {\n destAddress = destAddress + ((DirectBuffer) dest).address();\n } else {\n destAddress = destAddress + BYTE_ARRAY_BASE_OFFSET + dest.arrayOffset();\n destBase = dest.array();\n }\n long srcAddress = (long) srcOffset + BYTE_ARRAY_BASE_OFFSET;\n unsafeCopy(src, srcAddress, destBase, destAddress, length);\n }",
"public int copyTo(FloatSampleBuffer dest, int destOffset, int count) {\n\t\treturn copyTo(0, dest, destOffset, count);\n\t}",
"Buffer copy();",
"protected abstract Vector4d startSourceDrag(Node source,\n Vector3d pos, Vector4d copy);",
"public void sequencerCopyBank(int src, int dst) {\r\n\t\tfor (int x = 0; x < 64; x++) {\r\n\t\t\tfor (int y = 0; y < 16; y++) {\r\n\t\t\t\tsequence[dst][x][y] = sequence[src][x][y];\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void copyTo(int srcOffset, long[] dest, int destOffset, int length);",
"public int copyTo(int srcOffset, FloatSampleBuffer dest, int destOffset, int count) {\n\t\tif (srcOffset + count > getSampleCount()) {\n\t\t\tcount = getSampleCount() - srcOffset;\n\t\t}\n\t\tif (count + destOffset > dest.getSampleCount()) {\n\t\t\tcount = dest.getSampleCount() - destOffset;\n\t\t}\n\t\tint localChannelCount = getChannelCount();\n\t\tif (localChannelCount > dest.getChannelCount()) {\n\t\t\tlocalChannelCount = dest.getChannelCount();\n\t\t}\n\t\tfor (int ch = 0; ch < localChannelCount; ch++) {\n\t\t\tSystem.arraycopy(getChannel(ch), srcOffset, dest.getChannel(ch),\n\t\t\t\t\tdestOffset, count);\n\t\t}\n\t\treturn count;\n\t}",
"public boolean copy(int pos1, int pos2) {\r\n\t\tif(pos1 < 0 || pos1 >= size) return false;\r\n\t\tif(pos2 < 0 || pos2 >= size) return false;\r\n\t\tstrArray[pos2] = strArray[pos1];\r\n\t\treturn true;\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new primary school student with the primary key. Does not add the primary school student to the database. | public com.fsoft.bn.model.PrimarySchoolStudent createPrimarySchoolStudent(
java.lang.String primaryStudent_id) {
return _primarySchoolStudentLocalService.createPrimarySchoolStudent(primaryStudent_id);
} | [
"@Override\n\tpublic Student create(long studentId) {\n\t\tStudent student = new StudentImpl();\n\n\t\tstudent.setNew(true);\n\t\tstudent.setPrimaryKey(studentId);\n\n\t\treturn student;\n\t}",
"@Override\n public Student create(String key) {\n Student obj = new Student();\n obj.setId(key);\n return generalCreate(obj);\n }",
"private void addStudent() {\n\t\t\n\t\tString lastName = sLastNameTF.getText();\n\t\tString firstName = sFirstNameTF.getText();\n\t\tString schoolName = sSchoolNameTF.getText();\n\t\tchar[] password = sPasswordPF1.getPassword();\n\t\tString sA1 = sSecurityQ1TF.getText();\n\t\tString sQ1 = (String)sSecurityList1.getSelectedItem();\n\t\tString sA2 = sSecurityQ2TF.getText();\n\t\tString sQ2 = (String)sSecurityList2.getSelectedItem();\n\t\tString grade = (String)sGradeList.getSelectedItem();\n\t\t\n\t\tstudent = new Student(lastName, firstName, schoolName, password, sA1, sQ1, sA2, sQ2, grade);\n\t\t\n\t\t//Add student to database\n\t\t\n\t}",
"Student createStudent();",
"@Override\n\tpublic StudentDetails create(long studentId) {\n\t\tStudentDetails studentDetails = new StudentDetailsImpl();\n\n\t\tstudentDetails.setNew(true);\n\t\tstudentDetails.setPrimaryKey(studentId);\n\n\t\tstudentDetails.setCompanyId(companyProvider.getCompanyId());\n\n\t\treturn studentDetails;\n\t}",
"void createStudentSchoolInfo(StudentSchoolInfo studentSchoolInfo);",
"@Override\r\n\tpublic Student_Course createStudentCourse(Student_Course studentCourse) {\r\n\t\tStudent_Course newStudentCourse;\r\n\t\tnewStudentCourse = studentCourseRepository.save(studentCourse);\r\n\t\treturn newStudentCourse;\r\n\t}",
"private void createStudent(String studentID, String firstName, String lastName) {\n Connection connection = null;\n PreparedStatement statement = null;\n \n try {\n // get the connection \n connection = DriverManager.getConnection(DB_URL, DB_USER, DB_PASSWD);\n statement = connection.prepareStatement(\"INSERT INTO student VALUES (?,?,?)\");\n statement.setString(1, studentID); \n statement.setString(2, firstName);\n statement.setString(3, lastName);\n statement.executeQuery();\n \n } catch (SQLException ex) {\n ex.printStackTrace();\n } finally {\n try {\n statement.close();\n connection.close();\n } catch (SQLException ex) {\n }\n }\n\t}",
"private void createCourseStudentTable() throws SQLException\n {\n if (!database().hasTable(\"TCOURSESTUDENT\", \"CID\", \"1\"))\n {\n log.info(\"creating table TCOURSESTUDENT\");\n database().executeSQL(\n \"CREATE TABLE TCOURSESTUDENT \"\n + \"(CID INT NOT NULL, CID1 INT NOT NULL)\");\n database().executeSQL(\n \"ALTER TABLE TCOURSESTUDENT ADD PRIMARY KEY (CID, CID1)\");\n }\n }",
"@Override\n\tpublic void createStudent(Student student) {\n\t\tem.persist(student);\n\t}",
"boolean createStudent(Student student);",
"private void createTableStudent() {\n\t\tString sql = \"CREATE TABLE STUDENT \" + \"(id INTEGER not NULL, \" + \" faculty VARCHAR(255), \"\n\t\t\t\t+ \" major VARCHAR(255), \" + \"year INTEGER, \" +\" PRIMARY KEY ( id ))\";\n\t\ttry {\n\t\t\tStatement stmt = conn.createStatement(); // construct a statement\n\t\t\tstmt.executeUpdate(sql); // execute my query (i.e. sql)\n\t\t\tstmt.close();\n\t\t\tpopulateStudents();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"Table can NOT be created!\");\n\t\t}\n\t\tSystem.out.println(\"Created table in given database...\");\t\n\t}",
"private void saveStudent() {\n // Check that every required field has been filled in with valid parameters\n if (!checkUserInputValidity()) {\n return;\n }\n\n // Insert the new student info into the database\n if (isEditStudent) {\n updateStudentOnFirebaseDatabase();\n } else {\n // Make a unique id for the student\n String studentId = UUID.randomUUID().toString();\n saveNewStudentToFirebaseDatabase(studentId);\n }\n }",
"public Integer addCourseStudent(Integer openId, Integer studentId);",
"public void insert(Student student) {\t\t\r\n\t\tdao.insertStudent(student); \r\n\t}",
"boolean insertUser(SchoolSubject schoolSubject);",
"@Test \n\tvoid createStudent() {\n\t\tString[] studentAttributes = {\"123\", \"Yasser\", \"Dbeis\", \"TestProgram\",\t// Outline attributes of student\n\t\t\t\t\"TestLevel\", \"321\"};\n\t\t\n\t\tStudent stu = repo.createStudent(studentAttributes);\t\t\t// call function to create student\n\t\t\n\t\tassertEquals(stu.getID(), \"123\");\t\t\t\t\n\t\tassertEquals(stu.getFirstName(), \"Yasser\");\n\t\tassertEquals(stu.getLastName(), \"Dbeis\");\n\t\tassertEquals(stu.getProgram(), \"TestProgram\");\n\t\tassertEquals(stu.getLevel(), \"TestLevel\");\n\t\tassertEquals(stu.getASURITE(), \"321\");\n\t}",
"public static String addStudent(Student newStudent){\n\n\t\tConnection conn = null;\n\t\t//Statement stmt = null;\n\t\ttry{\n\t\t //STEP 2: Register JDBC driver\n\t\t Class.forName(\"com.mysql.jdbc.Driver\");\n\n\t\t //STEP 3: Open a connection\n\t\t System.out.println(\"Connecting to database... in course and adding student\");\n\t\t conn = DriverManager.getConnection(DB_URL,USER,PASS);\n\n\t\t //STEP 4: Execute a query\n\t\t System.out.println(\"Creating statement...in course and adding student\");\n\t\t PreparedStatement stmt = conn.prepareStatement(\"INSERT INTO enrolled VALUES(?, ?);\");\n\t\t //System.out.println(sql);\n\t\t stmt.setInt(1, newStudent.getSID());\n\t\t stmt.setInt(2, callNumber);\n\t\t stmt.executeUpdate();\n\t\t \n\t\t return \"You have sucessfully enrolled!\";\n\t\t \n\t\t}catch(SQLException se){\n\t\t //Handle errors for JDBC\n\t\t se.printStackTrace();\n\t\t return \"You are already Enrolled.\";\n\t\t }catch(Exception e){\n\t\t //Handle errors for Class.forName\n\t\t e.printStackTrace();\n\t\t }finally{\n\t\t //finally block used to close resources\n\t\t try{\n\t\t if(conn!=null)\n\t\t conn.close();\n\t\t }catch(SQLException se){\n\t\t se.printStackTrace();\n\t\t }//end finally try\n\t\t }//end try\n\t\treturn \"Error. Please contact an administrator.\";\n\t}",
"public void assignStudentToCourse() { \n // Read data from user's input\n int studentId = Integer.valueOf(readInputData(\"\\nInsert Student's ID: \"));\n int courseId = Integer.valueOf(readInputData(\"Insert Course's ID: \")); \n // Insert student per course into sql list of students_per_course\n if (con != null){\n try (PreparedStatement pstm1 = con.prepareStatement(\"INSERT INTO students_per_course (course_id, student_id)\\n\" +\n \"VALUES (?, ?)\")) {\n pstm1.setInt(1, courseId);\n pstm1.setInt(2, studentId); \n pstm1.executeUpdate();\n System.out.println(\"The student was assigned successfully!\");\n } catch (SQLException ex) {\n System.out.println(ex.getMessage() + \n \"\\nPlease, try again!\");\n } \n } \n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set value of LinkVisit_ToNodeVisit | public final void setLinkVisit_ToNodeVisit(com.mendix.systemwideinterfaces.core.IContext context, workflowexecution.proxies.NodeVisit linkvisit_tonodevisit)
{
if (linkvisit_tonodevisit == null)
getMendixObject().setValue(context, MemberNames.LinkVisit_ToNodeVisit.toString(), null);
else
getMendixObject().setValue(context, MemberNames.LinkVisit_ToNodeVisit.toString(), linkvisit_tonodevisit.getMendixObject().getId());
} | [
"public final void setLinkVisit_ToNodeVisit(workflowexecution.proxies.NodeVisit linkvisit_tonodevisit)\r\n\t{\r\n\t\tsetLinkVisit_ToNodeVisit(getContext(), linkvisit_tonodevisit);\r\n\t}",
"public final void setLinkVisit_FromNodeVisit(workflowexecution.proxies.NodeVisit linkvisit_fromnodevisit)\r\n\t{\r\n\t\tsetLinkVisit_FromNodeVisit(getContext(), linkvisit_fromnodevisit);\r\n\t}",
"public final void setLinkVisit_FromNodeVisit(com.mendix.systemwideinterfaces.core.IContext context, workflowexecution.proxies.NodeVisit linkvisit_fromnodevisit)\r\n\t{\r\n\t\tif (linkvisit_fromnodevisit == null)\r\n\t\t\tgetMendixObject().setValue(context, MemberNames.LinkVisit_FromNodeVisit.toString(), null);\r\n\t\telse\r\n\t\t\tgetMendixObject().setValue(context, MemberNames.LinkVisit_FromNodeVisit.toString(), linkvisit_fromnodevisit.getMendixObject().getId());\r\n\t}",
"public void setTo(Node theNode){\n m_to = theNode;\n }",
"@PortedFrom(file = \"Taxonomy.h\", name = \"setVisited\")\n public void setVisited(TaxonomyVertex node) {\n node.setChecked(visitedLabel);\n }",
"public void setLink( IntNode _node ) {\r\n\t\t\tlink = _node;\r\n\t\t}",
"public void setVisit(Integer visit) {\n this.visit = visit;\n }",
"public void setNode(Node node) {\r\n\t\tthis.node = node;\t\r\n\t}",
"public void setNode(Integer node) {\r\n this.node = node;\r\n }",
"public void setFrom(Node theNode){\n m_from = theNode;\n }",
"public final void setLinkVisit_Link(com.mendix.systemwideinterfaces.core.IContext context, workflowinstance.proxies.Link linkvisit_link)\r\n\t{\r\n\t\tif (linkvisit_link == null)\r\n\t\t\tgetMendixObject().setValue(context, MemberNames.LinkVisit_Link.toString(), null);\r\n\t\telse\r\n\t\t\tgetMendixObject().setValue(context, MemberNames.LinkVisit_Link.toString(), linkvisit_link.getMendixObject().getId());\r\n\t}",
"public final void setLinkVisit_Link(workflowinstance.proxies.Link linkvisit_link)\r\n\t{\r\n\t\tsetLinkVisit_Link(getContext(), linkvisit_link);\r\n\t}",
"public void setNode(DListNode n){\n\t\tnode = n;\n\t}",
"public Node setNextNode(Node node);",
"public void setLink(ListNode newLink){\t\r\n\t\tlink = newLink;\r\n\t}",
"public void set(Node<T> temp, int index) {\r\n this.set(temp.value, index);\r\n }",
"public void setCurrentNode(int node) {\n\t\tthis.currentNode = node;\n\t}",
"public void setAstNode(NodeAST node) {\n astNode=node;\n }",
"public void setNext(Node n) { next = n; }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Searches example comparisons from an evaluation. The return format is a list of example comparisons that show ground truth and prediction(s) for a single input. Search by providing an evaluation ID. | public com.google.common.util.concurrent.ListenableFuture<
com.google.cloud.datalabeling.v1beta1.SearchExampleComparisonsResponse>
searchExampleComparisons(
com.google.cloud.datalabeling.v1beta1.SearchExampleComparisonsRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getSearchExampleComparisonsMethod(), getCallOptions()), request);
} | [
"public com.google.cloud.datalabeling.v1beta1.SearchExampleComparisonsResponse\n searchExampleComparisons(\n com.google.cloud.datalabeling.v1beta1.SearchExampleComparisonsRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getSearchExampleComparisonsMethod(), getCallOptions(), request);\n }",
"public void searchEvaluations(\n com.google.cloud.datalabeling.v1beta1.SearchEvaluationsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.datalabeling.v1beta1.SearchEvaluationsResponse>\n responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getSearchEvaluationsMethod(), getCallOptions()),\n request,\n responseObserver);\n }",
"public static void evaluate() throws IOException{\n\t\tFileOutputStream fileOut = new FileOutputStream(\"prediction_file.txt\");\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n \n //Print output in format needed for prediction_file. Txts is now filled with testing docs, pred with matching predictions, and labels with actual labels of testing set.\n for(int p=0; p < txts.size(); p++){\n \tout.writeObject(txts.get(p) + \"\\t\" + pred.get(p) + \"\\t\" + gs.get(p) + \"\\n\");\n }\n \n fileOut.close();\n out.close();\n \n //Print confirmation and instructions\n System.out.println(\"Prediction file created! Run 'prediction_file' through the Evaluator now.\");\n \n\t}",
"public com.google.cloud.datalabeling.v1beta1.SearchEvaluationsResponse searchEvaluations(\n com.google.cloud.datalabeling.v1beta1.SearchEvaluationsRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getSearchEvaluationsMethod(), getCallOptions(), request);\n }",
"public List<String> evaluateRisk(Evaluation evaluation);",
"private String[] evaluate()\n {\n //there must be some recommender selected by the user on the UI\n if (selectedRecommenderPanel.getObject() == null\n || selectedRecommenderPanel.getObject().getTool() == null) {\n LOG.error(\"Please select a recommender from the list\");\n return null;\n }\n\n //get all the source documents related to the project\n Map<SourceDocument, AnnotationDocument> listAllDocuments = documentService\n .listAllDocuments(project, userDao.getCurrentUser());\n\n //create a list of CAS from the pre-annotated documents of the project\n List<CAS> casList = new ArrayList<>();\n listAllDocuments.forEach((source, annotation) -> {\n try {\n CAS cas = documentService.createOrReadInitialCas(source);\n casList.add(cas);\n }\n catch (IOException e1) {\n LOG.error(\"Unable to render chart\", e1);\n return;\n }\n });\n \n IncrementalSplitter splitStrategy = new IncrementalSplitter(TRAIN_PERCENTAGE,\n INCREMENT, LOW_SAMPLE_THRESHOLD);\n\n @SuppressWarnings(\"rawtypes\")\n RecommendationEngineFactory factory = recommenderRegistry\n .getFactory(selectedRecommenderPanel.getObject().getTool());\n RecommendationEngine recommender = factory.build(selectedRecommenderPanel.getObject());\n \n if (recommender == null) {\n LOG.warn(\"Unknown Recommender selected\");\n return null;\n }\n \n if (!evaluate) {\n return getEvaluationScore(evaluationResults);\n }\n\n evaluationResults = new ArrayList<EvaluationResult>();\n \n // create a list of comma separated string of scores from every iteration of\n // evaluation.\n while (splitStrategy.hasNext()) {\n splitStrategy.next();\n\n try {\n EvaluationResult evaluationResult = recommender.evaluate(casList, splitStrategy);\n \n if (evaluationResult.isEvaluationSkipped()) {\n LOG.warn(\"Evaluation skipped. Chart cannot to be shown\");\n continue;\n }\n\n evaluationResults.add(evaluationResult);\n }\n catch (RecommendationException e) {\n LOG.error(e.toString(),e);\n continue;\n }\n }\n\n return getEvaluationScore(evaluationResults);\n }",
"public ArrayList<ExperimentResult> getResults(int solverConfigId, int instanceId) {\n return getResults(solverConfigId, instanceId, null);\n }",
"public ArrayList<ExperimentResult> getResults(int solverConfigId, int instanceId, StatusCode[] status) {\n ArrayList<ExperimentResult> res = new ArrayList<ExperimentResult>();\n ExperimentResult result;\n for (int i = 0; i < getNumRuns(solverConfigId, instanceId); i++) {\n if ((result = getResult(solverConfigId, instanceId, i, status)) != null) {\n res.add(result);\n }\n }\n return res;\n }",
"public List<Evaluation> getCategoryEvaluations(int categoryId);",
"private static void processResults(List<CodeExample> examples) throws ParseException, IOException {\n if (examples != null) {\n ProjectCodeFormatter projectCodeFormatter = new ProjectCodeFormatter();\n List<CodeExample> project = null;\n if (searchInProject) {\n project = new ArrayList<>();\n for (CodeExample example : examples) {\n if (!example.getSource().contains(\"http\")) {\n examples.remove(example);\n project.add(example);\n }\n }\n projectCodeFormatter.beautifyCode(project);\n\n AlgorithmsRemoveDuplicates typeOfCompareResult = AlgorithmsRemoveDuplicates.LevenshteinDistance;\n CodeDuplicateRemover duplicateRemover = new CodeDuplicateRemover(project, typeOfCompareResult);\n project = duplicateRemover.removeDuplicates();\n }\n if (project != null) {\n examples.addAll(project);\n }\n\n String fileText = projectCodeFormatter.createResultFile(functionName, examples, format, null, \"\");\n\n String path = \"result\" + File.separator + \"examples\";\n if (!format.isEmpty()) {\n if (format.matches(\"html\")) {\n path += \".html\";\n } else if (format.matches(\"txt\")) {\n path += \".txt\";\n }\n\n File file = new File(path);\n if (!file.exists()) {\n file.getParentFile().mkdirs();\n file.createNewFile();\n }\n\n try (BufferedWriter writer = new BufferedWriter(new FileWriter(file))) {\n writer.write(fileText);\n writer.close();\n } catch (Exception e) {\n logger.error(\"Sorry, something wrong!\", e);\n e.printStackTrace();\n }\n System.out.println(\"Find data in folder 'result'\");\n } else {\n System.out.println(fileText);\n }\n\n } else {\n System.out.println(\"No such example found!\");\n }\n }",
"List<Training> find(String searchtext);",
"public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.datalabeling.v1beta1.SearchEvaluationsResponse>\n searchEvaluations(com.google.cloud.datalabeling.v1beta1.SearchEvaluationsRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getSearchEvaluationsMethod(), getCallOptions()), request);\n }",
"public List getExamProceedings(ExamProceeding examProceeding);",
"public static Vector<Integer> getAllRunsByExperimentId(int id) throws SQLException {\n Vector<Integer> res = new Vector<Integer>();\n PreparedStatement st = DatabaseConnector.getInstance().getConn().prepareStatement(\n \"SELECT run \" +\n \"FROM \" + table + \" \" +\n \"WHERE Experiment_idExperiment=? GROUP BY run ORDER BY run;\");\n st.setInt(1, id);\n ResultSet rs = st.executeQuery();\n while (rs.next()) {\n res.add(rs.getInt(1));\n }\n \n return res;\n }",
"public ExamProceeding getExamProceeding(final String id);",
"void compareSearch();",
"public List<OWLObject> search(OWLObject queryObj) {\n\t\tList<OWLObject> hits = new ArrayList<OWLObject>(maxHits);\n\t\tSystem.out.println(\"gettings atts for \"+queryObj+\" -- \"+simEngine.comparisonProperty);\n\t\tSet<OWLObject> atts = simEngine.getAttributeClosureFor(queryObj);\n\t\tSystem.out.println(\"all atts: \"+atts.size());\n\t\tif (atts.size() == 0)\n\t\t\treturn hits;\n\t\t\n\t\t// only compare using significant atts;\n\t\t// we don't do the same test on candidates as these will be removed by the\n\t\t// intersection operation. they will have a small effect on the score, as\n\t\t// we don't divide by the union, but instead the sum of sizes\n\t\tatts = filterNonSignificantAttributes(atts);\n\t\tSystem.out.println(\"filtered atts: \"+atts.size());\n\n\t\t//bloomFilter = new BloomFilter<OWLObject>(0.05, atts.size());\n\t\t//bloomFilter.addAll(atts);\n\t\t\t\t\n\t\tSortedMap<Integer,Set<OWLObject>> scoreCandidateMap = new TreeMap<Integer,Set<OWLObject>>();\n\t\t\n\t\tfor (OWLObject candidate : getCandidates()) {\n\t\t\tif (candidate.equals(queryObj))\n\t\t\t\tcontinue;\n\t\t\tSet<OWLObject> iAtts = simEngine.getAttributeClosureFor(candidate);\n\t\t\t//Set<OWLObject> iAtts = simEngine.getGraph().getAncestors(candidate);\n\n\t\t\tif (iAtts.size() == 0)\n\t\t\t\tcontinue;\n\t\t\tint cAttsSize = iAtts.size();\n\t\n\t\t\tiAtts.retainAll(atts);\n\t\t\t//Collection<OWLObject> iAtts = bloomFilter.intersection(cAtts);\n\t\t\t\n\t\t\t// simJ, one-sided, scaled by 1000\n\t\t\t// negate to ensure largest first\n\t\t\t//Integer score = - (iAtts.size() * 1000 / cAttsSize);\n\t\t\t\n\t\t\t// this biases us towards genes with large numbers of annotations,\n\t\t\t// but it is better at finding the models that share all features\n\t\t\tInteger score = - iAtts.size();\n\t\t\tif (!scoreCandidateMap.containsKey(score)) \n\t\t\t\tscoreCandidateMap.put(score, new HashSet<OWLObject>());\n\t\t\tscoreCandidateMap.get(score).add(candidate);\n\t\t\treporter.report(this,\"query_candidate_overlap_total\",queryObj,candidate,iAtts.size(),cAttsSize);\n\t\t}\n\t\t\n\t\tint n = 0;\n\t\tfor (Set<OWLObject> cs : scoreCandidateMap.values()) {\n\t\t\tn += cs.size();\n\t\t\thits.addAll(cs);\n\t\t}\n\t\t\n\t\tn = 0;\n\t\tfor (OWLObject hit : hits) {\n\t\t\tn++;\n\t\t\treporter.report(this,\"query_hit_rank_threshold\",queryObj,hit,n,maxHits);\n\t\t}\n\t\tif (hits.size() > maxHits)\n\t\t\thits = hits.subList(0, maxHits);\n\t\t\n\n\n\t\treturn hits;\n\t}",
"List<ProteinCurrent> searchByGeneID(String ensemblID);",
"public List<MatchResult<K>> identify(double[] voiceSample) {\n \n if(store.isEmpty()) {\n throw new IllegalStateException(\"There is no voice print enrolled in the system yet\");\n }\n\n VoicePrint voicePrint = new VoicePrint(extractFeatures(voiceSample, sampleRate));\n \n DistanceCalculator calculator = new EuclideanDistanceCalculator();\n List<MatchResult<K>> matches = new ArrayList<MatchResult<K>>(store.size());\n\n double distanceFromUniversalModel = voicePrint.getDistance(calculator, universalModel);\n for (Entry<K, VoicePrint> entry : store.entrySet()) {\n double distance = entry.getValue().getDistance(calculator, voicePrint);\n // likelihood : how close is the given voice sample to the current VoicePrint \n // compared to the total distance between the current VoicePrint and the universal model \n int likelihood = 100 - (int) (distance / (distance + distanceFromUniversalModel) * 100);\n matches.add(new MatchResult<K>(entry.getKey(), likelihood, distance));\n }\n\n Collections.sort(matches, new Comparator<MatchResult<K>>() {\n @Override\n public int compare(MatchResult<K> m1, MatchResult<K> m2) {\n return Double.compare(m1.getDistance(), m2.getDistance());\n }\n });\n \n return matches;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get all registered DiscordChatReceivers. | @SuppressWarnings("unused")
public static List<DiscordChatReceiver> getReceiversList() {
return DiscordListener.receivers;
} | [
"Iterable<MessageReceiver> getReceivers();",
"public List<PerunNotifReceiver> getAllPerunNotifReceivers();",
"public ArrayList<IReceiver> getReceivers() {\n\t\treturn this.receivers;\n\t}",
"public ArrayList<Receiver> getReceivers() {\r\n \t\treturn receivers;\r\n \t}",
"public Map getReceivers();",
"public List<Message> getAllMessagesByReceiver(Player receiver);",
"protected abstract AID[] getReceivers();",
"public nl.webservices.www.soap.InsolvencyReceivers getReceivers() {\n return receivers;\n }",
"UUID[] getReceiver();",
"public String receiverList() throws ZXException {\r\n\t\tString receiverList;\r\n\t\t\r\n\t\tBOCollection colRcvr = quickFKCollection(\"im/rcvr\", \"\", \"+\", \"+,usrPrfle\", false, null, \"usrPrfle\", false);\r\n\t if (colRcvr == null) {\r\n\t throw new ZXException(\"Unable to retrieve receivers for message\");\r\n\t }\r\n\r\n\t receiverList = colRcvr.col2String(\"usrPrfle\", \"\", \"; \");\r\n\t \r\n\t\treturn receiverList;\r\n\t}",
"public Channel.Receiver getReceiver(String sName);",
"public Vector<DCCSessionListener> getChatListeners() {\n return chatListeners;\n }",
"public Iterator getAllIntendedReceiver() {\n\t\tIterator it = null;\n\t\t//#CUSTOM_EXCLUDE_BEGIN\n\t\tEnvelope env = getEnvelope();\n\t\tif (env != null) {\n\t\t\tit = env.getAllIntendedReceiver();\n\t\t\tif (!it.hasNext()) {\n\t\t\t\t// The \":intended-receiver\" field is empty --> try with the \":to\" field \n\t\t\t\tit = env.getAllTo();\n\t\t\t}\n\t\t}\n\t\t//#CUSTOM_EXCLUDE_END\n\t\tif (it == null || !it.hasNext()) {\n\t\t\t// Both the \":intended-receiver\" and the \":to\" fields are empty --> \n\t\t\t// Use the ACLMessage receivers\n\t\t\tit = getAllReceiver();\n\t\t}\n\t\treturn it;\n\t}",
"public Collection getAllReceivables()\n throws RemoteException;",
"public List<message> getList() {\n return chats;\n }",
"public org.hl7.fhir.ResourceReference[] getReceiverArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(RECEIVER$16, targetList);\n org.hl7.fhir.ResourceReference[] result = new org.hl7.fhir.ResourceReference[targetList.size()];\n targetList.toArray(result);\n return result;\n }\n }",
"public void setReceivers(ArrayList<Receiver> receivers) {\r\n \t\tthis.receivers = receivers;\r\n \t}",
"public List<Message> getAllMessagesBySender(Player sender);",
"public LinkedList<Message> getAllRegisteredMessages()\n {\n LinkedList<Message> result = new LinkedList<>();\n for (Map.Entry<String, Message> entry : _registeredMessages.entrySet())\n {\n result.add(entry.getValue());\n }\n return result;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
calculates deposit using age and gender only returns the percentage to be deducted from the total price | public static double CalculateDiscount(int age, String gender) {
// for age between 0 - 17, return 75%
if(age > 0 && age < 18) {
return 0.75;
}
// for age greater than 40, return 50%
else if(age > 40) {
return 0.5;
}
// for female between 18 - 40, return 25%
else if(gender.equalsIgnoreCase("female")) {
return 0.25;
}
// if none of the above conditions is met, return 0
return 0.0;
} | [
"double getEmployerPaidPercentage();",
"public static double discount(int age) {\n\t\t// 25% discount for children\n\t\tif(age <= CHILD_AGE) {\n\t\t\treturn 0.25;\n\t\t// 35% discount for senior citizens\n\t\t} else if(age >= SENIOR_AGE) {\n\t\t\treturn 0.35;\n\t\t// no discount for \"adults\"\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}",
"private Double calcPassengerFare(Passenger p)\n\t{\n\t\tDouble d = new Double(100.0);\n\t\tif (p.getAge() <= 12)\n\t\t\td = d/2;\n\t\telse if (p.getAge() >= 60)\n\t\t\td -= d * 0.4;\n\t\t\n\t\tif (p.getGender() == 'F')\n\t\t\td -= d * 0.25;\n\t\t\n\t\treturn d;\n\t}",
"double getOOMortgageDebtToIncome() {\n return 100.0 * Model.creditSupply.getTotalOOCredit()\n / (Model.householdStats.getOwnerOccupierAnnualisedNetTotalIncome()\n + Model.householdStats.getActiveBTLAnnualisedNetTotalIncome()\n + Model.householdStats.getRentingAnnualisedNetTotalIncome()\n + Model.householdStats.getHomelessAnnualisedNetTotalIncome());\n }",
"public BigDecimal getTotalAccomodationExpense();",
"BigDecimal getAlcoholPercentage();",
"private static float calculateTotalInterest(int dollars, int years)\n {\n return dollars + (INTEREST_PERCENTAGE * dollars * years);\n }",
"public void calculatePf()\n {\n totalMonthlyPf=2*info.monthlyIncome*info.pfPercentage/100; \n \n }",
"double getMortgageDebtToIncome() {\n return 100.0 * (Model.creditSupply.getTotalBTLCredit() + Model.creditSupply.getTotalOOCredit())\n / (Model.householdStats.getOwnerOccupierAnnualisedNetTotalIncome()\n + Model.householdStats.getActiveBTLAnnualisedNetTotalIncome()\n + Model.householdStats.getRentingAnnualisedNetTotalIncome()\n + Model.householdStats.getHomelessAnnualisedNetTotalIncome());\n }",
"public double getDeposit() {\r\n return deposit;\r\n }",
"public void getTotalAmount(){\r\n totalAmount = (this.child * 2.50) + (this.adult * 5.00);\r\n }",
"float getPricePerAlcohol();",
"double getPricePerPerson();",
"public double calcWithAndDep()\r\n{\r\n\tbalance = (balance - withdrawals) + deposits;\r\n\t\r\n\treturn balance;\r\n}",
"public BigDecimal getPercentageProfitPLimit();",
"public void deposit(int amt)\n\t{\n\t\tif(amt>100)\n\t\t balance=balance+(amt + (int)(bonusValue * 0.1));\n\t\telse\n\t\t\tbalance=balance+amt;\n\t\t//endif\n\t}",
"public double adultBodyFat(int age, double m, double kg, int gender)\n {\n double value = bodyBMI(m,kg) * 1.2 + 0.23 * age - 5.4 - 10.8 * gender; // gender (male=1 female=0)\n printing (m,kg);\n System.out.println(\"\\n\\n\\n\\t\\t\\tAdult body fat TEST\");\n System.out.println(\"\\tAdult body fat:\" + value+\"%\"); \n return value;\n }",
"private void calcTotalDeposit() {\n BigDecimal totalDeposit = new BigDecimal(0);\n for (Bike bike : this.bikes) {\n totalDeposit = totalDeposit.add(bike.getDepositAmount());\n }\n this.totalDeposit = totalDeposit;\n }",
"public BigDecimal getPercentageProfitPStd();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Mutator method to set m_yearsUntilRetirement to yearsUntilRetirement. | public void setYearsUntilRetirement(int yearsUntilRetirement) {
m_yearsUntilRetirement = yearsUntilRetirement;
} | [
"public int getYearsUntilRetirement() {\n return m_yearsUntilRetirement;\n }",
"public int getYearsInRetirement() {\n\t\treturn yearsInRetirement;\n\t}",
"public void setYears(double years){\r\n\t\tthis.years = years;\r\n\t}",
"void setYears(int x) {\n\t\tyearsWorked = x;\r\n\t}",
"void setMaxYears(int val);",
"void addRestriction_of_liberty_length_years(Integer newRestriction_of_liberty_length_years);",
"public void setYears(int years) {\n // Check that the number of years is a positive integer as\n // its not possible to work a negative number of years\n if (years < 0) {\n throw new IllegalArgumentException(\"Invalid number of years: \" + years);\n }\n this.years = years;\n }",
"void removeRestriction_of_liberty_length_years(Integer oldRestriction_of_liberty_length_years);",
"public double payoffYears() {\n\t\treturn (myNumberOfBulbs * myReplacementBulbCost) / returnPerYear();\n\t}",
"public void setYearReleased(LocalDate yearReleased) {\n\n LocalDate currentYear = LocalDate.now().plusYears(1);\n LocalDate originYear = LocalDate.of(1990, Month.JANUARY, 1);\n\n try{\n if(yearReleased.getYear()>=originYear.getYear() && yearReleased.getYear()<=currentYear.getYear()){\n\n this.yearReleased=yearReleased;\n }\n else{\n\n throw new IllegalArgumentException(\"Year entered must be between 1990 - \" + currentYear.getYear());\n }\n }\n catch (IllegalArgumentException yearIAE){\n\n System.err.println(yearIAE.getMessage());\n }\n catch (NullPointerException yearNE){\n\n System.err.println(yearNE.getMessage());\n }\n catch (Exception yearE){\n\n System.err.println(yearE.getMessage());\n }\n }",
"DateTime minusYears( int years );",
"public void setNumberOfYears(int numberOfYears) {\n this.numberOfYears = numberOfYears;\n }",
"public void setLastYearAttended(Integer lastYearAttended) {\n this.lastYearAttended = lastYearAttended;\n }",
"public void setYears(int aYears)\n\t{\n\n\t\tthis.years = aYears;\n\n\t}",
"public int getYearsOld() {\n return yearsOld;\n }",
"public void setEndYear(int year) {\n _endYear = year;\n }",
"public static void expectedYearsRetired(){\n\t\ttry { \n\t\t\tSystem.out.println(\"Enter your expected years retired:\");\n\t\t\tString eYR = userInput.next();\n\t\t\teYearsRetiredDouble = Double.parseDouble(eYR);\n\t\t\tSystem.out.println(\"Expected years retired = \"+ eYearsRetiredDouble+\" years\");\n\t\t} catch(NumberFormatException e) {\n\t\t\tSystem.out.println(\"Error. Please enter a number\");\n\t\t\texpectedYearsRetired();\n\t\t}\n\t}",
"@Override\n public int getYear() {\n return this.deadline.getYear();\n }",
"public void setValidUntil(Date validUntil);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a validating method visitor. | protected ValidatingMethodVisitor(MethodVisitor methodVisitor, String name) {
super(OpenedClassReader.ASM_API, methodVisitor);
this.name = name;
} | [
"public MethodExpressionValidator()\n {\n }",
"Validator createValidator();",
"protected ValidatingFieldVisitor(FieldVisitor fieldVisitor) {\n super(OpenedClassReader.ASM_API, fieldVisitor);\n }",
"protected ValidatingClassVisitor(ClassVisitor classVisitor) {\n super(OpenedClassReader.ASM_API, classVisitor);\n }",
"public Object accept(Visitor visitor);",
"interface Validator {\r\n\r\n\t\t/**\r\n\t\t * A \"significant\" aspect has changed;\r\n\t\t * validate the node as appropriate\r\n\t\t */\r\n\t\tvoid validate();\r\n\r\n\t\t/**\r\n\t\t * Stop all validation of the node until #resume() is called.\r\n\t\t * This can be used to improve the performance of any long-running\r\n\t\t * action that triggers numerous changes to the node. Be sure to\r\n\t\t * match a call to this method with a corresponding call to\r\n\t\t * #resume().\r\n\t\t */\r\n\t\tvoid pause();\r\n\r\n\t\t/**\r\n\t\t * Resume validation of the node. This method can only be\r\n\t\t * called after a matching call to #pause().\r\n\t\t */\r\n\t\tvoid resume();\r\n\r\n\t}",
"protected static ClassVisitor of(ClassVisitor classVisitor, TypeValidation typeValidation) {\n return typeValidation.isEnabled()\n ? new ValidatingClassVisitor(classVisitor)\n : classVisitor;\n }",
"public interface Validator {\n \n}",
"interface VisitorAccept {\n\t/**\n\t * Methode permettant d'accepter le visiteur.\n\t * \n\t * @param visitor\n\t * ; MessageVisitor\n\t */\n\tpublic void accept(MessageVisitor visitor);\n}",
"public interface Validator extends TypedValidator<Node> {\n\n /**\n * @param node the node that wants to be validated\n * @param problemReporter when found, validation errors can be reported here\n */\n void accept(Node node, ProblemReporter problemReporter);\n}",
"void accept(SimpleVisitor visitor) throws Exception;",
"public IValidationDelegate getDelegate();",
"public interface Visitor {\n\t/* METHODS */\n\t/**\n\t * Visits a Liquor.\n\t * @param liquor The Liquor to visit.\n\t */\n\tvoid visit(Liquor liquor);\n\t\n\t/**\n\t * Visits a Tobacco.\n\t * @param tobacco The Tobacco to visit.\n\t */\n\tvoid visit(Tobacco tobacco);\n\t\n\t/**\n\t * Visits a Necessity.\n\t * @param necessity The Necessity to visit.\n\t */\n\tvoid visit(Necessity necessity);\n}",
"void apply(MethodVisitor methodVisitor, MethodDescription methodDescription);",
"public interface Visitor {\r\n \r\n public Object visit (Node n); \r\n\r\n /* Visit method for declarations and statements */\r\n public Object visit (StmtNode n); \r\n public Object visit (DeclNode n); \r\n public Object visit (List n); \r\n\r\n\r\n /* Visit method for expr nodes */\r\n public Object visit (ExprNode n); \r\n public Object visit (AddNode n); \r\n public Object visit (TimesNode n); \r\n public Object visit (IntNumNode n);\r\n \r\n}",
"public interface IMethodAnnotationVisitor extends IAnnotationVisitor{\r\n}",
"public interface FilterVisitor<R> {\r\n\r\n /**\r\n * A FilterVistor must visit all these methods below, per visitor design pattern. \r\n * And a FilterExpression just need implements an accept() method.\r\n */\r\n\r\n <T extends Comparable<T>> R visit(Eq<T> eq);\r\n\r\n <T extends Comparable<T>> R visit(NotEq<T> notEq);\r\n\r\n <T extends Comparable<T>> R visit(LtEq<T> ltEq);\r\n\r\n <T extends Comparable<T>> R visit(GtEq<T> gtEq);\r\n\r\n R visit(Not not);\r\n\r\n R visit(And and);\r\n\r\n R visit(Or or);\r\n\r\n}",
"public static MethodVisitor of(MethodVisitor methodVisitor, MethodDescription instrumentedMethod) {\n return UNADJUSTED\n ? methodVisitor\n : new StackAwareMethodVisitor(methodVisitor, instrumentedMethod);\n }",
"public ExpressionVisitor() {\n\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Randomizer' containment reference. If the meaning of the 'Randomizer' containment reference isn't clear, there really should be more of a description here... | Randomizer getRandomizer(); | [
"protected static Random getRandomizer() {\n return randomizer;\n }",
"public static final Randomizer getRandomizer() {return instance;}",
"protected Random get_rand_value()\n {\n return rand;\n }",
"public int getRand() {\n return rand;\n }",
"public Object randomMember() {\n double randomNumber = Math.random();\n\n int i = 0;\n for (; i < probabilityDistribution.length; i++)\n if (randomNumber <= probabilityDistribution[i].weight)\n break;\n // In case of roundoff issues.\n if (i == probabilityDistribution.length)\n --i;\n return probabilityDistribution[i].object;\n }",
"public AUnit random() {\n return (AUnit) A.getRandomElement(data);\n }",
"public Random getRng() {\n return this.rng;\n }",
"public Random getRandom() {\n\t\treturn (rand);\n\t}",
"public boolean getRandomization() {\n return randomize;\n }",
"public static Wrap getRandom() {\n return values()[(int) (Math.random() * values().length)];\n }",
"public Random getRandomNumberGenerator() { return randomNumberGenerator; }",
"public int getRandom() {\n\n\t\tif (size==0) return -1;\n\n\t\treturn set.get(rand.nextInt(size));\n\t}",
"public RandomNumberGenerator getNumberGenerator() {\n return numberGenerator;\n }",
"public int getRandom() {\n // Generate a random index in range of size of LinkedList and return the element at that index\n Random random = new Random();\n int randIndex = random.nextInt(this.set.size());\n return this.set.get(randIndex);\n }",
"public float randomQual() {\n\t\treturn((float) getRandomInteger(30,250));\n\t}",
"public Element setToRandom() {\n this.value = Math.abs(ThreadSecureRandom.get().nextLong()) % field.order;\n\n return mod();\n }",
"public T getRandomElement() {\n\t\treturn this.itemList.get(this.getRandomIndex());\n\t}",
"public float random() {\n\t\treturn getRandom().nextFloat();\n\t}",
"@ReLogoBuilderGeneratedFor(\"global: rnd_weight\")\n\tpublic Object getRnd_weight(){\n\t\treturn repast.simphony.relogo.ReLogoModel.getInstance().getModelParam(\"rnd_weight\");\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a parser that recognizes the grammar: axiom = structure (ruleDef | Empty); | public Parser axiom() {
Sequence s = new Sequence("axiom");
s.add(structure());
Alternation a = new Alternation();
a.add(ruleDef());
a.add(new Empty());
s.add(a);
s.setAssembler(new AxiomAssembler());
return s;
} | [
"abstract protected Parser createSACParser();",
"public CGrammar getGrammarStructure();",
"AxiomDeclRule createAxiomDeclRule();",
"static Grammar parse(Scanner scanner) {\n //First line\n String first = scanner.nextLine();\n if (!first.equals(\"Grammar\")) {\n throw new IllegalArgumentException(\"Parsed grammar does not start with 'Grammar'.\");\n }\n\n //Second line; nonterminals\n String second = scanner.nextLine();\n if (!second.startsWith(\"Nonterminals: \")) {\n throw new IllegalArgumentException(\"Parsed grammar does not declare Nonterminals first.\");\n }\n Set<Character> nonterminals = new HashSet<>();\n second = second.substring(\"Nonterminals: \".length());\n for (String nonterminal : second.split(\",\")) {\n if (nonterminal.length() == 1) {\n nonterminals.add(nonterminal.charAt(0));\n } else {\n throw new IllegalArgumentException(\n \"Nonterminals have to be input as a comma separated list without spaces. Nonterminals may only be chars.\");\n }\n }\n\n //Third line; Alphabet\n String third = scanner.nextLine();\n if (!third.startsWith(\"Alphabet: \")) {\n throw new IllegalArgumentException(\"Parsed grammar does not declare Alphabet second.\");\n }\n Set<Character> alphabet = new HashSet<>();\n third = third.substring(\"Alphabet: \".length());\n for (String terminal : third.split(\",\")) {\n if (terminal.length() == 1) {\n alphabet.add(terminal.charAt(0));\n } else {\n throw new IllegalArgumentException(\n \"Alphabet has to be input as a comma separated list without spaces. Terminals may only be chars.\");\n }\n }\n\n //Fourth line; Startsymbol\n String fourth = scanner.nextLine();\n if (!fourth.startsWith(\"Startsymbol: \")) {\n throw new IllegalArgumentException(\"Parsed grammar does not declare start symbol third.\");\n }\n fourth = fourth.substring(\"Startsymbol: \".length());\n char start;\n if (fourth.length() == 1) {\n start = fourth.charAt(0);\n } else {\n throw new IllegalArgumentException(\"Startsymbol must be a single char.\");\n }\n\n //Fifth line; rules\n String fifth = scanner.nextLine();\n if (!fifth.equals(\"Productions:\")) {\n throw new IllegalArgumentException(\n \"Parsed grammar does not contain the String 'Productions' in the fifth line.\");\n }\n Set<Production> productions = new HashSet<>();\n String production;\n while (!(production = scanner.nextLine()).equals(\"END\")) {\n if (!production.contains(\" -> \")) {\n throw new IllegalArgumentException(\"Production \" + production + \" does not contain ' -> '\");\n }\n String[] split = production.split(\" -> \");\n String left = split[0];\n if (split.length == 1) { // \"A -> \"; empty production.\n productions.add(new Production(left, \"\"));\n } else {\n String[] right = split[1].split(\"\\\\|\");\n for (String r : right) {\n productions.add(new Production(left, r));\n }\n int j = split[1].lastIndexOf(\"|\");\n if (split[1].lastIndexOf(\"|\") == split[1].length() - 1) {\n productions.add(new Production(left, \"\"));\n }\n }\n }\n\n return new Grammar(alphabet, nonterminals, productions, start);\n }",
"public Grammar()\n {\n this.rules = new ArrayList<Rule>();\n }",
"SAPL parse(String saplDefinition);",
"private static Parser<ExpressionGrammar> makeParser() {\n // Try to read the grammar file relative to the project root\n try {\n // Read the grammar as a file, relative to the project root.\n final File grammarFile = new File(\"src/crossword/Puzzle.g\");\n return Parser.compile(grammarFile, ExpressionGrammar.FILE);\n \n // Parser.compile() throws two checked exceptions.\n // Translate these checked exceptions into unchecked RuntimeExceptions,\n // because these failures indicate internal bugs rather than client errors\n } \n catch (IOException e) {\n throw new RuntimeException(\"can't read the grammar file\", e);\n } \n catch (UnableToParseException e) {\n throw new RuntimeException(\"the grammar has a syntax error\", e);\n }\n }",
"private Grammar make_grammar() {\n ITEM[] items;\n STATE state;\n PRODUCTION start_prod;\n PRODUCTION[] prodtab;\n Grammar grammar;\n\n /* Create an initial LR(1) item containing the start production and\n * the end-of-input marker as a lookahead symbol.\n */\n\n if (_goal_symbol == null)\n throw S.parseError(\"No goal symbol.\");\n\n start_prod = _goal_symbol.productions;\n\n if (start_prod.next != null)\n throw S.parseError(\"Start symbol must have only one right-hand side.\");\n\n items = new ITEM[1]; // Make item for start production\n items[0] = newitem(start_prod);\n items[0].lookaheads.set(_EOI_);\n state = newstate(items, 1);\n\n lr(state); // Add shifts and gotos to the table\n reductions(); // Add the reductions\n\n grammar = new Grammar();\n prodtab = mkprodtab();\n\n grammar.prefix_keys = prefix_keys();\n grammar.infix_keys = infix_keys();\n grammar.blocks = _code_blocks;\n grammar.fragments = _fragments;\n grammar.yy_action = make_tab(_actions);\n grammar.yy_goto = make_tab(_gotos);\n grammar.yy_stok = make_yy_stok();\n grammar.yy_lhs = make_yy_lhs(prodtab);\n grammar.yy_reduce = make_yy_reduce(prodtab);\n grammar.yy_acts = _yy_acts;\n\n return grammar;\n }",
"protected abstract Parser createParser();",
"protected ASTParser createASTParser() {\n ASTParser parser = ASTParser.newParser(this.testLevel);\n return parser;\n }",
"public Grammar() {\n grammar = new TreeMap<>();\n }",
"public Grammar() {\n unaryRulesMap = new HashMap<>();\n binaryRulesMap = new HashMap<>();\n }",
"IGrammarComp getGrammar();",
"public final ManchesterOWLSyntaxAutoComplete.axiom_return axiom() {\n ManchesterOWLSyntaxAutoComplete.axiom_return retval = new ManchesterOWLSyntaxAutoComplete.axiom_return();\n retval.start = input.LT(1);\n ManchesterOWLSyntaxTree p = null;\n ManchesterOWLSyntaxTree anotherProperty = null;\n ManchesterOWLSyntaxTree subject = null;\n ManchesterOWLSyntaxTree anotherIndividual = null;\n ManchesterOWLSyntaxAutoComplete.expression_return superClass = null;\n ManchesterOWLSyntaxAutoComplete.expression_return rhs = null;\n ManchesterOWLSyntaxAutoComplete.unary_return superProperty = null;\n ManchesterOWLSyntaxAutoComplete.unary_return object = null;\n ManchesterOWLSyntaxAutoComplete.expression_return domain = null;\n ManchesterOWLSyntaxAutoComplete.expression_return range = null;\n ManchesterOWLSyntaxAutoComplete.axiom_return a = null;\n try {\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:284:1:\n // ( ^( SUB_CLASS_AXIOM ^( EXPRESSION subClass= expression ) ^(\n // EXPRESSION superClass= expression ) ) | ^( EQUIVALENT_TO_AXIOM ^(\n // EXPRESSION lhs= expression ) ^( EXPRESSION rhs= expression ) ) |\n // ^( INVERSE_OF ^( EXPRESSION p= IDENTIFIER ) ^( EXPRESSION\n // anotherProperty= IDENTIFIER ) ) | ^( DISJOINT_WITH_AXIOM ^(\n // EXPRESSION lhs= expression ) ^( EXPRESSION rhs= expression ) ) |\n // ^( SUB_PROPERTY_AXIOM ^( EXPRESSION subProperty= expression ) ^(\n // EXPRESSION superProperty= unary ) ) | ^( ROLE_ASSERTION ^(\n // EXPRESSION subject= IDENTIFIER ) ^( EXPRESSION predicate=\n // propertyExpression ) ^( EXPRESSION object= unary ) ) | ^(\n // TYPE_ASSERTION ^( EXPRESSION description= expression ) ^(\n // EXPRESSION subject= IDENTIFIER ) ) | ^( DOMAIN ^( EXPRESSION p=\n // IDENTIFIER ) ^( EXPRESSION domain= expression ) ) | ^( RANGE ^(\n // EXPRESSION p= IDENTIFIER ) ^( EXPRESSION range= expression ) ) |\n // ^( SAME_AS_AXIOM ^( EXPRESSION anIndividual= IDENTIFIER ) ^(\n // EXPRESSION anotherIndividual= IDENTIFIER ) ) | ^(\n // DIFFERENT_FROM_AXIOM ^( EXPRESSION anIndividual= IDENTIFIER ) ^(\n // EXPRESSION anotherIndividual= IDENTIFIER ) ) | ^( UNARY_AXIOM\n // FUNCTIONAL ^( EXPRESSION p= IDENTIFIER ) ) | ^( UNARY_AXIOM\n // INVERSE_FUNCTIONAL ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // UNARY_AXIOM IRREFLEXIVE ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // UNARY_AXIOM REFLEXIVE ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // UNARY_AXIOM SYMMETRIC ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // UNARY_AXIOM TRANSITIVE ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // NEGATED_ASSERTION a= axiom ) )\n int alt16 = 18;\n alt16 = dfa16.predict(input);\n switch (alt16) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:285:3:\n // ^( SUB_CLASS_AXIOM ^( EXPRESSION subClass= expression ) ^(\n // EXPRESSION superClass= expression ) )\n {\n match(input, SUB_CLASS_AXIOM, FOLLOW_SUB_CLASS_AXIOM_in_axiom936);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom940);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom947);\n expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom952);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom959);\n superClass = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n superClass.node.getCompletions());\n } else {\n retval.completions = new ArrayList<>(\n AutoCompleteStrings\n .getStandaloneExpressionCompletions(superClass.node\n .getEvalType()));\n }\n }\n }\n break;\n case 2:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:293:5:\n // ^( EQUIVALENT_TO_AXIOM ^( EXPRESSION lhs= expression ) ^(\n // EXPRESSION rhs= expression ) )\n {\n match(input, EQUIVALENT_TO_AXIOM,\n FOLLOW_EQUIVALENT_TO_AXIOM_in_axiom972);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom975);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom981);\n expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom985);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom992);\n rhs = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n rhs.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 3:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:301:4:\n // ^( INVERSE_OF ^( EXPRESSION p= IDENTIFIER ) ^( EXPRESSION\n // anotherProperty= IDENTIFIER ) )\n {\n match(input, INVERSE_OF, FOLLOW_INVERSE_OF_in_axiom1007);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1010);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1016);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1020);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n anotherProperty = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1026);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = anotherProperty.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 4:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:309:5:\n // ^( DISJOINT_WITH_AXIOM ^( EXPRESSION lhs= expression ) ^(\n // EXPRESSION rhs= expression ) )\n {\n match(input, DISJOINT_WITH_AXIOM,\n FOLLOW_DISJOINT_WITH_AXIOM_in_axiom1038);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1041);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1048);\n expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1052);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1058);\n rhs = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n rhs.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 5:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:316:4:\n // ^( SUB_PROPERTY_AXIOM ^( EXPRESSION subProperty= expression )\n // ^( EXPRESSION superProperty= unary ) )\n {\n match(input, SUB_PROPERTY_AXIOM,\n FOLLOW_SUB_PROPERTY_AXIOM_in_axiom1070);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1073);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1080);\n expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1084);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_unary_in_axiom1090);\n superProperty = unary();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n superProperty.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 6:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:324:4:\n // ^( ROLE_ASSERTION ^( EXPRESSION subject= IDENTIFIER ) ^(\n // EXPRESSION predicate= propertyExpression ) ^( EXPRESSION\n // object= unary ) )\n {\n match(input, ROLE_ASSERTION, FOLLOW_ROLE_ASSERTION_in_axiom1104);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1107);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n subject = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1114);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1118);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_propertyExpression_in_axiom1125);\n propertyExpression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1129);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_unary_in_axiom1135);\n object = unary();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n object.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 7:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:331:5:\n // ^( TYPE_ASSERTION ^( EXPRESSION description= expression ) ^(\n // EXPRESSION subject= IDENTIFIER ) )\n {\n match(input, TYPE_ASSERTION, FOLLOW_TYPE_ASSERTION_in_axiom1145);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1148);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1155);\n expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1159);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n subject = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1165);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = subject.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 8:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:339:4:\n // ^( DOMAIN ^( EXPRESSION p= IDENTIFIER ) ^( EXPRESSION domain=\n // expression ) )\n {\n match(input, DOMAIN, FOLLOW_DOMAIN_in_axiom1177);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1180);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1186);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1190);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1196);\n domain = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n domain.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 9:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:347:5:\n // ^( RANGE ^( EXPRESSION p= IDENTIFIER ) ^( EXPRESSION range=\n // expression ) )\n {\n match(input, RANGE, FOLLOW_RANGE_in_axiom1209);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1212);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1218);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1222);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1228);\n range = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n range.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 10:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:355:6:\n // ^( SAME_AS_AXIOM ^( EXPRESSION anIndividual= IDENTIFIER ) ^(\n // EXPRESSION anotherIndividual= IDENTIFIER ) )\n {\n match(input, SAME_AS_AXIOM, FOLLOW_SAME_AS_AXIOM_in_axiom1243);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1246);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, IDENTIFIER, FOLLOW_IDENTIFIER_in_axiom1251);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1255);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n anotherIndividual = (ManchesterOWLSyntaxTree) match(input,\n IDENTIFIER, FOLLOW_IDENTIFIER_in_axiom1261);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = anotherIndividual.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 11:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:363:7:\n // ^( DIFFERENT_FROM_AXIOM ^( EXPRESSION anIndividual=\n // IDENTIFIER ) ^( EXPRESSION anotherIndividual= IDENTIFIER ) )\n {\n match(input, DIFFERENT_FROM_AXIOM,\n FOLLOW_DIFFERENT_FROM_AXIOM_in_axiom1277);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1280);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, IDENTIFIER, FOLLOW_IDENTIFIER_in_axiom1285);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1289);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n anotherIndividual = (ManchesterOWLSyntaxTree) match(input,\n IDENTIFIER, FOLLOW_IDENTIFIER_in_axiom1295);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = anotherIndividual.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 12:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:371:5:\n // ^( UNARY_AXIOM FUNCTIONAL ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1309);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, FUNCTIONAL, FOLLOW_FUNCTIONAL_in_axiom1311);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1314);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1320);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 13:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:379:5:\n // ^( UNARY_AXIOM INVERSE_FUNCTIONAL ^( EXPRESSION p= IDENTIFIER\n // ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1333);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, INVERSE_FUNCTIONAL,\n FOLLOW_INVERSE_FUNCTIONAL_in_axiom1335);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1338);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1344);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 14:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:387:7:\n // ^( UNARY_AXIOM IRREFLEXIVE ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1360);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, IRREFLEXIVE, FOLLOW_IRREFLEXIVE_in_axiom1362);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1365);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1371);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 15:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:395:6:\n // ^( UNARY_AXIOM REFLEXIVE ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1386);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, REFLEXIVE, FOLLOW_REFLEXIVE_in_axiom1388);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1391);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1397);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 16:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:403:6:\n // ^( UNARY_AXIOM SYMMETRIC ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1412);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, SYMMETRIC, FOLLOW_SYMMETRIC_in_axiom1414);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1417);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1423);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 17:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:411:7:\n // ^( UNARY_AXIOM TRANSITIVE ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1440);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, TRANSITIVE, FOLLOW_TRANSITIVE_in_axiom1442);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1445);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1451);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 18:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:419:6:\n // ^( NEGATED_ASSERTION a= axiom )\n {\n match(input, NEGATED_ASSERTION, FOLLOW_NEGATED_ASSERTION_in_axiom1466);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_axiom_in_axiom1471);\n a = axiom();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = a.completions;\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n }\n if (state.backtracking == 1 && retval.completions != null) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(retval.completions);\n }\n } catch (@SuppressWarnings(\"unused\") RecognitionException | RewriteEmptyStreamException exception) {}\n return retval;\n }",
"public interface Axiom {\r\n/**\r\n * Return an axiom that a consulting structure can use\r\n * to prove itself.\r\n *\r\n * @return an axiom that a consulting structure can use\r\n * to prove itself.\r\n */\r\nDynamicAxiom dynamicAxiom(AxiomSource as);\r\n/**\r\n * Return the first structure of this axiom.\r\n *\r\n * @return the first structure of this axiom\r\n */\r\nStructure head();\r\n}",
"public AutomataStructure createAutomataStructure();",
"interface GrammarCreator {\n /**\n * Creates the built-in grammar.\n * @param uri the URI for the built-in grammar to create.\n * @return created grammar as a byte stream\n * @exception BadFetchError\n * error creating the grammar\n * @exception IOException\n * error reading the grammar\n */\n byte[] createGrammar(final URI uri) throws BadFetchError, IOException;\n\n /**\n * Retrieves the type name of this grammar creator.\n * @return type name\n * @since 0.7.5\n */\n String getTypeName();\n}",
"private static Parser<Grammar> makeParser(final File grammar) {\n try {\n\n return Parser.compile(grammar, Grammar.ROOT);\n\n // translate these checked exceptions into unchecked\n // RuntimeExceptions,\n // because these failures indicate internal bugs rather than client\n // errors\n } catch (IOException e) {\n throw new RuntimeException(\"can't read the grammar file\", e);\n } catch (UnableToParseException e) {\n throw new IllegalArgumentException(\"the grammar has a syntax error\", e);\n }\n }",
"public static AclfModelParser createAclfModelParser() {\r\n\t\tAclfModelParser parser = new AclfModelParser();\r\n\t\treturn parser;\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__BooleanBinaryExpression__Group__0" $ANTLR start "rule__BooleanBinaryExpression__Group__0__Impl" InternalActivityDiagram.g:6203:1: rule__BooleanBinaryExpression__Group__0__Impl : ( ( rule__BooleanBinaryExpression__AssigneeAssignment_0 ) ) ; | public final void rule__BooleanBinaryExpression__Group__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalActivityDiagram.g:6207:1: ( ( ( rule__BooleanBinaryExpression__AssigneeAssignment_0 ) ) )
// InternalActivityDiagram.g:6208:1: ( ( rule__BooleanBinaryExpression__AssigneeAssignment_0 ) )
{
// InternalActivityDiagram.g:6208:1: ( ( rule__BooleanBinaryExpression__AssigneeAssignment_0 ) )
// InternalActivityDiagram.g:6209:1: ( rule__BooleanBinaryExpression__AssigneeAssignment_0 )
{
before(grammarAccess.getBooleanBinaryExpressionAccess().getAssigneeAssignment_0());
// InternalActivityDiagram.g:6210:1: ( rule__BooleanBinaryExpression__AssigneeAssignment_0 )
// InternalActivityDiagram.g:6210:2: rule__BooleanBinaryExpression__AssigneeAssignment_0
{
pushFollow(FollowSets000.FOLLOW_2);
rule__BooleanBinaryExpression__AssigneeAssignment_0();
state._fsp--;
}
after(grammarAccess.getBooleanBinaryExpressionAccess().getAssigneeAssignment_0());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__BooleanUnaryExpression__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // InternalActivityDiagram.g:6082:1: ( ( ( rule__BooleanUnaryExpression__AssigneeAssignment_0 ) ) )\n // InternalActivityDiagram.g:6083:1: ( ( rule__BooleanUnaryExpression__AssigneeAssignment_0 ) )\n {\n // InternalActivityDiagram.g:6083:1: ( ( rule__BooleanUnaryExpression__AssigneeAssignment_0 ) )\n // InternalActivityDiagram.g:6084:1: ( rule__BooleanUnaryExpression__AssigneeAssignment_0 )\n {\n before(grammarAccess.getBooleanUnaryExpressionAccess().getAssigneeAssignment_0()); \n // InternalActivityDiagram.g:6085:1: ( rule__BooleanUnaryExpression__AssigneeAssignment_0 )\n // InternalActivityDiagram.g:6085:2: rule__BooleanUnaryExpression__AssigneeAssignment_0\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__BooleanUnaryExpression__AssigneeAssignment_0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getBooleanUnaryExpressionAccess().getAssigneeAssignment_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__IntegerComparisonExpression__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // InternalActivityDiagram.g:5926:1: ( ( ( rule__IntegerComparisonExpression__AssigneeAssignment_0 ) ) )\n // InternalActivityDiagram.g:5927:1: ( ( rule__IntegerComparisonExpression__AssigneeAssignment_0 ) )\n {\n // InternalActivityDiagram.g:5927:1: ( ( rule__IntegerComparisonExpression__AssigneeAssignment_0 ) )\n // InternalActivityDiagram.g:5928:1: ( rule__IntegerComparisonExpression__AssigneeAssignment_0 )\n {\n before(grammarAccess.getIntegerComparisonExpressionAccess().getAssigneeAssignment_0()); \n // InternalActivityDiagram.g:5929:1: ( rule__IntegerComparisonExpression__AssigneeAssignment_0 )\n // InternalActivityDiagram.g:5929:2: rule__IntegerComparisonExpression__AssigneeAssignment_0\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__IntegerComparisonExpression__AssigneeAssignment_0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getIntegerComparisonExpressionAccess().getAssigneeAssignment_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__AssignmentExpression__Group_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:9471:1: ( rule__AssignmentExpression__Group_0__1__Impl )\n // InternalReflex.g:9472:2: rule__AssignmentExpression__Group_0__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__AssignmentExpression__Group_0__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__AssignmentExpression__Group_0__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:9482:1: ( ( ( rule__AssignmentExpression__AssignOpAssignment_0_1 ) ) )\n // InternalReflex.g:9483:1: ( ( rule__AssignmentExpression__AssignOpAssignment_0_1 ) )\n {\n // InternalReflex.g:9483:1: ( ( rule__AssignmentExpression__AssignOpAssignment_0_1 ) )\n // InternalReflex.g:9484:2: ( rule__AssignmentExpression__AssignOpAssignment_0_1 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getAssignmentExpressionAccess().getAssignOpAssignment_0_1()); \n }\n // InternalReflex.g:9485:2: ( rule__AssignmentExpression__AssignOpAssignment_0_1 )\n // InternalReflex.g:9485:3: rule__AssignmentExpression__AssignOpAssignment_0_1\n {\n pushFollow(FOLLOW_2);\n rule__AssignmentExpression__AssignOpAssignment_0_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getAssignmentExpressionAccess().getAssignOpAssignment_0_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 }",
"public final void rule__XAssignment__Group_1_1__0__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:17371:1: ( ( ( rule__XAssignment__Group_1_1_0__0 ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17372:1: ( ( rule__XAssignment__Group_1_1_0__0 ) )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17372:1: ( ( rule__XAssignment__Group_1_1_0__0 ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17373:1: ( rule__XAssignment__Group_1_1_0__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXAssignmentAccess().getGroup_1_1_0()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17374:1: ( rule__XAssignment__Group_1_1_0__0 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17374:2: rule__XAssignment__Group_1_1_0__0\r\n {\r\n pushFollow(FOLLOW_rule__XAssignment__Group_1_1_0__0_in_rule__XAssignment__Group_1_1__0__Impl35260);\r\n rule__XAssignment__Group_1_1_0__0();\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.getXAssignmentAccess().getGroup_1_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__XAssignment__Group_1_1_0__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:17420:1: ( rule__XAssignment__Group_1_1_0__0__Impl )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17421:2: rule__XAssignment__Group_1_1_0__0__Impl\r\n {\r\n pushFollow(FOLLOW_rule__XAssignment__Group_1_1_0__0__Impl_in_rule__XAssignment__Group_1_1_0__035351);\r\n rule__XAssignment__Group_1_1_0__0__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__XAssignment__Group_1_1_0__0__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:17431:1: ( ( ( rule__XAssignment__Group_1_1_0_0__0 ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17432:1: ( ( rule__XAssignment__Group_1_1_0_0__0 ) )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17432:1: ( ( rule__XAssignment__Group_1_1_0_0__0 ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17433:1: ( rule__XAssignment__Group_1_1_0_0__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXAssignmentAccess().getGroup_1_1_0_0()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17434:1: ( rule__XAssignment__Group_1_1_0_0__0 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17434:2: rule__XAssignment__Group_1_1_0_0__0\r\n {\r\n pushFollow(FOLLOW_rule__XAssignment__Group_1_1_0_0__0_in_rule__XAssignment__Group_1_1_0__0__Impl35378);\r\n rule__XAssignment__Group_1_1_0_0__0();\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.getXAssignmentAccess().getGroup_1_1_0_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__AssignmentExpression__Group_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:9444:1: ( rule__AssignmentExpression__Group_0__0__Impl rule__AssignmentExpression__Group_0__1 )\n // InternalReflex.g:9445:2: rule__AssignmentExpression__Group_0__0__Impl rule__AssignmentExpression__Group_0__1\n {\n pushFollow(FOLLOW_83);\n rule__AssignmentExpression__Group_0__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__AssignmentExpression__Group_0__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XAssignment__Group_0__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:17204:1: ( rule__XAssignment__Group_0__1__Impl rule__XAssignment__Group_0__2 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17205:2: rule__XAssignment__Group_0__1__Impl rule__XAssignment__Group_0__2\r\n {\r\n pushFollow(FOLLOW_rule__XAssignment__Group_0__1__Impl_in_rule__XAssignment__Group_0__134925);\r\n rule__XAssignment__Group_0__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__XAssignment__Group_0__2_in_rule__XAssignment__Group_0__134928);\r\n rule__XAssignment__Group_0__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__XAssignment__Group_1_1_0__0__Impl() 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:5364:1: ( ( ( rule__XAssignment__Group_1_1_0_0__0 ) ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5365:1: ( ( rule__XAssignment__Group_1_1_0_0__0 ) )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5365:1: ( ( rule__XAssignment__Group_1_1_0_0__0 ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5366:1: ( rule__XAssignment__Group_1_1_0_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXAssignmentAccess().getGroup_1_1_0_0()); \n }\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5367:1: ( rule__XAssignment__Group_1_1_0_0__0 )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5367:2: rule__XAssignment__Group_1_1_0_0__0\n {\n pushFollow(FOLLOW_rule__XAssignment__Group_1_1_0_0__0_in_rule__XAssignment__Group_1_1_0__0__Impl11339);\n rule__XAssignment__Group_1_1_0_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXAssignmentAccess().getGroup_1_1_0_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__XAssignment__Group_1_1_0__0() 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:3747:1: ( rule__XAssignment__Group_1_1_0__0__Impl )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3748:2: rule__XAssignment__Group_1_1_0__0__Impl\n {\n pushFollow(FOLLOW_rule__XAssignment__Group_1_1_0__0__Impl_in_rule__XAssignment__Group_1_1_0__08058);\n rule__XAssignment__Group_1_1_0__0__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__XAssignment__Group_0__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:17173:1: ( rule__XAssignment__Group_0__0__Impl rule__XAssignment__Group_0__1 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17174:2: rule__XAssignment__Group_0__0__Impl rule__XAssignment__Group_0__1\r\n {\r\n pushFollow(FOLLOW_rule__XAssignment__Group_0__0__Impl_in_rule__XAssignment__Group_0__034864);\r\n rule__XAssignment__Group_0__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__XAssignment__Group_0__1_in_rule__XAssignment__Group_0__034867);\r\n rule__XAssignment__Group_0__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__XAssignment__Group_1_1_0_0__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:17481:1: ( rule__XAssignment__Group_1_1_0_0__1__Impl )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17482:2: rule__XAssignment__Group_1_1_0_0__1__Impl\r\n {\r\n pushFollow(FOLLOW_rule__XAssignment__Group_1_1_0_0__1__Impl_in_rule__XAssignment__Group_1_1_0_0__135471);\r\n rule__XAssignment__Group_1_1_0_0__1__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__XAssignment__Group_1_1_0__0() 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:5353:1: ( rule__XAssignment__Group_1_1_0__0__Impl )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5354:2: rule__XAssignment__Group_1_1_0__0__Impl\n {\n pushFollow(FOLLOW_rule__XAssignment__Group_1_1_0__0__Impl_in_rule__XAssignment__Group_1_1_0__011312);\n rule__XAssignment__Group_1_1_0__0__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__XAssignment__Group_1_1_0__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:5553:1: ( rule__XAssignment__Group_1_1_0__0__Impl )\r\n // InternalDroneScript.g:5554:2: rule__XAssignment__Group_1_1_0__0__Impl\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__XAssignment__Group_1_1_0__0__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__AssignmentExpression__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:9402:1: ( ( ( rule__AssignmentExpression__Group_0__0 )? ) )\n // InternalReflex.g:9403:1: ( ( rule__AssignmentExpression__Group_0__0 )? )\n {\n // InternalReflex.g:9403:1: ( ( rule__AssignmentExpression__Group_0__0 )? )\n // InternalReflex.g:9404:2: ( rule__AssignmentExpression__Group_0__0 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getAssignmentExpressionAccess().getGroup_0()); \n }\n // InternalReflex.g:9405:2: ( rule__AssignmentExpression__Group_0__0 )?\n int alt62=2;\n int LA62_0 = input.LA(1);\n\n if ( (LA62_0==RULE_ID) ) {\n int LA62_1 = input.LA(2);\n\n if ( ((LA62_1>=47 && LA62_1<=56)) ) {\n alt62=1;\n }\n }\n switch (alt62) {\n case 1 :\n // InternalReflex.g:9405:3: rule__AssignmentExpression__Group_0__0\n {\n pushFollow(FOLLOW_2);\n rule__AssignmentExpression__Group_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getAssignmentExpressionAccess().getGroup_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__IntegerCalculationExpression__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // InternalActivityDiagram.g:5770:1: ( ( ( rule__IntegerCalculationExpression__AssigneeAssignment_0 ) ) )\n // InternalActivityDiagram.g:5771:1: ( ( rule__IntegerCalculationExpression__AssigneeAssignment_0 ) )\n {\n // InternalActivityDiagram.g:5771:1: ( ( rule__IntegerCalculationExpression__AssigneeAssignment_0 ) )\n // InternalActivityDiagram.g:5772:1: ( rule__IntegerCalculationExpression__AssigneeAssignment_0 )\n {\n before(grammarAccess.getIntegerCalculationExpressionAccess().getAssigneeAssignment_0()); \n // InternalActivityDiagram.g:5773:1: ( rule__IntegerCalculationExpression__AssigneeAssignment_0 )\n // InternalActivityDiagram.g:5773:2: rule__IntegerCalculationExpression__AssigneeAssignment_0\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__IntegerCalculationExpression__AssigneeAssignment_0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getIntegerCalculationExpressionAccess().getAssigneeAssignment_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__XAssignment__Group_0__0() 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:5106:1: ( rule__XAssignment__Group_0__0__Impl rule__XAssignment__Group_0__1 )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5107:2: rule__XAssignment__Group_0__0__Impl rule__XAssignment__Group_0__1\n {\n pushFollow(FOLLOW_rule__XAssignment__Group_0__0__Impl_in_rule__XAssignment__Group_0__010825);\n rule__XAssignment__Group_0__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XAssignment__Group_0__1_in_rule__XAssignment__Group_0__010828);\n rule__XAssignment__Group_0__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XAssignment__Group_1_1_0__0__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:3758:1: ( ( ( rule__XAssignment__Group_1_1_0_0__0 ) ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3759:1: ( ( rule__XAssignment__Group_1_1_0_0__0 ) )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3759:1: ( ( rule__XAssignment__Group_1_1_0_0__0 ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3760:1: ( rule__XAssignment__Group_1_1_0_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXAssignmentAccess().getGroup_1_1_0_0()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3761:1: ( rule__XAssignment__Group_1_1_0_0__0 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3761:2: rule__XAssignment__Group_1_1_0_0__0\n {\n pushFollow(FOLLOW_rule__XAssignment__Group_1_1_0_0__0_in_rule__XAssignment__Group_1_1_0__0__Impl8085);\n rule__XAssignment__Group_1_1_0_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXAssignmentAccess().getGroup_1_1_0_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 }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This demo will show products from a text based data source to the console implementing MVC. Two different ways of setting the same type of attribute. | public static void main(String[] args) {
DataStore dataStore = new DataStore();
dataStore.setDataSource(Settings.DATASOURCE); // Method 1: Setting the attribute in it's own method after the object has been initialized.
IUserView display = Display.CreateDisplay(Settings.DISPLAY); // Method 2: Setting the attribute in the constructor during initialization.
// List all of the products in the product catalog.
int i;
for (Product p : dataStore.getProducts(Product.ProductCategory.FOOD) ) {
display.Display(p.getName() + " - " + p.getPrice() + ", sale price: " + SaleController.ApplyDiscount(p, .10f).getPrice());
}
} | [
"private void setProductMarkup(double productMarkup) \n {\n\n this.productMarkup = productMarkup;\n }",
"public static void main(String[] args) {\n AbstractApplicationContext context = new AnnotationConfigApplicationContext(\"com.ravindra\");\n Product p =(Product)context.getBean(\"product \");\n p.setId(\"123\");\n p.setName(\"Dell\");\n p.setPrice(400);\n System.out.println(p.toString());\n }",
"public static void main(String[] args) {\n WeightBasedProduct apple = new WeightBasedProduct(\"Apple\",\"\",100,2);\n\n //Creating a list of Variants for Our VariantBasedProduct\n List<Variant> variants = new ArrayList<>(\n Arrays.asList(new Variant(\"500g Packet\",90), new Variant(\"1kg Packet\",180))\n );\n \n //Creating a object kiwi of class VariantBasedProduct\n VariantsBasedProducts kiwi = new VariantsBasedProducts(\"Kiwi\",\"\",variants);\n System.out.println(apple);\n System.out.println(kiwi);\n }",
"@Test\n public void testSetCaracteristicas_prod() {\n System.out.println(\"setCaracteristicas_prod\");\n String caracteristicas_prod = \"\";\n Produto produto = new Produto(1, \"Livrao\", \"Comedia\", \"25x13\", \"300\", \"Entretenimento\", 123);\n produto.setCaracteristicas_prod(caracteristicas_prod);\n }",
"public static void main(String[] args) {\n String productName = \"Amazon Fire\";\n String model = \"HD\";\n int version = 8;\n float price = 79.99f;\n\n System.out.println(\"I saw \" + productName + \" \" + model + version +\n \" \\nhands-free with Alexa \\nfor $\" + price);\n\n System.out.println(productName);\n\n }",
"@Test\n public void testSetDescricao_prod() {\n System.out.println(\"setDescricao_prod\");\n String descricao_prod = \"Livreto\";\n Produto produto = new Produto(3, \"Livrao\", \"Comedia\", \"20x13\", \"300\", \"Entretenimento\", 3212);\n produto.setDescricao_prod(descricao_prod);\n }",
"public void setJSONtoModelAttribute(Model model, String typeOfProduct){\n \tif(typeOfProduct.equals(\"printer\")){//separate for printers because they need to sort by equipment\n\t\t\tmodel.addAttribute(typeOfProduct, getShowedProperty(jsonObjectParser(typeOfProduct))); \n\t\t\t\n \t} else if(typeOfProduct.equals(\"rip\")){// rip has JSONArray in his structure\n \t\tmodel.addAttribute(typeOfProduct , jsonArrayParser(typeOfProduct));\t\t\n \t\t\n \t} else if(typeOfProduct.equals(\"3d_printer\")){//bad naming of attribute in 3d printers\n \t\tmodel.addAttribute(\"printer\" , getShowedProperty(jsonObjectParser(typeOfProduct))); \n \t\t\n \t} else if(typeOfProduct.equals(\"digital_printer\")){\n \t\tmodel.addAttribute(typeOfProduct , getShowedProperty(jsonObjectParser(typeOfProduct))); \n \t\t\n \t} else if(typeOfProduct.equals(\"laminator\")){\n \t\tmodel.addAttribute(typeOfProduct , getShowedProperty(jsonObjectParser(typeOfProduct))); \n \t\t\n \t} else if(typeOfProduct.equals(\"laser\")){\n \t\tmodel.addAttribute(typeOfProduct , getShowedProperty(jsonObjectParser(typeOfProduct))); \n \t\t\n \t} else if(typeOfProduct.equals(\"cutter\")){\n \t\tmodel.addAttribute(typeOfProduct , getShowedProperty(jsonObjectParser(typeOfProduct))); \n \t\t\n \t} else if(typeOfProduct.equals(\"scanner\")){\n \t\tmodel.addAttribute(typeOfProduct , getShowedProperty(jsonObjectParser(typeOfProduct))); \n \t\t\n \t} else {\n \t\tmodel.addAttribute(typeOfProduct , jsonObjectParser(typeOfProduct)); \t\t\n \t}\n\t}",
"public void showAttributes() {\r\n\t\tSystem.out.println(\"Name : \"+getName());\r\n\t\tSystem.out.println(\"ID : \"+getId());\r\n\t\tSystem.out.println(\"Percentage : \"+getPercentage());\r\n\t\tSystem.out.println(\"Skills : \");\r\n\t\tfor(String skill:getSkills()) {\r\n\t\t\tSystem.out.print(skill+\" \");\r\n\t\t}\r\n\t\t\r\n\t}",
"public void setProductLine(entity.APDProductLine value);",
"@FXML\n\t private void setProdInfoToTextArea ( Product prod) {\n\t resultArea.setText(\"Denumire: \" + prod.getDenumire() + \"\\n\" +\"Producator: \" + prod.getProducator() + \"\\n\" + \"Pret: \" + prod.getPrice() + \"\\n\" + \"Marime: \" + prod.getMarime() + \"\\n\" + \"Culoare: \" + prod.getCuloare());\n\t }",
"@Test\n public void testSetProductName_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 String productName = \"\";\n\n fixture.setProductName(productName);\n\n }",
"public void setProduct(Product product) {\n this.product = product;\n }",
"public void setProduct(entity.APDProduct value);",
"public ProductTalenshow () {\r\n\t\tsuper();\r\n\t}",
"private void initializeData() {\n lblItem.setText(product.getName());\n txtReference.setText(product.getTransaction().getReferenceNumber());\n txtItem.setText(product.getName());\n txtDescription.setText(product.getDescription());\n txtBrand.setText(product.getBrand());\n txtModel.setText(product.getModel());\n txtQuantity.setText(String.valueOf(product.getQuantity()));\n txtUnit.setText(product.getUnit());\n txtProductDate.setDate(product.getProduct_date());\n txtOrigPrice.setText(String.valueOf(product.getOriginalPrice()));\n txtAgent.setText(product.getAgent());\n txtContactPerson.setText(product.getContactPerson());\n try { \n txtSupplier.setText(((Supplier)product.getSuppliers().toArray()[0]).getName());\n } catch(ArrayIndexOutOfBoundsException ex) {\n System.out.println(ex.toString());\n }\n }",
"@Test\n public void testSetPeso_prod() {\n System.out.println(\"setPeso_prod\");\n String peso_prod = \"400\";\n Produto produto = new Produto(1, \"Livrao\", \"Comedia\", \"25x13\", \"300\", \"Entretenimento\", 256);\n produto.setPeso_prod(peso_prod);\n }",
"public void displayProductDetailEditMenu()\n {\n System.out.println(\"\");\n System.out.println(\"---- Product Editor ----\");\n System.out.println(\"Please select the attribute of product to edit: \");\n System.out.println(\"1. Name\");\n System.out.println(\"2. Type\");\n System.out.println(\"3. Location\");\n System.out.println(\"4. Price\");\n System.out.println(\"5. Sale method\");\n System.out.println(\"6. Shelf life\");\n System.out.println(\"7. Inventory\");\n System.out.println(\"R. return to the previous menu\");\n System.out.println(\"X. exit the MFV system\");\n System.out.println(\"------------------------\");\n }",
"@Test\n public void testSetDrinkAttributes() {\n System.out.println(\"setDrinkAttributes\");\n String drinkName = \"\";\n String drinkCost = \"\";\n SingleBaristaDrinkMenu instance = null;\n instance.setDrinkAttributes(drinkName, drinkCost);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"void setProductDescription(java.lang.String productDescription);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if automation can extract the given item in the given slot from the given side. Args: Slot, item, side | public boolean canExtractItem(int slot, ItemStack item, int side)
{
return this.getAccessibleSlotsFromSide(side)[0] == slot && item.getItem() == waterjetStacks[slot].getItem();
} | [
"public boolean canExtractItem(int slot, ItemStack item, int side)\n {\n return true;\n }",
"@Override\n\tpublic boolean canExtractItem(int slot, ItemStack par2ItemStack, int side) {\n\t\t\n\t\tif((side == BlockRegistry.sideTop || side == BlockRegistry.sideBottom) && slot >= 0 && slot <= 8)\n\t\t\treturn true;\n\t\t\n\t\tif(!(side == BlockRegistry.sideTop || side == BlockRegistry.sideBottom) && slot == nOutputSlot) //sides get the output slot\n\t\t\treturn true;\n\t\t\n\t\t\n\t\treturn false;\n\t}",
"public boolean canInsertItem(int slot, ItemStack item, int side)\n {\n return this.isItemValidForSlot(slot, item) && this.getAccessibleSlotsFromSide(side)[0] == slot;\n }",
"public boolean canInsertItem(int slot, ItemStack item, int side)\n {\n return true;\n }",
"@Override\n\tpublic boolean canInsertItem(int slot, ItemStack par2ItemStack, int side) {\n\t\treturn this.isItemValidForSlot(slot, par2ItemStack);\n\t}",
"private boolean slotContainsItem() {\n return random.nextFloat() < ITEM_CHANCE;\n }",
"public boolean canSeeItem(Item item) {\n\t\treturn this.hasItem(item) || item.getLocation() == this.getLocation();\n\t}",
"boolean isEquipped(Item item);",
"boolean canBuy( final Item item )\n {\n return !ship.contains( item ) && item.getPrice() <= credits;\n }",
"private boolean isGoodItem(Item item) {\n\t\tList<Item> list = Arrays.asList(datamodel);\n\t\twhile (true) {\n\t\t\tif (item == null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tItemType type = item.getType();\n\t\t\tif (type != CadseGCST.ITEM_TYPE && type != CadseGCST.DATA_MODEL && type != CadseGCST.LINK_TYPE) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (list.contains(item)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\titem = item.getPartParent();\n\t\t}\n\t}",
"boolean checkAvailability(Item item);",
"public abstract boolean canRemoveItem(Player player, Item item, int slot);",
"public boolean contains(Item item) { \n \treturn specials != null && specials.contains(item);\n }",
"public boolean canProcess(String item) {\n return ((IntrinsicMachine)this.getIntrinsicSelf()).canProcess(item);\n }",
"public boolean checkItem () {\r\n\t\tfor (Entity e : getLocation().getWorld().getEntities())\r\n\t\t{\r\n\t\t\tdouble x = e.getLocation().getX();\r\n\t\t\tdouble z = e.getLocation().getZ();\r\n\t\t\tdouble yDiff = getSpawnLocation().getY() - e.getLocation().getY();\r\n \r\n\t\t\tif (yDiff < 0)\r\n\t\t\t\tyDiff *= -1;\r\n\r\n\t\t\tif (x == getSpawnLocation().getX() && yDiff <= 1.5 && z == getSpawnLocation().getZ()) {\r\n \r\n ShowCaseStandalone.slog(Level.FINEST, \"Potential hit on checkItem()\");\r\n\t\t\t\ttry {\r\n\t\t\t\t\tItem itemE = (Item)e;\r\n\t\t\t\t\tif (ItemStackHandler.itemsEqual(itemE.getItemStack(), getItemStack(), true)) {\r\n ShowCaseStandalone.slog(Level.FINEST, \"Existing stack: \" + itemE.getItemStack().toString());\r\n itemE.getItemStack().setAmount(1); //Removes duped items, which can occur.\r\n\t\t\t\t\t\tthis.item = itemE;\r\n\t\t\t\t\t\tscs.log(Level.FINER, \"Attaching to existing item.\");\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (Exception ex) {}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean isRight(Item item) {\n return pointDirection(item.center()).getX() >= Math.cos(Math.PI / 4);\n }",
"private boolean canEquip(Item item,String target){\n\n\t\tif (! (item instanceof Equippable))return false;\n\t\tEquippable toEquip = (Equippable)item;\n\t\tswitch(toEquip.getEquipType()){\n\t\tcase HEAD:\n\t\t\tif (target.startsWith(\"EquipPos\"+EquipType.HEAD)) return true;\n\t\t\tbreak;\n\t\tcase CHEST:\n\t\t\tif (target.startsWith(\"EquipPos\"+EquipType.CHEST)) return true;\n\t\t\tbreak;\n\t\tcase WEAPON:\n\t\t\tif (target.startsWith(\"EquipPos\"+EquipType.WEAPON)) return true;\n\t\t\tbreak;\n\t\tcase LEGS:\n\t\t\tif (target.startsWith(\"EquipPos\"+EquipType.LEGS)) return true;\n\t\t\tbreak;\n\t\tcase NECK:\n\t\t\tif (target.startsWith(\"EquipPos\"+EquipType.NECK)) return true;\n\t\t\tbreak;\n\t\tcase BELT:\n\t\t\tif (target.startsWith(\"EquipPos\"+EquipType.BELT)) return true;\n\t\t\tbreak;\n\t\tcase BOOTS:\n\t\t\tif (target.startsWith(\"EquipPos\"+EquipType.BOOTS)) return true;\n\t\t}\n\t\treturn false;\n\t}",
"public static boolean extract(SpItem spItem) {\n if (!evalExtract(spItem)) {\n return false;\n }\n\n spItem.extract();\n\n return true;\n }",
"public boolean itemIsAllowed(int itemId) {\n\t\tswitch (itemId) {\n\t\tcase 15272: // Rocktail\n\t\tcase 7060: // Tuna potato\n\t\tcase 6685:\n\t\tcase 6687:\n\t\tcase 6689:\n\t\tcase 6691: // Saradomin brew\n\t\tcase 3024:\n\t\tcase 3026:\n\t\tcase 3028:\n\t\tcase 3030: // Super restore\n\t\tcase 391: // Manta Ray\n\t\tcase 385: // Shark\n\t\tcase 229: // Vial\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A MetOfficeInterface object represents data from the MetOffice . The MetOffice holds a list of weather stations. You should include a constructor which takes no parameters. | public interface MetOfficeInterface{
List<StationInterface> getWeatherStations();
void addStation(StationInterface station);
/**
* @return The most recent year in which observations are recorded. If no stations or no observations then return 0.
**/
int getLatestYear();
/**
* @return The earliest year in which observations are recorded. If no stations or no observations then return 0.
**/
int getEarliestYear();
/**
* @return The wettest place: the weather station with the highest annual total rainfall in the specified year. If there are no weather stations with observations in the given year then return null.
**/
StationInterface wettestPlace(int year);
/**
* @return The wettest place: the weather station with the highest annual total rainfall in any year
**/
StationInterface wettestPlace();
} | [
"public interface WeatherStation {\n\n\tpublic void connect() throws WeatherStationException;\n\t\n\tpublic void disconnect() throws WeatherStationException;\n\t\n\tpublic WeatherReading getWeatherReading() throws WeatherStationException;\n\t\n}",
"public interface Weather {\n int getPlaceId();\n\n String getPlaceName();\n\n double getPlaceLat();\n\n double getPlaceLon();\n\n int getWeatherId();\n\n String getWeatherMain();\n\n String getWeatherDescription();\n\n String getWeatherIcon();\n\n float getTemperature();\n\n float getPressure();\n\n float getHumidity();\n\n float getWindSpeed();\n\n long getSunriseTime();\n\n long getSunsetTime();\n\n long getStartTime();\n\n long getEndTime();\n\n}",
"public interface IWeather extends IOpenScenarioModelElement {\n /**\n * From OpenSCENARIO class model specification: Definition of the cloud state, i.e. cloud state\n * and sky visualization settings.\n *\n * @return value of model property cloudState\n */\n public CloudState getCloudState();\n /**\n * From OpenSCENARIO class model specification: Definition of the sun, i.e. position and\n * intensity.\n *\n * @return value of model property sun\n */\n public ISun getSun();\n /**\n * From OpenSCENARIO class model specification: Definition of fog, i.e. visual range and bounding\n * box.\n *\n * @return value of model property fog\n */\n public IFog getFog();\n /**\n * From OpenSCENARIO class model specification: Definition of precipitation, i.e. type and\n * intensity.\n *\n * @return value of model property precipitation\n */\n public IPrecipitation getPrecipitation();\n}",
"public WorkstationIfc instantiateWorkstationIfc()\n {\n return(DomainGateway.getFactory().getWorkstationInstance());\n }",
"public interface IWeatherDataProvider {\n\n\tpublic WeatherData getWeatherData(Location location);\n\t\n}",
"public interface MotifMetaIO\n{\n public void saveMeta(PrintWriter out, Object meta);\n public Object loadMeta(BufferedReader in) throws IOException; \n public Motif construct();\n public Motif construct(ArrayList<WindowLocation> _occs);\n public boolean hasOccCount();\n public int getOccCount();\n}",
"public interface StationDataProvider {\n\n List<GroundStation> getStations();\n\n}",
"public InfoDataIF() {\n initComponents();\n }",
"public interface IMetronomeEngine {\n\n public Integer getTempo();\n\n public void setTempo(Integer untemps);\n\n public Integer getBarLength();\n\n public void setBarLength(Integer untemps);\n\n public boolean isRunning();\n\n public void setRunning(boolean on);\n\n public void setBeatCmd(ICommand cmd);\n\n public void setBarCmd(ICommand cmd);\n\n}",
"public WeatherData() {\n observers=new ArrayList<>();\n }",
"private WeatherData() {}",
"public WeatherAdapter() {}",
"public WeatherData (Long sunset, Long sunrise, int weatherCode, String cityName, int temperature) {\n sunsetTime = sunset;\n sunriseTime = sunrise;\n weather = weatherCode;\n city = cityName;\n temp = temperature;\n }",
"public GISinterface() {\n initComponents();\n \n \n }",
"public WeatherHandler() {\r\n weather = new Weather(0.0, 0.0, 0.0, 0.0, \"\", null);\r\n weatherPrinter = new WeatherPrinter();\r\n weather.addObserver(weatherPrinter);\r\n }",
"public interface IOpenWeatherAPI {\n String ENDPOINT = \"http://api.openweathermap.org/\";\n\n String KEY_OPEN_WEATHER_API = \"0d664d5c76a364c4e18b207ac25a0ef4\";\n\n //******** 5 DÍAS/8 HORAS *******\n //@GET(\"/data/2.5/forecast\")\n //Call<RootPredicciones> getPredicciones(@Query(\"lat\") String latitud, @Query(\"lon\") String longitud);//Información meteorológica de 5 días de la latitud y longitud\n\n\n //******** Actual ***********\n @GET(\"data/2.5/weather\")\n Call<Prediccion> getPrediccionActual(@Query(\"lat\") String latitud, @Query(\"lon\") String longitud);//Información meteorológica actual de la latitud y longitud\n}",
"public ArrayList<MetroStation> loadMetroStations() {\n //request information from tmb with the following url\n Request request = new Request.Builder().url(\"https://api.tmb.cat/v1/transit/linies/metro/estacions?app_id=41936f32&app_key=3c5639afc8280c17cb4f633b78de717b\").build();\n ArrayList<MetroStation> metroStations = new ArrayList<>();\n\n try{\n //get the response from the API\n Response response = client.newCall(request).execute();\n String jsonData = null;\n //if the information is not null\n if(response.body() != null){\n jsonData = response.body().string();\n }\n\n Gson gson = new Gson();\n\n JsonObject metroStationTemp = gson.fromJson(jsonData, JsonObject.class);\n\n for (int i = 0; i < metroStationTemp.get(\"features\").getAsJsonArray().size(); i++) {\n //add all metro stations to an arraylist\n MetroStation ms = new MetroStation(metroStationTemp.get(\"features\").getAsJsonArray().get(i).getAsJsonObject());\n metroStations.add(ms);\n }\n\n }catch (IOException e){\n e.printStackTrace();\n metroStations = null;\n System.out.println(\"Error, unable to get metro stations\");\n }\n return metroStations;\n }",
"public FieldStation(String id, String name){\n this.id = id;\n this.name = name;\n \n //Initialises the SetOfSensors sensors.\n sensors = new SetOfSensors();\n }",
"public WeatherService() {\n super(\"WeatherService\");\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set value of ShowTrace | public final void setShowTrace(java.lang.Boolean showtrace)
{
setShowTrace(getContext(), showtrace);
} | [
"public final void setShowTrace(com.mendix.systemwideinterfaces.core.IContext context, java.lang.Boolean showtrace)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.ShowTrace.toString(), showtrace);\r\n\t}",
"public void setTrace(boolean trace) {\n this.trace = trace;\n }",
"public void setTrace(Boolean Trace) {\n this.Trace = Trace;\n }",
"public void toggleCMPTrace() {\r\n String filename = null;\r\n \r\n cmpTraceEnabled = !cmpTraceEnabled;\r\n if (cmpTraceEnabled) {\r\n filename = getTraceFilename();\r\n if (filename == null) {\r\n cmpTraceEnabled = false;\r\n }\r\n }\r\n \r\n if (cmpTraceEnabled) {\r\n try {\r\n ConfigManagerProxy.enableConfigManagerProxyTracing(filename);\r\n } catch (ConfigManagerProxyLoggedException e) {\r\n cmpTraceEnabled = false;\r\n exerciser.log(e);\r\n }\r\n exerciser.log(ResourcesHandler.getNLSResource(ResourcesHandler.CMP_TRACE_STARTED)+\" \"+filename);\r\n }\r\n \r\n if (!cmpTraceEnabled) {\r\n ConfigManagerProxy.disableConfigManagerProxyTracing();\r\n exerciser.log(ResourcesHandler.getNLSResource(ResourcesHandler.CMP_TRACE_STOPPED));\r\n }\r\n \r\n // Make the checkbox reflect the actual value of trace\r\n exerciser.cmpTraceEnabledMenuItem.setState(cmpTraceEnabled);\r\n }",
"public void setTraceEnabled( boolean trace )\n {\n m_trace = trace;\n }",
"public void setStackTraceTracking(java.lang.Boolean value);",
"@VisibleForTesting\n void maybeSetTraceParameter() {\n String traceParameter = Config.getTraceParameter();\n if (Strings.emptyToNull(traceParameter) != null) {\n setTraceParameter(traceParameter);\n }\n }",
"public static void traceOn() {\n logUtils.setLogLevel(log,java.util.logging.Level.FINE);\r\n }",
"public void toggleMQJavaTrace() {\r\n String filename = null;\r\n mqTraceEnabled = !mqTraceEnabled;\r\n \r\n if (mqTraceEnabled) {\r\n filename = getTraceFilename();\r\n if (filename == null) {\r\n mqTraceEnabled = false;\r\n }\r\n }\r\n \r\n if (mqTraceEnabled) {\r\n MQConfigManagerConnectionParameters.enableMQJavaClientTracing(filename);\r\n exerciser.log(ResourcesHandler.getNLSResource(ResourcesHandler.MQ_TRACE_STARTED)+\" \"+filename);\r\n } else {\r\n MQConfigManagerConnectionParameters.disableMQJavaClientTracing();\r\n exerciser.log(ResourcesHandler.getNLSResource(ResourcesHandler.MQ_TRACE_STOPPED));\r\n }\r\n \r\n // Make the checkbox reflect the actual value of trace\r\n exerciser.mqTraceEnabledMenuItem.setState(mqTraceEnabled);\r\n }",
"public void setTraceOn(boolean state) {\n traceOn = state;\n }",
"public void setDtraceEnabled(String value) throws PropertyVetoException;",
"public void setShowStacktrace(String showStacktrace) {\n _showStacktrace = Boolean.parseBoolean(showStacktrace);\n }",
"public abstract void setTraceParameter(String traceParameter);",
"public Boolean getTrace() {\n return this.Trace;\n }",
"public void setTracing(int traceFlag) {\n if (traceFlag == 0)\n Trace.setMask(Trace.MASK_NONE);\n else\n Trace.setMask(Trace.MASK_ALL);\n }",
"public void setTraceExecution(boolean traceExecution) {\n this.traceExecution = traceExecution;\n }",
"public final void setStackTrace(String value) {\n\t\tthis.stackTrace = value;\n\t}",
"public final void setSimDebug(boolean val) { simFlags.setIsDebug(val); }",
"public Builder setTraceTag(long value) {\n bitField0_ |= 0x00004000;\n traceTag_ = value;\n onChanged();\n return this;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/3. Bonus is not given if promotional code is invalid | @Test(groups = {"regression"})
public static void bonusIsNotGivenToPlayerIfPromotionalCodeIsInvalid() {
PromotionalCodeReplacerPage promotionalCodeReplacerPage = (PromotionalCodeReplacerPage) NavigationUtils.navigateToPage(PlayerCondition.player, ConfiguredPages.promotional_code_replacer);
Float balanceAmount = Float.valueOf(promotionalCodeReplacerPage.getBalanceAmount());
promotionalCodeReplacerPage.clearFieldAndInputNotValidPromocode();
promotionalCodeReplacerPage.assertPromotionalCodeTooltipStatus(ValidationUtils.STATUS_NONE, "invalid promocode");
assertEquals(PromotionalCodeReplacerPage.NO_BONUS_GIVEN_ALERT_TXT, promotionalCodeReplacerPage.getAlertMessageText(), "Wrong alert message for invalid promocode displayed. ");
assertTrue(Float.compare(balanceAmount, Float.valueOf(promotionalCodeReplacerPage.getBalanceAmount())) == 0, "Balance changed for invalid promotional code");
} | [
"@Test(groups = {\"regression\"})\n public static void bonusIsGivenToPlayerIfPromotionalCodeIsValid() {\n UserData userData = DataContainer.getUserData().getRandomUserData();\n userData.setCurrency(\"USD\");\n PortalUtils.registerUser(userData);\n PromotionalCodeReplacerPage promotionalCodeReplacerPage = (PromotionalCodeReplacerPage) NavigationUtils.navigateToPage(ConfiguredPages.promotional_code_replacer);\n Float balanceAmount = Float.valueOf(promotionalCodeReplacerPage.getBalanceAmount());\n ValidPromotionalCodePopup validPromotionalCodePopup = promotionalCodeReplacerPage.clearFieldAndInputValidPromocode();\n assertEquals(ValidPromotionalCodePopup.BONUS_GIVEN_MESSAGE_TXT, validPromotionalCodePopup.getMessage(), \"Wrong message for valid promotional code displayed. \");\n validPromotionalCodePopup.closePopup();\n NavigationUtils.refreshPage();\n assertTrue(Float.valueOf(promotionalCodeReplacerPage.getBalanceAmount()) - balanceAmount == 7.0, \"Balance not changed for valid promotional code\");\n }",
"@Test\n\tpublic void testPromotionCodeIncorrect() {\n\t\tstubGetBean(ContextIdNames.LIMITED_USE_COUPON_CODE_COND, LimitedUseCouponCodeConditionImpl.class);\n\n\t\t// Assign a promo code to a rule\n\t\tRuleSet orderRuleSet = createShoppingCartRuleSetWithShippingRule();\n\t\tRule rule = orderRuleSet.getRules().iterator().next();\n\t\truleEngine.setRuleSetService(createMockRuleSetService(getEmptyRuleSet(), orderRuleSet));\n\n\t\t// Add an invalid promo code to the cart\n\t\tShoppingCart shoppingCart = getShoppingCart();\n\t\trule.setCouponEnabled(true);\n\t\t//shoppingCart.applyPromotionCode(\"WrongCode\");\n\t\tfinal PromotionRuleDelegate mockDelegate = createMockDelegate();\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\t// Test that when cartHasValidLimitedUseCouponCode() returns false, the apply discount method is not called\n\t\t\t\tnever(mockDelegate).applyShippingDiscountAmount(\n\t\t\t\t\t\twith(any(ShoppingCart.class)),\n\t\t\t\t\t\twith(any(long.class)),\n\t\t\t\t\t\twith(any(int.class)),\n\t\t\t\t\t\twith(any(String.class)),\n\t\t\t\t\t\twith(any(String.class)));\n\n\t\t\t\tatLeast(1).of(mockDelegate).cartHasValidLimitedUseCouponCode(\n\t\t\t\t\t\twith(any(ShoppingCart.class)),\n\t\t\t\t\t\twith(any(long.class)));\n\t\t\t\twill(returnValue(false));\n\t\t\t}\n\t\t});\n\n\t\truleEngine.setPromotionRuleDelegate(mockDelegate);\n\t\truleEngine.fireOrderPromotionRules(shoppingCart);\n\t}",
"@Test(groups = {\"regression\"})\n public static void bonusIsNotGivenToPlayerIfPromotionalCodeIsBlank() {\n PromotionalCodeReplacerPage promotionalCodeReplacerPage = (PromotionalCodeReplacerPage) NavigationUtils.navigateToPage(PlayerCondition.player, ConfiguredPages.promotional_code_replacer);\n Float balanceAmount = Float.valueOf(promotionalCodeReplacerPage.getBalanceAmount());\n promotionalCodeReplacerPage.clearAndLeaveEmptyPromocodeField();\n assertEquals(PromotionalCodeReplacerPage.EMPTY_PROMOCODE_FIELD_TOOLTIP_TXT, promotionalCodeReplacerPage.getPromotionalCodeTooltipText(), \"Wrong tooltip for promotional code field displayed. \");\n promotionalCodeReplacerPage.assertPromotionalCodeTooltipStatus(ValidationUtils.STATUS_FAILED, \"empty\");\n assertTrue(Float.compare(balanceAmount, Float.valueOf(promotionalCodeReplacerPage.getBalanceAmount())) == 0, \"Balance changed for empty promotional code\");\n }",
"@Test\n\tpublic void testPromotionCodeCorrect() {\n\t\tstubGetBean(ContextIdNames.LIMITED_USE_COUPON_CODE_COND, LimitedUseCouponCodeConditionImpl.class);\n\n\t\t// Assign a promo code to a rule\n\t\tRuleSet orderRuleSet = createShoppingCartRuleSetWithShippingRule();\n\t\tRule rule = orderRuleSet.getRules().iterator().next();\n\t\truleEngine.setRuleSetService(createMockRuleSetService(getEmptyRuleSet(), orderRuleSet));\n\n\t\t// Add an invalid promo code to the cart\n\t\tShoppingCart shoppingCart = getShoppingCart();\n\t\trule.setCouponEnabled(true);\n\t\t//shoppingCart.applyPromotionCode(\"PromoCode\");\n\n\t\t// Test that when cartHasValidLimitedUseCouponCode() returns true, the apply discount method is called\n\t\tfinal PromotionRuleDelegate mockDelegate = createMockDelegate();\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\toneOf(mockDelegate).applyShippingDiscountAmount(\n\t\t\t\t\t\twith(any(ShoppingCart.class)),\n\t\t\t\t\t\twith(any(long.class)),\n\t\t\t\t\t\twith(any(long.class)),\n\t\t\t\t\t\twith(any(String.class)),\n\t\t\t\t\t\twith(any(String.class)));\n\n\t\t\t\tatLeast(1).of(mockDelegate).cartHasValidLimitedUseCouponCode(\n\t\t\t\t\t\twith(any(ShoppingCart.class)),\n\t\t\t\t\t\twith(any(long.class)));\n\t\t\t\twill(returnValue(true));\n\t\t\t}\n\t\t});\n\n\t\truleEngine.setPromotionRuleDelegate(mockDelegate);\n\t\truleEngine.fireOrderPromotionRules(shoppingCart);\n\t}",
"public boolean checkBonus() {\r\n\t\tif (bonus) {\r\n\t\t\tbonus = false;\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"@Override\n public boolean checkPromotionEligibility() {\n\n if (calculatePay() > 50000.0) {\n\n return true;\n } else {\n\n return false;\n }\n }",
"private void ustawienie_bonusu(String bonus)\n {\n switch (bonus)\n {\n case \"+10 naboi\":\n liczba_naboi+=10;\n break;\n case \"+zycie\":\n liczba_zyc+=1;\n break;\n case \"-zycie\":\n liczba_zyc-=1;\n break;\n case \"+wieksze pilki\":\n rozmiar_pilki+=1;\n break;\n case \"+5 naboi\":\n liczba_naboi+=5;\n case \"+40 punktow\":\n liczba_punktow+=40;\n break;\n case \"+duze pilki\":\n break;\n }\n }",
"abstract protected boolean isDamageDiscount();",
"public boolean checkPromoCode() {\n String code = this.view.getInputCode().getText();\n if (code.equals(\"FREEMOVIE\")) {\n return true;\n } else {\n return false;\n }\n }",
"@Override\r\n\tpublic boolean isPromotionApplicable(int code)\r\n\t{\r\n\t\t\r\n\t\tboolean result;\r\n\t\t\r\n\t\t// To check validity of promotion code\r\n\t\tif (( PromotionCode.code.getInfo() == code ) \r\n\t\t\t\t&& ( todaysDate >= PromotionCode.startDate.getInfo() \r\n\t\t\t\t&& todaysDate <= PromotionCode.endDate.getInfo()))\r\n\t\t{\r\n\t\t\t\r\n\t\t\tresult = true;\r\n\t\t}\r\n\t\telse \r\n\t\t\tresult = false;\r\n\t\t\r\n\t\treturn result;\r\n\t}",
"public boolean isValidCode()\r\n {\r\n boolean valid = false;\r\n if (priority == 'R' || priority == 'P' || priority == 'O' || priority == 'Z')\r\n {\r\n valid = true;\r\n }\r\n\r\n return valid;\r\n }",
"private void checkCodeRulesPC(String code) {\r\n if ( (code.length() < 4) || (code.length() > 8))\r\n throw new IllegalArgumentException(\"Code must have 4 to 8 chars.\");\r\n if (StringUtils.isBlank(code))\r\n throw new IllegalArgumentException(\"Code cannot be blank.\");\r\n }",
"boolean hasDiscountReason();",
"public boolean approveBonus(double bonus) {\n\n return bonus < this.getBonusBudget();\n\n }",
"public ErrorMessage verifyCode(String code, Integer year, Long exception);",
"double applyPromoCode(int pormoCode, double amount) {\n\t\t\n\t\tdouble amountToPay = 0;\n\t\t\n\t\tif(pormoCode == 1001) {\n\t\t\tamountToPay = amount - 0.5*amount;\n\t\t\tSystem.out.println(\"Promo Code Applied\");\n\t\t}else {\n\t\t\tamountToPay = amount;\n\t\t\tSystem.out.println(\"Promo Code Not Applicable\");\n\t\t}\n\t\t\n\t\treturn amountToPay;\t// return in the end. this is the last statement. any code below this line is not reachable\n\t}",
"private static int checkCnapSpecialCases(String n) {\n if (n.equals(\"PRIVATE\") ||\n n.equals(\"P\") ||\n n.equals(\"RES\")) {\n if (DBG) log(\"checkCnapSpecialCases, PRIVATE string: \" + n);\n return PhoneConstants.PRESENTATION_RESTRICTED;\n } else if (n.equals(\"UNAVAILABLE\") ||\n n.equals(\"UNKNOWN\") ||\n n.equals(\"UNA\") ||\n n.equals(\"U\")) {\n if (DBG) log(\"checkCnapSpecialCases, UNKNOWN string: \" + n);\n return PhoneConstants.PRESENTATION_UNKNOWN;\n } else {\n if (DBG) log(\"checkCnapSpecialCases, normal str. number: \" + n);\n return CNAP_SPECIAL_CASE_NO;\n }\n }",
"public PromoCodeAlreadyExistsException (Promo promo_input)\n {\n super(\"Promo Code: \");\n this.promo_error=promo_input;\n }",
"protected boolean validateCommodityCodes(PurApItem item, boolean commodityCodeRequired) {\n boolean valid = true;\n String identifierString = item.getItemIdentifierString();\n PurchasingItemBase purItem = (PurchasingItemBase) item;\n\n //This validation is only needed if the commodityCodeRequired system parameter is true\n if (commodityCodeRequired && StringUtils.isBlank(purItem.getPurchasingCommodityCode())) {\n //This is the case where the commodity code is required but the item does not currently contain the commodity code.\n valid = false;\n String attributeLabel = getDataDictionaryService().getDataDictionary().getBusinessObjectEntry(CommodityCode.class.getName()).\n getAttributeDefinition(PurapPropertyConstants.ITEM_COMMODITY_CODE).getLabel();\n GlobalVariables.getMessageMap().putError(PurapPropertyConstants.ITEM_COMMODITY_CODE, OLEKeyConstants.ERROR_REQUIRED, attributeLabel + \" in \" + identifierString);\n } else if (StringUtils.isNotBlank(purItem.getPurchasingCommodityCode())) {\n //Find out whether the commodity code has existed in the database\n Map<String, String> fieldValues = new HashMap<String, String>();\n fieldValues.put(PurapPropertyConstants.ITEM_COMMODITY_CODE, purItem.getPurchasingCommodityCode());\n if (businessObjectService.countMatching(CommodityCode.class, fieldValues) != 1) {\n //This is the case where the commodity code on the item does not exist in the database.\n valid = false;\n GlobalVariables.getMessageMap().putError(PurapPropertyConstants.ITEM_COMMODITY_CODE, PurapKeyConstants.PUR_COMMODITY_CODE_INVALID, \" in \" + identifierString);\n } else {\n valid &= validateThatCommodityCodeIsActive(item);\n }\n }\n\n return valid;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return null if !isCooldownable | public Cooldown getCooldownObject() {
return cooldown;
} | [
"@Override\n public int getCooldown() {\n return cooldown;\n }",
"public int getCooldown() {\n return cooldown;\n }",
"public float getCooldown() {\r\n\t\treturn cooldown;\r\n\t}",
"boolean hasCooldown(Player player, String interalName);",
"int getMaxCooldown();",
"public abstract float getCooldownRemaining();",
"protected abstract boolean cooldownReady(Player player);",
"public Cooldown getCooldown(GKitz kit) {\n\t\tfor(Cooldown cooldown : cooldowns) {\n\t\t\tif(cooldown.getGKitz() == kit) {\n\t\t\t\treturn cooldown;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"int getCooldown(Player player, String internalName);",
"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}",
"public float getAttackCooldown ( ) {\n\t\treturn extract ( handle -> handle.getAttackCooldown ( ) );\n\t}",
"public ArrayList<Cooldown> getCooldowns() {\n\t\treturn this.cooldowns;\n\t}",
"public long getCooldown(Entity entity, String cooldownKey){\n if (allCooldowns.get(cooldownKey).containsKey(entity)){\n return Math.max(allCooldowns.get(cooldownKey).get(entity) - System.currentTimeMillis(), 0);\n }\n return 0;\n }",
"@Override\n\tpublic void startCooldown() {\n\t\tthis.setSpecialAttackCooldown(HunterKillerConstants.SOLDIER_COOLDOWN);\n\t}",
"void setMaxCooldown(int maxCooldown);",
"CooldownTrackerItem makeCooldownTrackerItem();",
"public boolean cooldownLowerThanZero(Entity entity, String cooldownKey){\n if (allCooldowns.get(cooldownKey).containsKey(entity)){\n if (allCooldowns.get(cooldownKey).get(entity) > System.currentTimeMillis()){\n return false;\n }\n }\n return true;\n }",
"public Integer getScaleinCooldown() {\n return scaleinCooldown;\n }",
"public boolean hasCooldown ( Material material ) {\n\t\treturn extract ( handle -> handle.hasCooldown ( material ) );\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
routeBuilder(Route route, Node warehouse) shuffles a given route in order to randomize the routes. | private Route routeBuilder(Route route, Node warehouse) throws MaxWeightException {
long seed = System.nanoTime();
Collections.shuffle(route.getNodeList(), new Random(seed));
for (int nodeIndex = 0; nodeIndex < route.getNodeList().size(); nodeIndex++) {
if (route.getNode(nodeIndex).getType() == Values.nodeType.BACKHAUL && route.getNode(nodeIndex).isTaken() == false) {
route.getNode(nodeIndex).take();
route.addNode(route.getNode(nodeIndex));
nodeIndex--;
}
}
for (Node n : route.getNodeList()) n.release();
route.addNode(0, warehouse);
route.addNode(warehouse);
return route;
} | [
"private void createBurgdorfRoutes(Scenario scenario, LeastCostPathCalculator router, int numOrigins) {\n\t\t// create to Burgdorf routes\n\t\tfor (int i = 0; i < numOrigins; i++) {\n\t\t\tRoute route;\n\t\t\tId<Link> fromLinkId = Id.create(startLinkIds[i], Link.class);\n\t\t\tId<Link> toLinkId = Id.create(endLinkIdBurgdorf, Link.class);\n\t\t\tLink fromLink = scenario.getNetwork().getLinks().get(fromLinkId);\n\t\t\tLink toLink = scenario.getNetwork().getLinks().get(toLinkId);\n\t\t\t\n\t\t\tPath path = router.calcLeastCostPath(fromLink.getToNode(), toLink.getFromNode(), 0.0, null, null);\n\t\t\troute = new LinkNetworkRouteFactory().createRoute(fromLinkId, toLinkId);\n\t\t\t\n\t\t\tdouble distance = RouteUtils.calcDistance((NetworkRoute) route, scenario.getNetwork());\n\t\t\troute.setDistance(distance);\n\t\t\troute.setTravelTime(path.travelTime);\n\t\t\t\n\t\t\t((NetworkRoute) route).setLinkIds(fromLink.getId(), NetworkUtils.getLinkIds(path.links), toLink.getId());\n\t\t\t\n\t\t\troutes.put(startLinkIds[i] + \"_\" + endLinkIdBurgdorf, route);\n\t\t\t\n\t\t\tprintRoute(scenario, route, startLinkIds[i], endLinkIdBurgdorf);\n\t\t}\n\t\n\t\t// create from Burgdorf routes\n\t\tfor (int i = 0; i < numOrigins; i++) {\n\t\t\tRoute route;\n\t\t\tId<Link> fromLinkId = Id.create(startLinkIdBurgdorf, Link.class);\n\t\t\tId<Link> toLinkId = Id.create(endLinkIds[i], Link.class);\n\t\t\tLink fromLink = scenario.getNetwork().getLinks().get(fromLinkId);\n\t\t\tLink toLink = scenario.getNetwork().getLinks().get(toLinkId);\n\t\t\t\n\t\t\tPath path = router.calcLeastCostPath(fromLink.getToNode(), toLink.getFromNode(), 0.0, null, null);\n\t\t\troute = new LinkNetworkRouteFactory().createRoute(fromLinkId, toLinkId);\n\t\t\t\n\t\t\tdouble distance = RouteUtils.calcDistance((NetworkRoute) route, scenario.getNetwork());\n\t\t\troute.setDistance(distance);\n\t\t\troute.setTravelTime(path.travelTime);\n\t\t\t\n\t\t\t((NetworkRoute) route).setLinkIds(fromLink.getId(), NetworkUtils.getLinkIds(path.links), toLink.getId());\n\t\t\t\n\t\t\troutes.put(startLinkIdBurgdorf + \"_\" + endLinkIds[i], route);\n\t\t\t\n\t\t\tprintRoute(scenario, route, startLinkIdBurgdorf, endLinkIds[i]);\n\t\t}\n\t}",
"private static void mutateRoute(Chromosome chromosome) {\n int pathLength = chromosome.path.length;\n\n // setting position a for the RSM mutation as a random city between the first and penultimate city in the route\n int a = ThreadLocalRandom.current().nextInt(0, pathLength-1);\n // setting position b for the RSM mutation as a random city between a and the last city in the route\n int b = ThreadLocalRandom.current().nextInt(a, pathLength);\n\n while (a < b){\n int temp = chromosome.path[a];\n chromosome.path[a] = chromosome.path[b];\n chromosome.path[b] = temp;\n\n a++;\n b--;\n }\n }",
"public Thread findRoute() {\r\n // Create new random population\r\n for(int i = 0; i < Settings.Route.populationSize; i++)\r\n population[i] = Helper.shuffle(initOrder);\r\n \r\n // Return new logic thread\r\n return new Thread(new RouteLogic());\r\n }",
"Route createRoute();",
"public abstract void buildRoutes();",
"private Route routeBuilder (Collection<Park> parksInOrder) {\n\t\tRoute routeSoFar = new Route();\n\t\tIterator<Park> iter = parksInOrder.iterator();\n\t\twhile (iter.hasNext()) {\n\t\t\tInteger lastPark = routeSoFar.getLastParkID();\n\t\t\tInteger nextPark = iter.next().getParkID();\n\t\t\tInteger distance = allParks.getDistance(lastPark, nextPark);\n\t\t\trouteSoFar.addStop(nextPark, distance);\n\t\t}\n\t\treturn routeSoFar;\n\t}",
"static Tour rndTour() {\r\n\t\tTour tr = Tour.sequence();\r\n\t\ttr.randomize();\r\n\t\ttr.distance = tr.distance();\r\n\t\treturn tr;\r\n\t}",
"private void randomizeShips() {\n\t\t\n\t}",
"public void MoveRandom(){\n Asteroid a = (Asteroid) neighbors.get(0);\n a.RemoveNeighbor(this);\n Place neighbor = a.GetRandomNeighbor();\n neighbor.AddNeighbor(this);\n \n neighbors.remove(a);\n neighbors.add(neighbor);\n }",
"public AccessionReconciliationRouteBuilder(CamelContext camelContext, ApplicationContext applicationContext,\n @Value(\"${ftp.userName}\") String ftpUserName, @Value(\"${ftp.privateKey}\") String ftpPrivateKey,\n @Value(\"${ftp.accession.reconciliation.pul}\") String accessionReconciliationPulFtp,\n @Value(\"${ftp.accession.reconciliation.cul}\") String accessionReconciliationCulFtp,\n @Value(\"${ftp.accession.reconciliation.nypl}\") String accessionReconciliationNyplFtp,\n @Value(\"${ftp.accession.reconciliation.processed.pul}\") String accessionReconciliationFtpPulProcessed,\n @Value(\"${ftp.accession.reconciliation.processed.cul}\") String accessionReconciliationFtpCulProcessed,\n @Value(\"${ftp.accession.reconciliation.processed.nypl}\") String accessionReconciliationFtpNyplProcessed,\n @Value(\"${ftp.knownHost}\") String ftpKnownHost,\n @Value(\"${accession.reconciliation.filePath.pul}\") String filePathPul,\n @Value(\"${accession.reconciliation.filePath.cul}\") String filePathCul,\n @Value(\"${accession.reconciliation.filePath.nypl}\") String filePathNypl,\n @Value(\"${accession.reconciliation.pul.workdir}\") String pulWorkDir,\n @Value(\"${accession.reconciliation.cul.workdir}\") String culWorkDir,\n @Value(\"${accession.reconciliation.nypl.workdir}\") String nyplWorkDir) {\n\n /**\n * Predicate to idenitify is the input file is gz\n */\n Predicate gzipFile = new Predicate() {\n @Override\n public boolean matches(Exchange exchange) {\n String fileName = (String) exchange.getIn().getHeader(Exchange.FILE_NAME);\n return StringUtils.equalsIgnoreCase(\"gz\", FilenameUtils.getExtension(fileName));\n }\n };\n\n try {\n camelContext.addRoutes(new RouteBuilder() {\n @Override\n public void configure() throws Exception {\n from(ReCAPConstants.SFTP+ ftpUserName + ReCAPConstants.AT + accessionReconciliationPulFtp + ReCAPConstants.PRIVATE_KEY_FILE + ftpPrivateKey + ReCAPConstants.KNOWN_HOST_FILE + ftpKnownHost+ReCAPConstants.ACCESSION_RR_FTP_OPTIONS+pulWorkDir)\n .routeId(ReCAPConstants.ACCESSION_RECONCILATION_FTP_PUL_ROUTE)\n .noAutoStartup()\n .choice()\n .when(gzipFile)\n .unmarshal()\n .gzip()\n .log(\"PUL Accession Reconciliation FTP Route Unzip Complete\")\n .process(new StartRouteProcessor(ReCAPConstants.ACCESSION_RECONCILATION_DIRECT_PUL_ROUTE))\n .to(ReCAPConstants.DIRECT+ReCAPConstants.ACCESSION_RECONCILATION_DIRECT_PUL_ROUTE)\n .when(body().isNull())\n .process(new StopRouteProcessor(ReCAPConstants.ACCESSION_RECONCILATION_FTP_PUL_ROUTE))\n .log(\"No File To Process For PUL Accession Reconciliation\")\n .otherwise()\n .process(new StartRouteProcessor(ReCAPConstants.ACCESSION_RECONCILATION_DIRECT_PUL_ROUTE))\n .to(ReCAPConstants.DIRECT+ReCAPConstants.ACCESSION_RECONCILATION_DIRECT_PUL_ROUTE)\n .endChoice();\n\n from(ReCAPConstants.DIRECT+ReCAPConstants.ACCESSION_RECONCILATION_DIRECT_PUL_ROUTE)\n .routeId(ReCAPConstants.ACCESSION_RECONCILATION_DIRECT_PUL_ROUTE)\n .noAutoStartup()\n .log(\"accession reconciliation pul started\")\n .split(body().tokenize(\"\\n\",1000,true))\n .unmarshal().bindy(BindyType.Csv,BarcodeReconcilitaionReport.class)\n .bean(applicationContext.getBean(AccessionReconciliationProcessor.class,ReCAPConstants.REQUEST_INITIAL_LOAD_PUL),ReCAPConstants.PROCESS_INPUT)\n .end()\n .onCompletion()\n .process(new StopRouteProcessor(ReCAPConstants.ACCESSION_RECONCILATION_DIRECT_PUL_ROUTE));\n\n }\n });\n\n camelContext.addRoutes(new RouteBuilder() {\n @Override\n public void configure() throws Exception {\n from(ReCAPConstants.SFTP+ ftpUserName + ReCAPConstants.AT + accessionReconciliationCulFtp + ReCAPConstants.PRIVATE_KEY_FILE + ftpPrivateKey + ReCAPConstants.KNOWN_HOST_FILE + ftpKnownHost+ReCAPConstants.ACCESSION_RR_FTP_OPTIONS+culWorkDir)\n .routeId(ReCAPConstants.ACCESSION_RECONCILATION_FTP_CUL_ROUTE)\n .noAutoStartup()\n .choice()\n .when(gzipFile)\n .unmarshal()\n .gzip()\n .log(\"CUL Accession Reconciliation FTP Route Unzip Complete\")\n .process(new StartRouteProcessor(ReCAPConstants.ACCESSION_RECONCILATION_DIRECT_CUL_ROUTE))\n .to(ReCAPConstants.DIRECT+ReCAPConstants.ACCESSION_RECONCILATION_DIRECT_CUL_ROUTE)\n .when(body().isNull())\n .process(new StopRouteProcessor(ReCAPConstants.ACCESSION_RECONCILATION_FTP_CUL_ROUTE))\n .log(\"No File To Process For CUL Accession Reconciliation\")\n .otherwise()\n .process(new StartRouteProcessor(\"ReCAPConstants.ACCESSION_RECONCILATION_DIRECT_CUL_ROUTE\"))\n .to(ReCAPConstants.DIRECT+ReCAPConstants.ACCESSION_RECONCILATION_DIRECT_CUL_ROUTE)\n .endChoice();\n\n from(ReCAPConstants.DIRECT+ReCAPConstants.ACCESSION_RECONCILATION_DIRECT_CUL_ROUTE)\n .routeId(ReCAPConstants.ACCESSION_RECONCILATION_DIRECT_CUL_ROUTE)\n .noAutoStartup()\n .log(\"accession reconciliation cul started\")\n .split(body().tokenize(\"\\n\",1000,true))\n .unmarshal().bindy(BindyType.Csv,BarcodeReconcilitaionReport.class)\n .bean(applicationContext.getBean(AccessionReconciliationProcessor.class,ReCAPConstants.REQUEST_INITIAL_LOAD_CUL),ReCAPConstants.PROCESS_INPUT)\n .end()\n .onCompletion()\n .process(new StopRouteProcessor(ReCAPConstants.ACCESSION_RECONCILATION_DIRECT_CUL_ROUTE));\n }\n });\n\n camelContext.addRoutes(new RouteBuilder() {\n @Override\n public void configure() throws Exception {\n from(ReCAPConstants.SFTP+ ftpUserName + ReCAPConstants.AT + accessionReconciliationNyplFtp + ReCAPConstants.PRIVATE_KEY_FILE + ftpPrivateKey + ReCAPConstants.KNOWN_HOST_FILE + ftpKnownHost+ReCAPConstants.ACCESSION_RR_FTP_OPTIONS+nyplWorkDir)\n .routeId(ReCAPConstants.ACCESSION_RECONCILATION_FTP_NYPL_ROUTE)\n .noAutoStartup()\n .choice()\n .when(gzipFile)\n .unmarshal()\n .gzip()\n .log(\"NYPL Accession Reconciliation FTP Route Unzip Complete\")\n .process(new StartRouteProcessor(ReCAPConstants.ACCESSION_RECONCILATION_DIRECT_NYPL_ROUTE))\n .to(ReCAPConstants.DIRECT+ReCAPConstants.ACCESSION_RECONCILATION_DIRECT_NYPL_ROUTE)\n .when(body().isNull())\n .process(new StopRouteProcessor(ReCAPConstants.ACCESSION_RECONCILATION_FTP_NYPL_ROUTE))\n .log(\"No File To Process For NYPL Accession Reconciliation\")\n .otherwise()\n .process(new StartRouteProcessor(ReCAPConstants.ACCESSION_RECONCILATION_DIRECT_NYPL_ROUTE))\n .to(ReCAPConstants.DIRECT+ReCAPConstants.ACCESSION_RECONCILATION_DIRECT_NYPL_ROUTE)\n .endChoice();\n\n from(ReCAPConstants.DIRECT+ReCAPConstants.ACCESSION_RECONCILATION_DIRECT_NYPL_ROUTE)\n .routeId(ReCAPConstants.ACCESSION_RECONCILATION_DIRECT_NYPL_ROUTE)\n .noAutoStartup()\n .log(\"accession reconciliation nypl started\")\n .split(body().tokenize(\"\\n\",1000,true))\n .unmarshal().bindy(BindyType.Csv,BarcodeReconcilitaionReport.class)\n .bean(applicationContext.getBean(AccessionReconciliationProcessor.class,ReCAPConstants.REQUEST_INITIAL_LOAD_NYPL),ReCAPConstants.PROCESS_INPUT)\n .end()\n .onCompletion()\n .process(new StopRouteProcessor(ReCAPConstants.ACCESSION_RECONCILATION_DIRECT_NYPL_ROUTE));\n\n }\n });\n\n camelContext.addRoutes(new RouteBuilder() {\n @Override\n public void configure() throws Exception {\n from(ReCAPConstants.DAILY_RR_FS_FILE+filePathPul+ReCAPConstants.DAILY_RR_FS_OPTIONS)\n .routeId(ReCAPConstants.ACCESSION_RECONCILATION_FS_PUL_ROUTE)\n .noAutoStartup()\n .to(ReCAPConstants.SFTP+ ftpUserName + ReCAPConstants.AT + accessionReconciliationFtpPulProcessed + ReCAPConstants.PRIVATE_KEY_FILE + ftpPrivateKey + ReCAPConstants.KNOWN_HOST_FILE + ftpKnownHost+\"&fileName=BarcodeReconciliation_PUL_${date:now:yyyyMMdd_HHmmss}.csv\")\n .onCompletion()\n .bean(applicationContext.getBean(AccessionReconciliationEmailService.class,ReCAPConstants.PRINCETON),ReCAPConstants.PROCESS_INPUT)\n .process(new StopRouteProcessor(ReCAPConstants.ACCESSION_RECONCILATION_FS_PUL_ROUTE))\n .log(\"accession reconciliation pul completed\");\n\n }\n });\n\n camelContext.addRoutes(new RouteBuilder() {\n @Override\n public void configure() throws Exception {\n from(ReCAPConstants.DAILY_RR_FS_FILE+filePathCul+ReCAPConstants.DAILY_RR_FS_OPTIONS)\n .routeId(ReCAPConstants.ACCESSION_RECONCILATION_FS_CUL_ROUTE)\n .noAutoStartup()\n .to(ReCAPConstants.SFTP+ ftpUserName + ReCAPConstants.AT + accessionReconciliationFtpCulProcessed + ReCAPConstants.PRIVATE_KEY_FILE + ftpPrivateKey + ReCAPConstants.KNOWN_HOST_FILE + ftpKnownHost+\"&fileName=BarcodeReconciliation_CUL_${date:now:yyyyMMdd_HHmmss}.csv\")\n .onCompletion()\n .bean(applicationContext.getBean(AccessionReconciliationEmailService.class,ReCAPConstants.COLUMBIA),ReCAPConstants.PROCESS_INPUT)\n .process(new StopRouteProcessor(ReCAPConstants.ACCESSION_RECONCILATION_FS_CUL_ROUTE))\n .log(\"accession reconciliation cul completed\");\n }\n });\n\n camelContext.addRoutes(new RouteBuilder() {\n @Override\n public void configure() throws Exception {\n from(ReCAPConstants.DAILY_RR_FS_FILE+filePathNypl+ReCAPConstants.DAILY_RR_FS_OPTIONS)\n .routeId(ReCAPConstants.ACCESSION_RECONCILATION_FS_NYPL_ROUTE)\n .noAutoStartup()\n .to(ReCAPConstants.SFTP+ ftpUserName + ReCAPConstants.AT + accessionReconciliationFtpNyplProcessed + ReCAPConstants.PRIVATE_KEY_FILE + ftpPrivateKey + ReCAPConstants.KNOWN_HOST_FILE + ftpKnownHost+\"&fileName=BarcodeReconciliation_NYPL_${date:now:yyyyMMdd_HHmmss}.csv\")\n .onCompletion()\n .bean(applicationContext.getBean(AccessionReconciliationEmailService.class,ReCAPConstants.NYPL),ReCAPConstants.PROCESS_INPUT)\n .process(new StopRouteProcessor(ReCAPConstants.ACCESSION_RECONCILATION_FS_NYPL_ROUTE))\n .log(\"accession reconciliation nypl completed\");\n }\n });\n\n } catch (Exception e) {\n logger.info(ReCAPConstants.LOG_ERROR+e);\n }\n\n }",
"public Route createRoute(long durationSec) {\n\n Route rt = null;\n\n try {\n\n ArrayList<Waypoint> wpts;\n\n int i = 0;\n\n wpts = new ArrayList<>();\n\n Random rnd = new Random();\n\n Airport firstArpt = arpts.getRndAirport(\"\");\n\n Airport arpt1 = firstArpt;\n Airport arpt2;\n\n long t = 0;\n\n while (t < durationSec) {\n arpt2 = arpts.getRndAirport(arpt1.getName());\n\n DistanceBearing distB = gc.getDistanceBearing(arpt1.getLon(), arpt1.getLat(), arpt2.getLon(), arpt2.getLat());\n\n long st = t + rnd.nextInt(600) + 300; // Delay from 300 to 900 seconds\n\n //double speed = (Math.random() * 100 + 200) / 1000; // speed from 100 to 300 m/s converted to km/s\n // Speeds in Gaussian Distro around 250 +- 50; Reflect under 100 to over 100. Mean will be 250 with stddev of about 50\n double speed = 250 + 50 * grg.nextNormalizedDouble(); \n if (speed < 100) speed += 100 + (100 - speed);\n speed = speed / 1000;\n\n long et = st + Math.round(distB.getDistance() / speed);\n\n Waypoint wpt = new Waypoint(st, arpt1.getName(), arpt2.getName(), arpt1.getId(), arpt1.getLon(), arpt1.getLat(), distB.getDistance(), distB.getBearing(), speed, et);\n wpts.add(wpt);\n\n arpt1 = arpt2;\n\n t = et;\n i++;\n }\n\n arpt2 = firstArpt;\n if (!arpt2.getName().equalsIgnoreCase(arpt1.getName())) {\n // Only add if the last airport not equal first\n DistanceBearing distB = gc.getDistanceBearing(arpt1.getLon(), arpt1.getLat(), arpt2.getLon(), arpt2.getLat());\n\n long st = t + rnd.nextInt(600) + 300; // Delay from 300 to 900 seconds\n\n double speed = (Math.random() * 100 + 200) / 1000; // speed from 100 to 300 m/s converted to km/s\n\n long et = st + Math.round(distB.getDistance() / speed);\n\n //System.out.println(st + \",\" + arpt1.getName() + \",\" + arpt1.getId() + \",\" + arpt1.getLon() + \",\" + arpt1.getLat() + \",\" + distB.getDistance() + \",\" + distB.getBearing() + \",\" + et);\n Waypoint wpt = new Waypoint(st, arpt1.getName(), arpt2.getName(), arpt1.getId(), arpt1.getLon(), arpt1.getLat(), distB.getDistance(), distB.getBearing(), speed, et);\n wpts.add(wpt);\n\n }\n\n rt = new Route(wpts);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return rt;\n\n }",
"public void selectRouteChoice()\n\t{\n\t\tRoutePlanner planner = new RoutePlanner();\n\t\tthis.sequence = ap.listSequences.get(numTrips);\n\t\t// only minimisation\n\t\tif (ap.routeChoice.equals(\"DS\")) newPath = planner.roadDistance(originNode, destinationNode, ap);\n\t\telse if (ap.routeChoice.equals(\"AC\")) newPath = planner.angularChangeBased(originNode, destinationNode, ap);\n\t\telse if (ap.routeChoice.equals(\"TS\")) newPath = planner.angularChangeBased(originNode, destinationNode, ap);\n\t\t// minimisation plus only global landmarks\n\t\telse if (ap.routeChoice.equals(\"DG\")) newPath = planner.roadDistance(originNode, destinationNode, ap);\n\t\telse if (ap.routeChoice.equals(\"AG\")) newPath = planner.angularChangeBased(originNode, destinationNode, ap);\n\t\t// minimisation plus local and (optionally) global landmarks\n\t\telse if (ap.routeChoice.contains(\"D\") && ap.routeChoice.contains(\"L\")) newPath = planner.roadDistanceSequence(sequence, ap);\n\t\telse if (ap.routeChoice.contains(\"A\") && ap.routeChoice.contains(\"L\")) newPath = planner.angularChangeBasedSequence(sequence, ap);\n\t\t// anything with regions and/or barriers, or just barriers\n\t\telse if (ap.routeChoice.contains(\"R\")) newPath = planner.regionBarrierBasedPath(originNode, destinationNode, ap);\n\t\telse if (ap.routeChoice.contains(\"B\")) newPath = planner.barrierBasedPath(originNode, destinationNode, ap);\n\t}",
"public void internalSwapRandom() {\n int indexN1 = RandUtils.randInt(1, _tour.size());\n int indexN2 = RandUtils.randInt(1, _tour.size());\n while (indexN1 == indexN2) {\n indexN2 = RandUtils.randInt(1, _tour.size());\n }\n List<Node> nodes = new ArrayList<>(_tour.keySet());\n internalSwapSafe(nodes.get(indexN1), nodes.get(indexN2));\n }",
"@Override\n public String generate(String route,\n String... params) {\n return RouteParser.INSTANCE.generate(route,\n params);\n }",
"private Direction selectRandomDirection(List<Direction> possibleDirections) {\n\t\tint random = (int) (Math.random() * possibleDirections.size());\n\t\treturn possibleDirections.get(random);\n\t}",
"public RouteList createRoutesFromInstance(Instance instance) {\n\n System.out.println(\"Creating routes from an instance...\\n\");\n\n DistanceMatrix distances = DistanceMatrix.getInstance();\n\n RouteList routes = new RouteList();\n\n Route route = new Route(instance.maxWeight);\n\n ArrayList<Node> tsp = new ArrayList<Node>(instance.completeTSP);\n\n Node warehouse = tsp.get(0);\n tsp.remove(0);\n\n int tspSize = tsp.size();\n\n //Default size of the routes\n int routeSize = tspSize/instance.routeCount;\n\n //While we have at least one node in the tsp and tbe number of built routes is less than the given number of routes\n while (tsp.size() - 1 >= 0 && routes.size() < instance.routeCount) {\n\n //If current route isn't filled yet\n if (route.getNodeList().size() < routeSize) {\n\n //Try to fill it with another node\n try {\n route.addNode(tsp.get(0));\n tsp.remove(0);\n } catch (MaxWeightException e) {\n //If not possible, try to create a new route\n try {\n route = routeBuilder(route, warehouse);\n routes.add(route);\n } catch (MaxWeightException e1) {}\n route = new Route(instance.maxWeight);\n }\n\n } else {\n //If it's filled indeed, try to create a new route\n try {\n route = routeBuilder(route, warehouse);\n routes.add(route);\n } catch (MaxWeightException e) {}\n route = new Route(instance.maxWeight);\n\n }\n\n }\n\n if (routes.size() < instance.routeCount) {\n try {\n route = routeBuilder(route, warehouse);\n routes.add(route);\n } catch (MaxWeightException e) {}\n route = new Route(instance.maxWeight);\n }\n\n //Recover all remaining nodes from temporal route and tsp\n ArrayList<Node> remainingNodes = new ArrayList<>();\n ArrayList<Node> nodesToCheckInOrder = new ArrayList<>();\n\n //Let's add all the discarded nodes inside an array of nodes\n if (route.getNodeList().size() != 0) {\n for (Node node : route.getNodeList()) remainingNodes.add(node);\n }\n\n //While the tsp isn't empty, let's add the current node into remainingNodes\n while (tsp.size()-1 >= 0) {\n remainingNodes.add(tsp.get(0));\n tsp.remove(0);\n }\n\n //Used to exit from the while. It's decremented each time we are done analyzing a node.\n int steps = remainingNodes.size();\n\n while (steps > 0) {\n //Let's get the closer nodes to the current one by distance. They are sorted by distance ascending.\n nodesToCheckInOrder = distances.getClosestNodes(remainingNodes.get(0), instance.completeTSP);\n\n for (Node node : nodesToCheckInOrder) {\n //If the current node and the other remaining nodes are compared, skip\n if (remainingNodes.contains(node)) continue;\n try {\n //Let's try to relocate the current discarded node into the route of the current closest node\n if (canPositionate(remainingNodes.get(0), node.getRoute(), node.getRoute().getIndexByNode(node))) {\n\n //If it's possible indeed, update all the data\n node.getRoute().getNodeList().add(node.getRoute().getIndexByNode(node), remainingNodes.get(0));\n remainingNodes.get(0).setRoute(node.getRoute());\n if(remainingNodes.get(0).getType() == Values.nodeType.LINEHAUL) {\n node.getRoute().weightLinehaul += remainingNodes.get(0).getWeight();\n } else {\n node.getRoute().weightBackhaul += remainingNodes.get(0).getWeight();\n }\n node.getRoute().forceUpdate();\n\n //Remove the node from the remaining nodes\n remainingNodes.remove(0);\n break;\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n //Let's go to the next node\n steps--;\n\n }\n\n ///////////////////////////////////// SCRAPPED NODES MANAGEMENT //////////////////////////////////////////////\n\n if (remainingNodes.size() > 0 && routes.size() == instance.routeCount) {\n System.out.println(\"Now starting the management for the nodes that wouldn't fit the nodes on the first pass... \\n\");\n System.out.println(\"//////////////////////////////////////////////////////////////////////////////////////////////////////\\n\");\n\n\n while (remainingNodes.size() > 0) {\n\n try {\n relocateScrapped(remainingNodes.get(0), routes);\n System.out.println(\"Relocation of misplaced nodes successful! \\n\");\n\n remainingNodes.remove(0);\n\n } catch (Exception e) {\n\n System.out.println(\"!!! Couldn't relocate all the scrapped nodes with actual setup... !!!\");\n\n int lightestRouteIndex = getLightestRoute(routes, Values.nodeType.LINEHAUL);\n\n System.out.println(\"Making space in the lightest route (index = \" + lightestRouteIndex + \") and retrying... \\n\");\n\n try {\n relocateScrapped(routes.get(lightestRouteIndex), routes);\n } catch (Exception e1) {\n }\n\n\n }\n }\n }\n\n System.out.println(\"//////////////////////////////////////////////////////////////////////////////////////////////////////\");\n\n System.out.println(\"\\nRoutes ready! Now validating... \");\n\n\n boolean validationFailed = false;\n\n for (Route r : routes) {\n if ( r.validate() == false ) {\n validationFailed = true;\n System.out.println(\"core.Route \" + routes.indexOf(r) + \" is invalid\");\n }\n }\n\n if (validationFailed) {\n System.out.println(\"\\n!!! Validation terminated with errors! Check them up here! !!!\");\n } else {\n System.out.println(\"\\nValidation terminated without errors!\");\n }\n\n return routes;\n }",
"private void resetRoute() {\n\t\troute = new Route[] {new Route(distanceMatrix)};\n\t\ttotalCost = 0;\n\t}",
"@Override\n\tpublic void randomRoom() {\n\t\tint randSide = random.nextInt(3) + 1;\n\t\tString side = properties.getSideFromProperties().get(randSide);\n\t\tint randRoom = random.nextInt(6) + 1;\n\t\tthis.room = properties.getRoomFromProperties().get(randRoom);\n\t\tthis.side = this.room.substring(0, 1).toLowerCase() + side;\n\t}",
"public void setRoute(List<BoardPos> _route) {\r\n route = new ArrayList<>(_route);\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form Unidad_Medida | public MUnidad_Medida() {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) {
}
initComponents();
obtenerUltimoId();
actualizarBusqueda();
//this.setLocationRelativeTo(null);
activarBotones(true);
} | [
"private void populaUnidadeMedida()\n {\n UnidadeMedida u = new UnidadeMedida(\"Gramas\", \"g\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Unidade\", \"unidade\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sopa\", \"col. sopa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sobremesa\", \"col. sobremesa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Chá\", \"col. chá\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Copo\", \"copo\");\n unidadeMedidaDAO.insert(u);\n\n }",
"public void setUnidadMedida(String unidadMedida){\n this.unidadMedida = unidadMedida;\n }",
"public VentanaCrearMedicina(ControladorMedicina controladorMedicina) {\n initComponents();\n this.controladorMedicina = controladorMedicina;\n txtCodigo.setText(String.valueOf(this.controladorMedicina.getCodigo()));\n \n }",
"public void newMedidor(final View view) {\n if (!wasDownload) {\n Snackbar.make(view, \"No se han descargado las rutas\", Snackbar.LENGTH_SHORT).show();\n return;\n }\n AlertDialog.Builder newMedidor = new AlertDialog.Builder(this);\n newMedidor.setTitle(\"Nuevo Medidor\");\n View viewInside = LayoutInflater.from(this).inflate(R.layout.layout_new_medidor, null);\n nroMed = (EditText) viewInside.findViewById(R.id.new_med_number);\n lecMed = (EditText) viewInside.findViewById(R.id.new_med_lectura);\n potMed = (EditText) viewInside.findViewById(R.id.new_med_pot);\n newMedidor.setView(viewInside);\n newMedidor.setPositiveButton(\"Aceptar\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n if (nroMed.getText().toString().isEmpty() || lecMed.getText().toString().isEmpty()) {\n Snackbar.make(view, \"Ambos campos son necesarios\", Snackbar.LENGTH_SHORT).show();\n } else {\n DBAdapter dbAdapter = new DBAdapter(getApplicationContext());\n boolean valid = dbAdapter.validNewMedidor(Integer.parseInt(nroMed.getText().toString()));\n if (valid) {\n ContentValues cv = new ContentValues();\n cv.put(MedEntreLineas.Columns.MelRem.name(), nroRemesa);\n cv.put(MedEntreLineas.Columns.MelMed.name(), Integer.parseInt(nroMed.getText().toString()));\n cv.put(MedEntreLineas.Columns.MelLec.name(), Integer.parseInt(lecMed.getText().toString()));\n cv.put(MedEntreLineas.Columns.MelPot.name(), Integer.parseInt(potMed.getText().toString()));\n dbAdapter.saveObject(DBHelper.MED_ENTRE_LINEAS_TABLE, cv);\n dbAdapter.close();\n Snackbar.make(view, \"Nuevo medidor para la ruta\", Snackbar.LENGTH_SHORT).show();\n } else {\n Toast.makeText(MainActivity.this, \"El número de medidor ya existe\", Toast.LENGTH_SHORT).show();\n }\n }\n }\n });\n newMedidor.setNegativeButton(\"Cancelar\", null);\n newMedidor.show();\n }",
"public void registrarMateria() {\n materia.setIdDepartamento(departamento);\n ejbFacade.create(materia);\n RequestContext requestContext = RequestContext.getCurrentInstance();\n requestContext.execute(\"PF('MateriaCreateDialog').hide()\");\n items = ejbFacade.findAll();\n departamento = new Departamento();\n materia = new Materia();\n\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se registró con éxito\");\n FacesContext.getCurrentInstance().addMessage(null, msg);\n requestContext.update(\"msg\");//Actualiza la etiqueta growl para que el mensaje pueda ser mostrado\n\n requestContext.update(\"MateriaListForm\");\n requestContext.update(\"MateriaCreateForm\");\n }",
"public void setUnidadMedida(String unidadMedida) {\n\t\tthis.unidadMedida = unidadMedida;\n\t}",
"public void insertarMedico(Medico medico)\n {\n ContentValues valores = new ContentValues();\n valores.put(\"prefijo\",medico.getPrefijo());\n valores.put(\"nombre\",medico.getNombre());\n valores.put(\"apellido\",medico.getApellido());\n valores.put(\"email\",medico.getEmail());\n valores.put(\"ubicacion\",medico.getUbicacion());\n valores.put(\"telefonoContacto1\",medico.getNumeroTelefonoOpcion1());\n valores.put(\"telefonoContacto2\",medico.getNumeroTelefonoOpcion2());\n db.insert(\"medico\",null,valores);\n\n }",
"public FormMedico() throws ClassNotFoundException, SQLException {\n initComponents();\n preencherTabela(\"SELECT * FROM medicos\");\n }",
"org.hl7.fhir.Medication addNewMedication();",
"public ModificarMedicamento() {\n initComponents();\n conectarBaseDeDatos();\n this.setModal(true);\n }",
"public String getUnidadMedida(){\n return this.unidadMedida;\n }",
"private MaterialDialog buildDialog() {\n MaterialDialog dialog = new MaterialDialog.Builder(activity)\n .title(R.string.medicament)\n .customView(R.layout.dialog_medicament, true)\n .negativeText(R.string.cancel)\n .positiveText(R.string.save)\n .onPositive(new MaterialDialog.SingleButtonCallback() {\n @Override\n public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {\n Medicament newMedicament = getMedicamentByUI(dialog);\n if (needToCreateMedicament) {\n insertMedicamentAsync(newMedicament);\n } else {\n newMedicament.setCreationDate(medicament.getCreationDate());\n updateMedicamentAsync(newMedicament);\n }\n }\n }).build();\n return dialog;\n }",
"public controle_estoque_medicamentos() {\n initComponents();\n }",
"org.hl7.fhir.MedicationPrescription addNewMedicationPrescription();",
"@Command\n public void nuevaMateria() {\n\t\t\n\t\tWindow window = (Window)Executions.createComponents(\n \"/WEB-INF/include/Mantenimiento/Materias/vtnMaterias.zul\", null, null);\n window.doModal();\n }",
"public Medidor nuevoMedidor(TipoMedidor tipo, CoordenadaGPS pos){\r\n\t\tMedidor m;\r\n\t\tif (TipoMedidor.MONOFASICO.equals(tipo))\r\n\t\t\tm = new MedidorMonofasico(pos);\r\n\t\telse\r\n\t\t\tthrow new IllegalArgumentException();\r\n\t\tmedidores.add(m);\r\n\t\treturn m;\r\n\t}",
"public boolean comprobarCedulaMedic(frmUsuarios frmUsuarios){\r\n BasedeDatos bd= new BasedeDatos(\"SELECT `Cedula` FROM `medicos` WHERE Cedula=?\");\r\n this.medico=new Medicos();\r\n this.medico.setId(frmUsuarios.getTxtNumCedula().getText());\r\n bd.ejecutar(new Object[]{this.medico.getId()});\r\n this.obj=bd.getObject();\r\n if (this.obj==null) {\r\n return true;\r\n }else{\r\n if (this.obj[0].equals(this.medico.getId())) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"public void setUnidadMedida(ValorDTO unidadMedida) {\n\t\tthis.unidadMedida = unidadMedida;\n\t}",
"@Test\n\tpublic void guardarMedico() {\n\t\tlog.debug(\"Inicio - Test\");\n\t\t\n\t\tMedicoDto medicoDto = new MedicoDto();\n\t\t\n\t\tmedicoDto.setIdUsuario(22);\n\t\tmedicoDto.setCedulaProfesional(\"s-23836\");\n\t\t\n\t\tmedicoDao.guardarMedico(medicoDto);\n\t\t\n\t\tlog.debug(\"Fin - Test\");\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Attempts to empty a PM Inbox of all messages before the given date. folderid 0 is the primary inbox. | public boolean messageEmptyInbox(int folderid, long dateToDelete) throws InvalidId, NoPermissionLoggedout, NoPermissionLoggedin, VBulletinAPIException{
return messageEmptyInbox(""+folderid, ""+dateToDelete, 0);
} | [
"private boolean messageEmptyInbox(String folderid, String dateToDelete, int loop) throws InvalidId, NoPermissionLoggedout, NoPermissionLoggedin, VBulletinAPIException{\n\t\tif(isConnected()){\n\t\t\tString errorMsg = null;\n\t\t\tloop++;\n\t\t\tHashMap<String, String> params = new HashMap<String, String>();//150885\n\t\t\t//params.put(\"dateline\", \"9876543210\");\n\t\t\tparams.put(\"dateline\", dateToDelete);\n\t\t\tparams.put(\"folderid\", folderid);\n\t\t\terrorMsg = parseResponse(callMethod(\"private_confirmemptyfolder\", params, true));\n\t\t\tif(loop < 4){//no infinite loop by user\n\t\t\t\tif(errorMsg != null){\n\t\t\t\t\tif(errorMsg.equals(\"pm_messagesdeleted\")){//success\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\telse if(errorMsg.equals(\"nopermission_loggedout\")||errorMsg.equals(\"invalid_accesstoken\")){\n\t\t\t\t\t\tlogin();\n\t\t\t\t\t\tif(isLoggedin()){\n\t\t\t\t\t\t\treturn messageEmptyInbox(folderid, dateToDelete, loop);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(errorMsg.equals(\"invalid_api_signature\")){\n\t\t\t\t\t\treturn messageEmptyInbox(folderid, dateToDelete, loop);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(errorMsg.equals(\"invalidid\")){\n\t\t\t\tthrow new InvalidId(\"folder\");\n\t\t\t}\n\t\t\terrorsCommon(errorMsg);\n\t\t\tthrow new VBulletinAPIException(\"vBulletin API Unknown Error - \"+errorMsg);\n\t\t}\n\t\tthrow new NoConnectionException();\n\t}",
"public boolean messageEmptyInbox(int folderid) throws InvalidId, NoPermissionLoggedout, NoPermissionLoggedin, VBulletinAPIException{\n\t\treturn messageEmptyInbox(folderid, 9876543210L);\n\t}",
"void purgeEmailFromAllMailboxes() throws FolderException;",
"public void cleanMailBox() throws MessagingException {\n Properties properties = System.getProperties(); // Get system properties\n Session session = Session.getDefaultInstance(properties); // Get the default Session object.\n Store store =\n session.getStore(\"imaps\"); // Get a Store object that implements the specified protocol.\n store.connect(\n host, user,\n password); // Connect to the current host using the specified username and password.\n Folder folder =\n store.getFolder(\"inbox\"); // Create a Folder object corresponding to the given name.\n folder.open(Folder.READ_WRITE); // Open the Folder.\n Message[] messages = folder.getMessages();\n for (int i = 0, n = messages.length; i < n; i++) {\n messages[i].setFlag(Flags.Flag.DELETED, true);\n }\n closeStoreAndFolder(folder, store);\n }",
"public boolean messageEmptyInbox() throws InvalidId, NoPermissionLoggedout, NoPermissionLoggedin, VBulletinAPIException{\n\t\treturn messageEmptyInbox(0);\n\t}",
"public void resetInboxEntry() {\n\t\tthis.inboxEntry = null;\n\t}",
"abstract protected Inbox createInbox(int _initialLocalQueueSize);",
"void touchAllFolders() throws ServiceException {\n for (Folder folder : mMailbox.listAllFolders()) {\n if (folder.getItemCount() > 0) {\n folder.updateHighestMODSEQ();\n }\n }\n }",
"private void deleteMail(long position0){\n\t\tint position = (int) position0;\n\n\t\tArrayList<String> messages_to_delete = new ArrayList<String>();\n\t\tmessages_to_delete.clear(); //TESTING\n\t\tmessages_to_delete.add(Integer.toString(messages_array.get(position).id));\n\t\tString str = Integer.toString(messages_array.get(position).id);\n\t\tcounter2++;\n\t\tLog.d(\"ID is at:\", str);\n\t\tInbox inb = new Inbox();\n\n\t\tString request = inb.TrashMessages(2, selectedAccount.sessionID, messages_to_delete);\n\n Log.d(\"SelectMessage.DeleteMail\", \"Request String\"+request);\n\t\tServerRequest sRequest = new ServerRequest(selectedAccount.server, Inbox.url, request);\n\t\tAsyncServer s = new AsyncServer();\n\t\t//s.addListener(this);\n\t\ttry {\n\t\t\ts.execute(sRequest);\n\t\t} catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"protected void removeOrphanedMessages() {\r\n Enumeration e = orphanedMessageSet.elements();\r\n MessageToken[] orphanedTokens = new MessageToken[orphanedMessageSet.size()];\r\n int index = 0;\r\n while(e.hasMoreElements()) {\r\n FolderMessage message = (FolderMessage)e.nextElement();\r\n folderMessageCache.removeFolderMessage(folderTreeItem, message);\r\n orphanedTokens[index++] = message.getMessageToken();\r\n }\r\n orphanedMessageSet.clear();\r\n mailStoreServices.fireFolderExpunged(folderTreeItem, orphanedTokens, new MessageToken[0]);\r\n }",
"protected void loadCachedFolderMessages() {\r\n boolean dispOrder = MailSettings.getInstance().getGlobalConfig().getDispOrder();\r\n FolderMessage[] messages = folderMessageCache.getFolderMessages(folderTreeItem);\r\n if(messages.length > 0) {\r\n // Add all the messages that have been loaded from the\r\n // cache. Server-side messages will be removed from the\r\n // set later on.\r\n for(int i=0; i<messages.length; i++) {\r\n orphanedMessageSet.put(messages[i].getMessageToken().getMessageUid(), messages[i]);\r\n }\r\n \r\n // If the cached messages have already been loaded, then we can\r\n // skip notifying mail store listeners. However, we still have to\r\n // add them to the orphan set, as seen above.\r\n if(!cacheLoaded) {\r\n if(dispOrder) {\r\n for(int i=0; i<messages.length; i+=5) {\r\n int endIndex = Math.min(i + 5, messages.length);\r\n FolderMessage[] subset = new FolderMessage[endIndex - i];\r\n for(int j=0; j<subset.length; j++) {\r\n subset[j] = messages[i + j];\r\n }\r\n mailStoreServices.fireFolderMessagesAvailable(folderTreeItem, subset, false, false);\r\n }\r\n }\r\n else {\r\n for(int i=messages.length-1; i >= 0; i-=5) {\r\n int startIndex = Math.max(i - 4, 0);\r\n FolderMessage[] subset = new FolderMessage[i - startIndex + 1];\r\n for(int j=0; j<subset.length; j++) {\r\n subset[j] = messages[i - j];\r\n }\r\n mailStoreServices.fireFolderMessagesAvailable(folderTreeItem, subset, false, false);\r\n }\r\n }\r\n cacheLoaded = true;\r\n }\r\n }\r\n }",
"public void removeArchivedMessages(){\n\r\n\t\ttry {\r\n\r\n\t\t\tResultSet rs = dbconn.pullAllDBMessages();\r\n\t\t\tString msgRequest = \"\";\r\n\t\t\tArrayList<String> dbArray = new ArrayList<>();\r\n\t\t\tArrayList<String> msgArray = new ArrayList<>();\r\n\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tmsgRequest = rs.getString(\"MessageRequest\");\r\n\t\t\t\tdbArray.add(msgRequest);\r\n\t\t\t}\r\n\r\n\t\t\tDefaultListModel<String> dlm = drPanel.getMessageRequests();\r\n\r\n\t\t\tfor(int i = 0; i < dlm.getSize(); i++){ //Copies the DLM into the an ArrayList\r\n\t\t\t\tString tmpMessage = dlm.get(i);\r\n\t\t\t\tmsgArray.add(tmpMessage);\r\n\t\t\t}\r\n\r\n\t\t\tif(dlm.isEmpty()){\r\n\r\n\t\t\t}\r\n\t\t\telse{\r\n\r\n\t\t\t}\r\n\r\n\t\t\tfor(String request : msgArray){ \r\n\r\n\t\t\t\tif(!dbArray.contains(request)){\r\n\t\t\t\t\tif(!msgArray.contains(request)){\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tdrPanel.removeMessageItem(request);\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\tcatch(SQLException sqlexcpt){\r\n\r\n\t\t}\r\n\t}",
"@Override\n public void onRefresh() {\n getInbox();\n }",
"List<SendMessage> clearMonthlyStats();",
"public void saveToInboxFolder() {\r\n\t\temailDao.save(id, from, to, cc, subject, body, lastModifiedTime,\r\n\t\t\t\tsentTime, CECConfigurator.getReference().get(\"Inbox\"), isMeetingEmail.toString());\r\n\t\tArrayList<Email> target = new ArrayList<Email>();\r\n\t\ttarget.add(this);\r\n\t\tRuleSetFactory.getRuleSetInstance().apply(target);\r\n\t}",
"public Message purgeMailbox() { \n\t\tsynchronized (messageBox) {\n\t\t\tfinal Message m = messageBox.pollLast();\n\t\t\tmessageBox.clear();\t\t\n\t\t\treturn m;\n\t\t}\n\t}",
"MessageQueue createInbox();",
"public List<Message> retrieveMessages(EntityID agentID) {\n List<Message> mesageInbox = messageInboxes.remove(agentID);\n if (mesageInbox == null) {\n mesageInbox = new ArrayList<>();\n }\n return mesageInbox;\n }",
"void clearMessages();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes all the entries added into LabelMapper. | public LabelSchema clearLabelMapperEntries() {
this.labelMapper = null;
return this;
} | [
"private void removeContents() {\n\t\tfor (String labelName : contents.keySet()) {\n\t\t\tremove(contents.get(labelName));\n\t\t}\n\t\tcontents.clear();\t\t// Clear all entries in the hashmap\n\t}",
"public void clear() { \r\n\t\tmap.clear();\r\n\t}",
"public void clear() {\n\t\tmap.clear();\n\t}",
"public void clear() {\n map.clear();\n }",
"public void clearLabels();",
"void RemoveLabels() {\r\n\t\tfor (i = 0; i < tam_max; i++) {\r\n\t\t\tlabel = new String();\r\n\t\t\tlabel = Trata_Linha_Para_Label(i);\r\n\t\t\tif (!(label.length() == 0)) {\r\n\t\t\t\tmapLabels.put(i, label);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void eraseMap() {\n\t\tdataSets = new DataSet[0];\n\t\treDrawMap();\n\t}",
"public void removeAllAttributeMaps()\n {\n checkState();\n super.removeAllAttributeMaps();\n }",
"public void clearAllDefinitionMappings()\n {\n _lovItemMappings.clear();\n }",
"@Override\n public void clear() {\n map.clear();\n }",
"public void clearMaps() {\n MDSMap.clearData();\n }",
"public void removeAll(){\n\t\tif(isEmpty())\n\t\t\treturn ;\n\t\tMap<String, ?>map = sp.getAll();\n\t\tfor(String key : map.keySet())\n\t\t{\n\t\t\tremove(key);\n\t\t}\n\t}",
"public void removeAllMapsFromArchive() {\n\t\toldBlockHierarchy.clear();\n\t}",
"public void removeAllChildMaps()\n {\n checkState();\n super.removeAllChildMaps();\n }",
"public void removeAllElementInsertionMaps()\n {\n list.removeAllElements();\n }",
"public synchronized void unRegisterAll()\r\n {\r\n clearNameObjectMaps();\r\n }",
"private void removeItemsOnMap() {\n if (destinationMarkers != null) {\n destinationMarkers.remove();\n }\n if (polylinePaths != null) {\n polylinePaths.remove();\n }\n }",
"public void removeAllTaglabel() {\r\n\t\tBase.removeAll(this.model, this.getResource(), TAGLABEL);\r\n\t}",
"public synchronized void removeAll() throws IOException\n {\n map.clear();\n for ( MemoryElementDescriptor me = first; me != null; )\n {\n if ( me.prev != null )\n {\n me.prev = null;\n }\n MemoryElementDescriptor next = me.next;\n me = next;\n }\n first = last = null;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the current date time. | public static Date getCurrentDateTime() {
Calendar calendar = Calendar.getInstance();
return calendar.getTime();
} | [
"public String getCurrentDateAndTime(){\n return dateTimeFormatter.format(current);\n }",
"public String Get_current_date() {\n\n // set date format\n SimpleDateFormat convert_default_format = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n // convert date format into string\n String today_date = convert_default_format.format(new Date());\n // return current date\n return today_date;\n }",
"public static String getCurrentTime() {\n\t\t/* Calendar to get current time and date */\n\t\tCalendar cal = Calendar.getInstance();\n\t\t/* Time format */\n\t\t@SuppressLint(\"SimpleDateFormat\") SimpleDateFormat df = new SimpleDateFormat(\"HH:mm\");\n\t\treturn df.format(cal.getTime());\n\t}",
"public LocalDateTime getCurrentTime() {\n return clock.instant().atZone(ZoneId.systemDefault()).toLocalDateTime();\n }",
"public long getCurrentDateTime() {\n return currentDateTime;\n }",
"public static final String CurrentTime() {\n\t\t\n\t\tfinal SimpleDateFormat DF = new SimpleDateFormat(\"HH:mm:ss\");\n\t\treturn DF.format(new Date());\n\t}",
"public static String getCurrentTime(){\n Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone(\"Asia/Singapore\"));\n Date currentDate = calendar.getTime();\n return currentDate.toString();\n }",
"public Date currentDate() {\n return new Date();\n }",
"@SuppressLint(\"SimpleDateFormat\")\n\tpublic String getCurrentDateAndTime() {\n\t\tTime today = new Time(Time.getCurrentTimezone());\n\t\ttoday.setToNow();\n\t\tCalendar cal = Calendar.getInstance();\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"MMMM dd, yyyy\");\n\t\tString dateresult = sdf.format(cal.getTime());\n\t\treturn dateresult;\n\t}",
"public long getCurrentDateTime() {\n return currentDateTime;\n }",
"public static Date now()\r\n\t{\r\n\t\treturn new Date(System.currentTimeMillis());\r\n\t}",
"public static String getCurrentDateTime() {\n Calendar cal = new GregorianCalendar(TimeZone.getTimeZone(\"GMT+7\"));\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n fmt.setCalendar(cal);\n String currDateTime = fmt.format(cal.getTimeInMillis());\n \n return currDateTime;\n }",
"public static String getCurrentTimeAsString() {\n\t\treturn getTimeAsString(System.currentTimeMillis());\n\t}",
"public static Time getCurrentTime() {\r\n\t\tjava.util.Date date = new java.util.Date();\r\n\t\tlong t = date.getTime();\r\n\t\treturn new java.sql.Time(t);\r\n\t}",
"public static Date now() {\n return now(0);\n }",
"private String getCurrentDate() {\r\n\r\n String strCurrentDate = null;\r\n\r\n //Get current Date as String\r\n try {\r\n long currentTimeMillis = System.currentTimeMillis();\r\n Date currentDate = new Date(currentTimeMillis);\r\n strCurrentDate = dateFormat.format(currentDate);\r\n } catch (Exception e) {\r\n logger.error(\"Date error: \" + e);\r\n }\r\n\r\n return strCurrentDate;\r\n }",
"public Date getCurrentTime() {\n Date timeNow;\n\n // define the right formats\n SimpleDateFormat hourFormat = new SimpleDateFormat(\"HH\");\n SimpleDateFormat minFormat = new SimpleDateFormat(\"mm\");\n\n // get the current time in the right format\n Calendar calendar = Calendar.getInstance();\n int hour = Integer.parseInt(hourFormat.format(calendar.getTime()));\n int min = Integer.parseInt(minFormat.format(calendar.getTime()));\n\n // take year, month and date the same, because only the time maters\n if (hour < 4) {\n timeNow = new Date(2018, 5,6, hour, min);\n } else {\n timeNow = new Date(2018, 5,5, hour, min);\n }\n\n return timeNow;\n }",
"public static String now() {\n return dateTimeFormatZ.format(new Date());\n }",
"private String getCurrentDateTime() {\n DateFormat dateFormatter = new SimpleDateFormat(\"dd/MM/yyyy:hh:mm:ss \");\n dateFormatter.setLenient(false);\n Date today = new Date();\n return dateFormatter.format(today);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generate a time horizon coordinate from the supplied cell intersection | public static String buildTimeHorizonCoord(Intersection cellIs, MdbDef mdbDef) {
String timeDim = mdbDef.getTimeDim(), yearDim = mdbDef.getYearDim();
String timeCoord = cellIs.getCoordinate(timeDim), yearCoord = cellIs.getCoordinate(yearDim);
return buildTimeHorizonCoord(timeCoord, yearCoord);
} | [
"public static void applyTimeHorizonCoord(Intersection cellIs, String timeHorizonCoord, MdbDef mdbDef) {\r\n\t\t\r\n\t\tString timeDim = mdbDef.getTimeDim(), yearDim = mdbDef.getYearDim();\r\n\t\t\r\n\t\t// Look for period/year delimiter. Throw an error if the delimiter is not found\r\n\t\t// or if it is the last character.\r\n\t\tint pos = findTimeHorizonDelim(timeHorizonCoord);\r\n\r\n\t\t// Split time horizon coordinate into period and year\r\n\t\tcellIs.setCoordinate(timeDim, timeHorizonCoord.substring(pos + PafBaseConstants.TIME_HORIZON_MBR_DELIM_LEN));\r\n\t\tcellIs.setCoordinate(yearDim, timeHorizonCoord.substring(0, pos));\r\n\t}",
"Instant getInstantForCell(int[] start);",
"public ITimeSpan getTimeHorizon();",
"String getTopLeftCell();",
"public static void translateTimeHorizonCoords(Intersection intersection, String periodDim, String yearDim) {\r\n\t\t\r\n\t\tString yearCoord = intersection.getCoordinate(yearDim);\r\n\t\t\r\n\t\t// Verify that these are time horizon coordinates before performing translation\r\n\t\tif (yearCoord.equals(PafBaseConstants.TIME_HORIZON_DEFAULT_YEAR)) {\r\n\t\t\tString timeHorizonCoord = intersection.getCoordinate(periodDim);\r\n\t\t\tint pos = findTimeHorizonDelim(timeHorizonCoord);\r\n\t\t\tintersection.setCoordinate(periodDim, timeHorizonCoord.substring(pos + PafBaseConstants.TIME_HORIZON_MBR_DELIM_LEN));\r\n\t\t\tintersection.setCoordinate(yearDim, timeHorizonCoord.substring(0, pos));\r\n\t\t}\r\n\t\r\n\t}",
"double getHorDist(double initial_hor_vel, double time)\n {\n ux = initial_hor_vel;\n t = time;\n x = ux*t;\n return x;\n }",
"private int getNorthCell(Cell cell) {\n\t\tint cellNumber = cell.getNumber();\n\t\tif (cellNumber >= getGridWidth()) {\n\t\t\treturn (cellNumber - getGridWidth());\n\t\t} else {\n\t\t\tif (isToroidal()) {\n\t\t\t\treturn (getGridSize() - getGridWidth() + cellNumber);\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}",
"static public String buildTimeHorizonCoord(String period, String year) {\r\n\t\treturn year + PafBaseConstants.TIME_HORIZON_MBR_DELIM + period;\r\n\t}",
"private int getNorthWestCell(Cell cell) {\n\t\tint cellNumber = cell.getNumber();\n\t\tif ((cellNumber >= getGridWidth()) && (cellNumber % getGridWidth() != 0)) {\n\t\t\treturn (cellNumber - getGridWidth() - 1);\n\t\t} else {\n\t\t\tif (isToroidal()) {\n\t\t\t\tif (cellNumber >= getGridWidth()) { //move west, then north\n\t\t\t\t\treturn (cellNumber - 1);\n\t\t\t\t}\n\t\t\t\tif (cellNumber % getGridWidth() != 0) { //move north, then west\n\t\t\t\t\treturn (getGridSize() - getGridWidth() + cellNumber - 1);\n\t\t\t\t}\n\t\t\t\treturn (getGridSize() - 1); //upper left corner\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}",
"private Cell calcShiftedCellTempate(int shift, Cell cellTemplate) {\n // First need to move template cell south-west a bit (half cell size height)\n Cell theTemplate = new Cell(\n cellTemplate.minX - ((double) cellTemplate.width() / 2.0),\n cellTemplate.minY - ((double) cellTemplate.height() / 2.0),\n cellTemplate.maxX - ((double) cellTemplate.width() / 2.0),\n cellTemplate.maxY - ((double) cellTemplate.height() / 2.0));\n\n // Amount to shift cell grid each time (quarter or the cell size)\n double shiftXAmount = ((double) cellTemplate.width()) / 4.0;\n double shiftYAmount = ((double) cellTemplate.height()) / 4.0;\n\n // Now shift cell depending on the direction\n if (shift == 0) { \t\t\t// No shift\n return cellTemplate;\n }\n else if (shift == 1) { // Shift quarter of a cell north\n return new Cell(\n theTemplate.minX,\n theTemplate.minY + shiftYAmount,\n theTemplate.maxX,\n theTemplate.maxY + shiftYAmount);\n }\n else if (shift == 2) { // Shift quarter of a cell east\n return new Cell(\n theTemplate.minX + shiftXAmount,\n theTemplate.minY,\n theTemplate.maxX + shiftXAmount,\n theTemplate.maxY);\n }\n else if (shift == 3) { // Shift quarter of a cell south\n return new Cell(\n theTemplate.minX,\n theTemplate.minY - shiftYAmount,\n theTemplate.maxX,\n theTemplate.maxY - shiftYAmount);\n }\n else if (shift == 4) { // Shift quarter of a cell west\n return new Cell(\n theTemplate.minX - shiftXAmount,\n theTemplate.minY,\n theTemplate.maxX - shiftXAmount,\n theTemplate.maxY);\n }\n else {\n this.output(\"ExpandingCell.calcShiftedCellTemplate error, unrecognised shift value: \" + shift);\n return null;\n }\n }",
"int getStartCellIdx(Game game, Player player);",
"private int getWestCell(Cell cell) {\n\t\tint cellNumber = cell.getNumber();\n\t\tif (cellNumber % getGridWidth() != 0) {\n\t\t\treturn (cellNumber - 1);\n\t\t} else {\n\t\t\tif (isToroidal()) {\n\t\t\t\treturn (cellNumber + getGridWidth() - 1);\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}",
"private int createIndex() {\n if((x == 0) && (y == 0) && (z == 0))\n return 0;\n if(equalsAxis(-1, 0, 1)) // south west corner\n return 1;\n if(equalsAxis(0,-1, 1)) // south east corner\n return 2;\n if(equalsAxis(1, -1, 0)) // east corner\n return 3;\n if(equalsAxis(1, 0, -1)) // north east corner\n return 4;\n if(equalsAxis(0, 1, -1)) // north west corner\n return 5;\n if(equalsAxis(-1, 1, 0)) // west corner\n return 6;\n int radius = this.radiusFromCenter();\n // HexTile first = new HexTile(-radius, 0, radius, false);\n if(x == -radius && y == 0 && z == radius)\n return 1 + countInnerRingsTiles(radius); // the element + inner rings\n return countInnerRingsTiles(radius) + countTilesRing(radius);\n }",
"void computeFirstHour() {\n // Compute the first full hour that is visible on screen\n mFirstHour = (mViewStartY + mCellHeight + HOUR_GAP - 1) / (mCellHeight + HOUR_GAP);\n mFirstHourOffset = mFirstHour * (mCellHeight + HOUR_GAP) - mViewStartY;\n }",
"private int[] getTableIndexByView(int date, int time) {\n int x = targetStartDate + date;\n int y = targetStartTime + time;\n return new int[]{x, y};\n }",
"public int getTileGridXOffset();",
"GridHorizCoordSys getHorizCoordSys() {\n return hcs;\n }",
"Integer getStartHour();",
"long getCellRow();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is very important to override for . By default, any update that does not have a message will not pass through abilities. To customize that, you can just override this global flag and make it return true at every update. This way, the ability flags will be the only ones responsible for checking the update's validity. | @Override
public boolean checkGlobalFlags(Update update) {
return true;
} | [
"public void checkAndUpdate(){\n\t\tif(!canMove() && !canAttack())\n\t\t\tsetEnabled(false);\n\t}",
"public abstract boolean allowedToUpdate();",
"@Override\r\n public boolean allowedToUpdate() {\r\n return false;\r\n }",
"@Override\r\n public boolean allowedToUpdate() {\r\n return true;\r\n }",
"public boolean getAllowUpdate() {\n return allowUpdate;\n }",
"public boolean shouldPromptBeforeUpdate();",
"boolean hasUpdateWeaponReq();",
"boolean isUpdateSupport();",
"public void setAllowUpdate(boolean tmp) {\n this.allowUpdate = tmp;\n }",
"boolean canBeUpdated();",
"protected abstract boolean supportsForUpdate();",
"@Override\n protected void updateEnabled() {\n // Try to enable actions subject to setters' logic.\n setCreateEnabled(true);\n setEditEnabled(true);\n setCopyEnabled(true);\n setCompareEnabled(true);\n setExportRejectedEnabled(true);\n setDeleteEnabled(true);\n setUnlockEnabled(true);\n setLockEnabled(true);\n setMarkUplinkedEnabled(true);\n }",
"public Boolean canUpdateToServer() {\n\t\treturn true;\n\t}",
"boolean isUpdatesEnabled();",
"boolean isAutoCheckUpdate();",
"public boolean isModifiable();",
"public boolean isAffinedUpdate () {\n\t\treturn isAffined;\n\t}",
"@VTID(39)\n boolean getRequireManualUpdate();",
"boolean hasIsUpdate();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
END calculate_bmi_score() NEXT FUNCTION RETURNS A STRING DESCRIBING THE BMI CATEGORY BASED ON HEIGHT AND WEIGHT | public String calculate_bmi_category()
{
double bmi_score = this.calculate_bmi_score();
if( bmi_score < (18.5) )
{
return "Underweight";
} // END if
/************************************************/
if( bmi_score >= (18.5) && bmi_score <= (24.9) )
{
return "Normal weight";
} // END if
/************************************************/
if( bmi_score >= (25.0) && bmi_score <= (29.9) )
{
return "Overweight";
} // END if
/************************************************/
return "Obesity";
} | [
"static double computeBMI(double weight, double height){\n\t\treturn Math.round((weight*703*10)/(height*height))*(1/10.0);\n\t}",
"public double getBMI(){\n bmi = weight * KG_PER_POUND / (height * METERS_PER_INCH *height * METERS_PER_INCH);\n return (bmi);\n}",
"private static String bmiClassification (Double bmi) {\n String bmiToString = \"\";\n\n if (bmi < 18.5)\n bmiToString = \"Underweight\";\n else if (bmi < 25.0)\n bmiToString = \"Normal\";\n else if (bmi < 30.0)\n bmiToString = \"Overweight\";\n else if (bmi >= 30.0)\n bmiToString = \"Obese\";\n\n return bmiToString;\n }",
"public static void calculateMetricBMI()\n\t{\n\t\t// Declare variables to store data\n\t\tint weightKG, heightCM;\n\n\t\t// Collect user's weight in kilograms\n\t\tSystem.out.print(\"Enter your weight in kilograms: \");\n\t\tSystem.out.flush();\n\t\tweightKG = sc.nextInt();\n\n\t\t// Collect user's height in centimeters\n\t\tSystem.out.print(\"\\nEnter your height in centimeters: \");\n\t\tSystem.out.flush();\n\t\theightCM = sc.nextInt();\n\n\t\t// Calculate BMI\n\t\tdouble bmi = getBMI(weightKG, heightCM);\n\n\t\t// Display BMI\n\t\tSystem.out.printf(\"\\nA body mass index of 20 - 25 is considered \\\"normal\\\"\\n\");\n\t\tSystem.out.printf(\"Your BMI is %.2f\\n\\n\", bmi);\n\t}",
"public static double bmiCalculator (double weight, double height) { \n double bmi = weight/(height*height); // calculates BMI with formula\n System.out.println(\"Your BMI is \" + String.valueOf(bmi).substring(0, 2)); // prints rounded BMI value\n \n // announces what the BMI value of the user means\n if (bmi > 50 || bmi < 10) {\n System.out.println(\"That doesn't sound right.\");\n System.out.println(\"Please ensure that the correct information has been inputted.\");\n }\n else if (bmi < 18) {\n System.out.println(\"That means you are underweight.\");\n }\n else if (bmi >= 18 && bmi <= 24) {\n System.out.println(\"That means you are healthy.\");\n }\n else if (bmi > 24 && bmi <= 29) {\n System.out.println(\"That means you are overweight.\");\n }\n else if (bmi > 29 && bmi <= 39) {\n System.out.println(\"That means you are obese.\");\n }\n else if (bmi > 39) {\n System.out.println(\"That means you are extremely obese.\");\n }\n else { // if BMI is above 50\n System.out.println(\"Are you okay?\");\n System.out.println(\"That doesn't sound right.\");\n System.out.println(\"Please ensure that the correct information has been inputted.\");\n }\n return bmi; //returns the user bmi value\n }",
"public static double bmiCalculator (double weight, double height) { \n double bmi = weight/(height*height); // calculates BMI with formula\n System.out.println(\"Your BMI is \" + String.valueOf(bmi).substring(0, 4)); // prints rounded BMI value\n \n // announces what the BMI value of the user means\n if (bmi > 50 || bmi < 10) {\n System.out.println(\"That doesn't sound right.\");\n System.out.println(\"Please ensure that the correct information has been inputted.\");\n }\n else if (bmi < 18) {\n System.out.println(\"That means you are underweight.\");\n }\n else if (bmi >= 18 && bmi <= 24) {\n System.out.println(\"That means you are healthy.\");\n }\n else if (bmi > 24 && bmi <= 29) {\n System.out.println(\"That means you are overweight.\");\n }\n else if (bmi > 29 && bmi <= 39) {\n System.out.println(\"That means you are obese.\");\n }\n else if (bmi > 39) {\n System.out.println(\"That means you are extremely obese.\");\n }\n else { // if BMI is above 50\n System.out.println(\"Are you okay?\");\n System.out.println(\"That doesn't sound right.\");\n System.out.println(\"Please ensure that the correct information has been inputted.\");\n }\n return bmi; //returns the user bmi value\n }",
"public double BMI () {\n\t\treturn ( weight / ( height * height ) ) * 703;\n\t}",
"public double getBMI(){\n\t\t//BMI = weight / heightInMeter^2\n\t\t\n\t\tdouble heightInMeter = ((double)height) / 100;\n\t\t\n\t\treturn getCurrentWeight() / Math.pow(heightInMeter, 2);\n\t}",
"private int calculateBMI(int score, int total){\n int maxBMI = 39;\n\n int bmi = maxBMI - score;\n return bmi;\n }",
"public double calculateWeight() { \n\t\t\n\t\tdouble weight = (double) ((expectedBMI * height * height)/703);\n\t\treturn weight;\n\t}",
"private double calculateBmi(){\n\n double length = 0;\n double weight = 0;\n\n //if string not \"\"\n if(lengthValues != \"\"){\n length = Double.parseDouble(lengthValues);\n }\n\n if(weightValues != \"\"){\n weight = Double.parseDouble(weightValues);\n }\n\n\n if(length != 0 && weight != 0){\n double heightInMeters = length / 100;\n double bmi = weight/(heightInMeters*heightInMeters);\n\n //value with 2 decimals\n bmi = (double)Math.round(bmi * 100) / 100;\n return bmi;\n } else {\n return 0;\n }\n }",
"static float calculateBmi(float weight, float height, boolean isImperial) {\n float multiplier = isImperial ? 703: 1;\n float bmi = multiplier*weight/(height*height);\n \n return bmi;\n }",
"private double calculate() {\n\n return weight / (height * height); //zwrocenie niniejszej wartosci oznacza de facto obliczenie wskaznika BMI\n }",
"static void bmiInter(double bmi){\n\n if (bmi<18.5){ // Underweight Check\n System.out.println(\"Your BMI interpretation is Underweight.\");\n } else if (bmi<25.0){ // Normal check\n System.out.println(\"Your BMI interpretation is Normal.\");\n } else if (bmi < 30.){ // Overweight check\n System.out.println(\"Your BMI interpretation is Overweight.\");\n } else{ // Obese Category\n System.out.println(\"Your BMI interpretation is Obese.\");\n }\n }",
"public void calcBMI() {\r\n\t\tBMICalculator bmi = new BMICalculator();\r\n\t\tthis.bmi = bmi.calcBMI(this);\r\n\t}",
"float getOverallWeight();",
"@Override\r\n\tpublic void suggestHealthTips(double bmi) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tSystem.out.println(\"Your BMI value is : \" + bmi);\r\n\t\t\r\n\t\tif(bmi > 0 && bmi <= 18.5) {\r\n\t\t\tSystem.out.println(\"############### Under weight ###############\");\r\n\t\t\tSystem.out.println(\"############### diet plan ###############\");\r\n\t\t\tSystem.out.println(\"Add healthy calories\\n\" + \r\n\t\t\t\t\t\"Go nutrient dense\\n\" + \r\n\t\t\t\t\t\"Snack away\\n\" + \r\n\t\t\t\t\t\"Eat mini-meals\\n\" + \r\n\t\t\t\t\t\"Bulk up.\\n\\n\");\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"############### Exercise plan ###############\");\r\n\t\t\tSystem.out.println(\"You’re probably eating back more calories than you burned in the first place\\n\" + \r\n\t\t\t\t\t\"Having a high body fat percentage means you’re more likely to feel starving after a workout\\n\" + \r\n\t\t\t\t\t\"Bench presses help build shoulder, tricep, and chest muscles.\\n\" +\r\n\t\t\t\t\t\"This is a good exercise for bulking up. The more weight you can bench, the more muscle you'll build.\\n\\n\");\r\n\t\t}\r\n\t\telse if(bmi > 18.5 && bmi <= 25) {\r\n\t\t\tSystem.out.println(\"############### Normal weight ###############\");\r\n\t\t\tSystem.out.println(\"############### diet plan ###############\");\r\n\t\t\tSystem.out.println(\"Emphasizes fruits, vegetables, whole grains, and fat-free or low-fat milk and milk products.\\n\" + \r\n\t\t\t\t\t\"Includes lean meats, poultry, fish, beans, eggs, and nuts.\\n\" + \r\n\t\t\t\t\t\"Is low in saturated fats, trans fats, cholesterol, salt (sodium), and added sugars.\\n\" + \r\n\t\t\t\t\t\"Stays within your daily calorie needs.\\n\\n\");\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"############### Exercise plan ###############\");\r\n\t\t\tSystem.out.println(\"You’re probably eating back more calories than you burned in the first place\\n\" + \r\n\t\t\t\t\t\"Having a high body fat percentage means you’re more likely to feel starving after a workout\\n\" + \r\n\t\t\t\t\t\"Bench presses help build shoulder, tricep, and chest muscles.\\n\" +\r\n\t\t\t\t\t\"This is a good exercise for bulking up. The more weight you can bench, the more muscle you'll build.\\n\\n\");\r\n\t\t}\r\n\t\telse if(bmi > 30 && bmi <= 40) {\r\n\t\t\tSystem.out.println(\"############### Over weight ###############\");\r\n\t\t\tSystem.out.println(\"############### diet plan ###############\");\r\n\t\t\tSystem.out.println(\"Eat a high-protein breakfast.\\n\" + \r\n\t\t\t\t\t\"Avoid sugary drinks and fruit juice.\\n\" + \r\n\t\t\t\t\t\"Drink water a half hour before meals.\\n\" + \r\n\t\t\t\t\t\"Choose weight loss-friendly foods (see list).\\n\" + \r\n\t\t\t\t\t\"Eat soluble fiber.\\n\" + \r\n\t\t\t\t\t\"Drink coffee or tea.\\n\" + \r\n\t\t\t\t\t\"Eat mostly whole, unprocessed foods.\\n\" + \r\n\t\t\t\t\t\"Eat your food slowly.\\n\\n\");\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"############### Exercise plan ###############\");\r\n\t\t\tSystem.out.println(\"You’re probably eating back more calories than you burned in the first place\\n\" + \r\n\t\t\t\t\t\"Having a high body fat percentage means you’re more likely to feel starving after a workout\\n\" + \r\n\t\t\t\t\t\"Bench presses help build shoulder, tricep, and chest muscles.\\n\" +\r\n\t\t\t\t\t\"This is a good exercise for bulking up. The more weight you can bench, the more muscle you'll build.\\n\\n\");\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Invalid Input\\n\\n\");\r\n\t\t}\r\n\t\t\r\n\t}",
"public void getBMI() {\n System.out.println(user.calculateBMItoString());\n }",
"static void printBmiInfo(float bmi) {\n println(\"BMI VALUES\");\n println(\" * Underweight: less than 18.5\");\n println(\" * Normal: between 18.5 and 24.9\");\n println(\" * Overweight: between 25 and 29.9\");\n println(\" * Obese: 30 or greater\");\n println(\"Your BMI value is \" + bmi);\n \n if (bmi < 18.5) {\n println(\"You are underweight\");\n }\n else if (bmi >= 18.5 && bmi < 25) {\n println(\"You are normal :)\");\n }\n else if (bmi >= 25 && bmi < 29.9) {\n println(\"Be careful, you are overweight now!\");\n }\n else {\n println(\"Opps, you are obese!!!\");\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Imports all the services from the specified injector and makes available. Wirelets can be used to transform and filter the services from the specified injector. | public void importAll(Injector injector, Wirelet... wirelets) {
InjectorImporter pfi = new InjectorImporter(configuration, builder, injector, WireletList.of(wirelets)); // Validates arguments
checkConfigurable();
pfi.importAll(); // Will create the necessary nodes.
} | [
"public void boot()\n {\n injector = Guice.createInjector( modules );\n }",
"private Injector setupEarlyInjector() throws Exception {\n final List<Module> modules = Lists.newArrayList();\n\n modules.add(new AbstractModule() {\n @Singleton\n @Provides\n public Map<String, FilterDeserializer.PartialDeserializer> filters() {\n final Map<String, FilterDeserializer.PartialDeserializer> filters = new HashMap<>();\n filters.put(\"key\", new MatchKey.Deserializer());\n filters.put(\"=\", new MatchTag.Deserializer());\n filters.put(\"true\", new TrueFilter.Deserializer());\n filters.put(\"false\", new FalseFilter.Deserializer());\n filters.put(\"and\", new AndFilter.Deserializer());\n filters.put(\"or\", new OrFilter.Deserializer());\n filters.put(\"not\", new NotFilter.Deserializer());\n filters.put(\"type\", new TypeFilter.Deserializer());\n return filters;\n }\n\n @Singleton\n @Provides\n @Named(\"config\")\n public SimpleModule configModule(\n Map<String, FilterDeserializer.PartialDeserializer> filters\n ) {\n final SimpleModule module = new SimpleModule();\n module.addDeserializer(Filter.class, new FilterDeserializer(filters));\n return module;\n }\n\n @Override\n protected void configure() {\n bind(PluginContext.class).toInstance(new PluginContextImpl());\n }\n });\n\n final Injector injector = Guice.createInjector(modules);\n\n for (final FastForwardModule m : loadModules(injector)) {\n log.info(\"Setting up {}\", m);\n\n try {\n m.setup();\n } catch (Exception e) {\n throw new Exception(\"Failed to call #setup() for module: \" + m, e);\n }\n }\n\n return injector;\n }",
"public void inject() {\n beans.entrySet().forEach(bean -> {\n try {\n injectBeanInstance(bean.getKey(), bean.getValue().getInstance());\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n });\n }",
"private InjectionExtension injector() {\n return configuration.use(InjectionExtension.class);\n }",
"private void discoverServiceInjectionPoints(Set<InjectionPoint> ips) {\n for (Iterator<InjectionPoint> iterator = ips.iterator(); \n iterator.hasNext();) {\n InjectionPoint injectionPoint = iterator.next();\n Set<Annotation> qualifs = injectionPoint.getQualifiers();\n for (Iterator<Annotation> qualifIter = qualifs.iterator(); \n qualifIter.hasNext();) {\n Annotation annotation = qualifIter.next();\n if (annotation.annotationType().equals(OSGiService.class)){\n printDebugForInjectionPoint(injectionPoint);\n String s = \"---- Injection requested for \" +\n \"framework service type \" + injectionPoint.getType()\n + \" and annotated with dynamic=\"\n + injectionPoint.getAnnotated()\n .getAnnotation(OSGiService.class)\n .dynamic()\n + \", serviceCriteria=\"\n + injectionPoint.getAnnotated()\n .getAnnotation(OSGiService.class)\n .serviceCriteria();\n //logger.logp(Level.INFO, \"OSGiServiceExtension\", \"discoverServiceInjectionPoints\", s);\n debug (s);\n //Keep track of service-type and its injection point\n //Add to list of framework services to be injected\n addServiceInjectionInfo(injectionPoint);\n debug(\"number of injection points for \" \n + injectionPoint.getType() + \"=\" \n + servicesToBeInjected.size());\n \n }\n }\n }\n }",
"public static InjectorImpl getInjector(final Iterable<? extends DSBinder> binders, Stage stage) {\n long start = System.currentTimeMillis();\n PluginsLoader loader = new PluginsLoader();\n loader.loadFirstPlugins();\n List<ConfigurationHandler> handlers = (List<ConfigurationHandler>)\n loader.getConfigurationHandlers();\n try {\n if (handlers.size() > 0 && handlers.get(0).isAutoEnabled()) {\n return handlers.get(0).getInjector(stage);\n }\n InjectorImpl injector = InjectorBuilder.makeInjector((Iterable<Binder>) binders, loader, stage);\n return injector;\n } finally {\n if (handlers.size() > 1) {\n logger.warning(\"There are more than one configurator plugin in the classpath.\");\n logger.warning(new StringBuilder()\n .append(\"The plugin : \")\n .append(handlers.get(0).getClass().getSimpleName())\n .append(\" is used for this session.\").toString());\n }\n if (DEBUG) {\n logger.info(new StringBuilder()\n .append(\"Time elapsed for bootstrapping : \")\n .append((System.currentTimeMillis() - start))\n .append(\" ms.\").toString());\n }\n }\n }",
"private void initServices() {\n\t\ttsa = (TrackerServiceAsync) GWT.create(TrackerService.class);\t\t\n\n\t\tServiceDefTarget endpoint = (ServiceDefTarget) tsa;\n\t\tendpoint.setServiceEntryPoint(GWT.getModuleBaseURL() + URL_TRACKER_SERVICE);\n\t}",
"protected synchronized void set(Injector injector) {\n injectors.set(injector);\n }",
"@SuppressWarnings(\"unused\")\n public void loadServices() {\n if (Objects.nonNull(this.localServiceDirectory)) {\n registerServicesFromDirectories(this.localServiceDirectory, true);\n }\n\n if (Objects.nonNull(this.remoteServiceDirectories)) {\n for (File directory : this.remoteServiceDirectories) {\n registerServicesFromDirectories(directory, false);\n }\n }\n }",
"void register(Injector injector, Namespace ns);",
"private final void inject() {\n }",
"public void injectDependencies() {\n if (injectionMethods != null && injectionMethods.length > 0) {\n for (ComponentMetadata.InjectMetadata injectMetadata : injectionMethods) invokeInjectionMethod(instance, injectMetadata);\n }\n }",
"public void rewire() {\n // need to re-inject everything again.\n for (Component c : new HashSet<Component>(componentLookup.values())) {\n // inject dependencies for this component\n c.injectDependencies();\n }\n }",
"void injectModules (Object target);",
"ISet<Class<?>> collectAllTypeWiredServices();",
"private void registerAdditionalModules(final Set<Module> modules) {\n final DynamicBinderFactory dynamicBinderFactory = services.bindDynamically();\n \n for (Module module : modules) {\n module.configure(dynamicBinderFactory);\n }\n dynamicBinderFactory.commit();\n }",
"public static void setupGuice() {\n\t\tJerseyGuiceUtils.install(new ServiceLocatorGenerator() {\n\t\t\t@Override\n\t\t\tpublic ServiceLocator create(String name, ServiceLocator parent) {\n\t\t\t\tif (!name.startsWith(\"__HK2_\")) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\tList<Module> modules = new ArrayList<>();\n\t\t\t\tmodules.add(new JerseyGuiceModule(name));\n\t\t\t\tmodules.add(new ServletModule());\n\t\t\t\treturn Guice.createInjector(modules).getInstance(ServiceLocator.class);\n\t\t\t}\n\t\t});\n\t}",
"public ServiceLocatorImpl(final Collection<Module> modules,\n\t\t\t\t\t\t\t final Injector injector,\n\t\t\t\t\t\t\t final ScopeManager scopeManager) {\n\t\tassert modules != null;\n\t\tassert injector != null;\n\t\tassert scopeManager != null;\n\n\t\tthis.scopeManager = scopeManager;\n\n\t\t//creating and overriding service definitions\n\t\t//TODO: implement this using set\n\t\tfinal List<Marker<?>> markers = CollectionUtils.newList();\n\t\tfinal Map<Marker<?>, ServiceDefinition<?>> definitions = CollectionUtils.newMap();\n\t\tfor (Module module : modules) {\n\t\t\tfor (ServiceDefinition<?> definition : module.getDefinitions()) {\n\t\t\t\tfinal Marker<?> marker = definition.getMarker();\n\t\t\t\tif (definitions.containsKey(marker)) {\n\t\t\t\t\tif (!definition.isOverride()) {\n\t\t\t\t\t\tthrow new ApplicationException(String.format(\"Service (%s) already declared\", marker));\n\t\t\t\t\t}\n\t\t\t\t\tmarkers.remove(marker);\n\t\t\t\t}\n\t\t\t\tmarkers.add(marker);\n\t\t\t\tdefinitions.put(marker, definition);\n\t\t\t}\n\t\t}\n\n\t\tfor (Marker<?> marker : markers) {\n\t\t\tfinal ServiceDefinition<?> definition = definitions.get(marker);\n\t\t\taddService(injector, definition, modules);\n\t\t}\n\n\t\t//logging statistics\n\t\tlogStatistics();\n\t}",
"protected ServiceBundler getServices() {\n return services;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'COMMENT_TXT' field. | public void setCOMMENTTXT(java.lang.CharSequence value) {
this.COMMENT_TXT = value;
} | [
"public org.LNDCDC_ADS_PRPSL.PROPOSAL_LINE.apache.nifi.LNDCDC_ADS_PRPSL_PROPOSAL_LINE.Builder setCOMMENTTXT(java.lang.CharSequence value) {\n validate(fields()[7], value);\n this.COMMENT_TXT = value;\n fieldSetFlags()[7] = true;\n return this;\n }",
"public org.LNDCDC_ADS_PRPSL.PROPOSAL_LINE.apache.nifi.LNDCDC_ADS_PRPSL_PROPOSAL_LINE.Builder setMETRICCOMMENTTXT(java.lang.CharSequence value) {\n validate(fields()[14], value);\n this.METRIC_COMMENT_TXT = value;\n fieldSetFlags()[14] = true;\n return this;\n }",
"public java.lang.CharSequence getCOMMENTTXT() {\n return COMMENT_TXT;\n }",
"public java.lang.CharSequence getCOMMENTTXT() {\n return COMMENT_TXT;\n }",
"@Override\n\tpublic void setCommentText(java.lang.String commentText) {\n\t\t_comment.setCommentText(commentText);\n\t}",
"public void setMETRICCOMMENTTXT(java.lang.CharSequence value) {\n this.METRIC_COMMENT_TXT = value;\n }",
"void setComment(String comment);",
"void setComment(java.lang.String comment);",
"public void setComments(java.lang.String value);",
"public org.LNDCDC_ADS_PRPSL.PROPOSAL_LINE.apache.nifi.LNDCDC_ADS_PRPSL_PROPOSAL_LINE.Builder clearCOMMENTTXT() {\n COMMENT_TXT = null;\n fieldSetFlags()[7] = false;\n return this;\n }",
"public String getCommentText(){\n\t\treturn this.commentText;\n\t}",
"public void setComment(String comment);",
"public ItemPage setCommentTextareaField() {\n return setCommentTextareaField(data.get(\"COMMENT\"));\n }",
"public boolean hasCOMMENTTXT() {\n return fieldSetFlags()[7];\n }",
"public void setComments( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), COMMENTS, value);\r\n\t}",
"private void setFileComment(String fileComment){\n put(SlackParamsConstants.FILE_COMMENT, fileComment);\n }",
"public void setTxt(String aTxt)\n {\n txt = aTxt;\n setItDirty(true);\n }",
"public void setFileComment(String fileComment)\r\n {\r\n sFileComment = fileComment;\r\n }",
"void setComments(java.lang.String comments);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Samples one observable state from the current belief. | public GameSample sampleObservableState(Game currentGame, GameFactory factory) {
//sample resource hands
ThreadLocalRandom rnd = ThreadLocalRandom.current();
CatanFactoredBelief belief = ((CatanWithBelief)currentGame).getBelief();
ResourcesModel rssModel = belief.getResourceModel();
ResourceSet[] playerHands = new ResourceSet[NPLAYERS];
double[] prob = new double[NPLAYERS];
Arrays.fill(prob, 0.0);
for(int pl = 0; pl < NPLAYERS; pl++) {
PlayerResourceModel phm = rssModel.getPlayerHandModel(pl);
if(phm.isFullyObservable()) {
playerHands[pl] = phm.getHand();
continue;
}
double total = 0.0;
for(Entry<ResourceSet, Double> entry : phm.possibleResSets.entrySet() ) {
total+= entry.getValue().doubleValue();
}
double choice = rnd.nextDouble(total);
for(Entry<ResourceSet, Double> entry : phm.possibleResSets.entrySet() ) {
choice -= entry.getValue().doubleValue();
if(choice <= 0.0d) {
playerHands[pl] = entry.getKey();
prob[pl] += Math.log(entry.getValue());
break;
}
}
}
//sample development cards by creating a random order of the remaining ones and "revealing" them
DevCardModel devModel = belief.getDevCardModel().copy();
int totalUnk = devModel.getTotalUnknownCards();
if(totalUnk > 0) {
int totalNonVp = devModel.getTotalNonVPCards();
ArrayList<Integer> deck = new ArrayList<>();
//first reveal the nonvp cards so create the deck with the nonvp cards only
for(int i = 0; i < N_DEVCARDTYPES; i++ ) {
if(i == CARD_ONEPOINT)
continue;
for(int j = 0; j < devModel.getRemaining(i); j++){
deck.add(i);
}
}
if(totalNonVp > 0) {
Collections.shuffle(deck);
int idx = deck.size() - 1; //start from the back to avoid shifting the array
for(int pl = 0; pl < NPLAYERS; pl++) {
if(devModel.getNonVPCards(pl) > 0) {
int nvpCards = devModel.getNonVPCards(pl);
for(int i = 0; i < nvpCards; i++) {
int type = deck.get(idx);
prob[pl] += Math.log(((double)devModel.getRemaining(type))/(idx + 1));
devModel.reveal(pl, 1, type);
deck.remove(idx);
idx--;
}
}
}
}
totalUnk -= totalNonVp;
//now reveal the remaining if any
if(totalUnk > 0) {
for(int j = 0; j < devModel.getRemaining(CARD_ONEPOINT); j++){
deck.add(CARD_ONEPOINT);
}
Collections.shuffle(deck);
int idx = deck.size() - 1; //start from the back to avoid shifting the array
for(int pl = 0; pl < NPLAYERS; pl++) {
int cards = devModel.getTotalUnknownCards(pl);
if(cards > 0) {
for(int i = 0; i < cards; i++) {
int type = deck.get(idx);
prob[pl] += Math.log(((double)devModel.getRemaining(type))/(idx + 1));
devModel.reveal(pl, 1, type);
deck.remove(idx);
idx--;
}
}
}
}
}
//finally create the game state using the sampled rss sets and the revealed dev cards;
int[] state = currentGame.getState();
int fsmlevel = state[OFS_FSMLEVEL];
int fsmstate = state[OFS_FSMSTATE+fsmlevel];
if(fsmstate == S_NEGOTIATIONS || fsmstate == S_PAYTAX)
fsmlevel-=1;
int cpn = state[OFS_FSMPLAYER + fsmlevel];
for(int pl = 0; pl < CatanWithBelief.NPLAYERS; pl++) {
state[OFS_PLAYERDATA[pl] + OFS_RESOURCES + RES_WOOD] = playerHands[pl].getAmount(RES_WOOD);
state[OFS_PLAYERDATA[pl] + OFS_RESOURCES + RES_CLAY] = playerHands[pl].getAmount(RES_CLAY);
state[OFS_PLAYERDATA[pl] + OFS_RESOURCES + RES_WHEAT] = playerHands[pl].getAmount(RES_WHEAT);
state[OFS_PLAYERDATA[pl] + OFS_RESOURCES + RES_SHEEP] = playerHands[pl].getAmount(RES_SHEEP);
state[OFS_PLAYERDATA[pl] + OFS_RESOURCES + RES_STONE] = playerHands[pl].getAmount(RES_STONE);
state[OFS_PLAYERDATA[pl] + OFS_RESOURCES + NRESOURCES] = 0;
//avoid doing the below if it is the player whose belief we are tracking because we already have access to their exact hand description
if(pl == state[OFS_OUR_PLAYER])
continue;
//clear the array for dev cards to avoid duplicating anything
for(int i = 0; i < N_DEVCARDTYPES; i++) {
state[OFS_PLAYERDATA[pl] + OFS_NEWCARDS + i] = 0;
state[OFS_PLAYERDATA[pl] + OFS_OLDCARDS + i] = 0;
}
int[] revealed = devModel.getRevealedSet(pl).clone();
if(pl == cpn) {
//if there are any new cards, we can sample at random from the set to reveal them first
if(state[OFS_PLAYERDATA[pl] + OFS_NEWCARDS + N_DEVCARDTYPES] > 0) {
ArrayList<Integer> hand = new ArrayList<>();
int type = 0;
for(int i : revealed) {
for(int j = 0; j < i; j++)
hand.add(new Integer(type));
type++;
}
Collections.shuffle(hand);
int idx = hand.size() - 1;
for(int k = 0; k < state[OFS_PLAYERDATA[pl] + OFS_NEWCARDS + N_DEVCARDTYPES]; k++) {
int card = hand.remove(idx);
idx--;
state[OFS_PLAYERDATA[pl] + OFS_NEWCARDS + card] +=1;
revealed[card]-=1;
}
}
}
for(int i = 0; i < N_DEVCARDTYPES; i++)
state[OFS_PLAYERDATA[pl] + OFS_OLDCARDS + i] = revealed[i];
//Observable version of Catan always makes vp cards old cards, otherwise these won't be recognised until the end of the turn
if(state[OFS_PLAYERDATA[pl] + OFS_NEWCARDS + CARD_ONEPOINT] > 0) {
state[OFS_PLAYERDATA[pl] + OFS_OLDCARDS + CARD_ONEPOINT] += state[OFS_PLAYERDATA[pl] + OFS_NEWCARDS + CARD_ONEPOINT];
state[OFS_PLAYERDATA[pl] + OFS_NEWCARDS + CARD_ONEPOINT] = 0;
}
}
double finalProb = 0.0;
for(int pl = 0; pl < NPLAYERS; pl++ ) {
finalProb += prob[pl];
}
return new GameSample(new Catan(state, (CatanConfig)factory.getConfig()), Math.exp(finalProb));
} | [
"public void sample(boolean value) {\n sample(value ? 1 : 0);\n }",
"public void sample() {\n getFunctionEstimator().sample();\n }",
"public double sample() {\n return rb.peek();\n }",
"public double sample(){\n return rb.peek();\n }",
"public S getRandomState();",
"public final Object getSample()\n { return(this.sample); }",
"private static State sampleState(Map<State, Double> probDistribution) {\n\t\t//System.out.println(probDistribution);\n\t\tdouble startProb = 0.0;\n\t\tdouble uniform = Math.random();\n\t\t//System.out.println(uniform);\n\t\tfor (Entry<State, Double> x : probDistribution.entrySet()) {\n\t\t\tif (uniform >= startProb && uniform <= startProb + x.getValue()) {\n\t\t\t\t//System.out.println(\"Pick \" + x.getKey());\n\t\t\t\treturn x.getKey();\n\t\t\t}\n\t\t\tstartProb += x.getValue();\n\t\t}\n\t\treturn null;\n\t}",
"public double sample() {\n return buffer.peek();\n }",
"public void randomChange() {\n\t\tif (Math.random() < .5) {\n\t\t\tthis.setOn(true);\n\t\t} else {\n\t\t\tthis.setOn(false);\n\t\t}\n\t}",
"public final void startSampling() {\n isSampling = true;\n }",
"public boolean ifWTakeSampleFlag() {\n return choiceSelect == W_TAKE_SAMPLE_FLAG_CHOICE;\n }",
"public SampleMode getSampleMode();",
"public void updateSamples();",
"public void setSampleMode( SampleMode sampleMode );",
"public Item sample() { // return (but do not delete) a random item\n if (isEmpty()) throw new NoSuchElementException(\"Stack underflow\");\n int i = StdRandom.uniform(N);\n return a[i];\n }",
"public void sample () \n {\n int rando = (int)Math.random()*_size;\n\n for (int i = 0; i < rando; i++) {\n _front = _front.getNext();\n }\n }",
"private void SamplingFlashLight() {\n notifSampling.ledARGB = 0xFFff0000; // choose color for LED\n notifSampling.flags = Notification.FLAG_SHOW_LIGHTS;\n notifSampling.ledOnMS = 100;\n notifSampling.ledOffMS = 100;\n nmSampling.notify(16, notifSampling);\n }",
"public double sample() {\r\n\t\tdouble y = this.rng.nextDouble();\r\n\t\tdouble x = y * upper + (1 - y) * lower;\r\n\t\treturn x;\r\n\t}",
"private void sampleFromTransitionModel(Particle p, int action, double value) {\n if (action == ACTION_MOVE) {\n // System.out.println(\"move\");\n // value is the distance of the movement\n // Note that there is some uncertainty in the movement.\n // The error in the distance travelled is distributed according to\n // a gaussian distribution with standard deviation movnoise*value.\n double newX = p.getX() + (value + value * movnoise * rnd.nextGaussian()) * Math.sin(p.getA());\n double newY = p.getY() - (value + value * movnoise * rnd.nextGaussian()) * Math.cos(p.getA());\n p.setX(newX);\n p.setY(newY);\n\n } else if (action == ACTION_ROTATE) {\n // System.out.println(\"rotate\");\n // value is the angle of the rotation (by how much the robot rotates clockwise)\n // Note that there is some uncertainty in the rotation.\n // The error in the angle is distributed according to\n // a gaussian distribution with standard deviation rotnoise*value.\n p.setA(p.getA() + value + rnd.nextGaussian() * rotnoise * value);\n\n }\n\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
An EndorsementRating is a rating that expresses some level of endorsement, for example inclusion in a "critic's pick" blog, a "Like" or "+1" on a social network. It can be considered the [[result]] of an [[EndorseAction]] in which the [[object]] of the action is rated positively by some [[agent]]. As is common elsewhere in schema.org, it is sometimes more useful to describe the results of such an action without explicitly describing the [[Action]]. An [[EndorsementRating]] may be part of a numeric scale or organized system, but this is not required: having an explicit type for indicating a positive, endorsement rating is particularly useful in the absence of numeric scales as it helps consumers understand that the rating is broadly positive. | @NotNull public static EndorsementRating.Builder endorsementRating() { return new EndorsementRating.Builder(new HashMap<String,Object>()); } | [
"public void setEndorsement(boolean endorsement) {\n isEndorsement = endorsement;\n }",
"@WebMethod(action=\"http://xmlns.oracle.com/apps/hcm/hwr/coreService/EndorseUser\",\n operationName=\"EndorseUser\")\n @RequestWrapper(targetNamespace=\"http://xmlns.oracle.com/apps/hcm/hwr/coreService/types/\",\n localName=\"EndorseUser\")\n @ResponseWrapper(targetNamespace=\"http://xmlns.oracle.com/apps/hcm/hwr/coreService/types/\",\n localName=\"EndorseUserResponse\")\n @WebResult(name=\"result\")\n @CallbackMethod(exclude=true)\n String EndorseUser(@WebParam(mode = WebParam.Mode.IN, name=\"pEndorsement\")\n String pEndorsement) throws ServiceException;",
"public static String mostEndorsements() throws SQLException {\n\t\ttry (\n\t\t\t// get connection to the database\n\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:default:connection\"); \n\t\t\t\t\n\t\t\t// create statement using connection \n\t\t\tStatement stmt = conn.createStatement();\n\t\t\t\n\t\t\t// gets review with the most endorsements within 3 days\n\t\t\tResultSet rs = stmt.executeQuery(\n\t\t\t\t\t\"select CustomerID \"\t\t\t\t\t\t\t\t\t\t// selects the CustomerID which will be the winner\n\t\t\t\t\t+ \"from Review \"\t\t\t\t\t\t\t\t\t\t\t// from the Review table\n\t\t\t\t\t+ \"left join Endorsement on Review = Endorsement.ReviewID \"\t// combines matching rows from Endorsement based on the shared ReviewID field\n\t\t\t\t\t+ \"group by ReviewID \"\t\t\t\t\t\t\t\t\t\t// aggregating results based on ReviewID because the most endorsed review should show up the most in the Endorsement table\n\t\t\t\t\t+ \"where ReviewDate >= cast(getdate() as date)\"\t// only considering reviews from today's date; later functionality would include the ability to specify a date\n\t\t\t\t\t+ \"order by count(ReviewID) desc \"\t\t\t\t// order by the count of the ReviewID since the most endorsed review should be there the most and sort desc to get the highest total\n\t\t\t\t\t+ \"limit 1\");\t\t\t\t\t\t\t\t\t// only getting the top result back since there can be only one winner; later functionality would randomize if there were more than one reviews with the highest total of endorsements\n\t\t) {\n\t\t\tString customerID = rs.getString(1);\n\t\t\tSystem.out.println(\"Selected winner of a free movie ticket is CustomerID: \" + customerID);\n\t\t\treturn customerID;\n\t\t}\n\t\t\n\t}",
"public void addEndorsementCount(){\n endorsementCount += 1;\n }",
"public com.google.protobuf.ByteString\n getSkillsEndorsementsRawBytes() {\n java.lang.Object ref = skillsEndorsementsRaw_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n skillsEndorsementsRaw_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public final EObject entryRuleEndBehaviour() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleEndBehaviour = null;\n\n\n try {\n // InternalChessGame.g:765:53: (iv_ruleEndBehaviour= ruleEndBehaviour EOF )\n // InternalChessGame.g:766:2: iv_ruleEndBehaviour= ruleEndBehaviour EOF\n {\n newCompositeNode(grammarAccess.getEndBehaviourRule()); \n pushFollow(FOLLOW_1);\n iv_ruleEndBehaviour=ruleEndBehaviour();\n\n state._fsp--;\n\n current =iv_ruleEndBehaviour; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public java.lang.String getSkillsEndorsementsRaw() {\n java.lang.Object ref = skillsEndorsementsRaw_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n skillsEndorsementsRaw_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"java.lang.String getSkillsEndorsementsRaw();",
"public java.lang.String getSkillsEndorsementsRaw() {\n java.lang.Object ref = skillsEndorsementsRaw_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n skillsEndorsementsRaw_ = s;\n return s;\n }\n }",
"public void addendorsement(Endorsement newendorsement) {\n this.endorsements.add(newendorsement);\n int incrementendorsement = this.getNumEndorsements() + 1;\n this.setNumEndorsements(incrementendorsement);\n }",
"@ApiModelProperty(value = \"The Employees category includes disclosure of policies, programs, and performance in diversity, labor relations and labor rights. The evaluation focuses on the quality of policies and programs, compliance with national laws and regulations, and proactive management initiatives. The category includes evaluation of inclusive diversity policies, fair treatment of all employees, robust diversity (EEO-1) programs and training.\")\n public BigDecimal getEmployeeRating() {\n return employeeRating;\n }",
"public final EObject entryRuleRating() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleRating = null;\n\n\n try {\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:940:2: (iv_ruleRating= ruleRating EOF )\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:941:2: iv_ruleRating= ruleRating EOF\n {\n newCompositeNode(grammarAccess.getRatingRule()); \n pushFollow(FollowSets000.FOLLOW_ruleRating_in_entryRuleRating1866);\n iv_ruleRating=ruleRating();\n\n state._fsp--;\n\n current =iv_ruleRating; \n match(input,EOF,FollowSets000.FOLLOW_EOF_in_entryRuleRating1876); \n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"@WebMethod(action=\"http://xmlns.oracle.com/apps/hcm/hwr/coreService/getMyEndorsements\",\n operationName=\"getMyEndorsements\")\n @RequestWrapper(targetNamespace=\"http://xmlns.oracle.com/apps/hcm/hwr/coreService/types/\",\n localName=\"getMyEndorsements\")\n @ResponseWrapper(targetNamespace=\"http://xmlns.oracle.com/apps/hcm/hwr/coreService/types/\",\n localName=\"getMyEndorsementsResponse\")\n @WebResult(name=\"result\")\n @CallbackMethod(exclude=true)\n String getMyEndorsements(@WebParam(mode = WebParam.Mode.IN, name=\"pGlobalProfileId\")\n String pGlobalProfileId) throws ServiceException;",
"public void setDurationEndDay(Integer durationEndDay) {\n this.durationEndDay = durationEndDay;\n }",
"public PolicyBinderPage endorsementFromActionDropDown() {\r\n sleep(3000);\r\n ExtentReporter.logger.log(LogStatus.INFO,\r\n \"Select Policy Actions-> Endorsement. Verify Endorse policy window displays.\");\r\n if (selectDropdownByValueFromPolicyActionDDL(driver, policyAction,\r\n policybinderpageDTO.valueOfPolicyActionEndorse, \"Policy Action\").equals(\"false\")) {\r\n sleep(2000);\r\n\r\n // This method will select the policy using required criteria\r\n PolicyQuotePage quotepage = new PolicyQuotePage(driver);\r\n quotepage.searchBackUpPolicyUsingSearchCriteria();\r\n sleep(4000);\r\n\r\n if (selectDropdownByValueFromPolicyActionDDL(driver, policyAction,\r\n policybinderpageDTO.valueOfPolicyActionEndorse, \"Policy Action\").equals(\"false\")) {\r\n\r\n // navigate through policy list till policy with expected\r\n // criteria is found\r\n RateApolicyPage rateapolicypage = new RateApolicyPage(driver);\r\n rateapolicypage.searchThroughPolicyList(policybinderpageDTO.valueOfPolicyActionEndorse);\r\n }\r\n }\r\n return new PolicyBinderPage(driver);\r\n }",
"@ApiModelProperty(value = \"The company's overall aggregated ESG rating, taking into account its ESG scoring from the Community, Employee, Enviroment, and Governance categories.\")\n public BigDecimal getOverallRating() {\n return overallRating;\n }",
"@ApiModelProperty(value = \"The Environment category data covers a company's interactions with the environment at large, including use of natural resources. The category evaluates corporate environmental performance, compliance with environmental regulations, and mitigation of environmental footprint. It also includes leadership in addressing climate change through appropriate policies and strategies.\")\n public BigDecimal getEnvironmentRating() {\n return environmentRating;\n }",
"@ApiModelProperty(value = \"The average ESG rating of all companies in a particular industry in which the company is a peer of.\")\n public BigDecimal getIndustryAverageRating() {\n return industryAverageRating;\n }",
"com.google.ads.googleads.v13.resources.Recommendation.RecommendationImpactOrBuilder getImpactOrBuilder();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
When looping, the loop begin sample may not lie on the beginning of a new frame. This returns how many samples it is away from the beginning of the frame. | public long getLoopBeginFrameOffset() {
return getLoopBeginSampleIndex() - getLoopBeginFrameIndex() * getSamplesInBlock();
} | [
"public int sampleFrameCount()\n\t{\n\t\treturn -1;\n\t}",
"public int getExpectedNumberOfSamples() {\n return 1 + Math.round((_stop - _start) / _step);\n }",
"protected int getFramesPased() {\r\n\t\treturn framesPassed;\r\n\t}",
"public static int offset_sampleCnt() {\n return (24 / 8);\n }",
"public int getTotalFrames()\n\t{\n\t\treturn total_frames;\n\t}",
"public int getInitialFrames()\n\t{\n\t\treturn initial_frames;\n\t}",
"public int getNumberOfSamples()\r\n\t{\r\n\t\treturn this.samples.length / (this.format.getNBits() / 8);\r\n\t}",
"public int nSamples(){\n return _nSamples;\n }",
"public int getRawFrameCount();",
"int getFrameCount();",
"int getSamples();",
"int sampleOffset();",
"abstract int getFrameCount();",
"int getSampleMs();",
"int getNumberOfAveragedSamples() throws DeviceException;",
"public int getFrameCount();",
"public int getNumFrames() {\r\n\t\treturn m_numFrames; \r\n\t}",
"public int sampleSize() {\n return sampleSize;\n }",
"int getFrameSeek();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Docket method to execute swagger. | @Bean
public Docket postApi() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(metadata()).select().paths(regex("/api.*")).build();
} | [
"Swagger createSwagger();",
"Map<String, Object> swagger();",
"@Bean\r\n public Docket api() {\n\r\n return new Docket(DocumentationType.SWAGGER_2)\r\n .select()\r\n .apis(RequestHandlerSelectors.basePackage(\"com.varun.swaggerapp\"))\r\n .paths(PathSelectors.any())\r\n .build()\r\n .apiInfo(getMyAppInfo());\r\n }",
"@Bean\n\tpublic Docket api() {\n\t\treturn new Docket(DocumentationType.SWAGGER_2)\n\t\t\t\t.select()\n\t\t\t\t.apis(RequestHandlerSelectors.any())\n\t\t\t\t.paths(PathSelectors.any())\n\t\t\t\t.build()\n\t\t\t\t.pathMapping(\"/\")\n\t\t\t\t.apiInfo(metadata());\n\t}",
"@Bean\n\tpublic Docket api() {\n\t\treturn new Docket(DocumentationType.SWAGGER_2).select().apis(RequestHandlerSelectors.any())\n\t\t\t\t.paths(PathSelectors.any()).build();\n\t}",
"@Bean\r\n public Docket initApi() {\r\n return new Docket(DocumentationType.SWAGGER_2)\r\n .select() \r\n .apis(RequestHandlerSelectors.any())\r\n .paths(PathSelectors.any())\r\n .build();\r\n }",
"@Test\r\n\tpublic void testDocket() {\r\n\t\tDocket mm = swaggerConfig.api();\r\n\t\tassertNotNull(mm);\r\n\t}",
"public interface CliApi {\n\n @GET(\"/api/ping\")\n Pong ping();\n\n /**\n * Fetch and note by type.\n * <p>\n * <code>\n * http://localhost:5050/cli/cmd/update_docker?k=label&n=2\n * </code>\n *\n * @param key key for the fetching\n * @param keyType type of the key, default is 'id', could be 'id' or 'label'\n * @param num number of articles to return, default is 1\n * @return the note resource\n */\n @GET(\"/cli/cmd/{key}\")\n PagedResponse<NoteResult> getNote(@Path(\"key\") String key, @Query(\"k\") String keyType, @Query(\"n\") int num);\n\n @POST(\"/cli/cmd\")\n SaveCmdResponse saveCmd(@Body SaveCmdRequest request);\n\n @DELETE(\"/cli/cmd/{id}\")\n IdResponse deleteItem(@Path(\"id\") String id);\n\n @POST(\"/cli/search\")\n PagedResponse<NoteResult> search(@Body CliSearchRequest request);\n\n}",
"@RequestMapping(value = \"/swagger\", method = RequestMethod.GET)\n public String swaggerUI() {\n return \"redirect:swagger-ui.html\";\n }",
"Endpoint.DefinitionStages.Blank define(String name);",
"public Swagger getSwagger() {\n return swagger;\n }",
"@ApiResponses(value = {\n @ApiResponse(responseCode = \"401\", description = \"Unauthorized is returned if authorization in required but was not provided.\"),\n @ApiResponse(responseCode = \"403\", description = \"Forbidden is returned if the caller has no sufficient privileges.\")})\npublic interface ISchemaRegistryController extends InfoContributor {\n\n @Operation(summary = \"Register a schema document and its record.\", description = \"This endpoint allows to register a schema document and its record. \"\n + \"The record must contain at least an unique identifier (schemaId) and the type of the schema (type).\",\n responses = {\n @ApiResponse(responseCode = \"201\", description = \"Created is returned only if the record has been validated, persisted and the document was successfully validated and stored.\", content = @Content(schema = @Schema(implementation = MetadataSchemaRecord.class))),\n @ApiResponse(responseCode = \"400\", description = \"Bad Request is returned if the provided metadata record is invalid or if the validation of the provided schema failed.\"),\n @ApiResponse(responseCode = \"409\", description = \"A Conflict is returned, if there is already a record for the provided schema id.\")})\n @RequestMapping(path = \"\", method = RequestMethod.POST, consumes = {MediaType.MULTIPART_FORM_DATA_VALUE}, produces = {MediaType.APPLICATION_JSON_VALUE})\n @ResponseBody\n public ResponseEntity createRecord(\n @Parameter(description = \"Json representation of the schema record.\", required = true) @RequestPart(name = \"record\", required = true) final MultipartFile schemaRecord,\n @Parameter(description = \"The metadata schema document associated with the record.\", required = true) @RequestPart(name = \"schema\", required = true) final MultipartFile document,\n final HttpServletRequest request,\n final HttpServletResponse response,\n final UriComponentsBuilder uriBuilder);\n\n @Operation(summary = \"Get schema record by schema id (and version).\", description = \"Obtain is single schema record by its schema id. \"\n + \"Depending on a user's role, accessing a specific record may be allowed or forbidden. \"\n + \"Furthermore, a specific version of the record can be returned by providing a version number as request parameter. If no version is specified, the most recent version is returned.\",\n responses = {\n @ApiResponse(responseCode = \"200\", description = \"OK and the record is returned if the record exists and the user has sufficient permission.\", content = @Content(schema = @Schema(implementation = MetadataSchemaRecord.class))),\n @ApiResponse(responseCode = \"404\", description = \"Not found is returned, if no record for the provided id and version was found.\")})\n @RequestMapping(value = {\"/{schemaId}\"}, method = {RequestMethod.GET}, produces = {\"application/vnd.datamanager.schema-record+json\"})\n @ResponseBody\n public ResponseEntity getRecordById(@Parameter(description = \"The record identifier or schema identifier.\", required = true) @PathVariable(value = \"schemaId\") String id,\n @Parameter(description = \"The version of the record.\", required = false) @RequestParam(value = \"version\", required = false) Long version,\n WebRequest wr,\n HttpServletResponse hsr);\n\n @Operation(summary = \"Validate a metadata document.\", description = \"Validate the provided metadata document using the addressed schema. If all parameters\"\n + \" are provided, the schema is identified uniquely by schemaId and version. If the version is omitted, the most recent version of the \"\n + \"schema is used. This endpoint returns HTTP NO_CONTENT if it succeeds. Otherwise, an error response is returned, e.g. HTTP UNPROCESSABLE_ENTITY (422) if validation fails.\",\n responses = {\n @ApiResponse(responseCode = \"204\", description = \"No Content if validate succeeded.\"),\n @ApiResponse(responseCode = \"404\", description = \"Not found is returned, if no schema for the provided schemaId and version was found.\"),\n @ApiResponse(responseCode = \"422\", description = \"Unprocessable Entity if validation fails.\")\n })\n @RequestMapping(value = {\"/{schemaId}/validate\"}, method = {RequestMethod.POST}, consumes = {MediaType.MULTIPART_FORM_DATA_VALUE})\n @ResponseBody\n public ResponseEntity validate(@Parameter(description = \"The record identifier or schema identifier.\", required = true) @PathVariable(value = \"schemaId\") String id,\n @Parameter(description = \"The version of the record.\", required = false) @RequestParam(value = \"version\", required = false) Long version,\n @Parameter(description = \"The metadata file to validate against the addressed schema.\", required = true) @RequestPart(name = \"document\", required = true) final MultipartFile document,\n WebRequest wr,\n HttpServletResponse hsr);\n\n @Operation(summary = \"Get a schema document by schema id.\", description = \"Obtain a single schema document identified by its schema id. \"\n + \"Depending on a user's role, accessing a specific record may be allowed or forbidden. \"\n + \"Furthermore, a specific version of the schema document can be returned by providing a version number as request parameter. If no version is specified, the most recent version is returned.\",\n responses = {\n @ApiResponse(responseCode = \"200\", description = \"OK and the schema document is returned if the record exists and the user has sufficient permission.\"),\n @ApiResponse(responseCode = \"404\", description = \"Not found is returned, if no record for the provided id and version was found.\")})\n @RequestMapping(value = {\"/{schemaId}\"}, method = {RequestMethod.GET})\n\n @ResponseBody\n public ResponseEntity getSchemaDocumentById(@Parameter(description = \"The schema id.\", required = true) @PathVariable(value = \"schemaId\") String id,\n @Parameter(description = \"The version of the record.\", required = false) @RequestParam(value = \"version\", required = false) Long version,\n WebRequest wr,\n HttpServletResponse hsr);\n\n @Operation(summary = \"Get all schema records.\", description = \"List all schema records in a paginated and/or sorted form. The result can be refined by providing schemaId, a list of one or more mimetypes and/or a date range. Returned schema record(s) must match. \"\n + \"if 'schemaId' is provided all other parameters were skipped and all versions of the given schemaId record will be returned. \"\n + \"If 'mimetype' is provided, a record matches if its associated mime type matchs. \"\n + \"Furthermore, the UTC time of the last update can be provided in three different fashions: 1) Providing only updateFrom returns all records updated at or after the provided date, 2) Providing only updateUntil returns all records updated before or \"\n + \"at the provided date, 3) Providing both returns all records updated within the provided date range. \"\n + \"If no parameters are provided, all accessible records are listed. With regard to schema versions, only the most recent version of each schema is listed.\",\n responses = {\n @ApiResponse(responseCode = \"200\", description = \"OK and a list of records or an empty list of no record matches.\", content = @Content(array = @ArraySchema(schema = @Schema(implementation = MetadataSchemaRecord.class))))})\n @RequestMapping(value = {\"\"}, method = {RequestMethod.GET})\n @ResponseBody\n @PageableAsQueryParam\n public ResponseEntity<List<MetadataSchemaRecord>> getRecords(\n @Parameter(description = \"SchemaId\", required = false) @RequestParam(value = \"schemaId\", required = false) String schemaId,\n @Parameter(description = \"A list of mime types returned schemas are associated with.\", required = false) @RequestParam(value = \"mimeType\", required = false) List<String> mimeTypes,\n @Parameter(description = \"The UTC time of the earliest update of a returned record.\", required = false) @RequestParam(name = \"from\", required = false) Instant updateFrom,\n @Parameter(description = \"The UTC time of the latest update of a returned record.\", required = false) @RequestParam(name = \"until\", required = false) Instant updateUntil,\n @Parameter(hidden = true) @PageableDefault(sort = {\"id\"}, direction = Sort.Direction.ASC) Pageable pgbl,\n WebRequest wr,\n HttpServletResponse hsr,\n UriComponentsBuilder ucb);\n\n @Operation(summary = \"Update a schema record.\", description = \"Apply an update to the schema record and/or schema document with the provided schema id. \"\n + \"The update capabilities for a schema record are quite limited. An update is always related to the most recent version. \"\n + \"Only the associated mimeType and acl can be changed. All other fields are updated automatically or are read-only. Updating only the metadata record does not affect the version number. \"\n + \"A new version is only created while providing a (new) schema document.\",\n responses = {\n @ApiResponse(responseCode = \"200\", description = \"OK is returned in case of a successful update. \"\n + \"The updated record is returned in the response.\", content = @Content(schema = @Schema(implementation = MetadataSchemaRecord.class))),\n @ApiResponse(responseCode = \"400\", description = \"Bad Request is returned if the provided schema record/schema document is invalid.\"),\n @ApiResponse(responseCode = \"404\", description = \"Not Found is returned if no record for the provided id was found.\")})\n @RequestMapping(value = \"/{schemaId}\", method = RequestMethod.PUT, consumes = {MediaType.MULTIPART_FORM_DATA_VALUE}, produces = {MediaType.APPLICATION_JSON_VALUE})\n @Parameters({\n @Parameter(name = \"If-Match\", description = \"ETag of the object. Please use quotation marks!\", required = true, in = ParameterIn.HEADER)\n })\n ResponseEntity updateRecord(\n @Parameter(description = \"The schema id.\", required = true) @PathVariable(\"schemaId\") final String schemaId,\n @Parameter(description = \"Json representation of the schema record.\", required = false) @RequestPart(name = \"record\", required = false) final MultipartFile schemaRecord,\n @Parameter(description = \"The metadata schema document associated with the record.\", required = false) @RequestPart(name = \"schema\", required = false) final MultipartFile document,\n final WebRequest request,\n final HttpServletResponse response\n );\n\n @Operation(summary = \"Delete a schema record.\", description = \"Delete a single schema record. \"\n + \"Deleting a record typically requires the caller to have special permissions. \"\n + \"In some cases, deleting a record can also be available for the owner or other privileged users or can be forbidden at all. Deletion of a record affects all versions of the particular record.\",\n responses = {\n @ApiResponse(responseCode = \"204\", description = \"No Content is returned as long as no error occurs while deleting a record. Multiple delete operations to the same record will also return HTTP 204 even if the deletion succeeded in the first call.\")})\n @RequestMapping(value = {\"/{schemaId}\"}, method = {RequestMethod.DELETE})\n @Parameters({\n @Parameter(name = \"If-Match\", description = \"ETag of the object. Please use quotation marks!\", required = true, in = ParameterIn.HEADER)\n })\n @ResponseBody\n public ResponseEntity deleteRecord(@Parameter(description = \"The schema id.\", required = true) @PathVariable(value = \"schemaId\") String id, @Header(name = \"ETag\", required = true) WebRequest wr, HttpServletResponse hsr);\n}",
"private void createSwaggerConfiguration() {\n\t\tfinal String woHostAddress = hostAddress().getHostAddress() + \":\" + port();\n\t\tcreateSwaggerConfiguration(swaggerResourcePackages(), woHostAddress, name(), applicationExtension());\n\t}",
"@Test(description = \"Implements Abstract Test 4 and /req/core/api-definition-op\", groups = \"apidefinition\", dependsOnGroups = \"landingpage\")\n public void openapiDocumentRetrieval() {\n \n if ( apiUrl == null || apiUrl.isEmpty() )\n throw new AssertionError( \"Path to the API Definition could not be constructed from the landing page\" );\n Response request = init().baseUri( apiUrl ).accept( OPEN_API_MIME_TYPE ).when().request( GET );\n request.then().statusCode( 200 );\n response = request.asString();\n }",
"private static void generateApiSpec() {\n ClassName enumClass = ClassName.get(outputPackageName, \"ApiSpec\");\n TypeSpec.Builder apiSpec = TypeSpec.enumBuilder(enumClass).addModifiers(Modifier.PUBLIC);\n for (Map.Entry<String, APIRequestHandler> entry : APIServlet.getAPIRequestHandlers().entrySet()) {\n String requestType = entry.getKey();\n APIRequestHandler apiRequestHandler = entry.getValue();\n String fileParameter = apiRequestHandler.getFileParameter();\n CodeBlock.Builder codeBlockBuilder = CodeBlock.builder();\n if (fileParameter != null) {\n codeBlockBuilder.add(\"$S\", fileParameter);\n } else {\n codeBlockBuilder.add(\"$L\", (Object) null);\n }\n codeBlockBuilder.add(\", \").add(\"\\\"$L\\\"\", String.join(\"\\\", \\\"\", apiRequestHandler.getParameters()));\n apiSpec.addEnumConstant(requestType, TypeSpec.anonymousClassBuilder(codeBlockBuilder.build()).build());\n }\n\n // Generate fields and constructor\n apiSpec.addField(TypeName.get(String.class), \"fileParameter\", Modifier.PRIVATE, Modifier.FINAL);\n apiSpec.addField(ParameterizedTypeName.get(List.class, String.class), \"parameters\", Modifier.PRIVATE, Modifier.FINAL);\n CodeBlock codeBlock = CodeBlock.builder().add(\"this.$L = $T.asList($L);\", \"parameters\", Arrays.class, \"parameters\").build();\n apiSpec.addMethod(MethodSpec.constructorBuilder().\n addParameter(TypeName.get(String.class), \"fileParameter\").\n addParameter(TypeName.get(String[].class), \"parameters\").varargs().\n addStatement(\"this.$L = $L\", \"fileParameter\", \"fileParameter\").\n addCode(codeBlock).\n build());\n\n // Generate getter\n apiSpec.addMethod(MethodSpec.methodBuilder(\"getFileParameter\")\n .addModifiers(Modifier.PUBLIC)\n .returns(String.class)\n .addStatement(\"return fileParameter\")\n .build());\n apiSpec.addMethod(MethodSpec.methodBuilder(\"getParameters\")\n .addModifiers(Modifier.PUBLIC)\n .returns(ParameterizedTypeName.get(List.class, String.class))\n .addStatement(\"return parameters\")\n .build());\n\n // Create source file\n writeToFile(apiSpec.build());\n }",
"API createAPI();",
"@GetMapping(\"\")\r\n @ResponseStatus(code = HttpStatus.OK)\r\n public void main() {\r\n LOGGER.info(\"GET /\");\r\n }",
"DataControllerResource.DefinitionStages.Blank define(String name);",
"@Bean\n public Docket usersApi() {\n return new Docket(DocumentationType.SWAGGER_2).\n select()\n .apis(RequestHandlerSelectors.basePackage(\"ru.itis.usersservice.controllers\"))\n .paths(PathSelectors.any())\n .build()\n .apiInfo(swaggerApiInfo());\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getArtikelAnzahl liefert die Anzahl der Artikel im Lager Array | public int getArtikelAnzahl ()
{
return letzterBesetzterIndex + 1;
} | [
"int getNumberOfArtillery();",
"public int getArtikelNummer() {\r\n\t\treturn artikelNummer;\r\n\t}",
"public void entferneArtikel ( int loeschArtikelNr )\n {\n int fundstelle, schieber;\n\n //suche Artikel \n fundstelle = sucheArtikel( loeschArtikelNr );\n\n checkArgument( ( fundstelle == -1 ), ARTIKEL_NICHT_IN_LAGER );\n\n //loesche Artikel\n lager[fundstelle] = null;\n letzterBesetzterIndex--;\n\n //schiebe Lager zusammen\n for ( schieber = fundstelle; schieber <= letzterBesetzterIndex; schieber++ )\n {\n lager[schieber] = lager[schieber + 1];\n }\n\n if ( schieber + 1 < lager.length )\n {\n lager[schieber + 1] = null;\n }\n }",
"private void anzahlImKorbAendern() {\n\n\t\ttry {\n\t\t\tint artikelNummer = Integer.parseInt(in.readLine());\n\t\t\tint benutzerIndex = Integer.parseInt(in.readLine());\n\t\t\tint stueck = Integer.parseInt(in.readLine());\n\n\t\t\teShop.anzahlImKorbAendern(artikelNummer, benutzerIndex, stueck);\n\t\t\tout.println(\"Anzahl im Korb veraendert.\");\n\t\t} catch (StueckzahlEntsprichtNichtPackungException e) {\n\t\t\tout.println(e.getMessage());\n\t\t} catch (StueckzahlException e) {\n\t\t\tout.println(e.getMessage());\n\t\t} catch (NumberFormatException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public Artikel getArtikel (int index)\n {\n checkArgument( (index >= getLagerGroesse() || index < 0),\n INDEX_UNGUELTIG \n );\n\n return lager[index];\n }",
"public java.lang.Integer getArticleno () {\n\t\treturn articleno;\n\t}",
"public int getLagerGroesse ()\n {\n return lager.length; \n }",
"public int zeilenAnzahl() {\r\n return stimmzettelModel.getZeilenAnzahl();\r\n }",
"int getAnzahlGewusstInFolge();",
"public int gibAnzahl()\n {\n // for (int i = 0; i < ganzeZahlen.length; i++) {\n // if (ganzeZahlen[i] > 0) { //null geht nicht..?\n // anzahl+=1;\n // }\n // }\n \n return anzahl;\n }",
"public void aenderePreisAllerArtikel ( double prozent )\n {\n for ( int lauf = 0; lauf <= letzterBesetzterIndex; lauf++ )\n {\n lager[lauf].aenderePreis( prozent );\n }\n }",
"public int getNunFigli() {\n\t\tint numFigli = 0;\n\t\tfor (Nodo_m_ario figlio : figli) {\n\t\t\tif (figlio != null) {\n\t\t\t\tnumFigli += 1;\n\t\t\t}\n\t\t}\n\t\treturn numFigli;\n\t}",
"public int getNumArms() {\n return numArms;\n }",
"public int numero(){\r\n return masacres.size();\r\n }",
"public IArtikel getArtikelByID(int artikelnummer);",
"public int getArmy(){\r\n \treturn numOfArmy;\r\n }",
"long getNombreElements();",
"int getNewsindentifydetailCount();",
"Long getNumberOfElement();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the unit_excess value for this Order_item_select_responseOrder_item. | public int getUnit_excess() {
return unit_excess;
} | [
"public void setUnit_excess(int unit_excess) {\n this.unit_excess = unit_excess;\n }",
"public String getQuantityUnit() {\r\n return quantityUnit;\r\n }",
"public MMDecimal getUnitPrice() {\r\n return this.unitPrice;\r\n }",
"public String getUnit() {\r\n\r\n return data.getUnit();\r\n\r\n }",
"public String extendedUnit() {\n return this.extendedUnit;\n }",
"public Number getUnitPrice() {\n return (Number) getAttributeInternal(UNITPRICE);\n }",
"public KualiInteger getOleItemDamagedTotalQuantity() {\r\n return new KualiInteger(super.getItemDamagedTotalQuantity().intValue());\r\n }",
"org.spin.grpc.util.Decimal getQuantityReserved();",
"@ApiModelProperty(required = true, value = \"Unit Amount Excluding Tax\")\n public Double getUnitAmountExcludingTax() {\n return unitAmountExcludingTax;\n }",
"public double getUnitPrice()\r\n\t{\r\n\t\treturn this.untiPrice;\r\n\t}",
"public java.math.BigDecimal getExemptAmount() {\n return exemptAmount;\n }",
"double returnUnits() {\n\t\tif (TextUtils.isEmpty(unitsEditText.getText().toString()) || !(MainActivity.isNumeric( unitsEditText.getText().toString()))\n\t\t|| Float.parseFloat(unitsEditText.getText().toString()) == 0) {\n\t\t\treturn -1;\n\t\t} else return Float.parseFloat(unitsEditText.getText().toString());\n\t}",
"public java.lang.Object getAdjustedUnitPrice() {\n return adjustedUnitPrice;\n }",
"public double getUnitPrice(){\r\n double unitPrice = this.cost/this.quantity;\r\n DecimalFormat df = new DecimalFormat(\"#.##\");\r\n unitPrice = Double.parseDouble(df.format(unitPrice));\r\n return unitPrice;\r\n }",
"public String getQtyUnitCd()\n {\n return qtyUnitCd;\n }",
"public String getQuantityUnit();",
"private MMDecimal getVendorReturnItemPrice(OrderDetail odetail) {\r\n MMDecimal result = MMDecimal.ZERO;\r\n result = odetail.getOrderItemCostAmt() == null ? MMDecimal.ZERO : odetail\r\n .getOrderItemCostAmt();\r\n return result;\r\n }",
"public BigDecimal getUnitAmount() {\n return unitAmount;\n }",
"public BigDecimal getDEAL_EXPECTED_YIELD() {\r\n return DEAL_EXPECTED_YIELD;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column ecs_ego_post.useragent | public String getUseragent() {
return useragent;
} | [
"public com.iot.data.schema.UserAgentActionData getUSERAGENTACTION() {\n return USER_AGENT_ACTION;\n }",
"public String getUserAgent() {\n return userAgent;\n }",
"public static String getUserAgent()\n {\n return USER_AGENT;\n }",
"public com.iot.data.schema.UserAgentActionData getUSERAGENTACTION() {\n return USER_AGENT_ACTION;\n }",
"public String getUserAgentHeader() {\n\t\treturn _user_agent_header;\n\t}",
"private static String getUserAgent() {\n final String defaultUserAgent = \"bigtable-hbase/dev-\" + System.currentTimeMillis();\n try (InputStream stream =\n BigtableConstants.class.getResourceAsStream(\"bigtable-hbase.properties\")) {\n if (stream == null) {\n LOG.error(\"Could not load properties file bigtable-hbase.properties\");\n return defaultUserAgent;\n }\n\n Properties properties = new Properties();\n properties.load(stream);\n String value = properties.getProperty(\"bigtable.hbase.user_agent\");\n if (value == null) {\n LOG.error(\"bigtable.hbase.user_agent not found in bigtable-hbase.properties.\");\n } else if (value.startsWith(\"$\")){\n LOG.info(\"bigtable.hbase.user_agent property is not replaced.\");\n } else {\n return value;\n }\n } catch (IOException e) {\n LOG.error(\n String.format(\"Error while trying to get user agent name from bigtable-hbase.properties\"),\n e);\n }\n return defaultUserAgent;\n }",
"public String getUserAgent() {\n\t\treturn String.format(\"%ssdjson/%s (%s Java %s)\", userAgent != null && userAgent.length() > 0 ? userAgent + \" \" : \"\", Config.API_VERSION, System.getProperty(\"java.vendor\"), System.getProperty(\"java.version\"));\n\t}",
"public static String getUserAgent() {\n if (mUserAgent == null) {\n mUserAgent = String.format(USER_AGENT_TEMP, android.os.Build.VERSION.RELEASE, getDeviceModelAndManufacturer());\n FHLog.d(LOG_TAG, \"UA = \" + mUserAgent);\n }\n return mUserAgent;\n }",
"public static String userAgent() {\n Random random = new Random();\n return userAgents.get(random.nextInt(userAgents.size()));\n }",
"public void setUseragent(String useragent) {\n this.useragent = useragent == null ? null : useragent.trim();\n }",
"public String getUserAgent();",
"public java.lang.String getUserAgentName() {\n java.lang.Object ref = userAgentName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n userAgentName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"@java.lang.Override\n public java.lang.String getUserAgentName() {\n java.lang.Object ref = userAgentName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n userAgentName_ = s;\n return s;\n }\n }",
"public static String getDefaultUserAgent(){\n return sDefaultUserAgent;\n }",
"public void setUserAgent(String userAgent){\n\t\tmUserAgent = userAgent;\n\t}",
"public static void setUserAgent(String agent) {\n userAgent = agent;\n }",
"public void setUserAgent(java.lang.String userAgent) {\r\n this.userAgent = userAgent;\r\n }",
"@java.lang.Override\n public java.lang.String getUserAgentVersion() {\n java.lang.Object ref = \"\";\n if (userAgentVersionTypeCase_ == 7) {\n ref = userAgentVersionType_;\n }\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (userAgentVersionTypeCase_ == 7) {\n userAgentVersionType_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getUserAgentVersion() {\n java.lang.Object ref = \"\";\n if (userAgentVersionTypeCase_ == 7) {\n ref = userAgentVersionType_;\n }\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (userAgentVersionTypeCase_ == 7) {\n userAgentVersionType_ = s;\n }\n return s;\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Goal: To test that you cannot clear a tile from a square that is not occupied. Testing Method: Instantiate a square. Try removing a tile when it is not occupied and check the exception thrown. | @Test
public void testClearTileNotOccupied()
{
try
{
Square s = new Square();
s.clearTile();
fail("Should not be able to remove a tile from a Square that is not occupied.");
}
catch(Exception ex)
{
assertEquals("Cannot clear a tile from a square that is not occupied.", ex.getMessage());
}
} | [
"@Test\n public void testClearTileOccupied()\n {\n try\n {\n Square s = new Square();\n s.setTile(Tile.A);\n s.clearTile();\n assertNull(s.getTile());\n assertFalse(s.isOccupied());\n }\n catch(Exception ex)\n {\n fail(\"No exception should be thrown when removing a tile from an occupeid square.\");\n }\n }",
"public void testMoveEmptySquare() {\n try {\n board.moveTile(humansPlayer, 0, 0, 1, 1);\n fail(\"Shouldn't be able to move an empty square\");\n }\n catch (IllegalMoveException expected) {\n // Success\n }\n }",
"@Test\n public void testIsOccupied()\n {\n try\n {\n Square s = new Square();\n\n assertFalse(s.isOccupied()); // Should be false as no tile on it yet\n\n s.setTile(Tile.A); // Add a tile\n\n assertTrue(s.isOccupied()); // Should now be true\n }\n catch(Exception ex)\n {\n fail(\"No exception should be thrown when adding a tile to a square normally.\");\n }\n }",
"@Test\n void gameSquaresAreNotFilled() {\n assert (GameLogic.tilesAreNotFilled(TestData.getValidStart().getCopyOfGridState()));\n }",
"public void testRemoveAll() {\n // Put a tile in each corner\n board.addTile(duck, 0, 0);\n board.addTile(fox, 0, maxBoardIndex);\n board.addTile(hunter, maxBoardIndex, 0);\n board.addTile(tree, maxBoardIndex, maxBoardIndex);\n\n // Remove everything\n Iterator iter = board.getIterator();\n while (iter.hasNext()) {\n iter.next();\n iter.remove();\n }\n\n // Check the tiles are gone\n assertNull(\"Tile at (0,0) should be gone\", board.getTile(0, 0));\n assertNull(\"Tile at (0,\" + maxBoardIndex + \") should be gone\", board\n .getTile(0, maxBoardIndex));\n assertNull(\"Tile at (\" + maxBoardIndex + \",0) should be gone\", board\n .getTile(maxBoardIndex, 0));\n assertNull(\"Tile at (\" + maxBoardIndex + \",\" + maxBoardIndex\n + \") should be gone\", board.getTile(maxBoardIndex, maxBoardIndex));\n }",
"private static void RemoveTile(int x, int y) { city.setTile(EMPTY, x, y); }",
"@Test\n public void testGetTile()\n {\n try\n {\n Square s = new Square();\n\n assertNull(s.getTile()); // Should return null as no tile placed yet.\n\n s.setTile(Tile.E); // Add a tile\n\n assertEquals(Tile.E, s.getTile()); // Check the tile is now on the square\n }\n catch(Exception ex)\n {\n fail(\"No exception should be thrown when getting a Tile from the square.\");\n }\n }",
"public void testGetValidTile() {\n int testX = 0;\n int testY = 0;\n board.addTile(tree, testX, testY);\n Tile retrievedTile = board.getTile(testX, testY);\n assertSame(tree, retrievedTile);\n }",
"public abstract void clearTile(int row, int column);",
"@Test\r\n\tpublic void testRemovePiece() throws InvalidMoveException, InvalidRemovalException {\r\n\t\tTile t = new OpenTile();\r\n\t\tt.setPiece(new Knight(Team.HUMAN));\r\n\t\tt.removePiece();\r\n\t\tassertEquals(null, t.getPiece());\r\n\t\tTile b = new BlockedTile();\r\n\t\tassertThrows(InvalidRemovalException.class, ()->{b.removePiece();});\r\n\t\tb.setPiece(new Pegasus(Team.HUMAN));\r\n\t\tb.removePiece();\r\n\t\tassertEquals(null, b.getPiece());\r\n\t}",
"@Test\n public void testSetTile()\n {\n try\n {\n Square s = new Square();\n\n s.setTile(Tile.E); // Add a tile\n\n assertEquals(Tile.E, s.getTile()); // Check the tile is now on the square\n assertTrue(s.isOccupied()); // Check the status is now true\n }\n catch(Exception ex)\n {\n fail(\"No exception should be thrown when setting a Tile onto the square.\");\n }\n }",
"@Test\n public void testSetTypeOccupiedSquare()\n {\n try\n {\n Square s = new Square();\n\n s.setTile(Tile.T);\n s.setType(Square.squareType.DB_WORD);\n\n fail(\"An occupied square should not have a special type.\");\n }\n catch(Exception ex)\n {\n assertEquals(\"A Square cannot have a tile on it and have a special type.\", ex.getMessage());\n }\n }",
"public void removeTile(){\n\t\toccupied = false;\n\t\tcurrentTile = null;\n\t}",
"public void testSquareTileConstructor(){\n\t\tTile t = new Tile(1, 2, null);\n\t\t\n\t\tthisSquare.addTile(t);\n\t\t\n\t\tSquare nextSquare = new Square(4, 7, t);\n\t\t\n\t\tassertTrue(thisSquare.equals(nextSquare));\n\t\t\n\t\tSquare finalSquare = new Square(4, 7, 1, 2);\n\t\t\n\t\tassertTrue(t.equals(finalSquare.peekTile()));\n\t\tassertTrue(thisSquare.equals(finalSquare));\n\t}",
"public void testRescueTileBeforeEndGame() {\n int hunterX = 3;\n int hunterY = 0;\n board.addTile(hunter, hunterX, hunterY);\n board.flipTile(Team.PREDATORS, hunterX, hunterY);\n board.addTile(tree, 0, 0);\n assertFalse(\"Tree should begin face-down\", tree.isFaceUp());\n try {\n board.moveTile(humansPlayer, hunterX, hunterY, hunterX, -1);\n fail(\"Shouldn't be allowed to move own tile off board before end game\");\n }\n catch (IllegalMoveException expected) {\n // Success\n }\n }",
"public void testPlaceIllegalTile1() {\n Placement placement = new Placement(Color.GREEN, 0, 0, Color.BLUE, 1, 1);\n try {\n \t\tboard.place(placement);\n fail(\"It's not legal to put tile without any adjacent occupied cells\");\n } catch (StateException e) {\n // passed\n }\n catch (ContractAssertionError e) {\n \tSystem.out.println(\"ContractAssertionError\");\n }\n \t\n }",
"@Test\r\n public void boardDestructionMove(){\r\n Player tPlayer = new Player(\"Green\", true, 2);\r\n Player tPlayer2 = new Player(\"Yellow\", true, 7);\r\n Game tGame = new Game(tPlayer, tPlayer2);\r\n tGame.tryCreate(tPlayer, 'C', 0);\r\n tGame.moveMove(tPlayer, 'C', \"up\");\r\n tPlayer.resetPieces();\r\n tGame.moveMove(tPlayer, 'C', \"up\");\r\n tPlayer.resetPieces();\r\n assertEquals('C', tGame.getBoard().get(0, 2).letter());\r\n //This should kill the piece\r\n tGame.moveMove(tPlayer, 'C', \"up\");\r\n assertTrue(tGame.getBoard().get(0, 2) instanceof Empty);\r\n assertEquals('C', tGame.getBoard().getCemetery().getGrid()[0][0].letter());\r\n assertNull(tPlayer.getInPlayPiece('C'));\r\n }",
"@Test\r\n public void testSetPieceValid()\r\n {\r\n assertTrue(board.hasPiece(0,0));\r\n board.remove(0, 0);\r\n assertFalse(board.hasPiece(0,0));\r\n }",
"public void testGetNullTile() {\n // Place a tile in one spot\n board.addTile(tree, 1, 1);\n // Try to get a tile from another spot\n Tile tile = board.getTile(0, 0);\n assertNull(\"Retrieved tile is not null.\", tile);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Private constructor for exact image aspect ratio | private ImageAspectRatio(int a, int b) {
this(a, b, a + ":" + b);
} | [
"private ImageAspectRatio(float a, float b) {\n this(a, b, a + \":\" + b);\n }",
"@Override\n protected double getAspectRatio(MediaEntity photoEntity) {\n final double ratio = super.getAspectRatio(photoEntity);\n if (ratio <= SQUARE_ASPECT_RATIO) {\n // portrait (tall) photos should be cropped to be square aspect ratio\n // return SQUARE_ASPECT_RATIO;\n if(photoEntity.sizes.medium.h > getScreenHeight()){\n // double screenHeight = getScreenHeight();\n return photoEntity.sizes.medium.w/getScreenHeight();\n }\n else if(photoEntity.sizes.medium.w > getScreenWidth()){\n return getScreenWidth()/photoEntity.sizes.medium.h;\n } else{\n return ratio;\n }\n\n } else if (ratio > MAX_LANDSCAPE_ASPECT_RATIO) {\n // the widest landscape photos allowed are 3:1\n return MAX_LANDSCAPE_ASPECT_RATIO;\n } else if (ratio < MIN_LANDSCAPE_ASPECT_RATIO) {\n // the tallest landscape photos allowed are 4:3\n return MIN_LANDSCAPE_ASPECT_RATIO;\n } else {\n // landscape photos between 3:1 to 4:3 present the original width to height ratio\n return ratio;\n }\n }",
"public void setOriginalAspectRatioFixed() {\n if (!isImageLoaded()) {\n // if no image was loaded set the aspect ratio to free\n setAspectRatio(-1.0);\n return;\n }\n Rect imageRect = getImageRect();\n setAspectRatio((double) (imageRect.width()) / (double) (imageRect.height()));\n }",
"public void setAspectRatio(float aspectRatio) {\n\t\tthis.aspectRatio = aspectRatio;\n\t}",
"public double getAspectRatio() {\n\t\treturn aspectRatio;\n\t}",
"public void setKeepAspectRatio(boolean keepAspect);",
"public AspectRatio getAspectRatio() {\n return this.aspectRatio;\n }",
"public float getAspectRatio() {\n\t\treturn aspectRatio;\n\t}",
"@Test\n\tpublic void constructor_w_h_n() {\n\t\tDummyImage a = new DummyImage(10, 20, 3);\n\n\t\tassertEquals(10 * 20 * 3, a.data.length);\n\t\tassertEquals(10, a.getWidth());\n\t\tassertEquals(20, a.getHeight());\n\t\tassertEquals(3, a.getNumBands());\n\t\tassertEquals(30, a.getStride());\n\t\tassertEquals(0, a.getStartIndex());\n\t}",
"public void setAspectRatio(AspectRatio aspectRatio) {\n if (this.aspectRatio != aspectRatio) {\n AspectRatio oldAspectRatio = this.aspectRatio;\n this.aspectRatio = aspectRatio;\n this.propertyChangeSupport.firePropertyChange(Property.ASPECT_RATIO.name(), oldAspectRatio, aspectRatio);\n this.home.getEnvironment().setPhotoAspectRatio(this.aspectRatio);\n if (this.aspectRatio == AspectRatio.VIEW_3D_RATIO) {\n setHeight(Math.round(width / this.view3DAspectRatio), false);\n } else if (this.aspectRatio.getValue() != null) {\n setHeight(Math.round(width / this.aspectRatio.getValue()), false);\n }\n }\n }",
"public void setAspectRatio(double aspectRatio) {\n if (this.aspectRatio == aspectRatio) {\n return;\n }\n this.aspectRatio = aspectRatio;\n // update the cropRect\n if (isImageLoaded() && aspectRatio > 0.0) {\n setCropRect(getMaxCenteredCropRect(), true);\n //autoZoom(true);\n }\n }",
"private ImageAspectRatio(String text) {\n this.a = 0;\n this.b = 0;\n this.text = text;\n }",
"public Picture(int height, int width)\r\n {\r\n // let the parent class handle this width and height\r\n super(width, height);\r\n }",
"public Picture(int width, int height)\r\n {\r\n // let the parent class handle this width and height\r\n super(width,height);\r\n }",
"public double getAspectRatio() {\n return mAspectRatio;\n }",
"public Picture(int width, int height)\n {\n // let the parent class handle this width and height\n super(width,height);\n }",
"public Picture(int height, int width)\n {\n // let the parent class handle this width and height\n super(width,height);\n }",
"public float getAspectRatio() {\n\t\treturn this.aspectRatio;\n\t}",
"public float getAspectRatio()\n\t{\n\t\tif (this._width != 0 && this._height != 0)\n\t\t{\n\t\t\treturn (((float) this._width) / ((float) this._height));\n\t\t}\n\t\treturn 0f;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Output only. User list which are similar to users from another UserList. These lists are readonly and automatically created by google. .google.ads.googleads.v14.common.SimilarUserListInfo similar_user_list = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; | public Builder mergeSimilarUserList(com.google.ads.googleads.v14.common.SimilarUserListInfo value) {
if (similarUserListBuilder_ == null) {
if (userListCase_ == 20 &&
userList_ != com.google.ads.googleads.v14.common.SimilarUserListInfo.getDefaultInstance()) {
userList_ = com.google.ads.googleads.v14.common.SimilarUserListInfo.newBuilder((com.google.ads.googleads.v14.common.SimilarUserListInfo) userList_)
.mergeFrom(value).buildPartial();
} else {
userList_ = value;
}
onChanged();
} else {
if (userListCase_ == 20) {
similarUserListBuilder_.mergeFrom(value);
} else {
similarUserListBuilder_.setMessage(value);
}
}
userListCase_ = 20;
return this;
} | [
"@java.lang.Override\n public com.google.ads.googleads.v14.common.SimilarUserListInfo getSimilarUserList() {\n if (userListCase_ == 20) {\n return (com.google.ads.googleads.v14.common.SimilarUserListInfo) userList_;\n }\n return com.google.ads.googleads.v14.common.SimilarUserListInfo.getDefaultInstance();\n }",
"@java.lang.Override\n public com.google.ads.googleads.v14.common.SimilarUserListInfoOrBuilder getSimilarUserListOrBuilder() {\n if (userListCase_ == 20) {\n return (com.google.ads.googleads.v14.common.SimilarUserListInfo) userList_;\n }\n return com.google.ads.googleads.v14.common.SimilarUserListInfo.getDefaultInstance();\n }",
"@java.lang.Override\n public com.google.ads.googleads.v14.common.SimilarUserListInfo getSimilarUserList() {\n if (similarUserListBuilder_ == null) {\n if (userListCase_ == 20) {\n return (com.google.ads.googleads.v14.common.SimilarUserListInfo) userList_;\n }\n return com.google.ads.googleads.v14.common.SimilarUserListInfo.getDefaultInstance();\n } else {\n if (userListCase_ == 20) {\n return similarUserListBuilder_.getMessage();\n }\n return com.google.ads.googleads.v14.common.SimilarUserListInfo.getDefaultInstance();\n }\n }",
"@java.lang.Override\n public com.google.ads.googleads.v14.common.SimilarUserListInfoOrBuilder getSimilarUserListOrBuilder() {\n if ((userListCase_ == 20) && (similarUserListBuilder_ != null)) {\n return similarUserListBuilder_.getMessageOrBuilder();\n } else {\n if (userListCase_ == 20) {\n return (com.google.ads.googleads.v14.common.SimilarUserListInfo) userList_;\n }\n return com.google.ads.googleads.v14.common.SimilarUserListInfo.getDefaultInstance();\n }\n }",
"public Builder setSimilarUserList(com.google.ads.googleads.v14.common.SimilarUserListInfo value) {\n if (similarUserListBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n userList_ = value;\n onChanged();\n } else {\n similarUserListBuilder_.setMessage(value);\n }\n userListCase_ = 20;\n return this;\n }",
"public com.google.ads.googleads.v14.common.SimilarUserListInfo.Builder getSimilarUserListBuilder() {\n return getSimilarUserListFieldBuilder().getBuilder();\n }",
"com.google.ads.googleads.v0.common.UserListInfoOrBuilder getUserListOrBuilder();",
"com.google.ads.googleads.v0.common.UserListInfo getUserList();",
"com.google.ads.googleads.v6.resources.UserListOrBuilder getUserListOrBuilder();",
"com.google.ads.googleads.v1.resources.UserListOrBuilder getUserListOrBuilder();",
"@java.lang.Override\n public com.google.ads.googleads.v14.common.LogicalUserListInfo getLogicalUserList() {\n if (userListCase_ == 22) {\n return (com.google.ads.googleads.v14.common.LogicalUserListInfo) userList_;\n }\n return com.google.ads.googleads.v14.common.LogicalUserListInfo.getDefaultInstance();\n }",
"@java.lang.Override\n public com.google.ads.googleads.v14.common.LogicalUserListInfoOrBuilder getLogicalUserListOrBuilder() {\n if (userListCase_ == 22) {\n return (com.google.ads.googleads.v14.common.LogicalUserListInfo) userList_;\n }\n return com.google.ads.googleads.v14.common.LogicalUserListInfo.getDefaultInstance();\n }",
"com.google.ads.googleads.v6.resources.UserList getUserList();",
"@java.lang.Override\n public com.google.ads.googleads.v14.common.LogicalUserListInfo getLogicalUserList() {\n if (logicalUserListBuilder_ == null) {\n if (userListCase_ == 22) {\n return (com.google.ads.googleads.v14.common.LogicalUserListInfo) userList_;\n }\n return com.google.ads.googleads.v14.common.LogicalUserListInfo.getDefaultInstance();\n } else {\n if (userListCase_ == 22) {\n return logicalUserListBuilder_.getMessage();\n }\n return com.google.ads.googleads.v14.common.LogicalUserListInfo.getDefaultInstance();\n }\n }",
"com.google.ads.googleads.v1.resources.UserList getUserList();",
"public void setUserList(List<String> userList) {\n\t\tthis.userList = userList;\n\t}",
"public void addUserIdAndArtistNameToSimilarArtist(String userId, String artistName,\n List<SimilarArtist> similarArtistList) {\n for (int i = 0; i < similarArtistList.size(); i++) {\n similarArtistList.get(i).setUserId(userId);\n similarArtistList.get(i).setArtistName(artistName);\n }\n }",
"public List<String> getUserList() {\n\t\treturn userList;\n\t}",
"@ManyToMany(cascade={CascadeType.PERSIST,CascadeType.MERGE})\r\n @JoinTable(name=\"user_function_assoc\", joinColumns=@JoinColumn(name = \"my_function_id\"), inverseJoinColumns=@JoinColumn(name = \"user_id\"))\r\n\tpublic Set<User> getUserList(){\r\n\t\treturn userList;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculates the resolution for the current grism and wavelength. The image quality is not taken into account; for NIRI the resolution in the files assumes that the target fills the slit (IQ>slit width). | public double resolution(final Slit slit, final double imgQuality) {
return resolution(slit);
} | [
"public double resolution(final Slit slit) {\n return getEffectiveWavelength() / resolution.get(getGrismNumber());\n }",
"double getResolution();",
"public Dimension getResolution()\n {\n return resolution;\n }",
"public String getResolution() {\n return resolution;\n }",
"public native int GetScaledEstimatedResolution();",
"private static int getResolution(int rad) {\n\t\tint res;\n\t\tif(rad >= 625) { \n\t\t\tres = 4;\n\t\t} else if (rad >= 156) { \n\t\t\tres = 5;\n\t\t} else if (rad >= 39) { \n\t\t\tres = 6;\n\t\t} else { \n\t\t\tres = 7;\n\t\t}\n\t\treturn res;\n\t}",
"private void checkResolution(String filename, int expectedResolution)\n throws IOException\n {\n assertFalse(\"Empty file \" + filename, new File(filename).length() == 0);\n String suffix = filename.substring(filename.lastIndexOf('.') + 1);\n if (\"BMP\".equals(suffix.toUpperCase()))\n {\n // BMP reader doesn't work\n checkBmpResolution(filename, expectedResolution);\n return;\n }\n Iterator readers = ImageIO.getImageReadersBySuffix(suffix);\n assertTrue(\"No image reader found for suffix \" + suffix, readers.hasNext());\n ImageReader reader = (ImageReader) readers.next();\n ImageInputStream iis = ImageIO.createImageInputStream(new File(filename));\n assertNotNull(\"No ImageInputStream created for file \" + filename, iis);\n reader.setInput(iis);\n IIOMetadata imageMetadata = reader.getImageMetadata(0);\n Element root = (Element) imageMetadata.getAsTree(STANDARD_METADATA_FORMAT);\n NodeList dimensionNodes = root.getElementsByTagName(\"Dimension\");\n assertTrue(\"No resolution found in image file \" + filename, dimensionNodes.getLength() > 0);\n Element dimensionElement = (Element) dimensionNodes.item(0);\n \n NodeList pixelSizeNodes = dimensionElement.getElementsByTagName(\"HorizontalPixelSize\");\n assertTrue(\"No X resolution found in image file \" + filename, pixelSizeNodes.getLength() > 0);\n Node pixelSizeNode = pixelSizeNodes.item(0);\n String val = pixelSizeNode.getAttributes().getNamedItem(\"value\").getNodeValue();\n int actualResolution = (int) Math.round(25.4 / Double.parseDouble(val));\n assertEquals(\"X resolution doesn't match in image file \" + filename, expectedResolution, actualResolution);\n \n pixelSizeNodes = dimensionElement.getElementsByTagName(\"VerticalPixelSize\");\n assertTrue(\"No Y resolution found in image file \" + filename, pixelSizeNodes.getLength() > 0);\n pixelSizeNode = pixelSizeNodes.item(0);\n val = pixelSizeNode.getAttributes().getNamedItem(\"value\").getNodeValue();\n actualResolution = (int) Math.round(25.4 / Double.parseDouble(val));\n assertEquals(\"Y resolution doesn't match\", expectedResolution, actualResolution);\n \n iis.close();\n reader.dispose();\n }",
"public static int size_quality() {\n return (16 / 8);\n }",
"private void checkResolution(String filename, int expectedResolution)\n throws IOException\n {\n assertNotEquals(0, new File(filename).length(), \"Empty file \" + filename);\n String suffix = filename.substring(filename.lastIndexOf('.') + 1);\n if (\"BMP\".equalsIgnoreCase(suffix))\n {\n // BMP reader doesn't work\n checkBmpResolution(filename, expectedResolution);\n return;\n }\n Iterator<ImageReader> readers = ImageIO.getImageReadersBySuffix(suffix);\n assertTrue(readers.hasNext(), \"No image reader found for suffix \" + suffix);\n ImageReader reader = readers.next();\n try (ImageInputStream iis = ImageIO.createImageInputStream(new File(filename)))\n {\n assertNotNull(iis, \"No ImageInputStream created for file \" + filename);\n reader.setInput(iis);\n IIOMetadata imageMetadata = reader.getImageMetadata(0);\n Element root = (Element) imageMetadata.getAsTree(STANDARD_METADATA_FORMAT);\n NodeList dimensionNodes = root.getElementsByTagName(\"Dimension\");\n assertTrue(dimensionNodes.getLength() > 0, \"No resolution found in image file \" + filename);\n Element dimensionElement = (Element) dimensionNodes.item(0);\n\n NodeList pixelSizeNodes = dimensionElement.getElementsByTagName(\"HorizontalPixelSize\");\n assertTrue(pixelSizeNodes.getLength() > 0, \"No X resolution found in image file \" + filename);\n Node pixelSizeNode = pixelSizeNodes.item(0);\n String val = pixelSizeNode.getAttributes().getNamedItem(\"value\").getNodeValue();\n int actualResolution = (int) Math.round(25.4 / Double.parseDouble(val));\n assertEquals(expectedResolution, actualResolution, \"X resolution doesn't match in image file \" + filename);\n\n pixelSizeNodes = dimensionElement.getElementsByTagName(\"VerticalPixelSize\");\n assertTrue(pixelSizeNodes.getLength() > 0, \"No Y resolution found in image file \" + filename);\n pixelSizeNode = pixelSizeNodes.item(0);\n val = pixelSizeNode.getAttributes().getNamedItem(\"value\").getNodeValue();\n actualResolution = (int) Math.round(25.4 / Double.parseDouble(val));\n assertEquals(expectedResolution, actualResolution, \"Y resolution doesn't match\");\n }\n reader.dispose();\n }",
"float getQuality();",
"private double resolution(int zoom) {\n\t\treturn this.initialResolution / (Math.pow(2, zoom));\r\n\t}",
"public String getFigureResolution() {\n return (String)getAttributeInternal(FIGURERESOLUTION);\n }",
"int getQuality();",
"public abstract int getSampleSize(int band);",
"public String getFigureResolution() {\n return (String) getAttributeInternal(FIGURERESOLUTION);\n }",
"protected int getResRatio(int res) {\r\n\t\tSubband node = parser.header.subband;\r\n\t\twhile(node.resLvl != (res - 1)) {\r\n\t\t\tnode = node.subb_LL;\r\n\t\t}\r\n\t\treturn parser.getWidth()/*tileW*/ / node.w;\r\n\t}",
"public double resolution(int zoom) {\n //return (2 * Math.PI * 6378137) / (this.tileSize * Math.pow(2, zoom));\n return initialResolution / Math.pow(2, zoom);\n }",
"float getQualityValue(MediaQuality quality);",
"double calculateQuality(ReplayBean replay);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the vmotionAcrossNetworkSupported value for this HostCapability. | public void setVmotionAcrossNetworkSupported(java.lang.Boolean vmotionAcrossNetworkSupported) {
this.vmotionAcrossNetworkSupported = vmotionAcrossNetworkSupported;
} | [
"public java.lang.Boolean getVmotionAcrossNetworkSupported() {\r\n return vmotionAcrossNetworkSupported;\r\n }",
"public void setVmotionWithStorageVMotionSupported(java.lang.Boolean vmotionWithStorageVMotionSupported) {\r\n this.vmotionWithStorageVMotionSupported = vmotionWithStorageVMotionSupported;\r\n }",
"public void setStorageVMotionSupported(java.lang.Boolean storageVMotionSupported) {\r\n this.storageVMotionSupported = storageVMotionSupported;\r\n }",
"public void setPerVMNetworkTrafficShapingSupported(java.lang.Boolean perVMNetworkTrafficShapingSupported) {\r\n this.perVMNetworkTrafficShapingSupported = perVMNetworkTrafficShapingSupported;\r\n }",
"public void setVmotionSupported(boolean vmotionSupported) {\r\n this.vmotionSupported = vmotionSupported;\r\n }",
"public void setEightPlusHostVmfsSharedAccessSupported(java.lang.Boolean eightPlusHostVmfsSharedAccessSupported) {\r\n this.eightPlusHostVmfsSharedAccessSupported = eightPlusHostVmfsSharedAccessSupported;\r\n }",
"public void setHostAccessManagerSupported(java.lang.Boolean hostAccessManagerSupported) {\r\n this.hostAccessManagerSupported = hostAccessManagerSupported;\r\n }",
"public Boolean allowVirtualNetworkAccess() {\n return this.innerProperties() == null ? null : this.innerProperties().allowVirtualNetworkAccess();\n }",
"public void setInterVMCommunicationThroughVMCISupported(java.lang.Boolean interVMCommunicationThroughVMCISupported) {\r\n this.interVMCommunicationThroughVMCISupported = interVMCommunicationThroughVMCISupported;\r\n }",
"Update withGatewayUseByRemoteNetworkAllowed();",
"public void setSupportedCpuFeature(com.vmware.converter.HostCpuIdInfo[] supportedCpuFeature) {\r\n this.supportedCpuFeature = supportedCpuFeature;\r\n }",
"public java.lang.Boolean getVmotionWithStorageVMotionSupported() {\r\n return vmotionWithStorageVMotionSupported;\r\n }",
"public void setIpmiSupported(java.lang.Boolean ipmiSupported) {\r\n this.ipmiSupported = ipmiSupported;\r\n }",
"public java.lang.Boolean getPerVMNetworkTrafficShapingSupported() {\r\n return perVMNetworkTrafficShapingSupported;\r\n }",
"public void setMultipleNetworkStackInstanceSupported(java.lang.Boolean multipleNetworkStackInstanceSupported) {\r\n this.multipleNetworkStackInstanceSupported = multipleNetworkStackInstanceSupported;\r\n }",
"public boolean isUnsharedSwapVMotionSupported() {\r\n return unsharedSwapVMotionSupported;\r\n }",
"public boolean hasConnectivityManagedCapability() {\n return ((mNetworkCapabilities & CONNECTIVITY_MANAGED_CAPABILITIES) != 0);\n }",
"public void setMediaNetworkReachable(boolean value);",
"public void setCpuMemoryResourceConfigurationSupported(boolean cpuMemoryResourceConfigurationSupported) {\r\n this.cpuMemoryResourceConfigurationSupported = cpuMemoryResourceConfigurationSupported;\r\n }"
] | {
"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.