query
stringlengths 8
1.54M
| document
stringlengths 9
312k
| negatives
sequencelengths 19
20
| metadata
dict |
---|---|---|---|
Recupera id ocorrencia processo. | public Integer getIdOcorrenciaProcesso() {
return idOcorrenciaProcesso;
} | [
"String getRecepieId();",
"public String getCorusPid();",
"public int getIdComentario() {\n return id;\n }",
"public void setIdOcorrenciaProcesso(Integer idOcorrenciaProcesso) {\n\t\tthis.idOcorrenciaProcesso = idOcorrenciaProcesso;\n\t}",
"long getCommandId();",
"public abstract long getProcessID();",
"public Processo getProcesso(final int id);",
"public long getSagardotegiId();",
"@Override\r\n\tpublic long getId() {\r\n\t\treturn _tthcBieuMauHoSo.getId();\r\n\t}",
"public String getInoId();",
"String getExecId();",
"java.lang.String getID();",
"private String getIdioma()\n throws MareException\n {\n\t\tLong idioma = UtilidadesSession.getIdioma(this);\n\t\treturn idioma.toString();\n }",
"public int getIdNumeroDocumento() {\n return idNumeroDocumento;\n }",
"@Override\n\tpublic String getId() {\n\t\tString doi = getDoi();\n\t\tif (doi != null && doi.length() > 0)\n\t\t\treturn doi;\n\t\treturn getPMId();\n\t}",
"int getCommandId();",
"public String obtenerIdPersona(){\n Persona m = (Persona) personas.obtenerObjetopp(personas.tamano()-1);\n return String.valueOf(m.getId());\n }",
"long getId();",
"public String getIdProceso() {\n\t\treturn idProceso;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Read file and return list of employees | private static Employee [] readFile(String fileName) {
Employee[] employees = new Employee[0];
try{
File file = new File(fileName);
try (Scanner scanner = new Scanner(file)) {
while(scanner.hasNextLine())
{
StringTokenizer st = new StringTokenizer(scanner.nextLine());
Employee employee = new Employee();
employee.employee = st.nextToken();
if(st.hasMoreTokens()) {
String manager = st.nextToken();
// Check if manager is not empty, if empty then last employee
if(!"".equals(manager))
employee.manager = manager;
}
employees = addEmployee(employees, employee);
} }
} catch (FileNotFoundException e)
{
}
return employees;
} | [
"public void loadEmployees() {\n this.employees = new ArrayList<>();\n\n try {\n // creates a BufferedReader to read from EmployeeData\n BufferedReader br = new BufferedReader(new FileReader(\"EmployeeData.txt\"));\n\n while (br.ready()) {\n String line = br.readLine();\n // skip to the next line if there is nothing there or is null\n if (line == null) {\n continue;\n }\n if (line.isEmpty() || line.isBlank()) {\n continue;\n }\n\n // Create an Employee object from the line of data and add it to the list\n // Comma Separated Values: 1st=name, 2nd=username, 3rd=password, 4th=email\n String[] values = line.split(\",\");\n Employee employee = new Employee(values[0], values[1], this.reverseString(values[3]),\n values[2]);\n this.employees.add(employee);\n }\n } catch (FileNotFoundException e) {\n this.createEmployeeData();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void readFile() {\n String fileName = \"employees.dat\";\n try (Stream<String> stream = Files.lines(Paths.get(fileName))) {\n employees = stream\n .filter(line -> !line.equals(\"\") && !line.substring(0,1).equals(\"#\"))\n .map(Employee::new).filter(e -> e.getFlag() == 1)\n .collect(Collectors.toList());\n } catch (IOException e) {\n System.out.println(\"Read file Error!\");\n }\n }",
"public void readEmployees() {\n\t\tList<Employee> employees = new ArrayList<Employee>();\n\t\temployees = employeeRepository.getEmployees();\n\n\t\tEmployeePrinter eprinter = new EmployeePrinter(employees);\n\t\teprinter.print();\n\t}",
"public void loadEmployees(String fileName)\r\n\t{\r\n\t\t//try block to attempt to open the file\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//declare local variables for the file name and data fields within the employeelist text file\r\n\t\t\t//these will all be Strings when pulled from the file, and then converted to the proper data type when they are assigned to the Employee objects\r\n\t\t\tString empID = \"\";\r\n\t\t\tString empLastName = \"\";\r\n\t\t\tString empFirstName = \"\";\r\n\t\t\tString empType = \"\";\t\r\n\t\t\tString empSalary = \"\"; //will convert to double\r\n\t\t\t\r\n\t\t\t//scan for file\r\n\t\t\tScanner infile = new Scanner(new FileInputStream(fileName));\r\n\t\t\t\r\n\t\t\t//while loop searching file records\r\n\t\t\twhile(infile.hasNext())\r\n\t\t\t{\r\n\t\t\t\t//split the field into segments with the comma (,) being the delimiter (employee ID, Last Name, First Name, employee type, and employee salary)\r\n\t\t\t\tString line = infile.nextLine();\r\n\t\t\t\tString[] fields = line.split(\",\");\r\n\t\t\t\tempID = fields[0];\r\n\t\t\t\tempLastName = fields[1];\r\n\t\t\t\tempFirstName = fields[2];\r\n\t\t\t\tempType = fields[3];\r\n\t\t\t\tempSalary = fields[4];\r\n\t\t\t\t\r\n\t\t\t\t//create a selection structure that creates the type of employee based on the empType\r\n\t\t\t\tif(empType.equalsIgnoreCase(\"H\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t//create an HourlyEmployee and convert empSalary to a double\r\n\t\t\t\t\tHourlyEmployee hourlyEmp = new HourlyEmployee(empID, empLastName, empFirstName, Double.parseDouble(empSalary));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//add hourlyEmp to the Employee ArrayList empList\r\n\t\t\t\t\tempList.add(hourlyEmp);\r\n\t\t\t\t}//end create hourly employee\r\n\t\t\t\t\r\n\t\t\t\t//else if create an exempt employee for E\r\n\t\t\t\telse if(empType.equalsIgnoreCase(\"E\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t//create an exempt employee (salary) and convert the empSalary to a double\r\n\t\t\t\t\tExemptEmployee salaryEmp = new ExemptEmployee(empID, empLastName, empFirstName, Double.parseDouble(empSalary));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//add salaryEmp to the Employee ArrayList empList\r\n\t\t\t\t\tempList.add(salaryEmp);\r\n\t\t\t\t}//end create exempt (salary) employee\r\n\t\t\t\t\r\n\t\t\t\t//else if create a contractor \r\n\t\t\t\telse if(empType.equalsIgnoreCase(\"C\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t//create a contract employee and convert the empSalary to a double\r\n\t\t\t\t\tContractEmployee contractEmp = new ContractEmployee(empID, empLastName, empFirstName, Double.parseDouble(empSalary));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//add contractEmp to the Employee ArrayList empList\r\n\t\t\t\t\tempList.add(contractEmp);\r\n\t\t\t\t}//end create contractor employee\r\n\t\t\t\t\r\n\t\t\t\t//else if create a day laborer\r\n\t\t\t\telse if(empType.equalsIgnoreCase(\"d\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t//create a day laborer and convert the empSalary to a double\r\n\t\t\t\t\tDayLaborer laborer = new DayLaborer(empID, empLastName, empFirstName, Double.parseDouble(empSalary));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//add laborer to the Employee ArrayList empList\r\n\t\t\t\t\tempList.add(laborer);\r\n\t\t\t\t}//end create day laborer employee\r\n\t\t\t\t\r\n\t\t\t\t//else ignore the employee (looking at you Greyworm!)\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t//save the employee type and id to return as an error\r\n\t\t\t\t\tempTypeError = empType;\r\n\t\t\t\t\tempIDError = empID;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//ignore the employee \r\n\t\t\t\t\tempType = null;\r\n\t\t\t\t}//end ignore X employee\r\n\t\t\t}//end while loop cycling the records in the employeelist\r\n\t\t\t\r\n\t\t\t//close infile when done\r\n\t\t\tinfile.close();\r\n\t\t}//end of try block opening employeelist.txt file\r\n\t\t\r\n\t\t//catch block if file not found\r\n\t\tcatch(IOException ex)\r\n\t\t{\r\n\t\t\t//call ex object and display message\r\n\t\t\tex.printStackTrace();\r\n\t\t}//end of catch for file not found\r\n\t}",
"List<String> readWholeEmployeeRecords();",
"public void readFile() throws IOException {\r\n File file = new File(\"employee_list.txt\"); //Declaration and initialization of file object\r\n Scanner textFile = new Scanner(file); //Creates Scanner object and parse in the file\r\n\r\n while(textFile.hasNextLine()){ //Stay in a loop until there is no written line in the text file\r\n String line = textFile.nextLine(); //Read line and store in a String variable 'line'\r\n String[] words = line.split(\",\"); //Split the whole line at commas and store those in a simple String array\r\n Employee employee = new Employee(words[0],words[1],words[2]); //Create Employee object\r\n this.listOfEmployees.add(employee); //Add created Employee object to listOfEmployees ArrayList\r\n if(!this.listOfDepartments.contains(words[1])){ //This just adds all the department names to an ArrayList\r\n this.listOfDepartments.add(words[1]);\r\n }\r\n }\r\n }",
"public static ArrayList<Employee> getEmployeeFromJson()\n {\n ArrayList<Employee> users = new ArrayList<>();\n File file = new File(employeeFile);\n try (BufferedReader buffer = new BufferedReader(new FileReader(file))) {\n Gson gson = new Gson();\n users = gson.fromJson(buffer, new TypeToken<ArrayList<Employee>>()\n {\n }.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return users;\n }",
"private static boolean readEmployeesFromFile(String fileName, ArrayList<Employee> employees)\r\n\t{\r\n\t\t// Initialize input streams\r\n\t\tFileInputStream fis = null;\r\n\t\tObjectInputStream ois = null;\r\n\t\tboolean readFail = false;\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tfis = new FileInputStream(fileName);\r\n\t\t\tois = new ObjectInputStream(fis);\r\n\t\t\twhile (1 == 1)\r\n\t\t\t\temployees.add((Employee)ois.readObject());\r\n\t\t}\r\n\t\tcatch (EOFException e1) \r\n\t\t{\r\n\t\t\tSystem.out.println(\"File successfully read.\");\r\n\t\t} \r\n\t\tcatch (ClassNotFoundException e1) \r\n\t\t{\r\n\t\t\te1.printStackTrace();\r\n\t\t} \r\n\t\tcatch (IOException e1) \r\n\t\t{\r\n\t\t\tSystem.out.println(\"File not found.\");\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tfis.close(); \r\n\t\t\t\tois.close();\r\n\t\t\t}\r\n\t\t\tcatch(Exception e) { System.out.println(\"ERROR: \" + e.getMessage());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Return whether there was success or not\r\n\t\tif (readFail)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn true; //If we made it here, then the file was read successfully. Return true.\r\n\t}",
"public static void read(String fileName,\n ArrayList<Employee> employees) throws FileNotFoundException {\n File file = new File(fileName);\n exists(fileName);\n\n try {\n try (BufferedReader in = new BufferedReader(new FileReader(file.getAbsoluteFile()))) {\n String line;\n while ((line = in.readLine()) != null) {\n // TODO: check the correctness of current line\n if (line.charAt(0) == 'w') {\n employees.add(new Worker(line));\n } else if (line.charAt(0) == 'f') {\n employees.add(new Freelancer(line));\n }\n }\n }\n } catch(IOException e) {\n throw new RuntimeException(e);\n }\n }",
"void readFromFile(String file)\n {\n try\n {\n employees.clear();\n FileReader inputFile = new FileReader(fileName);\n BufferedReader input = new BufferedReader(inputFile);\n String line = input.readLine();\n \n while(line != null)\n {\n Employee worker = new Employee();\n StringTokenizer stringParser = new StringTokenizer(line, \",\");\n while(stringParser.hasMoreElements())\n {\n worker.setName(stringParser.nextElement().toString());\n worker.setHours(Integer.parseInt(stringParser.nextElement().toString()));\n worker.setRate(Float.parseFloat(stringParser.nextElement().toString()));\n }\n employees.add(worker);\n line = input.readLine();\n }\n inputFile.close();\n }\n catch(FileNotFoundException e)\n {\n e.getStackTrace();\n }\n catch(IOException e)\n {\n e.getStackTrace();\n }\n }",
"public void readEmployeeTextFile(String path) throws IOException {\n\t\tList<String> lines = Files.readAllLines(Paths.get(path));\n\t\t\n\t\tfor (String line : lines) {\n\t\t\tString[] tokens = line.split(\",\");\n\t\t\t\n\t\t\ttry {\n\t\t\tthis.insertEmployee(\n\t\t\t\t\tnew Employee(\n\t\t\t\t\t\t\ttokens[0],\n\t\t\t\t\t\t\ttokens[1],\n\t\t\t\t\t\t\tInteger.parseInt(tokens[2]),\n\t\t\t\t\t\t\tDepartment.parseDepartment(tokens[3]),\n\t\t\t\t\t\t\tInteger.parseInt(tokens[4])\n\t\t\t\t\t));\n\t\t\t} catch (DuplicateEntryException e) {\n\t\t\t\t// XXX: DuplicateException usage\n\t\t\t\tSystem.err.println(e.getMessage());\n\t\t\t}\n\t\t}\n\t}",
"public List<Employee> getAllEmployees() {\n\t\tList<Employee> list = new ArrayList<Employee>();\n\t\tlist = template.loadAll(Employee.class);\n\t\treturn list;\n\t}",
"public List<Person> getPersons() throws ParseException, IOException { \t\r\n List<Person> persons = new ArrayList<Person>(); \r\n \r\n BufferedReader bufferedReader = new BufferedReader(new FileReader(path));\r\n try { \r\n while((line = bufferedReader.readLine()) != null) \r\n { \r\n String[] values = line.split(\"\\\\|\");\r\n Date date =new SimpleDateFormat(\"dd-MM-yyyy\").parse(values[3]);\r\n Person person = new Person(Integer.parseInt(values[0]), values[1], values[2], date, values[4], Integer.parseInt(values[5]), Double.parseDouble(values[6]));\r\n persons.add(person);\r\n } \t\r\n } \r\n finally { \t\r\n \tbufferedReader.close();\r\n }\r\n return persons;\r\n }",
"public void loadEmployeeDataFromFile(String filepath) {\r\n\t\tScanner scanner;\r\n\t\ttry {\r\n\t\t\tscanner = new Scanner(new FileReader(filepath));\r\n\t\t\tscanner.useDelimiter(\"\\n\");\r\n\r\n\t\t\tString line;\r\n\t\t\tscanner.next(); // skip the first line\r\n\r\n\t\t\twhile (scanner.hasNext()) {\r\n\t\t\t\tline = scanner.next();\r\n\t\t\t\tString[] args = line.replaceAll(\"\\\\s+\", \" \").split(\" \");\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tString id = args[0].trim();\r\n\t\t\t\t\tString fn = args[1].trim();\r\n\t\t\t\t\tString ln = args[2].trim();\r\n\t\t\t\t\tEmployee.Subteam subteam = Employee.getSubteamFor(args[3].trim());\r\n\t\t\t\t\tint freshmanYear = Integer.parseInt(args[4].trim());\r\n\r\n\t\t\t\t\tthis.addEmployee(new Employee(id, fn, ln, subteam, freshmanYear));\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\tSystem.out.println(\"something went wrong:\" + e.getMessage());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"File not found \" + filepath);\r\n\t\t}\r\n\t}",
"@GET\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic String getAllEmployees(){\n\t\tString employeesJsonString = getFileContent();\n\t\treturn employeesJsonString;\n\t}",
"public void readFromEmployeeListFile()\r\n {\r\n try(ObjectInputStream fromEmployeeListFile = \r\n new ObjectInputStream(new FileInputStream(\"listfiles/employeelist.dta\")))\r\n {\r\n employeeList = (EmployeeList) fromEmployeeListFile.readObject();\r\n employeeList.setSavedStaticEmpRunNR(fromEmployeeListFile);\r\n }\r\n catch(ClassNotFoundException cnfe)\r\n {\r\n employeeList = new EmployeeList();\r\n JOptionPane.showMessageDialog(null, \"Fant ikke definisjon av ansatt \"\r\n + \"objektene.\\nOppretter tomt ansattregister.\\n\"\r\n + cnfe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n catch(FileNotFoundException fnfe)\r\n {\r\n employeeList = new EmployeeList();\r\n JOptionPane.showMessageDialog(null, \"Finner ikke angitt fil.\\n\"\r\n + \"Oppretter tomt ansattregister.\\n\" \r\n + fnfe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n catch(IOException ioe)\r\n\t{\r\n employeeList = new EmployeeList();\r\n JOptionPane.showMessageDialog(null, \"Fikk ikke lest fra filen.\\n\"\r\n + \"Oppretter tomt ansattregister.\\n\"\r\n + ioe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n }",
"public static int readFile(String filename)\r\n { TextInputStream inputData = new TextInputStream(filename);\r\n if (inputData.fail()) return -1;\r\n // if file doesn't exist, return -1\r\n\r\n int x = 0;\r\n do // loop up until 100 employees or endoffile\r\n { String name = inputData.readLine();\r\n // read name\r\n if (inputData.fail()) continue; // check for odd # of lines\r\n double salary = Numeric.parseDouble(inputData.readLine());\r\n // read salary\r\n Worker[x] = new Employee(name, salary);\r\n // update array\r\n x = x + 1;\r\n } while (x < 100 && (!inputData.fail()));\r\n return x;\r\n }",
"public List<Employee> getAllEmployees(){\n\t\tFaker faker = new Faker();\n\t\tList<Employee> employeeList = new ArrayList<Employee>();\n\t\tfor(int i=101; i<=110; i++) {\n\t\t\tEmployee myEmployee = new Employee();\n\t\t\tmyEmployee.setId(i);\n\t\t\tmyEmployee.setName(faker.name().fullName());\n\t\t\tmyEmployee.setMobile(faker.phoneNumber().cellPhone());\n\t\t\tmyEmployee.setAddress(faker.address().streetAddress());\n\t\t\tmyEmployee.setCompanyLogo(faker.company().logo());\n\t\t\temployeeList.add(myEmployee);\n\t\t}\n\t\treturn employeeList;\n\t}",
"@Override\n public List<Professor> loadFromFile() {\n BufferedReader fileReader = null;\n List<Professor> professors = new ArrayList<Professor>(0);\n try {\n String line;\n fileReader = new BufferedReader(new FileReader(professorFileName));\n //read the header to skip it\n fileReader.readLine();\n while ((line = fileReader.readLine()) != null) {\n String[] tokens = line.split(COMMA_DELIMITER);\n if (tokens.length > 0) {\n Professor professor = new Professor(tokens[professorIdIndex], tokens[professorNameIndex]);\n professor.setProfDepartment(tokens[professorDepartmentIndex]);\n professors.add(professor);\n }\n }\n } catch (Exception e) {\n System.out.println(\"Error occurs when loading professors.\");\n e.printStackTrace();\n } finally {\n printFinallyBlock(fileReader);\n }\n return professors;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test Case : BRIT2449 Testing if receipt can be deleted | @Test (description = "Testing if as a manager can delete receipt")
public void deleteReceipt(){
extentLogger = report.createTest("Testing if receipt can be deleted");
commonSteps(extentLogger);
extentLogger.info("Click to select receipt \"e.g. 3456");
pages.receiptsMyCompanyChicago().selectReceipt.click();
BrowserUtilities.isClickable(pages.receiptsMyCompanyChicago().actionList);
extentLogger.info("Push button \"Action\" on a middle top");
pages.receiptsMyCompanyChicago().actionButton.click();
extentLogger.info("Choosing Delete");
pages.receiptsMyCompanyChicago().actionList.click();
String expectedDeleteMessage = "Are you sure you want to delete this record ?";
String actualDeleteMessage = pages.receiptsMyCompanyChicago().deleteMessage.getText();
Assert.assertEquals(expectedDeleteMessage, actualDeleteMessage);
} | [
"@Test\n public void testEDeleteMerchandisePurchaseOrder() throws Exception {\n System.out.println(\"deleteMerchandisePurchaseOrder\");\n int sizeBefore = instance.retrieveAllMerchandisePurchaseOrders().size();\n \n int expResult = sizeBefore - 1;\n \n instance.deleteMerchandisePurchaseOrder(id);\n \n int sizeAfter = instance.retrieveAllMerchandisePurchaseOrders().size();\n \n assertEquals(expResult, sizeAfter);\n }",
"@Test(description = \"Implements A.1.4 DGIWG Transactional CSW - Update (Requirement 18)\", dependsOnMethods = \"issueGetRecords_EnsureUpdate\")\n public void issueDeleteOperation() {\n this.requestDocument = requestCreator.createDeleteRequest( this.insertedId );\n this.response = this.cswClient.submitPostRequest( transactionUrl, this.requestDocument );\n assertStatusCode( this.response.getStatus(), 200 );\n assertXmlContentType( this.response.getHeaders() );\n this.responseDocument = this.response.getEntity( Document.class );\n\n assertQualifiedName( responseDocument, CSW, \"TransactionResponse\" );\n assertSchemaValid( cswValidator, new DOMSource( this.responseDocument ) );\n\n int totalDeleted = parseTotalDeleted();\n assertTrue( totalDeleted == 1, \"Expected totalDeleted 1 but was \" + totalDeleted );\n }",
"@Test\n\tpublic void testDeleteBook() {\n\t\t//System.out.println(\"Deleting book from bookstore...\");\n\t\tstore.deleteBook(b1);\n\t\tassertFalse(store.getBooks().contains(b1));\n\t\t//System.out.println(store);\n\t}",
"@Test\r\n\tvoid testdelete() {\r\n\t\t\r\n\t\tassertEquals(true,service.deleteOrder(ob));\r\n\t}",
"public void testCancelledPurchaseOrderItemQuantities() throws Exception {\n GenericValue cancelProduct = createTestProduct(\"Physical product for testing PO item quantities after cancellation\", admin);\n createMainSupplierForProduct(cancelProduct.getString(\"productId\"), demoSupplier.getString(\"partyId\"), new BigDecimal(\"10.0\"), \"USD\", new BigDecimal(\"0.0\"), admin);\n \n Map<GenericValue, BigDecimal> orderSpec = new HashMap<GenericValue, BigDecimal>();\n orderSpec.put(cancelProduct, new BigDecimal(\"10.0\"));\n PurchaseOrderFactory pof = testCreatesPurchaseOrder(orderSpec, demoSupplier, facilityContactMechId);\n String orderId = pof.getOrderId();\n \n // cancel the cancel product\n pof.cancelProduct(cancelProduct, new BigDecimal(\"10.0\"));\n \n OrderRepositoryInterface repository = getOrderRepository(admin);\n Order order = repository.getOrderById(pof.getOrderId());\n OrderItem cancelOrderItem = repository.getOrderItem(order, \"00001\");\n assertEquals(\"Order [\" + orderId + \"] item [\" + cancelOrderItem.getOrderItemSeqId() + \"] quantity is not correct\", cancelOrderItem.getQuantity(), new BigDecimal(\"10.0\"));\n assertEquals(\"Order [\" + orderId + \"] item [\" + cancelOrderItem.getOrderItemSeqId() + \"] cancelled quantity is not correct\", cancelOrderItem.getCancelQuantity(), new BigDecimal(\"10.0\"));\n assertEquals(\"Order [\" + orderId + \"] item [\" + cancelOrderItem.getOrderItemSeqId() + \"] ordered quantity is not correct\", cancelOrderItem.getOrderedQuantity(), new BigDecimal(\"0.0\"));\n assertEquals(\"Order [\" + orderId + \"] item [\" + cancelOrderItem.getOrderItemSeqId() + \"] invoiced quantity is not correct\", cancelOrderItem.getInvoicedQuantity(), new BigDecimal(\"0.0\"));\n assertEquals(\"Order [\" + orderId + \"] item [\" + cancelOrderItem.getOrderItemSeqId() + \"] invoiced value is not correct\", cancelOrderItem.getInvoicedValue(), new BigDecimal(\"0.0\"));\n assertEquals(\"Order [\" + orderId + \"] item [\" + cancelOrderItem.getOrderItemSeqId() + \"] remaining to ship quantity is not correct\", cancelOrderItem.getRemainingToShipQuantity(), new BigDecimal(\"0.0\"));\n assertEquals(\"Order [\" + orderId + \"] item [\" + cancelOrderItem.getOrderItemSeqId() + \"] subtotal is not correct\", cancelOrderItem.getSubTotal(), new BigDecimal(\"0.0\"));\n assertEquals(\"Order [\" + orderId + \"] item [\" + cancelOrderItem.getOrderItemSeqId() + \"] uninvoiced value is not correct\", cancelOrderItem.getUninvoicedValue(), new BigDecimal(\"0.0\"));\n }",
"public int checkReceipt(String productID);",
"public int modifyChkStorageForDeleteInBill(TicketStorageInBill vo);",
"public void removePurchaseOrderIntoRepositoryTest() {\n\t}",
"public void test_delete_ok() \r\n throws GrouperException,\r\n InsufficientPrivilegeException\r\n {\r\n \r\n rSubjX.delete(s);\r\n assertTrue(\"deleted registry subject\", true);\r\n }",
"public void testRemoveNotification() throws Exception {\r\n Date start = new Date();\r\n\r\n for (int i = 0; i < STRESS_TEST_NUM; i++) {\r\n // add it\r\n persistence.addNotification(200 + i, 1, 3, \"reviewer\");\r\n\r\n // delete it\r\n persistence.removeNotification(200 + i, 1, 3, \"reviewer\");\r\n\r\n String sql = \"SELECT * FROM notification WHERE external_ref_id = ? \";\r\n\r\n assertFalse(\"The record should not exist.\", existsRecord(sql, new Object[] {new Long(i + 200)}));\r\n }\r\n\r\n Date finish = new Date();\r\n\r\n outputStressInfo(start, finish, \"removeNotification(long, long, long, String)\");\r\n }",
"public void del_cart_status()\n\t{\n\t\ttestlog = report.createTest(\"Delete from cart Test\");\n\n\t\tList<WebElement> rows = driver.findElements(By.tagName(\"tr\"));\n\t\tcnt1=rows.size();\n\t\tif(cnt1>1)\n\t\t{\n\t\t\ttestlog.log(Status.PASS, \"Product is deleted from the cart\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttestlog.log(Status.FAIL, \"Product is not deleted from the cart\");\n\t\t}\n\t}",
"@Test\n public void testDeleteCartsIdPaymentAction() throws ClientException, IOException, ProcessingException {\n CloudResponse response = this.actions.deleteCartsIdPaymentAction(\"{id}\", \"{customerId}\");\n List<Integer> expectedResults = Arrays.asList(200, 400, 403, 404);\n LOG.info(\"Got status {}\", response.getStatusLine());\n Assert.assertTrue(expectedResults.contains(response.getStatusLine().getStatusCode()));\n\n if(response.getStatusLine().getStatusCode() == 200) {\n this.actions.checkResponseJSONSchema(\"#/definitions/Cart\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 400) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 403) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 404) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n \n }",
"@Test\n\tpublic void checkRemoveCustomerSuccess()\n\t{\n\n\t\tint i =0;\n\t\ti=testCustomer.removeCustomer(103);\n\t\t\n\n\t\tassertEquals(\"Removed Successfully\",1,i);\n\t\n\t}",
"@Test (description = \"Testing if manager can edit new created Receipt \\\"PO4567\\\" with invalid client info (phone number)\")\n public void testingToEditReceiptsWithInvalidInfo(){\n\n extentLogger = report.createTest(\"Testing if Receipt \\\"PO4567\\\" can be edited with invalid client info (phone number)\");\n commonSteps(extentLogger);\n\n extentLogger.info(\"Clicking on receipt with number PO4567\");\n pages.receiptsMyCompanyChicago().receiptNumber.click();\n\n extentLogger.info(\"Clicking on button Edit\");\n pages.receiptsMyCompanyChicago().editButton.click();\n\n extentLogger.info(\"Click on \\\"Open partner\\\" button \\\"Edit\");\n pages.receiptsMyCompanyChicago().openPartnerButton.click();\n\n extentLogger.info(\"Deleting existing phone number\");\n pages.receiptsMyCompanyChicago().phoneNumber.clear();\n\n extentLogger.info(\"Entering invalid phone number\");\n pages.receiptsMyCompanyChicago().phoneNumber.sendKeys(\"abc-erf-uytr\");\n\n extentLogger.info(\"Clicking on Save button of Open Partner\");\n pages.receiptsMyCompanyChicago().saveButtonPartner.click();\n\n\n extentLogger.info(\"Click on \\\"Open partner\\\" button \\\"Edit\");\n pages.receiptsMyCompanyChicago().openPartnerButton.click();\n\n extentLogger.info(\"Verify if error Message is displayed\");\n String actualText = pages.receiptsMyCompanyChicago().phoneNumber.getText();\n System.out.println(actualText);\n Assert.assertNotEquals(\"Invalid phone number format\", actualText);\n\n\n }",
"public void testDeletePhoneNumber( )\n {\n setUpScenario1( );\n contact.deletePhoneNumber( \"6556850\" );\n ArrayList phones = contact.getPhoneNumbers( );\n String tel1 = ( String )phones.get( 0 );\n assertTrue( \"The phone number wasnt deleted correctly\", tel1.equals( \"4859527\" ) && phones.size( ) == 1 );\n\n }",
"@Test\n public void deleteMobileContract() {\n ContractRepository contractRepository = new ContractRepository();\n contractRepository.add(mobileContract);\n Assert.assertEquals(mobileContract, contractRepository.get(2));\n contractRepository.delete(2);\n Assert.assertNull(contractRepository.get(2));\n }",
"@SuppressWarnings(\"unchecked\")\n public void testPurchaseOrderReceiptAccountingTags() throws Exception {\n // 1. create test product\n GenericValue product1 = createTestProduct(\"testCompletePurchaseOrder Test Product 1\", demopurch1);\n GenericValue product2 = createTestProduct(\"testCompletePurchaseOrder Test Product 2\", demopurch1);\n GenericValue product3 = createTestProduct(\"testCompletePurchaseOrder Test Product 3\", demopurch1);\n \n // 2. Create a PO. and approve it\n PurchaseOrderFactory pof = new PurchaseOrderFactory(delegator, dispatcher, User, (String) demoSupplier.get(\"partyId\"), getOrganizationPartyId(), facilityContactMechId);\n pof.setCurrencyUomId(\"USD\");\n pof.addPaymentMethod(\"EXT_OFFLINE\", null);\n pof.addShippingGroup(\"UPS\", \"NEXT_DAY\");\n Map<String, String> tags1 = UtilMisc.toMap(\"acctgTagEnumId1\", \"DIV_GOV\", \"acctgTagEnumId2\", \"DPT_SALES\", \"acctgTagEnumId3\", \"ACTI_MARKETING\");\n Map<String, String> tags2 = UtilMisc.toMap(\"acctgTagEnumId1\", \"DIV_GOV\", \"acctgTagEnumId2\", \"DPT_CORPORATE\");\n Map<String, String> tags3 = UtilMisc.toMap(\"acctgTagEnumId1\", \"DIV_SMALL_BIZ\", \"acctgTagEnumId2\", \"DPT_SALES\", \"acctgTagEnumId3\", \"ACTI_MARKETING\");\n pof.addProduct(product1, new BigDecimal(\"100.0\"), pof.getFirstShipGroup(), tags1);\n pof.addProduct(product2, new BigDecimal(\"200.0\"), pof.getFirstShipGroup(), tags2);\n pof.addProduct(product3, new BigDecimal(\"300.0\"), pof.getFirstShipGroup(), tags3);\n String orderId = pof.storeOrder();\n pof.approveOrder();\n \n // 3. Receive all items with\n // warehouse.issueOrderItemToShipmentAndReceiveAgainstPO\n GenericValue pOrder = delegator.findByPrimaryKeyCache(\"OrderHeader\", UtilMisc.toMap(\"orderId\", orderId));\n Map<String, Object> inputParameters = createTestInputParametersForReceiveInventoryAgainstPurchaseOrder(pOrder, demowarehouse1);\n runAndAssertServiceSuccess(\"warehouse.issueOrderItemToShipmentAndReceiveAgainstPO\", inputParameters);\n \n // 4. find the received inventory item and check their tags\n GenericValue inventoryItem1 = EntityUtil.getOnly(delegator.findByAnd(\"InventoryItem\", UtilMisc.toMap(\"productId\", product1.getString(\"productId\"))));\n assertNotNull(\"Inventory not found for product \" + product1, inventoryItem1);\n assertAccountingTagsEqual(inventoryItem1, tags1);\n \n GenericValue inventoryItem2 = EntityUtil.getOnly(delegator.findByAnd(\"InventoryItem\", UtilMisc.toMap(\"productId\", product2.getString(\"productId\"))));\n assertNotNull(\"Inventory not found for product \" + product2, inventoryItem2);\n assertAccountingTagsEqual(inventoryItem2, tags2);\n \n GenericValue inventoryItem3 = EntityUtil.getOnly(delegator.findByAnd(\"InventoryItem\", UtilMisc.toMap(\"productId\", product3.getString(\"productId\"))));\n assertNotNull(\"Inventory not found for product \" + product3, inventoryItem3);\n assertAccountingTagsEqual(inventoryItem3, tags3);\n \n // 5. find the accounting transactions\n List<GenericValue> entries1 = delegator.findByAnd(\"AcctgTransEntry\", UtilMisc.toMap(\"productId\", product1.getString(\"productId\")));\n assertNotEmpty(\"Accounting transaction entries not found for product \" + product1, entries1);\n for (GenericValue entry : entries1) {\n assertAccountingTagsEqual(entry, tags1);\n }\n \n List<GenericValue> entries2 = delegator.findByAnd(\"AcctgTransEntry\", UtilMisc.toMap(\"productId\", product2.getString(\"productId\")));\n assertNotEmpty(\"Accounting transaction entries not found for product \" + product2, entries2);\n for (GenericValue entry : entries2) {\n assertAccountingTagsEqual(entry, tags2);\n }\n \n List<GenericValue> entries3 = delegator.findByAnd(\"AcctgTransEntry\", UtilMisc.toMap(\"productId\", product3.getString(\"productId\")));\n assertNotEmpty(\"Accounting transaction entries not found for product \" + product3, entries3);\n for (GenericValue entry : entries3) {\n assertAccountingTagsEqual(entry, tags3);\n }\n }",
"@Test(priority = 99)\n public void testDelete() {\n System.out.println(\"delete\");\n\n Truck expResult = truck.delete(TRUCK_ID);\n\n assertEquals(TRUCK_ID, expResult.getTruckId());\n assertEquals(\"Test\", expResult.getUpdtGuiUser());\n }",
"protected void okToDelete() \n throws RefAssertionException { }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getHttpHeader method, of class HttpResponse. | @Test
public void testGetHttpHeader() {
System.out.println("getHttpHeader");
String expResult = null;
String result = instance.getHttpHeader();
assertEquals(expResult, result);
} | [
"@Test\n\tpublic void verifyHeader() {\n\t\t\tHeaders head = response.getHeaders();\n\t\t\tAssert.assertEquals(head.getValues(\"Content-Type\").toString(), \"[application/json; charset=utf-8]\");\n\t\t}",
"@Test\r\n public void testHasHttpHeader() {\r\n System.out.println(\"hasHttpHeader\");\r\n boolean b = false;\r\n instance.hasHttpHeader(b);\r\n }",
"public String getHttpHeader() {\n return this.httpHeader;\n }",
"public String getHttpHeader() {\n return httpHeader;\n }",
"@Test\r\n public void testGetHeaderValue()\r\n {\r\n Map<String, Collection<String>> headerValues = New.map();\r\n headerValues.put(\"headeR\", New.list(\"headerValue\"));\r\n headerValues.put(\"header2\", New.list(\"header2Value1\", \"header2Value2\"));\r\n headerValues.put(\"Content-Type\", New.list(\"ct\"));\r\n\r\n ResponseValues response = new ResponseValues();\r\n response.setHeader(headerValues);\r\n\r\n assertEquals(\"headerValue\", response.getHeaderValue(\"Header\"));\r\n assertEquals(\"header2Value1,header2Value2\", response.getHeaderValue(\"header2\"));\r\n assertEquals(\"ct\", response.getContentType());\r\n\r\n assertNull(response.getHeaderValue(\"header3\"));\r\n }",
"public void testGetHeader() {\n Map<String, String> map = context.getHeader();\n assertTrue(\"The header does not contain a set value\", \"text/html\"\n .equals(map.get(\"Content-Type\")));\n doTestReadMap(map, String.class, String.class, \"header map\");\n }",
"public void testBasicOperation() throws IOException,HttpException\n {\n final String testUnchanged=\"TestUnchanged\";\n final String testReplaced=\"TestReplaced\";\n final String testSingleValued=\"TestSingleValued\";\n final String testMultiValued=\"TestMultiValued\";\n final String[] values={\"Value1\",\"Value2\"};\n\n SetResponseHeadersHandler shh=new SetResponseHeadersHandler();\n shh.setHeaderValue(testReplaced,testReplaced);\n shh.setHeaderValue(testSingleValued,testSingleValued);\n shh.setHeaderValues(testMultiValued,values);\n\n HttpRequest request=new HttpRequest();\n HttpResponse response=new HttpResponse();\n response.setField(testUnchanged,testUnchanged);\n response.setField(testReplaced,\"Will be replaced by: \" + testReplaced);\n assertEquals(\"Header size not as expected.\",\n 2,response.getHeader().size());\n\n shh.handle(\"\",\"\",request,response);\n\n assertEquals(testUnchanged,\n testUnchanged,response.getField(testUnchanged));\n assertEquals(testReplaced,\n testReplaced,response.getField(testReplaced));\n assertEquals(testSingleValued,\n testSingleValued,response.getField(testSingleValued));\n\n Enumeration ve=response.getFieldValues(testMultiValued);\n assertNotNull(testMultiValued,ve);\n for (int i=0;i<values.length;i++)\n {\n assertTrue(testMultiValued+\" Empty on \"+i,ve.hasMoreElements());\n String v=(String)ve.nextElement();\n assertEquals(testMultiValued+\" values[\"+i+\"]\",values[i],v);\n }\n assertTrue(testMultiValued+\" Too many values\",!ve.hasMoreElements());\n }",
"String getResponseHeader(String name);",
"@Test\n public void test001() {\n System.out.println(\"---------------Printing Response Headers------------------\");\n\n }",
"@Test\n public void test304ResponseWithDateHeaderForwardedFromOriginIncludesDateHeader() throws Exception {\n\n request.setHeader(\"If-None-Match\", \"\\\"etag\\\"\");\n\n originResponse = new BasicClassicHttpResponse(HttpStatus.SC_NOT_MODIFIED,\"Not Modified\");\n originResponse.setHeader(\"Date\", DateUtils.formatStandardDate(Instant.now()));\n originResponse.setHeader(\"Server\", \"MockServer/1.0\");\n originResponse.setHeader(\"ETag\", \"\\\"etag\\\"\");\n\n Mockito.when(mockExecChain.proceed(Mockito.any(), Mockito.any())).thenReturn(originResponse);\n\n final ClassicHttpResponse result = execute(request);\n\n Assertions.assertNotNull(result.getFirstHeader(\"Date\"));\n }",
"public void testAuthorization() throws Exception {\n assertHeaderForwarded(\"Authorization\");\n }",
"public void testExpect() throws Exception {\n HttpClient client = HttpClients.createDefault();\n HttpGet request = new HttpGet(APPLICATION_PATH + \"request-headers.jsp?name=expect\");\n request.addHeader(\"Expect\", \"dummy\");\n HttpResponse response = client.execute(request);\n assertEquals(\"Expect header is not supported, should send a '417 Expectation failed'\",\n HttpStatus.SC_EXPECTATION_FAILED, response.getStatusLine().getStatusCode());\n\n }",
"@Test\n public void testEnterNamedHttpHeaderSet() {\n System.out.println(\"enterNamedHttpHeaderSet\");\n }",
"@Test\n\tpublic void checkContentType() {\n\t\tString contentype = response.header(\"content-type\");\n\t\tSystem.out.println(\"Content type is:-\" + contentype);\n\t\tAssert.assertEquals(contentype, \"application/json; charset=utf-8\");\n\n\t}",
"@Test\n public void testIfModifiedSinceHeaderInThePast() throws Exception\n {\n HttpAction<HttpGet> request = get(new DefaultHttpClient(), \"/test.txt\", ifModifiedSinceHeaderNowPlusHours(-1));\n assertEquals(200, request.getResponse().getStatusLine().getStatusCode());\n assertEquals(\"SOMETHING\", request.getResponseContent());\n }",
"org.intellimate.server.proto.HttpResponse.Header getHeaders(int index);",
"IHeaderResponse getHeaderResponse();",
"@Test\n\tpublic void contentLenght() {\n\t\tString contentlength = response.header(\"Content-Length\");\n\t\t// int a =Integer.parseInt(contentlength);\n\t\t// if(Integer.parseInt(contentlength)<15000)\n\t\t// System.out.println(\"Content length is less then 1500\");\n\n\t\t Assert.assertTrue(Integer.parseInt(contentlength)<1500);\n\t\tSystem.out.println(\"Content length is less then 1500\");\n\t}",
"public void setHttpHeader(String httpHeader) {\n this.httpHeader = httpHeader;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test remove record at pos. Note: Requires swapNodes and update to be functional. | public void testRemovePos() {
// going to use value1 value2 as other keys
heap.insert(new Record(value2, value1)); // 58
heap.insert(rec2); // 16
heap.insert(rec2); // 16
heap.insert(new Record(value2, value2)); // 58
heap.insert(new Record(value1, value1)); // 74
// remove pos 1 will cause 74 to have to switch with 58
// should be the first 58 added with ID v1
// covers the siftDown case for update
assertEquals(value2, heap.remove(1).getValue());
// add another 16 and 12 (turned out to not be needed tho)
heap.insert(rec2);
heap.insert(new Record(new byte[] {12, 1, 1, 1, 1, 1, 1, -1},
value1));
// remove pos 1 causes 16 (rec2) to switch with 58, but 58 will not move
assertEquals(rec2, heap.remove(1));
assertEquals(value1, heap.remove(1).getValue()); // remove that 58 v2
// this function might not even be needed
// can't test sift upwards because unable to create un-heapified heap
} | [
"public void remove(Record r) \n\t{\n\t\tfilled--; //reduce load factor\n\t\tif (r.placement != -1){ //if r's expected position isnt null\n\t\t\tRecord newRecord = new Record(\"deleted\"); //make a new record with value \"deleted\n\t\t\tnewRecord.placement = -2; //set position to -1 (as is standard for deleted\n\t\t\tTable[r.placement] = newRecord; //puts deleted slot in table\n\t\t}\t\n\t}",
"@Test\n public void testRemove() {\n System.out.println(\"remove\");\n RecordFile instance = new RecordFile();\n \n String first = \"hello\";\n String second = \"hello 2\";\n String third = \"hello 3\";\n \n instance.write(first.getBytes(), 0);\n instance.write(second.getBytes(), 1);\n instance.write(third.getBytes(), 2);\n \n Assert.assertEquals(first, new String(instance.read(0)));\n Assert.assertEquals(second, new String(instance.read(1)));\n Assert.assertEquals(third, new String(instance.read(2)));\n \n instance.write(third.getBytes(), 1);\n \n Assert.assertEquals(first, new String(instance.read(0)));\n Assert.assertEquals(third, new String(instance.read(1)));\n Assert.assertEquals(third, new String(instance.read(2)));\n \n instance.remove(0);\n \n Assert.assertEquals(third, new String(instance.read(0)));\n Assert.assertEquals(third, new String(instance.read(1)));\n }",
"public synchronized void removeRecord(PVRecord record) {\n master.removeRecord(record);\n }",
"public void remove(int pos) {\n trackList.remove(pos - 1);\n }",
"public void remove(BlockPos pos) {\r\n\t\tstructure.remove(key(pos));\r\n\t}",
"@Test\n\tpublic void testRemove() {\n\t\ttry {\n\t\t\tVRDevice v1 = new VRDevice(\"Serial\", \"Name\", 0);\n\t\t\ts1.putOnWaitingList(v1);\n\t\t} catch (BadDeviceInformationException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\n\t\ts1.remove(null, 0);\n\n\t\tassertEquals(\"\", s1.printWaitList(null));\n\t\t\n\t\ttry {\n\t\t\tVRDevice v1 = new VRDevice(\"Serial\", \"Name\", 0);\n\t\t\ts1.putOnWaitingList(v1);\n\t\t} catch (BadDeviceInformationException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t\ts1.remove(\"n\", 0);\n\t\tassertEquals(\"\", s1.printWaitList(null));\n\t}",
"@Test\n public void testRemove_Contains() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(1);\n\n Integer item = 1;\n boolean expResult = true;\n boolean result = instance.remove(item);\n assertEquals(expResult, result);\n }",
"@Test\r\n public void testDeleteStudent() {\r\n System.out.println(\"deleteStudent\");\r\n instance.addLast(student);\r\n instance.addLast(student);\r\n instance.addLast(student2);\r\n instance.addLast(student);\r\n String reference = \"S0034522\";\r\n String type = \"ID\";\r\n instance.deleteStudent(reference, type);\r\n Node node = null;\r\n assertEquals(null, instance.searchStudentByName(reference));\r\n }",
"@Test\r\n public void testRemove_int() {\r\n System.out.println(\"remove\");\r\n int position = 0;\r\n Course instance = new Course();\r\n instance.remove(position);\r\n \r\n }",
"@Test\n public void testRemove() {\n System.out.println(\"remove\");\n Repositorio repo = new RepositorioImpl();\n Persona persona = new Persona();\n persona.setNombre(\"Ismael\");\n persona.setApellido(\"González\");\n persona.setNumeroDocumento(\"4475199\");\n repo.crear(persona);\n \n Persona personaAEliminar = (Persona) repo.buscar(persona.getId());\n assertNotNull(personaAEliminar);\n \n //eliminacion\n repo.eliminar(personaAEliminar);\n Persona personaEliminada = (Persona) repo.buscar(persona.getId());\n assertNull(personaEliminada);\n }",
"@Test\n public void testRemove_Not_Contains() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(1);\n\n Integer item = 2;\n boolean expResult = false;\n boolean result = instance.remove(item);\n assertEquals(expResult, result);\n }",
"@Test\n public void testRemove() {\n VmTemplate before = dbFacade.getVmTemplateDao().get(DELETABLE_TEMPLATE_ID);\n\n assertNotNull(before);\n\n dao.remove(DELETABLE_TEMPLATE_ID);\n\n VmTemplate after = dbFacade.getVmTemplateDao().get(DELETABLE_TEMPLATE_ID);\n\n assertNull(after);\n }",
"public void testRemove() {\n // return object that was removed\n database.addMovie(this.testMovie);\n database.addMovie(this.anotherMovie);\n assertEquals(2, database.size());\n assertTrue(database.remove(this.testMovie).equals(this.testMovie));\n assertEquals(1, database.size());\n assertFalse(database.contains(this.testMovie));\n\n // illegal argument exception\n Exception exception = null;\n try {\n database.remove(not);\n }\n catch (IllegalArgumentException e) {\n exception = e;\n }\n assertNotNull(exception);\n\n // no such element exception\n exception = null;\n try {\n database.remove(this.testMovie);\n }\n catch (NoSuchElementException e) {\n exception = e;\n }\n assertNotNull(exception);\n }",
"@Test\n public void testRemoveUser() {\n // Initializes Test Data\n Account mainTestUser1 = new Account(\"TestUser1\");\n Account mainTestUser2 = new Account(\"TestUser2\");\n Account mainTestUser3 = new Account(\"TestUser3\");\n\n // Creates Account List for expected outcome\n Vector<Account> users = new Vector<Account>();\n users.addElement(mainTestUser1);\n users.addElement(mainTestUser2);\n users.addElement(mainTestUser3);\n\n // Begins Testing\n Database testData = new Database();\n testData.setAccountList(users);\n testData.removeUser(mainTestUser2);\n\n // Checks Results; Makes sure User2 is removed\n assertNotEquals(testData.returnGroupList(), users);\n assertNotEquals(-1, testData.returnAccountList().indexOf(mainTestUser1));\n assertNotEquals(-1, testData.returnAccountList().indexOf(mainTestUser3));\n assertEquals(-1, testData.returnAccountList().indexOf(mainTestUser2));\n }",
"public void testRemoveSample() {\r\n\t\tDatabase b = new Database();\r\n\t\tSamples s= b.searchSample(\"1\");\r\n\t\tb.storage.addSample(s);\r\n\t\tb.storage.removeSample(s);\r\n\t\tassertTrue(b.storage.listSample().size()==0);\r\n\t}",
"@Test\n public void testRemove() {\n System.out.println(\"remove\");\n int index = 2;\n SinEllasList instance = new SinEllasList();\n System.out.println(\"Size: \" + instance.size());\n //eliminar con la lista vacía en una posición diferente a la primera\n assertEquals(instance.remove(index), false);\n index = 0;\n //Eliminar en la primera posición con la lista vacía\n assertEquals(instance.remove(index), false);\n //Insertamos un elemento\n instance.insert(index, 0);\n //Eliminar con un solo elemento\n assertEquals(instance.removeLast(), true);\n }",
"@Test\n\tpublic void test05Remove() {\n\t\tassertNotNull(msghome.findByMessageId(\"test1\"));\n\t\tmsghome.remove(\"test1\");\n\t\tassertNull(msghome.findByMessageId(\"test1\"));\n\n\t\tassertNotNull(msghome.findByMessageId(\"test2\"));\n\t\tmsghome.remove(\"test2\");\n\t\tassertNull(msghome.findByMessageId(\"test2\"));\n\t\t\n\t\tassertNotNull(msghome.findByMessageId(\"test3\"));\n\t\tmsghome.remove(\"test3\");\n\t\tassertNull(msghome.findByMessageId(\"test3\"));\n\t\t\n\t}",
"@Test\n public void testRemoveStore() throws Exception {\n System.out.println(\"removeStore\");\n\n transaction.begin();\n Mall mall = mallFacade.find(1L);\n transaction.commit();\n System.out.println(\"Number of stores: \" + mall.getStores().size());\n assertTrue(\"Expected three stores\", mall.getStores().size() == 3);\n transaction.begin();\n storeFacade.removeStore(mall.getStores().iterator().next());\n transaction.commit();\n assertEquals(\"Deleted one store, should be two left\", 2, mall.getStores().size());\n transaction.begin();\n assertEquals(\"Deleted one store, should be two left after find\", 2,\n mallFacade.find(1L).getStores().size());\n transaction.commit();\n }",
"@Test\r\n private void testDelete() {\r\n ClusterNodeList clusterNodeList = null;\r\n try {\r\n clusterNodeList = resource.remove(uuid);\r\n } catch (Exception e) {\r\n System.out.println(e.getMessage());\r\n clusterNodeList = null;\r\n fail();\r\n }\r\n if (clusterNodeList == null) {\r\n System.err.println(\"No matching confidence interval found\");\r\n fail();\r\n } else {\r\n System.out.println(\"testDelete() : \");\r\n System.out.println(clusterNodeList);\r\n assertTrue(clusterNodeList != null);\r\n }\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test iterator on empty list and several list | @Test
public void testIterator()
{
int counter = 0 ;
ListIterator<Integer> iter;
for (iter = empty.listIterator() ; iter.hasNext(); )
{
fail("Iterating empty list and found element") ;
}
counter = 0 ;
for (iter = several.listIterator() ; iter.hasNext(); iter.next())
counter++;
assertEquals("Iterator several count", counter, DIM);
} | [
"public void testIterator()\r\n {\r\n int counter = 0 ;\r\n ListIterator<Integer> iter;\r\n for (iter = empty.QQQlistIterator() ; iter.hasNext(); )\r\n {\r\n fail(\"Iterating empty list and found element\") ;\r\n }\r\n counter = 0 ;\r\n for (iter = several.listIterator() ; iter.hasNext(); iter.next())\r\n counter++;\r\n assertEquals(\"Iterator several count\", counter, DIM);\r\n }",
"@Test\n public void testisElementInListOfEmptyList() {\n List <Integer> list = new List<Integer>();\n assertFalse(list.isElementInList(4));\n }",
"@Test\n public void testEmptyIterator() {\n Iterator<RestaurantHours> iterator = restaurantHourService.all().iterator();\n assertFalse(iterator.hasNext());\n }",
"@Test\n public void hasNextFalseTest() {\n this.it.next();\n this.it.next();\n this.it.next();\n this.it.next();\n this.it.hasNext();\n this.it.hasNext();\n assertThat(false, is(this.it.hasNext()));\n }",
"public boolean supportsEmptyInList();",
"@Test\n public void testHasNext_End() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2));\n\n ListIterator<Integer> instance = baseList.listIterator();\n boolean expResult = false;\n instance.next();\n instance.next();\n\n boolean result = instance.hasNext();\n\n assertEquals(expResult, result);\n }",
"@Test\n public void testMyListIterator()\n {\n\t //int counter = 0;\n\t //ListIterator<Integer> iter;\n\t //for(iter = empty.list)\n }",
"public boolean supportsEmptyIterator() {\n return true;\n }",
"boolean isListRemainingEmpty();",
"private void\n check_has_data(org.jmlspecs.jmlunit.strategies.IndefiniteIterator iter,\n String call)\n {\n if (iter == null) {\n junit.framework.Assert.fail(call + \" returned null\");\n }\n if (iter.atEnd()) {\n junit.framework.Assert.fail(call + \" returned an empty iterator\");\n }\n }",
"@Test\n public void testListIterator() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n assertTrue(isEqual(instance, baseList));\n\n }",
"@Test\n public void testNonEmptyIterator() {\n restaurantHourService.add(restaurant.getId(), restaurantHours.getDay(), 1000, 3000);\n Iterator<RestaurantHours> iterator = restaurantHourService.all().iterator();\n assertTrue(iterator.hasNext());\n iterator.next();\n assertFalse(iterator.hasNext());\n }",
"@Test\n public void testIterator() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n Iterator<Integer> instance = baseList.iterator();\n assertTrue(isEqual(instance, baseList));\n\n }",
"public void testIterEnd() {\r\n list.add(\"A\");\r\n list.add(\"B\");\r\n assertTrue(iter.hasNext());\r\n iter.next();\r\n assertTrue(iter.hasNext());\r\n iter.next();\r\n assertFalse(iter.hasNext());\r\n \r\n Exception e = null;\r\n try {\r\n iter.next();\r\n }\r\n catch (Exception no) {\r\n e = no;\r\n }\r\n assertNotNull(e);\r\n assertTrue(e instanceof NoSuchElementException);\r\n }",
"@Test(expected = NoSuchElementException.class)\n public void testNext_End() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n instance.next();\n }",
"@Test\n public void testHasNext_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n boolean expResult = true;\n boolean result = instance.hasNext();\n\n assertEquals(expResult, result);\n }",
"boolean testIterator(Tester t) {\n initIterators();\n return t.checkExpect(this.l2.iterator(), \n new IListIterator<Cell>(this.l2));\n }",
"@Test\n public void testIterator_Overflow() {\n OasisList<Integer> baseList = new SegmentedOasisList<>(2, 2);\n baseList.addAll(Arrays.asList(1, 2, 6, 8, 7, 8, 90));\n\n Iterator<Integer> instance = baseList.iterator();\n assertTrue(isEqual(instance, baseList));\n\n }",
"@Test\n public void test4() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1350,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test4\");\n OrderedIterator<Object> orderedIterator0 = IteratorUtils.emptyOrderedIterator();\n assertEquals(false, orderedIterator0.hasNext());\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the embeddedFont if any. | public FontFile getEmbeddedFont() {
return font;
} | [
"public Font getFont()\r\n {\r\n return font.getValue();\r\n }",
"public Font getFont(\n )\n {return font;}",
"public Object getFont()\n {\n return font;\n }",
"public RMFont getFont() { return getParent()!=null? getParent().getFont() : null; }",
"public String getFont()\n { \n return font; \n }",
"String getFont();",
"public String getFont();",
"public Font findFont(Font f)\n {\n String representation = getRepresentation(f);\n return myFontMap.get(representation);\n }",
"public String getSoundFont() {\n\t\treturn soundFont;\n\t}",
"public Font GetFont(String name) { return FontList.get(name); }",
"private Typeface getFont() {\n Typeface fontText = Typeface.createFromAsset(SnapziApplication.getContext().getAssets(), \"fonts/GothamHTF-Book.ttf\");\n return fontText;\n }",
"public CanvasFont getFont() {\n return this.textFont;\n }",
"public FontModel getGeneralContainerFont();",
"public int getFont()\r\n\t{\r\n\t\tif (this.font > -1) {\r\n\t\t\treturn this.font;\r\n\t\t}\r\n\t\tif (getParent() != null) {\r\n\t\t\treturn getParent().getFont();\r\n\t\t}\r\n\t\treturn -1;\r\n\t}",
"@Nullable\n public SlickRenderFont getFontSave(final FontLoader.Fonts font) {\n try {\n return getFont(font);\n } catch (@Nonnull final SlickLoadFontException e) {\n return null;\n }\n }",
"public Font getFont(int elementNum) {\n System.out.println(\"List.getFont() called with no effect!\");\n return null;\n }",
"public static FontType getFont(Font font) {\r\n if (fonts.get(font) == null) {\r\n fonts.put(font, loadFont(font));\r\n }\r\n return fonts.get(font);\r\n }",
"public String getFont(String id)\n\t{\n\t\tString font = fontElementMap.get(id);\n\t\tif (font == null)\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn font;\n\t\t}\n\t}",
"public boolean isHasFont()\n {\n return hasFont;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Eliminamos lista de Clasificacion Participantes de un Concurso | public void deleteConcursoClasificacionParticipante(String oidConcurso); | [
"public List<ni.org.ics.estudios.appmovil.domain.muestreoanual.EncuestaParticipante> getListaEncuestaParticipantesSinEnviar() throws SQLException {\n Cursor encparts = null;\n List<ni.org.ics.estudios.appmovil.domain.muestreoanual.EncuestaParticipante> mEncuestaParticipantes = new ArrayList<ni.org.ics.estudios.appmovil.domain.muestreoanual.EncuestaParticipante>();\n encparts = mDb.query(true, ConstantsDB.ENC_PART_TABLE, null,\n ConstantsDB.STATUS + \"= '\" + Constants.STATUS_NOT_SUBMITTED+ \"'\", null, null, null, null, null);\n if (encparts != null && encparts.getCount() > 0) {\n encparts.moveToFirst();\n mEncuestaParticipantes.clear();\n do{\n mEncuestaParticipantes.add(crearEncuestaParticipante(encparts));\n } while (encparts.moveToNext());\n }\n encparts.close();\n return mEncuestaParticipantes;\n }",
"public ArrayList<ComentarioComp> listaComentarioNoRespondido() {\n ArrayList<ComentarioComp> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"select co.nombre, c.nombreUsuario, c.descripcion, c.fecha, c.valoracion\\n\" +\n\"from Comentarios c join Comercios co on c.id_comercio = co.id_comercio\\n\" +\n\"where id_comentario not in (select id_comentario from Respuestas r )\");\n\n while (rs.next()) {\n String nombreC = rs.getString(1);\n String nombre = rs.getString(2);\n String descripcion = rs.getString(3);\n String fecha = rs.getString(4);\n int valoracion = rs.getInt(5);\n\n ComentarioComp c = new ComentarioComp(nombreC, nombre, descripcion, fecha, valoracion);\n\n lista.add(c);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }",
"List<String> getRemovedParticipant();",
"@Override\r\n\tpublic List<Concurso> listarConcursosParticipanteInscripto(int id_participante) {\r\n\t\tConexionDB conexion_db = new ConexionDB();\r\n\t\tList<Concurso> lista = new ArrayList<Concurso>();\r\n\t\ttry (Connection connect = conexion_db.obtenerConexionBD();\r\n\t\t\t\tPreparedStatement statement = connect\r\n\t\t\t\t\t\t.prepareStatement(this.listaConcursoInscripcionAbiertaInscriptoParticipante)) {\r\n\t\t\tstatement.setInt(1, id_participante);\r\n\t\t\ttry (ResultSet rs = statement.executeQuery()) {\r\n\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\tlista.add(new Concurso(rs.getInt(\"id\"), rs.getString(\"nombre\")));\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn lista;\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tthrow new RuntimeException(\"Error al cargar la lista de concursos que se inscribio\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new RuntimeException(\"Error al cargar la lista de concursos que se inscribio\");\r\n\t\t}\r\n\t}",
"@Override\n public void deleteAllConnectathonParticipantsForSession() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"deleteAllConnectathonParticipantsForSession\");\n }\n\n for (ConnectathonParticipant cp : connectathonParticipantsDataModel().getAllItems(FacesContext.getCurrentInstance())) {\n ConnectathonParticipant cpToDelete = entityManager.find(ConnectathonParticipant.class, cp.getId());\n try {\n\n entityManager.remove(cpToDelete);\n entityManager.flush();\n\n } catch (Exception e) {\n\n StatusMessages.instance().addFromResourceBundle(StatusMessage.Severity.ERROR,\n \"gazelle.users.connectaton.participants.CannotDeleteParticipant\", cp.getFirstname(),\n cp.getLastname(), cp.getEmail());\n }\n }\n FinancialCalc.updateInvoiceIfPossible(choosenInstitutionForAdmin, TestingSession.getSelectedTestingSession(),\n entityManager);\n }",
"public void removeAllSecundario()\r\n {\r\n _secundarioList.removeAllElements();\r\n }",
"public void eliminaCircuitoRutero (){\n\t\n\tfor (OpeCircuito circuito: listaCircuitoSeleccionado){\n\t\t\n\t\tservicioRutero.eliminaCircuitoRutero(circuito.getIdCircuito(), tripulacion.getFechaOperacion() );\n\t\t\t\t\n\t\t}\n\t\n\t\n\t\n\t\n}",
"public static void EliminarCliente(String cli){\r\n ArrayList<Cliente> listaAux=new ArrayList<Cliente>();\r\n for(Cliente user: usuariosConectados){\r\n if(user.getUsuario().equals(cli)){\r\n listaAux.add(user);\r\n }\r\n }\r\n usuariosConectados.removeAll(listaAux);\r\n usuariosConectados.forEach((user) -> {\r\n user.ActualizarJList();\r\n });\r\n }",
"void addAllRemovedParticipant(List<String> removedParticipant);",
"public void eliminarDiasOcupados(){\r\n try{\r\n List<BeanDia> lstDias = sessionGestionarHorario.getLstDia();\r\n List<BeanDia> lstAux = new ArrayList();\r\n for(BeanDia dia : lstDias){\r\n if(dia.getHoras() == 0){\r\n lstAux.add(dia);\r\n }\r\n }\r\n for(BeanDia dia : lstAux){\r\n lstDias.remove(dia);\r\n }\r\n }catch(Exception e){\r\n ln_T_SFLoggerLocal.registrarLogErroresSistema(beanUsuario.getNidUsuario(), \"LOG\", CLASE, \r\n \"eliminarDiasOcupados()\", \r\n \"Error al eliminar los dias ocupados\", \r\n Utils.getStack(e));\r\n e.printStackTrace();\r\n } \r\n }",
"void removePontos(int diasPassados){\n if (_estatuto == Estatuto.SELECTION){\n\t\t\tClienteSelection cliente = new ClienteSelection();\n\t\t\t_pontos = cliente.atualizaPontos(_pontos, diasPassados);\n\t\t\t_estatuto = cliente.atualizaEstatuto();\n }\n else if (_estatuto == Estatuto.ELITE){\n\t\t\tClienteElite cliente = new ClienteElite();\n\t\t\t_pontos = cliente.atualizaPontos(_pontos, diasPassados);\n\t\t\t_estatuto = cliente.atualizaEstatuto();\n }\n }",
"public List<Participante> listadoParticipantes() {\n List<Participante> participantes = new ArrayList();\n List<Participante> lista = em.createQuery(\"Select p from Participante p\").getResultList();\n\n for (Participante participante : lista) {\n participantes.add(participante);\n }\n return Collections.unmodifiableList(participantes);\n }",
"public void emptyParticipants()\n \t{\n \t\t// get their indices\n \t\tInteger[] parts = getListOfParticipants();\n \t\tfor (int i = 0; i < parts.length; i++)\n \t\t{\n \t\t\tremoveParticipant(parts[i]);\n \t\t}\n \t}",
"void removeFromTheList(String cliente) {\n try {\n for(int x=0; x < clienteLista.size(); x++){\n //Verificar cual cliente ha salido\n if(clienteLista.elementAt(x).equals(cliente)){\n clienteLista.removeElementAt(x);\n socketLista.removeElementAt(x);\n //Mostrar mensaje en gui del cliente\n agregarMensaje(\"Ha salido: \"+ cliente);\n break;\n }\n }\n } catch (Exception e) {\n agregarMensaje(\"[RemovedException]: \"+ e.getMessage());\n }\n }",
"public List getClasificacionesParticipante();",
"public List<CommunicationIdentifierModel> getParticipantsToRemove() {\n return this.participantsToRemove;\n }",
"List<ParticipanteVO> findParticipantesAsignablesAActividad(ConsultaParticipantesVO consultaParticipantes) throws AdapterBPMException;",
"public void removeAllProveedor()\r\n {\r\n _proveedorList.removeAllElements();\r\n }",
"public ArrayList<ni.org.ics.estudios.appmovil.domain.muestreoanual.EncuestaParticipante> getListaEncuestaParticipantes(Integer codigo) throws SQLException {\n Cursor encparts = null;\n ArrayList<ni.org.ics.estudios.appmovil.domain.muestreoanual.EncuestaParticipante> mEncuestaParticipantes = new ArrayList<ni.org.ics.estudios.appmovil.domain.muestreoanual.EncuestaParticipante>();\n encparts = mDb.query(true, ConstantsDB.ENC_PART_TABLE, null,\n ConstantsDB.CODIGO + \"=\" + codigo, null, null, null, null, null);\n if (encparts != null && encparts.getCount() > 0) {\n encparts.moveToFirst();\n mEncuestaParticipantes.clear();\n do{\n mEncuestaParticipantes.add(crearEncuestaParticipante(encparts));\n } while (encparts.moveToNext());\n }\n encparts.close();\n return mEncuestaParticipantes;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getPropRef method, of class Property. | @Test
public void testGetPropRef() {
try {
System.out.println("getPropRef");
Calendar date = Calendar.getInstance();
date.set(2015, 1, 10);
Note note = new NoteImpl(1, "TEST NOTE", "DEDWARDS", new Date());
Note note2 = new NoteImpl(2, "TEST NOTE2", "DEDWARDS", new Date());
Element element = new ElementImpl("TEST", "TEST", note, "DEDWARDS", new Date());
AddressInterface address = new Address(1, "12", "Kestrel House", "1", "The Close", "1", "The Ride", "Enfield", "London", "England", "EN3 4EN", note2, "DEDWARDS", new Date());
Property instance = new Property(1, address, date.getTime(), element, element, "DEDWARDS", new Date());
assertEquals(1, instance.getPropRef());
assertEquals(false, instance.getPropRef() == 4);
} catch (RemoteException ex) {
Logger.getLogger(PropertyTest.class.getName()).log(Level.SEVERE, null, ex);
}
} | [
"PropertyReference createPropertyReference();",
"Property getProperty();",
"@Test\n public void testGetPropType() {\n try {\n System.out.println(\"getPropType\");\n Calendar date = Calendar.getInstance();\n date.set(2015, 1, 10);\n Note note = new NoteImpl(1, \"TEST NOTE\", \"DEDWARDS\", new Date());\n Note note2 = new NoteImpl(2, \"TEST NOTE2\", \"DEDWARDS\", new Date());\n Element element = new ElementImpl(\"TEST\", \"TEST\", note, \"DEDWARDS\", new Date());\n Element element2 = new ElementImpl(\"TEST2\", \"TEST2\", note, \"DEDWARDS\", new Date());\n AddressInterface address = new Address(1, \"12\", \"Kestrel House\", \"1\", \"The Close\", \"1\", \"The Ride\", \"Enfield\", \"London\", \"England\", \"EN3 4EN\", note2, \"DEDWARDS\", new Date());\n Property instance = new Property(1, address, date.getTime(), element, element, \"DEDWARDS\", new Date());\n \n assertEquals(element, instance.getPropType());\n assertEquals(false, instance.getPropType().equals(element2));\n } catch (RemoteException ex) {\n Logger.getLogger(PropertyTest.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"Object getPropertytrue();",
"ReferenceProperty createReferenceProperty();",
"@Test\n public void testGetValueFromBean() {\n System.out.println(\"getValueFromBean\");\n BeanTestA obj = new BeanTestA();\n obj.getProp1().getBeanTestC().setProp(7);\n String propertyName = \"prop1.beanTestC.prop\";\n Object expResult = 7;\n Object result = ReflectionUtil.getValueFromBean(obj, propertyName);\n assertEquals(expResult, result);\n }",
"@SuppressWarnings({ \"static-method\", \"nls\" })\n @Test\n public final void testGetProperty()\n {\n TestEasyPropertiesObject object = new TestEasyPropertiesObject();\n Assert.assertEquals(\"1.2.3\", object.getVersion());\n }",
"BuiltinPropertyRef createBuiltinPropertyRef();",
"@Test\n public void testGetPropElement() {\n try {\n System.out.println(\"getPropElement\");\n Calendar date = Calendar.getInstance();\n date.set(2015, 1, 10);\n Note note = new NoteImpl(1, \"TEST NOTE\", \"DEDWARDS\", new Date());\n Note note2 = new NoteImpl(2, \"TEST NOTE2\", \"DEDWARDS\", new Date());\n Note note3 = new NoteImpl(3, \"TEST NOTE3\", \"DEDWARDS\", new Date());\n Note note4 = new NoteImpl(4, \"TEST NOTE4\", \"DEDWARDS\", new Date());\n Element element = new ElementImpl(\"TEST\", \"TEST\", note, \"DEDWARDS\", new Date());\n Element element2 = new ElementImpl(\"RENT\", \"RENT\", note3, \"DEDWARDS\", new Date());\n ModifiedByInterface modifiedBy = new ModifiedBy(\"MODIFIED\", \"DEDWARDS\", new Date());\n AddressInterface address = new Address(1, \"12\", \"Kestrel House\", \"1\", \"The Close\", \"1\", \"The Ride\", \"Enfield\", \"London\", \"England\", \"EN3 4EN\", note2, \"DEDWARDS\", new Date());\n Property instance = new Property(1, address, date.getTime(), element, element, \"DEDWARDS\", new Date());\n PropertyElement rent = new PropertyElement(1, 1, element2, date.getTime(), true, null, 1200.00, note4, \"DEDWARDS\", new Date());\n \n assertEquals(null, instance.getPropElement(rent.getPropertyElementRef()));\n assertEquals(false, instance.hasPropElement(rent.getPropertyElementRef()));\n instance.createPropertyElement(rent, modifiedBy);\n assertEquals(rent, instance.getPropElement(rent.getPropertyElementRef()));\n assertEquals(true, instance.hasPropElement(rent.getPropertyElementRef()));\n } catch (RemoteException ex) {\n Logger.getLogger(PropertyTest.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Test\n public void testGetPropStatus() {\n try {\n System.out.println(\"getPropStatus\");\n Calendar date = Calendar.getInstance();\n date.set(2015, 1, 10);\n Note note = new NoteImpl(1, \"TEST NOTE\", \"DEDWARDS\", new Date());\n Note note2 = new NoteImpl(2, \"TEST NOTE2\", \"DEDWARDS\", new Date());\n Element element = new ElementImpl(\"TEST\", \"TEST\", note, \"DEDWARDS\", new Date());\n ModifiedByInterface modifiedBy = new ModifiedBy(\"MODIFIED\", \"DEDWARDS\", new Date());\n AddressInterface address = new Address(1, \"12\", \"Kestrel House\", \"1\", \"The Close\", \"1\", \"The Ride\", \"Enfield\", \"London\", \"England\", \"EN3 4EN\", note2, \"DEDWARDS\", new Date());\n Property instance = new Property(1, address, date.getTime(), element, element, \"DEDWARDS\", new Date());\n \n assertEquals(\"NEW\", instance.getPropStatus());\n instance.setPropStatus(\"VOID\", modifiedBy);\n assertEquals(\"VOID\", instance.getPropStatus());\n assertEquals(false, instance.getPropStatus().equals(\"NEW\"));\n } catch (RemoteException ex) {\n Logger.getLogger(PropertyTest.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Test\n public void testGetPropertyValue() {\n Document doc = getAsDOM(\"wfs?request=GetPropertyValue&version=2.0.0&typename=gsml:MappedFeature&valueReference=gml:name\");\n LOGGER.info((\"WFS GetPropertyValue response:\\n\" + (prettyString(doc))));\n assertXpathEvaluatesTo(\"GUNTHORPE FORMATION\", \"//wfs:member[1]/gml:name\", doc);\n assertXpathCount(4, \"//gml:name\", doc);\n assertXpathCount(0, \"//gsml:shape\", doc);\n assertXpathCount(0, \"//gsml:specification\", doc);\n }",
"@Test\n public void testExistsReadPropertyInClass() {\n System.out.println(\"existsReadPropertyInClass\");\n Class clazz = BeanTestA.class;\n String propertyName = \"prop1.beanTestC.propReadOnly\";\n boolean expResult = true;\n boolean result = ReflectionUtil.existsReadPropertyInClass(clazz, propertyName);\n assertEquals(expResult, result);\n }",
"protected PropertySet getRef() {\n return (PropertySet) getCheckedRef(PropertySet.class, \"propertyset\");\n }",
"public Result testGetPropertyDescriptors() {\n beanInfo.getPropertyDescriptors();\n PropertyDescriptor[] propertyDescriptors = beanInfo\n .getPropertyDescriptors();\n assertTrue(findProperty(\"property8\", propertyDescriptors));\n assertTrue(findProperty(\"class\", propertyDescriptors));\n assertEquals(propertyDescriptors.length, 2);\n return passed();\n }",
"Property getExternalProperty();",
"public Property getProperty(String property);",
"public PropertyRectangle get(OtmProperty property);",
"abstract Object getProperty(String propertyKey);",
"@Test\n public void testGetPropSubType() {\n try {\n System.out.println(\"getPropSubType\");\n Calendar date = Calendar.getInstance();\n date.set(2015, 1, 10);\n Note note = new NoteImpl(1, \"TEST NOTE\", \"DEDWARDS\", new Date());\n Note note2 = new NoteImpl(2, \"TEST NOTE2\", \"DEDWARDS\", new Date());\n Element element = new ElementImpl(\"TEST\", \"TEST\", note, \"DEDWARDS\", new Date());\n Element element2 = new ElementImpl(\"TEST2\", \"TEST2\", note, \"DEDWARDS\", new Date());\n AddressInterface address = new Address(1, \"12\", \"Kestrel House\", \"1\", \"The Close\", \"1\", \"The Ride\", \"Enfield\", \"London\", \"England\", \"EN3 4EN\", note2, \"DEDWARDS\", new Date());\n Property instance = new Property(1, address, date.getTime(), element, element, \"DEDWARDS\", new Date());\n \n assertEquals(element, instance.getPropSubType());\n assertEquals(false, instance.getPropSubType().equals(element2));\n } catch (RemoteException ex) {\n Logger.getLogger(PropertyTest.class.getName()).log(Level.SEVERE, null, ex);\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
com.mcip.orb.Stringss getRptTelNum (in string in_dpt_cde) raises (com.mcip.orb.CoException); | public java.lang.String[][] getRptTelNum (java.lang.String in_dpt_cde) throws com.mcip.orb.CoException {
return this._delegate.getRptTelNum(in_dpt_cde);
} | [
"public String getTelNo()\r\n\t{\r\n\t\treturn this.telNo;\r\n\t}",
"java.lang.String getDeptExcCd();",
"java.lang.String getSerialnumber();",
"java.lang.String getDeptReqCd();",
"public String getSjrTel() {\r\n\t\treturn sjrTel;\r\n\t}",
"public String getTelNo() {\n return telNo;\n }",
"public int getNrTelCom() {\n return nrTelCom;\n }",
"String getDnum();",
"public String getTelNo() {\n return telNo;\n }",
"public String getnTel() {\n return nTel;\n }",
"public java.lang.String getRptNo () {\n\t\treturn rptNo;\n\t}",
"java.lang.String getContactNum();",
"public String getTEL_NO() {\r\n return TEL_NO;\r\n }",
"public java.lang.String getDncDigit()\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(DNCDIGIT$14, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public java.lang.String getCustTel () {\n\t\treturn custTel;\n\t}",
"public static String getRCSePhoneNumber(CallManager cm) {\n if (sFgCall != null) {\n String number = sFgCall.getDetails().getHandle().toString().substring(4);\n if (DBG) {\n log(\"getRCSePhoneNumber(), call is \" + sFgCall\n + \"number\" + number);\n }\n if(number.startsWith(\"%2B\"))\n {\n \tnumber = \"+\" + number.substring(3);\n }\n return number;\n }\n return null;\n }",
"public Long getComTelno() {\n return comTelno;\n }",
"public com.callfire.api.data.PhoneDigit xgetDncDigit()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.callfire.api.data.PhoneDigit target = null;\n target = (com.callfire.api.data.PhoneDigit)get_store().find_element_user(DNCDIGIT$14, 0);\n return target;\n }\n }",
"private String getCpr() throws RemoteException, SQLException\n {\n boolean setter=true;\n int firstPart=0;\n int secondPart=0;\n try{\n firstPart=Integer.parseInt(cprFirstField.getText());\n secondPart=Integer.parseInt(cprSecondField.getText());\n }\n catch (NumberFormatException e)\n {\n Alert alert = new Alert(Alert.AlertType.WARNING);\n alert.setTitle(\"Invalid Input\");\n alert.setContentText(\n \"Please enter a valid cpr!\\nPlease try again!\");\n alert.showAndWait();\n setter = false;\n }\n if(cprFirstField.getText().length()!=6 && cprSecondField.getText().length()!=4)\n setter=false;\n\n String cpr=cprFirstField.getText()+cprSecondField.getText();\n for(int i=0;i<editPersonalInfoViewModel.getCustomers().size();i++)\n {\n if (!editPersonalInfoViewModel.getCustomers().get(i).equals(customer))\n if (cpr.equals(editPersonalInfoViewModel.getCustomers().get(i).getCpr_number()))\n setter = false;\n }\n if(setter)\n return cprFirstField.getText()+cprSecondField.getText();\n return null;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if this value is definitely null or undefined. | public boolean isNullOrUndef() {
checkNotPolymorphicOrUnknown();
return (flags & (NULL | UNDEF)) != 0
&& (flags & (NUM | STR | BOOL)) == 0 && num == null && str == null && object_labels == null && getters == null && setters == null;
} | [
"public boolean isPresent()\n {\n return value != null;\n }",
"public boolean hasValue() {\n\t\treturn value != null;\n\t}",
"public boolean isSetIs_null() {\n return this.is_null != null;\n }",
"boolean isNilValue();",
"boolean isNullable();",
"public boolean canBeUndefined();",
"public boolean canBeNull() {\n return true;\n }",
"public boolean isSetVal() {\n\t\treturn this.val != null;\n\t}",
"boolean getValueNull();",
"@SuppressWarnings({\"unused\"})\n public boolean exists() {\n return (val != null);\n }",
"public boolean hasBaseValue() {\n return Objects.nonNull(getBaseValue());\n }",
"public boolean hasNulls() {\n return hasNulls;\n }",
"boolean getRequiredNull();",
"public boolean isNull() {\n return originalValue == null;\n }",
"public boolean isSetValue() {\n return this.Value != null;\n }",
"public boolean nullPlusNonNullIsNull()\n throws SQLException\n {\n return true;\n }",
"public boolean isSetNullPolicy() {\r\n return nullPolicy != null;\r\n }",
"public boolean isSetValue() {\n return this.value != null;\n }",
"public boolean isMaybePresentData() {\n checkNotUnknown();\n if (isPolymorphic())\n return (flags & PRESENT_DATA) != 0;\n else\n return (flags & PRIMITIVE) != 0 || num != null || str != null || object_labels != null;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Folder__FoldersAssignment_4_4" $ANTLR start "rule__Folder__FilesAssignment_5_4" InternalData.g:1779:1: rule__Folder__FilesAssignment_5_4 : ( ruleFile ) ; | public final void rule__Folder__FilesAssignment_5_4() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalData.g:1783:1: ( ( ruleFile ) )
// InternalData.g:1784:2: ( ruleFile )
{
// InternalData.g:1784:2: ( ruleFile )
// InternalData.g:1785:3: ruleFile
{
before(grammarAccess.getFolderAccess().getFilesFileParserRuleCall_5_4_0());
pushFollow(FOLLOW_2);
ruleFile();
state._fsp--;
after(grammarAccess.getFolderAccess().getFilesFileParserRuleCall_5_4_0());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__Folder__Group_5__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalData.g:1234:1: ( ( ( rule__Folder__FilesAssignment_5_4 )* ) )\n // InternalData.g:1235:1: ( ( rule__Folder__FilesAssignment_5_4 )* )\n {\n // InternalData.g:1235:1: ( ( rule__Folder__FilesAssignment_5_4 )* )\n // InternalData.g:1236:2: ( rule__Folder__FilesAssignment_5_4 )*\n {\n before(grammarAccess.getFolderAccess().getFilesAssignment_5_4()); \n // InternalData.g:1237:2: ( rule__Folder__FilesAssignment_5_4 )*\n loop10:\n do {\n int alt10=2;\n int LA10_0 = input.LA(1);\n\n if ( (LA10_0==13) ) {\n alt10=1;\n }\n\n\n switch (alt10) {\n \tcase 1 :\n \t // InternalData.g:1237:3: rule__Folder__FilesAssignment_5_4\n \t {\n \t pushFollow(FOLLOW_11);\n \t rule__Folder__FilesAssignment_5_4();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop10;\n }\n } while (true);\n\n after(grammarAccess.getFolderAccess().getFilesAssignment_5_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__Project__FilesAssignment_5_4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalData.g:1723:1: ( ( ruleFile ) )\n // InternalData.g:1724:2: ( ruleFile )\n {\n // InternalData.g:1724:2: ( ruleFile )\n // InternalData.g:1725:3: ruleFile\n {\n before(grammarAccess.getProjectAccess().getFilesFileParserRuleCall_5_4_0()); \n pushFollow(FOLLOW_2);\n ruleFile();\n\n state._fsp--;\n\n after(grammarAccess.getProjectAccess().getFilesFileParserRuleCall_5_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__Project__FoldersAssignment_6_4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalData.g:1738:1: ( ( ruleFolder ) )\n // InternalData.g:1739:2: ( ruleFolder )\n {\n // InternalData.g:1739:2: ( ruleFolder )\n // InternalData.g:1740:3: ruleFolder\n {\n before(grammarAccess.getProjectAccess().getFoldersFolderParserRuleCall_6_4_0()); \n pushFollow(FOLLOW_2);\n ruleFolder();\n\n state._fsp--;\n\n after(grammarAccess.getProjectAccess().getFoldersFolderParserRuleCall_6_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__Project__Group_5__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalData.g:559:1: ( ( ( rule__Project__FilesAssignment_5_4 )* ) )\n // InternalData.g:560:1: ( ( rule__Project__FilesAssignment_5_4 )* )\n {\n // InternalData.g:560:1: ( ( rule__Project__FilesAssignment_5_4 )* )\n // InternalData.g:561:2: ( rule__Project__FilesAssignment_5_4 )*\n {\n before(grammarAccess.getProjectAccess().getFilesAssignment_5_4()); \n // InternalData.g:562:2: ( rule__Project__FilesAssignment_5_4 )*\n loop5:\n do {\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( (LA5_0==13) ) {\n alt5=1;\n }\n\n\n switch (alt5) {\n \tcase 1 :\n \t // InternalData.g:562:3: rule__Project__FilesAssignment_5_4\n \t {\n \t pushFollow(FOLLOW_11);\n \t rule__Project__FilesAssignment_5_4();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop5;\n }\n } while (true);\n\n after(grammarAccess.getProjectAccess().getFilesAssignment_5_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__Folder__FoldersAssignment_4_4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalData.g:1768:1: ( ( ruleFolder ) )\n // InternalData.g:1769:2: ( ruleFolder )\n {\n // InternalData.g:1769:2: ( ruleFolder )\n // InternalData.g:1770:3: ruleFolder\n {\n before(grammarAccess.getFolderAccess().getFoldersFolderParserRuleCall_4_4_0()); \n pushFollow(FOLLOW_2);\n ruleFolder();\n\n state._fsp--;\n\n after(grammarAccess.getFolderAccess().getFoldersFolderParserRuleCall_4_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__Folder__Group_5__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalData.g:1153:1: ( ( 'files' ) )\n // InternalData.g:1154:1: ( 'files' )\n {\n // InternalData.g:1154:1: ( 'files' )\n // InternalData.g:1155:2: 'files'\n {\n before(grammarAccess.getFolderAccess().getFilesKeyword_5_1()); \n match(input,18,FOLLOW_2); \n after(grammarAccess.getFolderAccess().getFilesKeyword_5_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__Directory__FileAssignment_3_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:14607:1: ( ( ( RULE_ID ) ) )\n // InternalMyDsl.g:14608:2: ( ( RULE_ID ) )\n {\n // InternalMyDsl.g:14608:2: ( ( RULE_ID ) )\n // InternalMyDsl.g:14609:3: ( RULE_ID )\n {\n before(grammarAccess.getDirectoryAccess().getFileFileCrossReference_3_1_0()); \n // InternalMyDsl.g:14610:3: ( RULE_ID )\n // InternalMyDsl.g:14611:4: RULE_ID\n {\n before(grammarAccess.getDirectoryAccess().getFileFileIDTerminalRuleCall_3_1_0_1()); \n match(input,RULE_ID,FOLLOW_2); \n after(grammarAccess.getDirectoryAccess().getFileFileIDTerminalRuleCall_3_1_0_1()); \n\n }\n\n after(grammarAccess.getDirectoryAccess().getFileFileCrossReference_3_1_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__Directory__Group_3__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:10145:1: ( ( ( rule__Directory__FileAssignment_3_1 ) ) )\n // InternalMyDsl.g:10146:1: ( ( rule__Directory__FileAssignment_3_1 ) )\n {\n // InternalMyDsl.g:10146:1: ( ( rule__Directory__FileAssignment_3_1 ) )\n // InternalMyDsl.g:10147:2: ( rule__Directory__FileAssignment_3_1 )\n {\n before(grammarAccess.getDirectoryAccess().getFileAssignment_3_1()); \n // InternalMyDsl.g:10148:2: ( rule__Directory__FileAssignment_3_1 )\n // InternalMyDsl.g:10148:3: rule__Directory__FileAssignment_3_1\n {\n pushFollow(FOLLOW_2);\n rule__Directory__FileAssignment_3_1();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getDirectoryAccess().getFileAssignment_3_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 ruleFile() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalData.g:166:2: ( ( ( rule__File__Group__0 ) ) )\n // InternalData.g:167:2: ( ( rule__File__Group__0 ) )\n {\n // InternalData.g:167:2: ( ( rule__File__Group__0 ) )\n // InternalData.g:168:3: ( rule__File__Group__0 )\n {\n before(grammarAccess.getFileAccess().getGroup()); \n // InternalData.g:169:3: ( rule__File__Group__0 )\n // InternalData.g:169:4: rule__File__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__File__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getFileAccess().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__Folder__Group_4__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalData.g:1072:1: ( ( ( rule__Folder__FoldersAssignment_4_4 )* ) )\n // InternalData.g:1073:1: ( ( rule__Folder__FoldersAssignment_4_4 )* )\n {\n // InternalData.g:1073:1: ( ( rule__Folder__FoldersAssignment_4_4 )* )\n // InternalData.g:1074:2: ( rule__Folder__FoldersAssignment_4_4 )*\n {\n before(grammarAccess.getFolderAccess().getFoldersAssignment_4_4()); \n // InternalData.g:1075:2: ( rule__Folder__FoldersAssignment_4_4 )*\n loop9:\n do {\n int alt9=2;\n int LA9_0 = input.LA(1);\n\n if ( (LA9_0==13) ) {\n alt9=1;\n }\n\n\n switch (alt9) {\n \tcase 1 :\n \t // InternalData.g:1075:3: rule__Folder__FoldersAssignment_4_4\n \t {\n \t pushFollow(FOLLOW_11);\n \t rule__Folder__FoldersAssignment_4_4();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop9;\n }\n } while (true);\n\n after(grammarAccess.getFolderAccess().getFoldersAssignment_4_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__Mediafile__Group__5__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalPlaylist.g:395:1: ( ( ( rule__Mediafile__LocationAssignment_5 ) ) )\n // InternalPlaylist.g:396:1: ( ( rule__Mediafile__LocationAssignment_5 ) )\n {\n // InternalPlaylist.g:396:1: ( ( rule__Mediafile__LocationAssignment_5 ) )\n // InternalPlaylist.g:397:2: ( rule__Mediafile__LocationAssignment_5 )\n {\n before(grammarAccess.getMediafileAccess().getLocationAssignment_5()); \n // InternalPlaylist.g:398:2: ( rule__Mediafile__LocationAssignment_5 )\n // InternalPlaylist.g:398:3: rule__Mediafile__LocationAssignment_5\n {\n pushFollow(FOLLOW_2);\n rule__Mediafile__LocationAssignment_5();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getMediafileAccess().getLocationAssignment_5()); \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__EDependencyFiles__Group_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:16154:1: ( ( ( rule__EDependencyFiles__FilesAssignment_1_1 ) ) )\n // InternalAADMParser.g:16155:1: ( ( rule__EDependencyFiles__FilesAssignment_1_1 ) )\n {\n // InternalAADMParser.g:16155:1: ( ( rule__EDependencyFiles__FilesAssignment_1_1 ) )\n // InternalAADMParser.g:16156:2: ( rule__EDependencyFiles__FilesAssignment_1_1 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getEDependencyFilesAccess().getFilesAssignment_1_1()); \n }\n // InternalAADMParser.g:16157:2: ( rule__EDependencyFiles__FilesAssignment_1_1 )\n // InternalAADMParser.g:16157:3: rule__EDependencyFiles__FilesAssignment_1_1\n {\n pushFollow(FOLLOW_2);\n rule__EDependencyFiles__FilesAssignment_1_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getEDependencyFilesAccess().getFilesAssignment_1_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__Project__Group_6__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalData.g:721:1: ( ( ( rule__Project__FoldersAssignment_6_4 )* ) )\n // InternalData.g:722:1: ( ( rule__Project__FoldersAssignment_6_4 )* )\n {\n // InternalData.g:722:1: ( ( rule__Project__FoldersAssignment_6_4 )* )\n // InternalData.g:723:2: ( rule__Project__FoldersAssignment_6_4 )*\n {\n before(grammarAccess.getProjectAccess().getFoldersAssignment_6_4()); \n // InternalData.g:724:2: ( rule__Project__FoldersAssignment_6_4 )*\n loop6:\n do {\n int alt6=2;\n int LA6_0 = input.LA(1);\n\n if ( (LA6_0==13) ) {\n alt6=1;\n }\n\n\n switch (alt6) {\n \tcase 1 :\n \t // InternalData.g:724:3: rule__Project__FoldersAssignment_6_4\n \t {\n \t pushFollow(FOLLOW_11);\n \t rule__Project__FoldersAssignment_6_4();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop6;\n }\n } while (true);\n\n after(grammarAccess.getProjectAccess().getFoldersAssignment_6_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__Project__Group_5__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalData.g:478:1: ( ( 'files' ) )\n // InternalData.g:479:1: ( 'files' )\n {\n // InternalData.g:479:1: ( 'files' )\n // InternalData.g:480:2: 'files'\n {\n before(grammarAccess.getProjectAccess().getFilesKeyword_5_1()); \n match(input,18,FOLLOW_2); \n after(grammarAccess.getProjectAccess().getFilesKeyword_5_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__TestDSL__RuleAssignment_5() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:34752:1: ( ( ruleRules ) )\n // InternalDsl.g:34753:2: ( ruleRules )\n {\n // InternalDsl.g:34753:2: ( ruleRules )\n // InternalDsl.g:34754:3: ruleRules\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getTestDSLAccess().getRuleRulesParserRuleCall_5_0()); \n }\n pushFollow(FOLLOW_2);\n ruleRules();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getTestDSLAccess().getRuleRulesParserRuleCall_5_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__Folder__NameAssignment_3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalData.g:1753:1: ( ( RULE_STRING ) )\n // InternalData.g:1754:2: ( RULE_STRING )\n {\n // InternalData.g:1754:2: ( RULE_STRING )\n // InternalData.g:1755:3: RULE_STRING\n {\n before(grammarAccess.getFolderAccess().getNameSTRINGTerminalRuleCall_3_0()); \n match(input,RULE_STRING,FOLLOW_2); \n after(grammarAccess.getFolderAccess().getNameSTRINGTerminalRuleCall_3_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__EDependencyFiles__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:16074:1: ( ( ( rule__EDependencyFiles__FilesAssignment_0 ) ) )\n // InternalAADMParser.g:16075:1: ( ( rule__EDependencyFiles__FilesAssignment_0 ) )\n {\n // InternalAADMParser.g:16075:1: ( ( rule__EDependencyFiles__FilesAssignment_0 ) )\n // InternalAADMParser.g:16076:2: ( rule__EDependencyFiles__FilesAssignment_0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getEDependencyFilesAccess().getFilesAssignment_0()); \n }\n // InternalAADMParser.g:16077:2: ( rule__EDependencyFiles__FilesAssignment_0 )\n // InternalAADMParser.g:16077:3: rule__EDependencyFiles__FilesAssignment_0\n {\n pushFollow(FOLLOW_2);\n rule__EDependencyFiles__FilesAssignment_0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getEDependencyFilesAccess().getFilesAssignment_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__File__NameAssignment_3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalData.g:1798:1: ( ( RULE_STRING ) )\n // InternalData.g:1799:2: ( RULE_STRING )\n {\n // InternalData.g:1799:2: ( RULE_STRING )\n // InternalData.g:1800:3: RULE_STRING\n {\n before(grammarAccess.getFileAccess().getNameSTRINGTerminalRuleCall_3_0()); \n match(input,RULE_STRING,FOLLOW_2); \n after(grammarAccess.getFileAccess().getNameSTRINGTerminalRuleCall_3_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__File__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalData.g:1369:1: ( ( ( rule__File__NameAssignment_3 ) ) )\n // InternalData.g:1370:1: ( ( rule__File__NameAssignment_3 ) )\n {\n // InternalData.g:1370:1: ( ( rule__File__NameAssignment_3 ) )\n // InternalData.g:1371:2: ( rule__File__NameAssignment_3 )\n {\n before(grammarAccess.getFileAccess().getNameAssignment_3()); \n // InternalData.g:1372:2: ( rule__File__NameAssignment_3 )\n // InternalData.g:1372:3: rule__File__NameAssignment_3\n {\n pushFollow(FOLLOW_2);\n rule__File__NameAssignment_3();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getFileAccess().getNameAssignment_3()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculates and gets a pixel location for the specified text render and the text cursor position. | public static Point getTextLocationAt(LwTextRender render, PosController pos)
{
if (pos.getOffset() < 0) return null;
int cl = pos.getCurrentLine();
return new Point(render.substrWidth(render.getLine(cl), 0, pos.getCurrentCol()),
cl * (render.getLineHeight() + render.getLineIndent()));
} | [
"public static Point getTextRowColAt(LwTextRender render, int x, int y)\n {\n int size = render.getTextModel().getSize();\n if (size == 0) return null;\n\n int lineHeight = render.getLineHeight();\n int lineIndent = render.getLineIndent();\n int lineNumber = (y<0)?0:(y + lineIndent)/(lineHeight + lineIndent) +\n ((y + lineIndent)%(lineHeight + lineIndent)>lineIndent?1:0) - 1;\n\n if (lineNumber >= size) return new Point (size - 1, render.getLine(size - 1).length());\n else\n if (lineNumber < 0) return new Point();\n\n if (x < 0) return new Point(lineNumber, 0);\n\n int x1 = 0, x2 = 0;\n String s = render.getLine(lineNumber);\n for(int c = 0; c < s.length(); c++)\n {\n x1 = x2;\n x2 = render.substrWidth(s, 0, c + 1);\n if (x >= x1 && x < x2) return new Point(lineNumber, c);\n }\n return new Point (lineNumber, s.length());\n }",
"public TextPosition getPosition ( ) { return _cursorPosition; }",
"int TextSetPos(int id, int x, int y);",
"public String getHitLocation(int pos);",
"public Position getTextPosition()\n {\n int hpos = getComponent().getHorizontalTextPosition();\n int vpos = getComponent().getVerticalTextPosition();\n return Position.get(hpos, vpos);\n }",
"@Generated\n @CFunction\n @ByValue\n public static native CGPoint CGContextGetTextPosition(@Nullable CGContextRef c);",
"private Point2D computeLayoutOrigin() {\n Dimension size = getSize();\n Point2D.Float origin = new Point2D.Float();\n origin.x = (size.width - textLayout.getAdvance()) / 2;\n origin.y = (size.height - textLayout.getDescent() + textLayout.getAscent()) / 2;\n return origin;\n }",
"private Point2D computeLayoutOrigin() {\n Dimension size = getSize();\n Point2D.Float origin = new Point2D.Float();\n origin.x = (float) (size.width - textLayout.getAdvance()) / 2;\n origin.y = (float) (size.height - textLayout.getDescent() + textLayout.getAscent()) / 2;\n return origin;\n }",
"private Point2D computeLayoutOrigin() {\r\n\r\n\t\tDimension size = getSize();\r\n\r\n\t\tPoint2D.Float origin = new Point2D.Float();\r\n\r\n\t\torigin.x = (float) (size.width - textLayout.getAdvance()) / 2;\r\n\t\torigin.y = (float) (size.height - textLayout.getDescent() + textLayout\r\n\t\t\t\t.getAscent()) / 2;\r\n\r\n\t\treturn origin;\r\n\t}",
"public void calculateXYPosition();",
"public int getPosition(String sourceText) {\r\n return getPosition(sourceText, 1);\r\n }",
"public static ITextPointer GetTextPositionFromPoint(ReadOnlyCollection<LineResult> lines, Point point, boolean snapToText) \r\n { \r\n int lineIndex;\r\n ITextPointer orientedPosition; \r\n\r\n Debug.Assert(lines != null && lines.Count > 0, \"Line array is empty.\");\r\n\r\n // Figure out which line is the closest to the input pixel position. \r\n lineIndex = GetLineFromPoint(lines, point, snapToText);\r\n Debug.Assert(lineIndex < lines.Count); \r\n \r\n // If no line is hit, return null oriented text position.\r\n // Otherwise hittest line content. \r\n if (lineIndex < 0)\r\n {\r\n orientedPosition = null;\r\n } \r\n else\r\n { \r\n // Get position from distance. \r\n orientedPosition = lines[lineIndex].GetTextPositionFromDistance(point.X);\r\n } \r\n\r\n return orientedPosition;\r\n }",
"@Generated\n @CFunction\n public static native void CGContextSetTextPosition(@Nullable CGContextRef c, @NFloat double x, @NFloat double y);",
"int getCursorPos();",
"int getCursorPosition();",
"public void renderText(GameText text, int _x, int _y)\n\t{\n\t\tGameImage img = text.getFontImage();\n\t\tint[] charData = text.getCharData();\n\t\t\n\t\tfor(int i = 0; i < charData.length; i++)\n\t\t{\n\t\t\tint idx = charData[i];\n\t\t\t\n\t\t\tint tu = idx % (img.getWidth() / text.getCharWidth());\n\t\t\tint tv = idx / (img.getWidth() / text.getCharWidth());\n\t\t\t\n\t\t\trenderSubImage(img, _x + i * text.getCharWidth(), _y, tu * text.getCharWidth(), tv * text.getCharHeight(), text.getCharWidth(), text.getCharHeight());\n\t\t}\n\t}",
"private int convertLocation(int x, int y) {\n\tchar[] text = _pa.getText().toCharArray();\n\tint c = 0;\n\tint curX = 0;\n\tint curY = 0;\n\n\ttry {\n\t while (curX != x || curY != y) {\n\t\tif (text[c] == '\\n') {\n\t\t curX++;\n\t\t curY = 0;\n\t\t} else {\n\t\t curY++;\n\t\t}\n\t\tc++;\n\t }\n\t} catch (ArrayIndexOutOfBoundsException oobex) {\n\t c = -1;\n\t}\n\treturn c;\n }",
"public int getPixel(int x, int y);",
"private int getOffset(final String message, final ResourceText text,\n\t\t\tfinal int line, final int column) {\n\t\tint offset = text.getOffset(line - 1) + column;\n\t\tif (isEndLineSpace(message)) {\n\t\t\tfinal byte[] content = text.getContent();\n\t\t\twhile (offset > 0 && isWhitespace(content, offset - 1)) {\n\t\t\t\toffset--;\n\t\t\t}\n\t\t} else if (isOneSpace(message)) {\n\t\t\tfinal byte[] content = text.getContent();\n\t\t\tif (isWhitespace(content, offset)) {\n\t\t\t\toffset++;\n\t\t\t}\n\t\t}\n\t\treturn offset;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true iff a call to this method can be ignored. | boolean ignoreCallsTo(IMethod method); | [
"boolean ignoreCallsFrom(IMethod method);",
"public boolean isDoNotCall() {\n return doNotCall;\n }",
"private boolean shouldIgnoreMethod(String name) {\n return ignoredMethodNames.contains(name);\n }",
"public boolean isIgnored() {\r\n return ignored && !isExtendedTarget();\r\n }",
"boolean isDisallowedCall(XAbstractFeatureCall call);",
"public boolean ignore() {\n return ignore(member);\n }",
"public boolean isExempt();",
"boolean ignoresPermission();",
"boolean isDiscouragedCall(XAbstractFeatureCall call);",
"public boolean ignore() {\n\t\tif(ignoreT<=0) return false; // if ignoreT is 0, the user gets control again\n\t\telse return true; // otherwise the user doesn't have control\n\t}",
"private boolean isIgnoredByTag(AnnotatedElement element) {\n Tag[] annotations = element.getDeclaredAnnotationsByType(Tag.class);\n\n if (annotations.length == 0 || enabledTags.isEmpty()) {\n LOGGER.info(\"Test method {} is not ignored by tag\", ((Method) element).getName());\n return false;\n }\n\n for (Tag annotation : annotations) {\n if (enabledTags.contains(annotation.value())) {\n LOGGER.info(\"Test method {} is not ignored by tag: {}\", ((Method) element).getName(), annotation.value());\n return false;\n }\n }\n LOGGER.info(\"Test method {} is ignored by tag\", ((Method) element).getName());\n return true;\n }",
"public boolean isProhibited() {\n return getFlow().isProhibited();\n }",
"protected boolean ignoreFailure() {\n return ignoreFailure;\n }",
"@SuppressWarnings(\"all\")\n private boolean isIgnored(final TestCandidate c) {\n if (c.method.getAnnotation(Ignore.class) != null)\n return true;\n \n final HashMap<Class<? extends Annotation>,RuntimeTestGroup> testGroups = \n RandomizedContext.current().getTestGroups();\n \n // Check if any of the test's annotations is a TestGroup. If so, check if it's disabled\n // and ignore test if so.\n for (AnnotatedElement element : Arrays.asList(c.method, suiteClass)) {\n for (Annotation ann : element.getAnnotations()) {\n RuntimeTestGroup g = testGroups.get(ann.annotationType());\n if (g != null && !g.isEnabled()) {\n // Ignore this test.\n return true;\n }\n }\n }\n \n return false;\n }",
"public boolean isSleepingIgnored ( ) {\n\t\treturn extract ( handle -> handle.isSleepingIgnored ( ) );\n\t}",
"public boolean isNoteworthy() {\n return getResultValue() != ResultValue.OK || recentlyChanged() || changedSinceTag();\n }",
"public boolean isIgnored() {\n NodeMonitor m = ComputerSet.getMonitors().get(this);\n return m == null || m.isIgnored();\n }",
"boolean isExcluded();",
"public boolean isInhibited() {\n return inhibited;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds given pack to the database. | static void installPack(final Activity activity, int packId) {
FirebaseFirestore.getInstance().collection(Constants.COLLECTION_PACKS).document(String.valueOf(packId))
.get()
.addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {
@Override
public void onComplete(@NonNull Task<DocumentSnapshot> task) {
if (task.isSuccessful()) {
DocumentSnapshot document = task.getResult();
if (document != null && document.exists()) {
try {
new PacksDao().addPack(activity,
new Pack(Integer.parseInt(document.getId()),
Integer.parseInt(document.get(Constants.FIELD_CATEGORY_ID).toString()),
true));
String topicIds = document.get(Constants.FIELD_TOPIC_IDS).toString();
savePackContents(activity,
topicIds.split(Constants.TOPIC_ID_LIST_SEPARATOR),
Constants.SHPREFS_PACKS_UPDATE);
} catch (NumberFormatException e) {
Log.e(TAG, "Invalid ID! Pack " + document.getId());
}
} else {
Log.e(TAG, "Pack not found");
}
} else {
Log.w(TAG, "Error getting pack: ", task.getException());
}
}
});
} | [
"public void addPackage(Package pack)\n\t{\n\t\tif(!(this.packages.contains(pack)))\n\t\t\t(this.packages).add(pack);\n\t}",
"public void insertPack(packagee p) \r\n {\r\n packagee[] temp = new packagee[pack.length + 1];\r\n //System.arraycopy(pack, 0, temp, 0, pack.length);\r\n for (int i = 0; i < pack.length; i++)\r\n {\r\n temp[i] = pack[i];\r\n }\r\n temp[pack.length] = p;\r\n pack = temp;\r\n }",
"private void addPackages(String pack) {\n if (!nodes.containsKey(pack)) {\n String sup;\n String sub;\n\n if (pack.lastIndexOf('.') > -1) {\n sup = pack.substring(0, pack.lastIndexOf('.'));\n sub = pack.substring(pack.lastIndexOf('.') + 1);\n addPackages(sup);\n } else {\n sup = \"\";\n sub = pack;\n }\n DefaultMutableTreeNode parent = (DefaultMutableTreeNode) nodes.get(sup);\n DefaultMutableTreeNode node = new DefaultMutableTreeNode(sub);\n insertInto(node, parent);\n nodes.put(pack, node);\n }\n }",
"public void addLifePack(LifePack pack) {\n\n//// Removes expired life packs\n\n ListIterator iter = lifePacks.listIterator();\n\n while (iter.hasNext()) {\n LifePack lp = (LifePack) iter.next();\n\n if (!lp.isAvailable()) {\n iter.remove();\n }\n }\n////\n\n\n lifePacks.add(pack);\n\n }",
"public void addCoinPack(CoinPack coinPack) {\n\n ListIterator iter = coinPacks.listIterator();\n\n //remove expired/taken coin packs\n while (iter.hasNext()) {\n CoinPack cp = (CoinPack) iter.next();\n\n if (!cp.isAvailable()) {\n iter.remove();\n }\n }\n\n coinPacks.add(coinPack);\n\n\n }",
"public int createPack(String name)\n {\n dbObj=new dbFlashCards(userId);\n if(dbObj.packExists(name)!=-1)\n return -1;\n else\n {\n //no such pack exists ..creates a new pack and returns its packid\n return dbObj.addPack(name);\n \n }\n \n }",
"public Package add(Package paquete) {\r\n\t\tSession session = HibernateUtil.createSessionFactory();\r\n\t\tsession.beginTransaction();\r\n\t\tsession.save(paquete);\r\n\t\tsession.getTransaction().commit();\r\n\t\tsession.close();\r\n\t\treturn paquete;\r\n\t}",
"void addBin(Bin<T> bin);",
"IDatabase addDatabase(final IDatabase database);",
"Pack(Bouquet bouquet)\n {\n this.bouquet = bouquet;\n }",
"gov.nih.nlm.ncbi.www.Blast4DatabaseDocument.Blast4Database addNewBlast4Database();",
"private void addSeatToDatabase(Seat seat) throws SQLException {\n\n\t\tseatdb.storeToDatabase(seat);\n\t}",
"private void addToBag1(GridSquare.Type id, GridSquare.Type N, GridSquare.Type E, GridSquare.Type S, GridSquare.Type W) {\r\n\t\tbag1.add(new PieceTile(new GridSquare(id), new GridSquare[] {\r\n\t\t\t\tnew GridSquare(N),\r\n\t\t\t\tnew GridSquare(E),\r\n\t\t\t\tnew GridSquare(S),\r\n\t\t\t\tnew GridSquare(W)\r\n\t\t}));\r\n\t}",
"@Override\n public void addTag(Tag tag, int bookId) {\n Connection connection = connect();\n try {\n int tagId = addTagStatement(connection, tag);\n insertIntoBookTagMappingTable(connection, bookId, tagId);\n } catch (SQLException e) {\n //System.err.println(e.getMessage());\n } finally {\n closeConnection(connection);\n }\n }",
"@Override\n public void addBook(Book book) {\n\n DataSource source = new DataSource();\n Connection connection = source.getConnection();\n PreparedStatement statement = null;\n final String insert = \"INSERT INTO BOOK VALUES(? , ? , ? , ? , ? , ? , ?)\";\n\n\n try{\n\n statement = connection.prepareStatement(insert);\n statement.setString(1 , book.getName());\n statement.setString(2 , book.getDescription());\n statement.setString(3 , book.getAuthor());\n statement.setString(4 , book.getCategory());\n statement.setString(5 , book.getPublisher());\n statement.setInt(6 , book.getInStock());\n statement.setString(7 , book.getPrice());\n statement.executeUpdate();\n\n System.out.println(\"new Book added to the database\");\n\n }catch (SQLException e){\n e.printStackTrace();\n }\n finally {\n\n try {\n\n if (connection != null) {\n connection.close();\n }\n }catch (SQLException e){\n e.printStackTrace();\n }\n }\n\n }",
"public void addTuple(Tuple tup) {\n table.add(tup);\n }",
"public void pushIntoDb(String table, String date, String time, BigDecimal stockprice, int sellpercent,\r\n\t\t\tint holdpercent, int buypercent) {\n\t\tquery = \"INSERT INTO `\" + table\r\n\t\t\t\t+ \"` (`date`, `time`, `stockprice`, `sellpercent`, `holdpercent`, `buypercent`) VALUES ('\" + date\r\n\t\t\t\t+ \"', '\" + time + \"', '\" + stockprice + \"', '\" + sellpercent + \"', '\" + holdpercent + \"', '\"\r\n\t\t\t\t+ buypercent + \"')\";\r\n\r\n\t\t// Dateneintrag ausführen\r\n\t\ttry {\r\n\t\t\tstmt.executeUpdate(query);\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void insertIntoProduct() {\n\t\ttry {\n\t\t\tPreparedStatement statement = connect.prepareStatement(addProduct);\n\t\t\tstatement.setString(1, productName);\n\t\t\tstatement.setString(2, quantity);\n\t\t\t\n\t\t\tstatement.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}",
"public void addTag(Tag tag) {\r\n\t\ttry {\r\n\t\t\t//edit Tag table\r\n\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(\"insert into Tag(TagName,NumPosts) values (?, ? )\");\r\n\t\t\tpreparedStatement.setString(1, tag.getTagName());\r\n\t\t\tpreparedStatement.setInt(2, tag.getNumPosts());\r\n\t\t\t\r\n\t\t\tpreparedStatement.executeUpdate();\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Moves the turtle forward the given number of steps. The methods blocks until the turtle is at the final position. The actual distance depends on the "TurtleStepFactor" as defined in the nxtlib.properties file. The turtle speed corresponds to the "TurtleSpeed" as defined in the nxtlib.properties file. | public TurtleRobot forward(int steps)
{
if (isReleased)
return this;
if (tp != null)
tp.println(id + "forward(" + steps + ")");
gear.moveTo(Tools.round(stepFactor * steps));
return this;
} | [
"public void forward(int numSteps);",
"void move(int steps);",
"public void forward(int step) {\n setPosition(getPosition() + step);\n }",
"public void moveForward (double distance) {\r\n\t\t\r\n\t\tdouble random_distance = Math.random()*2*distance; //random distance lottery\r\n\t\tint random_degrees = (int) ((Math.random()*60) -30); //Random degrees lottery\r\n\t\t\r\n\t\t//for positive degrees the turtle turns left\r\n\t\tif (random_degrees > 0) {\r\n\t\t\tsuper.turnLeft(random_degrees);\r\n\t\t\t\r\n\t\t//for negative degrees the turtle turns right\r\n\t\t} else {\r\n\t\t\tsuper.turnRight(random_degrees);\r\n\t\t}\r\n\t\t\r\n\t\t//by the saved word 'super' we call to 'moveForward' function in 'SimpleTurtle' class from that we inherit her\r\n\t\tsuper.moveForward(random_distance);\r\n\t}",
"public void stepForward() {\n if (currentStep < brewRecipe.getNumberOfSteps()) {\n synchronized(this) {\n currentStep += 1;\n stepOffsetSec = 0L;\n currentState = 1;\n brewframe.setPump(\"OFF\");\n brewframe.setHeater(\"OFF\");\n if (currentStep < brewRecipe.getNumberOfSteps()) {\n brewframe.setStepsinFrame(currentStep - 1);\n }\n } \n } \n }",
"public void setTurtleStep(int step)\n\t{\n\t\tturt.setStepLength(step);\n\t\trepaint();\n\t}",
"public void moveForward() {\n m_robot.motorLeft.setSpeed(Robot.CRUISE_SPEED);\n m_robot.motorRight.setSpeed(Robot.CRUISE_SPEED);\n\n double oldTheta = m_Odometer.getThetaInDegrees();\n\n if (oldTheta >= -45 && oldTheta <= 45) {\n travelTo(m_Odometer.getX()+ Robot.tileLength, m_Odometer.getY());\n }\n else if (oldTheta >= 45 && oldTheta <= 135) {\n travelTo(m_Odometer.getX(), m_Odometer.getY() + Robot.tileLength);\n }\n else if (oldTheta >= -135 && oldTheta <= -45) {\n travelTo(m_Odometer.getX(), m_Odometer.getY() - Robot.tileLength);\n }\n else if (oldTheta >= 135 || oldTheta <= -135) {\n travelTo(m_Odometer.getX()- Robot.tileLength, m_Odometer.getY());\n }\n }",
"public void forward( double speed, double numSeconds)\n {\n assert scribblerConnected() : \"Scribbler not connected\";\n assert -1.0 <= speed && speed <= 1.0 : \"speed not between -1.0 and 1.0\";\n assert numSeconds >= 0.0 : \"numSeconds not >= 0.0\";\n\n move( speed, 0.0 );\n MyroUtils.sleep( numSeconds );\n stop();\n }",
"Boolean setStep(Double nextStep);",
"public void goForward() {\n\t\tnavigator.travelDistance(Constants.TILE_LENGTH);\n\t\tdefaultOrienteer.advance();\n\t}",
"public void step(){\n if (this.ht < maxHeight){\n this.ht = this.ht + STEP_SIZE;\n }\n else if (! this.isFinished()){\n this.radius = this.radius + GROW_SIZE;\n }\n }",
"void moveTurtle(int turtleIndex, Coordinate start, Coordinate end);",
"private void moveTowardsStep(int diffDistance) {\n if(velocity <= diffDistance || !pathfindingRoute.hasNextStep()) {\n // We will land on or just before this point. Great!\n moveGhost(direction, velocity);\n } else {\n // We're going to overshoot the point...\n // Move ghost as much as possible; up to the end of this stage\n moveGhost(direction, diffDistance);\n\n // Calculate excess distance and redirect to new direction\n int excess = velocity - diffDistance;\n Point nextStep = pathfindingRoute.getNextStep();\n DIRECTION newDirection = findDirectionOfTarget(nextStep);\n\n // Move ghost in new direction with excess momentum\n moveGhost(newDirection, excess);\n this.direction = newDirection;\n }\n }",
"private static void stepOne_waypoint() {\n moveStraightFor(-movementOffset);\n double backwardAdjustment = -movementOffset * 3.5;\n alignWithLine();\n moveStraightFor(backwardAdjustment);\n turnBy(90.0);\n moveStraightFor(-movementOffset);\n }",
"public boolean goNextStep(MoveDirection direction);",
"public void updateStep(int current){\n visualization.setProgress(current + stepsToMoveForward);\n }",
"void forward(float steps) {\n _x += _rotVector.x * steps;\n _y += _rotVector.y * steps;\n }",
"public void incrementSpeed(double amount) { setCurrentSpeed(getCurrentSpeed() + speedFactor() * amount); }",
"public void advanceSimulation () {\n\t\tstep_++;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of remove method, of class BiMap. | @Test
public void testRemove() {
BiMap<Integer, String> biMap = new BiMap();
biMap.put(1, "One");
biMap.put(2, "Two");
biMap.put(3, "Three");
//remove(Key)
assertEquals("Three", biMap.remove(3));
assertEquals(2, biMap.size());
assertEquals("One", biMap.getValue(1));
assertEquals("Two", biMap.getValue(2));
assertEquals(1, (int)biMap.getKey("One"));
assertEquals(2, (int)biMap.getKey("Two"));
//KeyFromValueMap
assertEquals(2, biMap.getKeyFromValueMap().size());
assertEquals(true, biMap.getKeyFromValueMap().containsKey("One"));
assertEquals(1, (int)biMap.getKeyFromValueMap().get("One"));
assertEquals(true, biMap.getKeyFromValueMap().containsKey("Two"));
assertEquals(2, (int)biMap.getKeyFromValueMap().get("Two"));
//ValueFromKeyMap
assertEquals(2, biMap.getValueFromKeyMap().size());
assertEquals(true, biMap.getValueFromKeyMap().containsKey(1));
assertEquals("One", biMap.getValueFromKeyMap().get(1));
assertEquals(true, biMap.getValueFromKeyMap().containsKey(2));
assertEquals("Two", biMap.getValueFromKeyMap().get(2));
//remove(Key, Value)
assertEquals(false, biMap.remove(1, "Two"));
assertEquals(2, biMap.size());
assertEquals("One", biMap.getValue(1));
assertEquals(1, (int)biMap.getKey("One"));
assertEquals(true, biMap.remove(1, "One"));
assertEquals(1, biMap.size());
assertEquals(null, biMap.getValue(1));
assertEquals(null, biMap.getKey("One"));
} | [
"@Test\r\n public void testRemoveValue() {\r\n BiMap<Integer, String> biMap = new BiMap();\r\n biMap.put(1, \"One\");\r\n biMap.put(2, \"Two\");\r\n biMap.put(3, \"Three\");\r\n \r\n assertEquals(1, (int)biMap.removeValue(\"One\"));\r\n assertEquals(2, biMap.size());\r\n assertEquals(2, biMap.getKeyFromValueMap().size());\r\n assertEquals(2, biMap.getValueFromKeyMap().size());\r\n \r\n assertEquals(null, biMap.removeValue(\"One\"));\r\n assertEquals(2, biMap.size());\r\n assertEquals(2, biMap.getKeyFromValueMap().size());\r\n assertEquals(2, biMap.getValueFromKeyMap().size());\r\n \r\n assertEquals(2, (int)biMap.removeValue(\"Two\"));\r\n assertEquals(3, (int)biMap.removeValue(\"Three\"));\r\n assertEquals(true, biMap.isEmpty());\r\n assertEquals(true, biMap.getKeyFromValueMap().isEmpty());\r\n assertEquals(true, biMap.getValueFromKeyMap().isEmpty());\r\n }",
"@Test\n public void testRemove() {\n map.put(\"Hello\", \"World\");\n map.put(\"Hi\", \"World2\");\n\n configureAnswer();\n\n testObject.remove(\"Hello\");\n\n verify(helper).fireRemove(entry(\"Hello\", \"World\"));\n\n verifyNoMoreInteractions(helper);\n }",
"@Test\r\n public void testRemoveKey() {\r\n BiMap<Integer, String> biMap = new BiMap();\r\n biMap.put(1, \"One\");\r\n biMap.put(2, \"Two\");\r\n biMap.put(3, \"Three\");\r\n \r\n assertEquals(\"One\", biMap.removeKey(1));\r\n assertEquals(2, biMap.size());\r\n assertEquals(2, biMap.getKeyFromValueMap().size());\r\n assertEquals(2, biMap.getValueFromKeyMap().size());\r\n \r\n assertEquals(null, biMap.removeKey(1));\r\n assertEquals(2, biMap.size());\r\n assertEquals(2, biMap.getKeyFromValueMap().size());\r\n assertEquals(2, biMap.getValueFromKeyMap().size());\r\n \r\n assertEquals(\"Two\", biMap.removeKey(2));\r\n assertEquals(\"Three\", biMap.removeKey(3));\r\n assertEquals(true, biMap.isEmpty());\r\n assertEquals(true, biMap.getKeyFromValueMap().isEmpty());\r\n assertEquals(true, biMap.getValueFromKeyMap().isEmpty());\r\n }",
"@Test\n public void mapRemove() {\n check(MAPREM);\n query(MAPSIZE.args(MAPREM.args(MAPENTRY.args(1, 2), 1)), 0);\n }",
"@Test\n public void testRemoveFromMap() {\n //see testWriteToFileAndRemoveOrder\n }",
"@Test(timeout=1000)\n\tpublic void TestComplexRemove(){\n\t\thashmap.add(s1);\n\t\thashmap.add(s2);\n\t\thashmap.add(s3);\n\t\thashmap.add(s4);\n\t\thashmap.add(s5);\n\t\thashmap.add(s6);\n\t\thashmap.add(s7);\n\t\t\n\t\thashmap.remove(s2);\n\t\thashmap.remove(s5);\n\n\t\tassertEquals(\"An error ocurred in remove in array[0]\", s6, hashmap.getArray()[0]);\n\t\tassertEquals(\"An error ocurred in remove in array[1]\", null, hashmap.getArray()[1]);\n\t\tassertEquals(\"An error ocurred in remove in array[2]\", null, hashmap.getArray()[2]);\n\t\tassertEquals(\"An error ocurred in remove in array[3]\", s1, hashmap.getArray()[3]);\n\t\tassertEquals(\"An error ocurred in remove in array[4]\", s3, hashmap.getArray()[4]);\n\t\tassertEquals(\"An error ocurred in remove in array[5]\", s4, hashmap.getArray()[5]);\n\t\tassertEquals(\"An error ocurred in remove in array[6]\", s7, hashmap.getArray()[6]);\n\t\t\n\t\thashmap.remove(s7);\n\t\thashmap.remove(s1);\n\t\thashmap.remove(s4);\n\t\thashmap.remove(s3);\n\t\thashmap.remove(s6);\n\t\t\n\t\tfor(int i = 0; i < hashmap.getArray().length; i++){\n\t\t\tif(hashmap.getArray()[i] != null){\n\t\t\t\tfail(\"Student at position\" + i + \"was not removed\");\n\t\t\t}\n\t\t}\n\t}",
"public void testInverseRemoveItem()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkRemove(pmf,\r\n HashMap2.class,\r\n HashMap2Item.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap2.class);\r\n clean(HashMap2Item.class);\r\n }\r\n }",
"public void testNormalRemoveItem()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkRemove(pmf,\r\n HashMap1.class,\r\n ContainerItem.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap1.class);\r\n clean(ContainerItem.class);\r\n }\r\n }",
"@Test\n void testRemove() {\n HashTable table = new HashTable();\n table.put(\"key\", \"value\");\n assertNull(table.remove(\"key2\"));\n assertEquals(\"value\", table.remove(\"key\"));\n assertFalse(table.contains(\"key\"));\n assertNull(table.remove(\"key\"));\n }",
"@Test(timeout=1000)\n\tpublic void testRemoveCase(){\n\t\tStudent[] array = new Student[6];\n\t\tarray[0] = s1;\n\t\tarray[1] = s4;\n\t\tarray[2] = s5;\n\t\tarray[3] = s6;\n\t\tarray[4] = s3;\n\t\tarray[5] = s2;\n\t\thashmap.setArray(array);\t\t\n\t\thashmap.remove(s1);\n\t\tassertEquals(\"Student 5 should not be moved\", s5, hashmap.getArray()[2]);\n\t\tassertEquals(\"Student 1 was not removed\", null, hashmap.getArray()[0]);\n\t}",
"@Test\r\n public void testGetKey() {\r\n BiMap<Integer, String> biMap = new BiMap();\r\n biMap.put(1, \"One\");\r\n biMap.put(2, \"Two\");\r\n biMap.put(3, \"Three\"); \r\n assertEquals(1, (int)biMap.getKey(\"One\"));\r\n assertEquals(2, (int)biMap.getKey(\"Two\"));\r\n assertEquals(3, (int)biMap.getKey(\"Three\"));\r\n \r\n biMap.remove(1);\r\n assertEquals(null, biMap.getKey(\"One\"));\r\n }",
"@Test\r\n public void testGetValue() {\r\n BiMap<Integer, String> biMap = new BiMap();\r\n biMap.put(1, \"One\");\r\n biMap.put(2, \"Two\");\r\n biMap.put(3, \"Three\");\r\n assertEquals(\"One\", biMap.getValue(1));\r\n assertEquals(\"Two\", biMap.getValue(2));\r\n assertEquals(\"Three\", biMap.getValue(3));\r\n \r\n biMap.remove(1);\r\n assertEquals(null, biMap.getValue(1));\r\n }",
"@Test\n public void testRemove() {\n System.out.println(\"remove\");\n Object key = null;\n Relation instance = new Relation();\n Object expResult = null;\n Object result = instance.remove(key);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }",
"@Test\n public void testRemoveFromEmptyMap() {\n if (!doesMapSupportRemove()) return;\n \n Map map = createEmptyMap();\n \n TestCollectionElement oneKey = getElement(ONE_KEY);\n \n assertNull(map.remove(oneKey));\n assertEquals(0, map.size());\n assertTrue(map.isEmpty());\n }",
"@Test(timeout=1000)\n\tpublic void testWrongRemove(){\n\t\texception.expect(RuntimeException.class);\n\t\texception.reportMissingExceptionWithMessage(\"Student 7 shouldn`t be findable and therefore a RunTimeException should be thrown\");\n\t\tStudent[] array = new Student[7];\n\t\tarray[5] = s2; // This is the correct hash position of this student\n\t\tarray[6] = s4;\n\t\tarray[0] = s5;\n\t\tarray[3] = s1;\n\t\tarray[4] = s3;\n\t\tarray[2] = s7;\n\t\thashmap.setArray(array);\n\t\thashmap.remove(s7);\n\t}",
"@Test\n public void testRemove_Not_Contains() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(1);\n\n Integer item = 2;\n boolean expResult = false;\n boolean result = instance.remove(item);\n assertEquals(expResult, result);\n }",
"@Test\n public void testRemove_Contains() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(1);\n\n Integer item = 1;\n boolean expResult = true;\n boolean result = instance.remove(item);\n assertEquals(expResult, result);\n }",
"public void putRemoveTry() {\n// System.out.println(map.replace(4,\"four\"));\n// System.out.println(map);\n// System.out.println(map.replace(5, \"five\"));\n// System.out.println(map);\n\n\n System.out.println(map.remove(4));\n System.out.println(map.remove(5));\n System.out.println(map);\n System.out.println(map.remove(4, \"four\"));\n System.out.println(map.remove(3, \"three\"));\n System.out.println(map);\n }",
"@Test\n public void testDelete() throws Exception {\n map.set(\"key-1\", \"value-1\", 10);\n \n Assert.assertEquals(map.get(\"key-1\"), \"value-1\");\n \n Assert.assertTrue(map.delete(\"key-1\", 0));\n \n Assert.assertNull(map.get(\"key-1\"));\n \n Assert.assertFalse(map.delete(\"no-set-key\", 0));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses the specified file for issues. | public Issues<Issue> parse(final File file, final Charset charset, final IssueBuilder builder)
throws ParsingException, ParsingCanceledException {
try (Reader input = createReader(new FileInputStream(file), charset)) {
Issues<Issue> issues = parse(input, builder);
issues.log("Successfully parsed '%s': found %d issues (tool ID = %s)",
file.getAbsolutePath(), issues.getSize(), builder.origin);
if (issues.getDuplicatesSize() == 1) {
issues.log("Note: one issue has been dropped since it is a duplicate");
}
else if (issues.getDuplicatesSize() > 1) {
issues.log("Note: %d issues have been dropped since they are duplicates",
issues.getDuplicatesSize());
}
return issues;
}
catch (FileNotFoundException exception) {
throw new ParsingException(exception, "Can't find file: " + file.getAbsolutePath());
}
catch (IOException exception) {
throw new ParsingException(exception, "Can't scan file for issues: " + file.getAbsolutePath());
}
} | [
"@Test\n public void parseFile() throws IOException {\n Issues warnings = new AcuCobolParser().parse(openFile());\n\n assertEquals(4, warnings.size());\n\n Iterator<Issue> iterator = warnings.iterator();\n Issue annotation = iterator.next();\n checkWarning(annotation,\n 39,\n \"Imperative statement required\",\n \"COPY/zzz.CPY\",\n TYPE, DEFAULT_CATEGORY, Priority.NORMAL);\n annotation = iterator.next();\n checkWarning(annotation,\n 111,\n \"Don't run with knives\",\n \"C:/Documents and Settings/xxxx/COB/bbb.COB\",\n TYPE, DEFAULT_CATEGORY, Priority.NORMAL);\n annotation = iterator.next();\n checkWarning(annotation,\n 115,\n \"Don't run with knives\",\n \"C:/Documents and Settings/xxxx/COB/bbb.COB\",\n TYPE, DEFAULT_CATEGORY, Priority.NORMAL);\n annotation = iterator.next();\n checkWarning(annotation,\n 123,\n \"I'm a green banana\",\n \"C:/Documents and Settings/xxxx/COB/ccc.COB\",\n TYPE, DEFAULT_CATEGORY, Priority.NORMAL);\n }",
"void parseFixatdlFile(String aFilename) throws FIXatdlFormatException;",
"public String parse(File file);",
"@Test\n public void issue10566() throws IOException {\n Collection<FileAnnotation> warnings = new MsBuildParser().parse(openFile(\"issue10566.txt\"));\n\n assertEquals(WRONG_NUMBER_OF_WARNINGS_DETECTED, 1, warnings.size());\n FileAnnotation annotation = warnings.iterator().next();\n checkWarning(annotation,\n 54, \"cannot open include file: 'Header.h': No such file or directory\",\n \"..//..//..//xx_Source//file.c\", MsBuildParser.WARNING_TYPE, \"c1083\", Priority.HIGH);\n }",
"@Test\n public void issue26441() throws IOException {\n Collection<FileAnnotation> warnings = new MsBuildParser().parse(openFile(\"issue26441.txt\"));\n\n assertEquals(WRONG_NUMBER_OF_WARNINGS_DETECTED, 0, warnings.size());\n }",
"Collection<IParsingIssue> getIssues();",
"@Test\n public void issue21569() throws IOException {\n Collection<FileAnnotation> warnings = new DynamicParser(\"issue12280\",\n \"^.*: XmlDoc warning (\\\\w+): (.* type ([^\\\\s]+)\\\\..*)$\",\n \"import hudson.plugins.warnings.parser.Warning\\n\"\n + \" String fileName = matcher.group(3)\\n\"\n + \" String category = matcher.group(1)\\n\"\n + \" String message = matcher.group(2)\\n\"\n + \" return new Warning(fileName, lineNumber, \\\"Xml Doc\\\", category, message);\", TYPE, TYPE)\n .parse(openFile(\"issue12280.txt\"));\n\n assertEquals(WRONG_NUMBER_OF_WARNINGS_DETECTED, 9, warnings.size());\n\n int lineNumber = 2;\n for (FileAnnotation warning : warnings) {\n assertEquals(\"Wrong line number parsed\", lineNumber++, warning.getPrimaryLineNumber());\n }\n }",
"@Test\n public void parse() throws IOException {\n Issues inspections = new IdeaInspectionParser().parse(openFile());\n\n assertEquals(1, inspections.size());\n\n Iterator<Issue> iterator = inspections.iterator();\n Issue annotation = iterator.next();\n checkWarning(annotation,\n 42,\n \"Parameter <code>intentionallyUnusedString</code> is not used in either this method or any of its derived methods\",\n \"file://$PROJECT_DIR$/src/main/java/org/lopashev/Test.java\",\n \"Unused method parameters\",\n Priority.NORMAL);\n }",
"@Test\n public void issue12280() throws IOException {\n Collection<FileAnnotation> warnings = new DynamicParser(\"issue12280\",\n \"^.*: XmlDoc warning (\\\\w+): (.* type ([^\\\\s]+)\\\\..*)$\",\n \"import hudson.plugins.warnings.parser.Warning\\n\"\n + \" String fileName = matcher.group(3)\\n\"\n + \" String category = matcher.group(1)\\n\"\n + \" String message = matcher.group(2)\\n\"\n + \" return new Warning(fileName, 0, \\\"Xml Doc\\\", category, message);\", TYPE, TYPE)\n .parse(openFile(\"issue12280.txt\"));\n\n assertEquals(WRONG_NUMBER_OF_WARNINGS_DETECTED, 9, warnings.size());\n }",
"public static Collection<LintFailure> run(String fileToLint, FlintConfiguration config)\n throws IllegalArgumentException, ParseProblemException, Exception {\n assert (config != null);\n\n // if (doesCompile(fileToLint)) {\n RandomAccessFile inputFile = new RandomAccessFile(fileToLint, \"r\");\n Collection<LintFailure> result = config.runChecks(JavaParser.parse(new File(fileToLint)), inputFile);\n inputFile.close();\n return result;\n // } else {\n // throw new IllegalArgumentException(\"Filepath provided does not compile!\");\n // }\n }",
"List<ReportEntry> analyzeFile(Path filePath);",
"Sample parseTrackFile(File trackFile) throws FileParserException;",
"@Test\n public void testInfoParser() {\n Issues<Issue> warnings = new NagFortranParser().parse(openFile(\"NagFortranInfo.txt\"));\n\n assertSoftly(softly -> {\n softly.assertThat(warnings).hasSize(1);\n softly.assertThat(warnings).hasLowPrioritySize(1);\n\n Issue warning = warnings.get(0);\n softly.assertThat(warning)\n .hasFileName(\"C:/file1.inc\")\n .hasCategory(\"Info\")\n .hasPriority(Priority.LOW)\n .hasMessage(\"Unterminated last line of INCLUDE file\")\n .hasDescription(\"\")\n .hasPackageName(\"-\")\n .hasLineStart(1)\n .hasLineEnd(1)\n .hasColumnStart(0)\n .hasColumnEnd(0);\n });\n }",
"public MapMessage processFile(File file) {\r\n\t\ttry {\r\n\r\n\t\t\tScanner input = new Scanner(file);\r\n\r\n\t\t\twhile (input.hasNext()) {\r\n\t\t\t\tString line = input.nextLine();\r\n\t\t\t\tif (!line.isEmpty()) {\r\n\t\t\t\t\tfileContent.append(line).append(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tinput.close();\r\n\r\n\t\t} catch (FileNotFoundException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\tMapMessage mapMessage = validateMap(fileContent.toString());\r\n\t\treturn mapMessage;\r\n\t}",
"void generateScanReport(String format, IScanIssue[] issues, \r\n java.io.File file);",
"public List<Conflict> parseConflictData(String filepath)\n throws IOException {\n List<Conflict> conflicts = new LinkedList<>();\n \n try(BufferedReader reader = new BufferedReader(\n new FileReader(filepath))) {\n String line = reader.readLine();\n \n while(line != null) {\n conflicts.add(parseSingleConflict(line));\n line = reader.readLine();\n }\n }\n \n return conflicts;\n }",
"public void reportIssue(InputFile file, int lineNumber, String msg) {\n NewIssue issue = context.newIssue();\n issue.forRule(getRuleKey()).at(issue.newLocation().on(file).at(file.selectLine(lineNumber)).message(msg)).save();\n }",
"List<Player> parseFile(String fileName) throws ParserException, IOException;",
"@Test\n public void issue4932() throws IOException {\n Collection<FileAnnotation> warnings = new MsBuildParser().parse(openFile(\"issue4932.txt\"));\n\n assertEquals(WRONG_NUMBER_OF_WARNINGS_DETECTED, 2, warnings.size());\n Iterator<FileAnnotation> iterator = warnings.iterator();\n FileAnnotation annotation = iterator.next();\n checkWarning(annotation,\n 0,\n \"unresolved external symbol \\\"public:\",\n \"SynchronisationHeure.obj\",\n MsBuildParser.WARNING_TYPE, \"LNK2001\", Priority.HIGH);\n annotation = iterator.next();\n checkWarning(annotation,\n 0,\n \"1 unresolved externals\",\n \"Release/Navineo.exe\",\n MsBuildParser.WARNING_TYPE, \"LNK1120\", Priority.HIGH);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The method returns the points of player two. | public int getPlayerTwoPoints() {
if (gameStatus == null) return -1;
return gameStatus.getPlayerTwoPoints();
} | [
"public Player getP2() {\n return p2;\n }",
"public Player getPlayer2() {\n return p2;\n }",
"public int getPilotPoints(){\n\t return player.getPilot();\n }",
"public int getCurrPoints(){\n return playerPoints;\n }",
"public Point getPoint2()\r\n {\r\n return point2;\r\n }",
"public GPoint getSecondPoint(){\n return(point2);\n }",
"private int players_in(Double x1, Double y1, Double x2, Double y2) {\n //gets all online players\n Collection<? extends Player> onlinePlayers = server.getOnlinePlayers();\n\n //count number of players online in area (don't ask me how this works I have no clue)\n return (int) onlinePlayers.stream().map(Entity::getLocation).filter(\n (l) ->\n l.getX() >= x1 &&\n l.getX() <= x2 &&\n l.getY() >= y1 &&\n l.getY() <= y2)\n .count();\n }",
"public Point getP2(){\n return this.p2;\n }",
"public Two<Player> getPlayers() {\n\t\treturn this.players;\n\t}",
"public Result getResultOfSecondPlayer() {\r\n\t\treturn this.resultOfFirstPlayer.getOpposite();\r\n\t}",
"public int getFirstPlayerPoints(){\r\n\t\treturn playerFirstPoints;\r\n\t}",
"private int[] points( List<Player> players){\n int [] points ={0,0,0}; //Intially points are 0\n RankingEnum pokerHand; //Points are calculated according to the ranking of poker hand\n int pid; \n //User's pid is 0\n for(int i=0;i<players.size();i++){\n pid=i;\n //If the user is not in the current round (If user has discarded his hand at one of the stages),then there are only two players\n if(players.size()==2){\n pokerHand=players.get(pid).getRankingEnum(); //get the poker hand of the player\n pid=i+1; //increment the pid to correcty store the points of remaining players\n }\n else\n pokerHand=players.get(pid).getRankingEnum();\n \n //. Players will receive points accordingto the ranking of the hand.\n //Poker hands are assigned different points\n switch(pokerHand){\n case ROYAL_FLUSH : points[pid]+=30;break;\n case STRAIGHT_FLUSH :points[pid]+=20;break;\n case FOUR_OF_A_KIND :points[pid]+=14;break;\n case FULL_HOUSE:points[pid]+=12;break;\n case FLUSH:points[pid]+=10;break;\n case STRAIGHT:points[pid]+=8;break;\n case THREE_OF_A_KIND:points[pid]+=6;break;\n case TWO_PAIR:points[pid]+=4;break;\n case ONE_PAIR:points[pid]+=2;break;\n case HIGH_CARD:points[pid]+=1;break;\n }\n }\n return points; //return the points of each player at end of the round\n }",
"public Player getPlayer2(){\n return this.player2;\n }",
"private void points(){\n\t\tSystem.out.println(\"\\nPoints\");\n\t\tfor(int i = 0; i < Player.size(); i++){\n\t\t\tSystem.out.println(\"Player \" +(i+1)+\" points: \" + Player.get(i).getPoints());\n\t\t}\n\n\t}",
"public int getPlayerOnePoints() {\n if (gameStatus == null) return -1;\n return gameStatus.getPlayerOnePoints();\n }",
"public static Player getPlayer2() {\n return player2;\n }",
"public int getEngineerPoints(){\n\t return player.getEngineer();\n }",
"public Player getPlayer2() {\n\t\treturn player2;\n\t}",
"public int getPlayer2Score() {\n int sum = 0;\n for (int i : levelScoresPlayer2) {\n sum += i;\n }\n return sum;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests both flavors of anyOf(), because one invokes the other. | @Test
public void testAnyOf() throws Exception {
// first task completes, others do not
List<Supplier<CompletableFuture<OperationOutcome>>> tasks = new LinkedList<>();
final OperationOutcome outcome = params.makeOutcome();
tasks.add(() -> CompletableFuture.completedFuture(outcome));
tasks.add(() -> new CompletableFuture<>());
tasks.add(() -> null);
tasks.add(() -> new CompletableFuture<>());
CompletableFuture<OperationOutcome> result = oper.anyOf(tasks);
assertTrue(executor.runAll(MAX_REQUESTS));
assertTrue(result.isDone());
assertSame(outcome, result.get());
// repeat using array form
@SuppressWarnings("unchecked")
Supplier<CompletableFuture<OperationOutcome>>[] taskArray = new Supplier[tasks.size()];
result = oper.anyOf(tasks.toArray(taskArray));
assertTrue(executor.runAll(MAX_REQUESTS));
assertTrue(result.isDone());
assertSame(outcome, result.get());
// second task completes, others do not
tasks.clear();
tasks.add(() -> new CompletableFuture<>());
tasks.add(() -> CompletableFuture.completedFuture(outcome));
tasks.add(() -> new CompletableFuture<>());
result = oper.anyOf(tasks);
assertTrue(executor.runAll(MAX_REQUESTS));
assertTrue(result.isDone());
assertSame(outcome, result.get());
// third task completes, others do not
tasks.clear();
tasks.add(() -> new CompletableFuture<>());
tasks.add(() -> new CompletableFuture<>());
tasks.add(() -> CompletableFuture.completedFuture(outcome));
result = oper.anyOf(tasks);
assertTrue(executor.runAll(MAX_REQUESTS));
assertTrue(result.isDone());
assertSame(outcome, result.get());
} | [
"@Test\n\t@DisplayName(\"allMatch, anyMatch, and noneMatch example\")\n\tpublic void whenApplyMatch_thenReturnBoolean() {\n\t List<Integer> intList = Arrays.asList(2, 4, 5, 6, 8);\n\t boolean allEven = intList.stream().allMatch(i -> i % 2 == 0);\n\t boolean oneEven = intList.stream().anyMatch(i -> i % 2 == 0);\n\t boolean noneMultipleOfThree = intList.stream().noneMatch(i -> i % 3 == 0);\n\t assertEquals(allEven, false);\n\t assertEquals(oneEven, true);\n\t assertEquals(noneMultipleOfThree, false);\n\t}",
"@SafeVarargs\n public static <T> OutputMatcher<T> anyOf(OutputMatcher<T>... matchers) {\n return OutputMatcherFactory.create(AnyOf.anyOf(matchers));\n }",
"@Test\n public void whenApplyMatch_thenReturnBoolean() {\n // arrange\n List<Integer> intList = Arrays.asList(2, 4, 5, 6, 8);\n\n // act\n boolean allEven = intList.stream().allMatch(i -> i % 2 == 0);\n // allMatch() checks if the predicate is true for all the elements in the stream. Here, it returns false as soon as it encounters 5, which is not divisible by 2.\n boolean oneEven = intList.stream().anyMatch(i -> i % 2 == 0);\n // anyMatch() checks if the predicate is true for any one element in the stream. Here, again short-circuiting is applied and true is returned immediately after the first element.\n boolean noneMultipleOfThree = intList.stream().noneMatch(i -> i % 3 == 0);\n // noneMatch() checks if there are no elements matching the predicate. Here, it simply returns false as soon as it encounters 6, which is divisible by 3.\n\n // assert\n assertFalse(allEven);\n assertTrue(oneEven);\n assertFalse(noneMultipleOfThree);\n }",
"@Test\n public void allTrue() {\n assertTrue(getPredicateInstance(true, true).evaluate(getTestValue()),\n \"multiple true predicates evaluated to false\");\n assertTrue(getPredicateInstance(true, true, true).evaluate(getTestValue()),\n \"multiple true predicates evaluated to false\");\n }",
"@Test\n public void testAssertThatHamcrestCoreMatchers() {\n assertThat(\"good\", allOf(equalTo(\"good\"), startsWith(\"good\")));\n assertThat(\"good\", not(allOf(equalTo(\"bad\"), equalTo(\"good\"))));\n assertThat(\"good\", anyOf(equalTo(\"bad\"), equalTo(\"good\")));\n assertThat(7, not(CombinableMatcher.<Integer> either(equalTo(3)).or(equalTo(4))));\n assertThat(new Object(), not(sameInstance(new Object())));\n }",
"@Test\n\tpublic void testNotAMatchOfAnyKind() {\n\t\tassertFalse(s4.equals(s3));\n\t\tassertFalse(streetAddresses.contains(s4));\n\t\tassertFalse(streetAddresses.stream().anyMatch(s -> comparator.compare(s4, s) == 0));\n\t}",
"@Test\n public void testOtherFilteringStillApplied() {\n testOtherFilteringStillApplied(true);\n testOtherFilteringStillApplied(false);\n }",
"boolean isSatisfiedBy(T target);",
"public static <A, B, AA extends A, BB extends B> Option<Boolean> forAll2(final BiFunction<A, B, Boolean> f, final Iterable<AA> input1, final Iterable<BB> input2) {\r\n final Iterator<AA> enum1 = input1.iterator();\r\n final Iterator<BB> enum2 = input2.iterator();\r\n boolean enum1Moved = false, enum2Moved = false;\r\n do {\r\n enum1Moved = enum1.hasNext();\r\n enum2Moved = enum2.hasNext();\r\n if (enum1Moved && enum2Moved && !f.apply(enum1.next(), enum2.next()))\r\n return Option.toOption(false);\r\n } while (enum1Moved && enum2Moved);\r\n if (enum1Moved != enum2Moved)\r\n return Option.None();\r\n return Option.toOption(true);\r\n }",
"public void testContainsAnyRejected() throws Exception {\n \n // Permissions: COPY, Reject: COPY\n Permissions copy = Permissions.fromSet(Arrays.asList(\"ALLOW_COPY\"), true);\n assertTrue(copy.containsAnyOf(copy));\n \n // Permissions: COPY, SCREENREADERS\n Permissions copyScreenreaders = Permissions.fromSet(Arrays.asList(\"ALLOW_COPY\", \"ALLOW_SCREENREADERS\"), true);\n Permissions screenreaders = Permissions.fromSet(Arrays.asList(\"ALLOW_SCREENREADERS\"), true);\n Permissions assembly = Permissions.fromSet(Arrays.asList(\"ALLOW_ASSEMBLY\"), true);\n Permissions assemblyScreenreaders = Permissions.fromSet(Arrays.asList(\"ALLOW_ASSEMBLY\", \"ALLOW_SCREENREADERS\"), true);\n assertTrue(copyScreenreaders.containsAnyOf(copy));\n assertTrue(copyScreenreaders.containsAnyOf(screenreaders));\n assertFalse(copyScreenreaders.containsAnyOf(assembly));\n assertTrue(copyScreenreaders.containsAnyOf(assemblyScreenreaders));\n \n // Permissions: COPY, PRINTING\n Permissions copyPrinting = Permissions.fromSet(Arrays.asList(\"ALLOW_COPY\", \"ALLOW_PRINTING\"), true);\n Permissions printing = Permissions.fromSet(Arrays.asList(\"ALLOW_PRINTING\"), true);\n Permissions degradedPrinting = Permissions.fromSet(Arrays.asList(\"ALLOW_DEGRADED_PRINTING\"), true);\n assertTrue(copyPrinting.containsAnyOf(printing));\n \n // Peermissions: COPY, DEGRADED_PRINTING\n Permissions copyDegradedPrinting = Permissions.fromSet(Arrays.asList(\"ALLOW_COPY\", \"ALLOW_DEGRADED_PRINTING\"), true);\n assertTrue(copyDegradedPrinting.containsAnyOf(printing));\n assertTrue(copyDegradedPrinting.containsAnyOf(degradedPrinting));\n \n // Permissions: DEGRADED_PRINTING, PRINTING\n Permissions printingDegradedPrinting = Permissions.fromSet(Arrays.asList(\"ALLOW_PRINTING\", \"ALLOW_DEGRADED_PRINTING\"), true);\n LOG.debug(\"printingDegradedPrinting: \" + printingDegradedPrinting);\n assertTrue(printingDegradedPrinting.containsAnyOf(printing));\n assertTrue(printingDegradedPrinting.containsAnyOf(degradedPrinting));\n }",
"@Test\n\tpublic void testComparatorsForAllTypesAlias() {\n\t\t\n\t\tassertThat(true).isEqualTo(false);\n\t}",
"public boolean any(Trait... flags)\n {\n return any(traits, flags);\n }",
"static boolean any(EnumSet<Trait> traits, Trait... args)\n {\n return Arrays.stream(args).anyMatch(traits::contains);\n }",
"boolean getRequireAtLeastOneMatch();",
"boolean hasRequireAtLeastOneMatch();",
"public static <A, B, AA extends A, BB extends B> boolean forAll2(final BiFunction<A, B, Boolean> f, final Iterable<AA> input1, final Iterable<BB> input2) {\r\n final Iterator<AA> enum1 = input1.iterator();\r\n final Iterator<BB> enum2 = input2.iterator();\r\n boolean enum1Moved = false, enum2Moved = false;\r\n do {\r\n enum1Moved = enum1.hasNext();\r\n enum2Moved = enum2.hasNext();\r\n if (enum1Moved && enum2Moved && !f.apply(enum1.next(), enum2.next()))\r\n return false;\r\n } while (enum1Moved && enum2Moved);\r\n if (enum1Moved != enum2Moved)\r\n throw new IllegalArgumentException();\r\n return true;\r\n }",
"public void setMatchAny() {\n this.value = ANY;\n }",
"boolean getAny();",
"@Test\n public void testOr2(){\n or1 = factory.getOr(cons1, cons2);\n\n cons1.setValue(true);\n cons2.setValue(false);\n\n assertTrue(or1.getValue());\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/isEmpty: Determines whether the fuel tank is empty Parameters: N/A Returns: A boolean value corresponding to whether the tank is empty or not | public boolean isEmpty()
{
boolean empty;
if (fuel <= 0)
empty = true;
else
empty = false;
return(empty);
} | [
"public boolean isGasTankEmpty() {\r\n\t\tif(fuelLevel < 0.05)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"public boolean fuelIsEmpty() throws Exception;",
"public boolean isEmpty()\n {\n if (this.piggyBank.getCurrentSize() == 0)\n {\n return true;\n }\n else\n {\n return false;\n }\n }",
"public boolean isEmpty(){\n\t\treturn deck.isEmpty();\n\t}",
"public boolean isEmpty()\n{\n if (deck.size() == 0)\n {\n return true;\n }\n \n else\n {\n return false;\n }\n}",
"public boolean isEmpty()\n {\n return deck.isEmpty();\n }",
"public boolean isEmpty() {\r\n //bagEmpty = false; \r\n if (letters.size() < 7) { //== 0) {\r\n bagEmpty = true; \r\n }\r\n return bagEmpty;\r\n }",
"public boolean isEmpty() {\n return downStack.isEmpty();\n }",
"boolean isDeckEmpty();",
"public boolean isEmpty() {\n return (fifoEmpty.getBoolean());\n }",
"public boolean isEmpty(){\n return deck.isEmpty();\n }",
"public boolean deckIsEmpty(){\n return getSizeOfDeck() <= 0;\n }",
"public boolean isEmpty() {\n \treturn stack.size() == 0;\n }",
"public boolean isEmpty() \r\n\t{\r\n\t\tif (stones == 0)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"public boolean isEmpty() { return !hasData(); }",
"public boolean empty()\n {\n return deck.empty();\n }",
"public boolean isEmpty()\n {\n return (numNodes == 0);\n }",
"public boolean isEmpty() {\n boolean axesEmpty;\n synchronized (axes) {\n axesEmpty = axes.size() == 0;\n }\n boolean buttonsEmpty;\n synchronized (buttons) {\n buttonsEmpty = buttons.size() == 0;\n }\n boolean povHatsEmpty;\n synchronized (povHats) {\n povHatsEmpty = povHats.size() == 0;\n }\n return axesEmpty && buttonsEmpty && povHatsEmpty;\n }",
"public boolean isEmpty() {\n return numberOfNodes == 0;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the contact station. A "" indicates that this field is not in use. | public String getContactStation() ; | [
"public String get_station_location () {\n if (!this.on) {\n return null;\n }\n\n return this.stationLocation;\n }",
"public String get_station_name () {\n if (!this.on) {\n return null;\n }\n\n return this.stationName;\n }",
"public String getStationNumber()\n\t{\n\t\treturn getValue(ASLocation.STATIONNUMBER).toString();\n\t}",
"public String getStationNumber()\n\t{\n\t\treturn getValue(WareHouse.STATIONNUMBER).toString();\n\t}",
"public void setContactStation(String station) ;",
"public String getStationId() {\n return location.getStationId();\n }",
"public Station getStation() {\n return station;\n }",
"public java.lang.String getSzCdContactLocation()\r\n {\r\n return this._szCdContactLocation;\r\n }",
"public String getGPSDifferentialStation () {\n return GPSD_GPSStation;\n }",
"public String getFromStation();",
"public String getStationName() {\n\t\treturn stationName;\n\t}",
"public String getContactWay() {\n return contactWay;\n }",
"public String getContactStreet() {\n return contactStreet;\n }",
"public int getCurrentStation() {\n\t\treturn currentStation;\n\t}",
"public java.lang.String getStreet()\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(STREET$26, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public String getStationId() {\n return stationId;\n }",
"public org.apache.xmlbeans.XmlAnySimpleType getStationDescription()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlAnySimpleType target = null;\r\n target = (org.apache.xmlbeans.XmlAnySimpleType)get_store().find_attribute_user(STATIONDESCRIPTION$20);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target;\r\n }\r\n }",
"public java.lang.String getContact() {\n return contact;\n }",
"public int getStartStation() {\n\t\treturn startStation;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__StepGeneration__Group__3__Impl" $ANTLR start "rule__Template__Group__0" InternalDsl.g:24437:1: rule__Template__Group__0 : rule__Template__Group__0__Impl rule__Template__Group__1 ; | public final void rule__Template__Group__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDsl.g:24441:1: ( rule__Template__Group__0__Impl rule__Template__Group__1 )
// InternalDsl.g:24442:2: rule__Template__Group__0__Impl rule__Template__Group__1
{
pushFollow(FOLLOW_147);
rule__Template__Group__0__Impl();
state._fsp--;
if (state.failed) return ;
pushFollow(FOLLOW_2);
rule__Template__Group__1();
state._fsp--;
if (state.failed) return ;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__EventTemplate__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:24819:1: ( rule__EventTemplate__Group__0__Impl rule__EventTemplate__Group__1 )\n // InternalDsl.g:24820:2: rule__EventTemplate__Group__0__Impl rule__EventTemplate__Group__1\n {\n pushFollow(FOLLOW_150);\n rule__EventTemplate__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__EventTemplate__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__SetTemplate__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:24522:1: ( rule__SetTemplate__Group__0__Impl rule__SetTemplate__Group__1 )\n // InternalDsl.g:24523:2: rule__SetTemplate__Group__0__Impl rule__SetTemplate__Group__1\n {\n pushFollow(FOLLOW_18);\n rule__SetTemplate__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__SetTemplate__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__EventTemplate__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:24858:1: ( ( ( rule__EventTemplate__Group_1__0 )? ) )\n // InternalDsl.g:24859:1: ( ( rule__EventTemplate__Group_1__0 )? )\n {\n // InternalDsl.g:24859:1: ( ( rule__EventTemplate__Group_1__0 )? )\n // InternalDsl.g:24860:2: ( rule__EventTemplate__Group_1__0 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getEventTemplateAccess().getGroup_1()); \n }\n // InternalDsl.g:24861:2: ( rule__EventTemplate__Group_1__0 )?\n int alt182=2;\n int LA182_0 = input.LA(1);\n\n if ( ((LA182_0>=RULE_ID && LA182_0<=RULE_CHAR_SEQUENCE)||LA182_0==RULE_STRING||(LA182_0>=13 && LA182_0<=14)||LA182_0==61||(LA182_0>=166 && LA182_0<=168)||LA182_0==172||LA182_0==179||(LA182_0>=198 && LA182_0<=208)) ) {\n alt182=1;\n }\n switch (alt182) {\n case 1 :\n // InternalDsl.g:24861:3: rule__EventTemplate__Group_1__0\n {\n pushFollow(FOLLOW_2);\n rule__EventTemplate__Group_1__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.getEventTemplateAccess().getGroup_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__ENodeTemplateBody__Group_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:4288:1: ( rule__ENodeTemplateBody__Group_0__0__Impl rule__ENodeTemplateBody__Group_0__1 )\n // InternalAADMParser.g:4289:2: rule__ENodeTemplateBody__Group_0__0__Impl rule__ENodeTemplateBody__Group_0__1\n {\n pushFollow(FOLLOW_10);\n rule__ENodeTemplateBody__Group_0__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__ENodeTemplateBody__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__ENodeTemplate__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:4153:1: ( rule__ENodeTemplate__Group__0__Impl rule__ENodeTemplate__Group__1 )\n // InternalAADMParser.g:4154:2: rule__ENodeTemplate__Group__0__Impl rule__ENodeTemplate__Group__1\n {\n pushFollow(FOLLOW_8);\n rule__ENodeTemplate__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__ENodeTemplate__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__TgtScript__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalTest.g:283:1: ( rule__TgtScript__Group__0__Impl rule__TgtScript__Group__1 )\n // InternalTest.g:284:2: rule__TgtScript__Group__0__Impl rule__TgtScript__Group__1\n {\n pushFollow(FOLLOW_3);\n rule__TgtScript__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__TgtScript__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ENodeTemplateBody__Group_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:4315:1: ( rule__ENodeTemplateBody__Group_0__1__Impl )\n // InternalAADMParser.g:4316:2: rule__ENodeTemplateBody__Group_0__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__ENodeTemplateBody__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__EventTemplate__Group_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:24954:1: ( rule__EventTemplate__Group_1__0__Impl rule__EventTemplate__Group_1__1 )\n // InternalDsl.g:24955:2: rule__EventTemplate__Group_1__0__Impl rule__EventTemplate__Group_1__1\n {\n pushFollow(FOLLOW_140);\n rule__EventTemplate__Group_1__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__EventTemplate__Group_1__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__Transformation__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../fr.tpt.aadl.ramses.transformation.trc.xtext.ui/src-gen/fr/tpt/aadl/ramses/transformation/trc/xtext/ui/contentassist/antlr/internal/InternalTRC.g:1986:1: ( rule__Transformation__Group__0__Impl rule__Transformation__Group__1 )\n // ../fr.tpt.aadl.ramses.transformation.trc.xtext.ui/src-gen/fr/tpt/aadl/ramses/transformation/trc/xtext/ui/contentassist/antlr/internal/InternalTRC.g:1987:2: rule__Transformation__Group__0__Impl rule__Transformation__Group__1\n {\n pushFollow(FOLLOW_rule__Transformation__Group__0__Impl_in_rule__Transformation__Group__04029);\n rule__Transformation__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__Transformation__Group__1_in_rule__Transformation__Group__04032);\n rule__Transformation__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Generate__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:22308:1: ( rule__Generate__Group__0__Impl rule__Generate__Group__1 )\n // InternalDsl.g:22309:2: rule__Generate__Group__0__Impl rule__Generate__Group__1\n {\n pushFollow(FOLLOW_11);\n rule__Generate__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__Generate__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Language__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1370:1: ( rule__Language__Group__0__Impl rule__Language__Group__1 )\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1371:2: rule__Language__Group__0__Impl rule__Language__Group__1\n {\n pushFollow(FollowSets000.FOLLOW_rule__Language__Group__0__Impl_in_rule__Language__Group__02668);\n rule__Language__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FollowSets000.FOLLOW_rule__Language__Group__1_in_rule__Language__Group__02671);\n rule__Language__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Type__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:3190:1: ( rule__Type__Group__0__Impl rule__Type__Group__1 )\n // InternalMyDsl.g:3191:2: rule__Type__Group__0__Impl rule__Type__Group__1\n {\n pushFollow(FOLLOW_13);\n rule__Type__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Type__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__EventTemplate__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:24912:1: ( ( ( rule__EventTemplate__Group_3__0 )? ) )\n // InternalDsl.g:24913:1: ( ( rule__EventTemplate__Group_3__0 )? )\n {\n // InternalDsl.g:24913:1: ( ( rule__EventTemplate__Group_3__0 )? )\n // InternalDsl.g:24914:2: ( rule__EventTemplate__Group_3__0 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getEventTemplateAccess().getGroup_3()); \n }\n // InternalDsl.g:24915:2: ( rule__EventTemplate__Group_3__0 )?\n int alt183=2;\n int LA183_0 = input.LA(1);\n\n if ( (LA183_0==134) ) {\n alt183=1;\n }\n switch (alt183) {\n case 1 :\n // InternalDsl.g:24915:3: rule__EventTemplate__Group_3__0\n {\n pushFollow(FOLLOW_2);\n rule__EventTemplate__Group_3__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.getEventTemplateAccess().getGroup_3()); \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__TemplateTypeSelection__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:3666:1: ( rule__TemplateTypeSelection__Group__0__Impl rule__TemplateTypeSelection__Group__1 )\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:3667:2: rule__TemplateTypeSelection__Group__0__Impl rule__TemplateTypeSelection__Group__1\n {\n pushFollow(FOLLOW_rule__TemplateTypeSelection__Group__0__Impl_in_rule__TemplateTypeSelection__Group__07465);\n rule__TemplateTypeSelection__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__TemplateTypeSelection__Group__1_in_rule__TemplateTypeSelection__Group__07468);\n rule__TemplateTypeSelection__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__EventTemplate__Group_3__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:25008:1: ( rule__EventTemplate__Group_3__0__Impl rule__EventTemplate__Group_3__1 )\n // InternalDsl.g:25009:2: rule__EventTemplate__Group_3__0__Impl rule__EventTemplate__Group_3__1\n {\n pushFollow(FOLLOW_49);\n rule__EventTemplate__Group_3__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__EventTemplate__Group_3__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__Hello__Group__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:3310:1: ( rule__Hello__Group__0__Impl rule__Hello__Group__1 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3311:2: rule__Hello__Group__0__Impl rule__Hello__Group__1\n {\n pushFollow(FOLLOW_rule__Hello__Group__0__Impl_in_rule__Hello__Group__07199);\n rule__Hello__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__Hello__Group__1_in_rule__Hello__Group__07202);\n rule__Hello__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Template__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:24495:1: ( rule__Template__Group__2__Impl )\n // InternalDsl.g:24496:2: rule__Template__Group__2__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Template__Group__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Definition__Group_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:621:1: ( rule__Definition__Group_0__0__Impl rule__Definition__Group_0__1 )\n // InternalWh.g:622:2: rule__Definition__Group_0__0__Impl rule__Definition__Group_0__1\n {\n pushFollow(FOLLOW_10);\n rule__Definition__Group_0__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Definition__Group_0__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Definition__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:552:1: ( ( ( rule__Definition__Group_0__0 ) ) )\n // InternalWh.g:553:1: ( ( rule__Definition__Group_0__0 ) )\n {\n // InternalWh.g:553:1: ( ( rule__Definition__Group_0__0 ) )\n // InternalWh.g:554:2: ( rule__Definition__Group_0__0 )\n {\n before(grammarAccess.getDefinitionAccess().getGroup_0()); \n // InternalWh.g:555:2: ( rule__Definition__Group_0__0 )\n // InternalWh.g:555:3: rule__Definition__Group_0__0\n {\n pushFollow(FOLLOW_2);\n rule__Definition__Group_0__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getDefinitionAccess().getGroup_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 }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the accountName value. | public String accountName() {
return this.accountName;
} | [
"public String accountName() {\n return this.innerProperties() == null ? null : this.innerProperties().accountName();\n }",
"public String get_account_name(){\n\t\treturn txtDisplayed_UserAccountName.getText();\n\t}",
"public String getaccountname() {\n\n return accountname;\n }",
"public String getAccountName() {\n return accountNameField.getText().toString();\n }",
"public java.lang.String getAccountName() {\r\n return accountName;\r\n }",
"public String getAccountname()\r\n\t{\r\n\t\treturn accountname;\r\n\t}",
"public java.lang.String getNameOnAccount() {\r\n return nameOnAccount;\r\n }",
"public String getAccount() {\n return (String) getAttributeInternal(ACCOUNT);\n }",
"public java.lang.String getAccount() {\n return account;\n }",
"public String getAcctName() {\n return acctName;\n }",
"String getAccountName();",
"public String getAcctName() {\n\t\treturn acctName;\n\t}",
"public java.lang.String getAccountValue() {\n return accountValue;\n }",
"public java.lang.String getUser_account() {\r\n return user_account;\r\n }",
"public String getUseraccount() {\n return useraccount;\n }",
"public String getAccountTypeName() {\n return accountTypeName;\n }",
"public String getAccountNameCustom() {\n\t\tSystem.out.println(keypad.SelectAccountNameCustom.getText());\n\t\treturn keypad.SelectAccountNameCustom.getText();\n\t}",
"public String getaAccount() {\n return aAccount;\n }",
"@ApiModelProperty(value = \"The name of the account that the workspace user belongs to.\")\n public String getAccountName() {\n return accountName;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__ImplForm__Group_1__1__Impl" $ANTLR start "rule__ImplForm__Group_1__2" InternalDSLSAT.g:599:1: rule__ImplForm__Group_1__2 : rule__ImplForm__Group_1__2__Impl ; | public final void rule__ImplForm__Group_1__2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDSLSAT.g:603:1: ( rule__ImplForm__Group_1__2__Impl )
// InternalDSLSAT.g:604:2: rule__ImplForm__Group_1__2__Impl
{
pushFollow(FOLLOW_2);
rule__ImplForm__Group_1__2__Impl();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__ImplForm__Group_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDSLSAT.g:576:1: ( rule__ImplForm__Group_1__1__Impl rule__ImplForm__Group_1__2 )\n // InternalDSLSAT.g:577:2: rule__ImplForm__Group_1__1__Impl rule__ImplForm__Group_1__2\n {\n pushFollow(FOLLOW_5);\n rule__ImplForm__Group_1__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__ImplForm__Group_1__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__BiImplForm__Group_1__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDSLSAT.g:468:1: ( rule__BiImplForm__Group_1__2__Impl )\n // InternalDSLSAT.g:469:2: rule__BiImplForm__Group_1__2__Impl\n {\n pushFollow(FOLLOW_2);\n rule__BiImplForm__Group_1__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__OrForm__Group_1__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDSLSAT.g:738:1: ( rule__OrForm__Group_1__2__Impl )\n // InternalDSLSAT.g:739:2: rule__OrForm__Group_1__2__Impl\n {\n pushFollow(FOLLOW_2);\n rule__OrForm__Group_1__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ImplForm__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDSLSAT.g:522:1: ( rule__ImplForm__Group__1__Impl )\n // InternalDSLSAT.g:523:2: rule__ImplForm__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__ImplForm__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__OrForm__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDSLSAT.g:657:1: ( rule__OrForm__Group__1__Impl )\n // InternalDSLSAT.g:658:2: rule__OrForm__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__OrForm__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ImplForm__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDSLSAT.g:533:1: ( ( ( rule__ImplForm__Group_1__0 )* ) )\n // InternalDSLSAT.g:534:1: ( ( rule__ImplForm__Group_1__0 )* )\n {\n // InternalDSLSAT.g:534:1: ( ( rule__ImplForm__Group_1__0 )* )\n // InternalDSLSAT.g:535:2: ( rule__ImplForm__Group_1__0 )*\n {\n before(grammarAccess.getImplFormAccess().getGroup_1()); \n // InternalDSLSAT.g:536:2: ( rule__ImplForm__Group_1__0 )*\n loop4:\n do {\n int alt4=2;\n int LA4_0 = input.LA(1);\n\n if ( (LA4_0==15) ) {\n alt4=1;\n }\n\n\n switch (alt4) {\n \tcase 1 :\n \t // InternalDSLSAT.g:536:3: rule__ImplForm__Group_1__0\n \t {\n \t pushFollow(FOLLOW_7);\n \t rule__ImplForm__Group_1__0();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop4;\n }\n } while (true);\n\n after(grammarAccess.getImplFormAccess().getGroup_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void ruleImplForm() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDSLSAT.g:116:2: ( ( ( rule__ImplForm__Group__0 ) ) )\n // InternalDSLSAT.g:117:2: ( ( rule__ImplForm__Group__0 ) )\n {\n // InternalDSLSAT.g:117:2: ( ( rule__ImplForm__Group__0 ) )\n // InternalDSLSAT.g:118:3: ( rule__ImplForm__Group__0 )\n {\n before(grammarAccess.getImplFormAccess().getGroup()); \n // InternalDSLSAT.g:119:3: ( rule__ImplForm__Group__0 )\n // InternalDSLSAT.g:119:4: rule__ImplForm__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__ImplForm__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getImplFormAccess().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__AndForm__Group_1__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDSLSAT.g:873:1: ( rule__AndForm__Group_1__2__Impl )\n // InternalDSLSAT.g:874:2: rule__AndForm__Group_1__2__Impl\n {\n pushFollow(FOLLOW_2);\n rule__AndForm__Group_1__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ImplForm__Group_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDSLSAT.g:549:1: ( rule__ImplForm__Group_1__0__Impl rule__ImplForm__Group_1__1 )\n // InternalDSLSAT.g:550:2: rule__ImplForm__Group_1__0__Impl rule__ImplForm__Group_1__1\n {\n pushFollow(FOLLOW_6);\n rule__ImplForm__Group_1__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__ImplForm__Group_1__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__NandForm__Group_1__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDSLSAT.g:1008:1: ( rule__NandForm__Group_1__2__Impl )\n // InternalDSLSAT.g:1009:2: rule__NandForm__Group_1__2__Impl\n {\n pushFollow(FOLLOW_2);\n rule__NandForm__Group_1__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__BiImplForm__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDSLSAT.g:387:1: ( rule__BiImplForm__Group__1__Impl )\n // InternalDSLSAT.g:388:2: rule__BiImplForm__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__BiImplForm__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__BiImplForm__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDSLSAT.g:398:1: ( ( ( rule__BiImplForm__Group_1__0 )* ) )\n // InternalDSLSAT.g:399:1: ( ( rule__BiImplForm__Group_1__0 )* )\n {\n // InternalDSLSAT.g:399:1: ( ( rule__BiImplForm__Group_1__0 )* )\n // InternalDSLSAT.g:400:2: ( rule__BiImplForm__Group_1__0 )*\n {\n before(grammarAccess.getBiImplFormAccess().getGroup_1()); \n // InternalDSLSAT.g:401:2: ( rule__BiImplForm__Group_1__0 )*\n loop3:\n do {\n int alt3=2;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0==14) ) {\n alt3=1;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // InternalDSLSAT.g:401:3: rule__BiImplForm__Group_1__0\n \t {\n \t pushFollow(FOLLOW_4);\n \t rule__BiImplForm__Group_1__0();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n after(grammarAccess.getBiImplFormAccess().getGroup_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ImplForm__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDSLSAT.g:495:1: ( rule__ImplForm__Group__0__Impl rule__ImplForm__Group__1 )\n // InternalDSLSAT.g:496:2: rule__ImplForm__Group__0__Impl rule__ImplForm__Group__1\n {\n pushFollow(FOLLOW_6);\n rule__ImplForm__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__ImplForm__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__BiImplForm__Group_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDSLSAT.g:414:1: ( rule__BiImplForm__Group_1__0__Impl rule__BiImplForm__Group_1__1 )\n // InternalDSLSAT.g:415:2: rule__BiImplForm__Group_1__0__Impl rule__BiImplForm__Group_1__1\n {\n pushFollow(FOLLOW_3);\n rule__BiImplForm__Group_1__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__BiImplForm__Group_1__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Program__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:405:1: ( rule__Program__Group__2__Impl )\n // InternalWh.g:406:2: rule__Program__Group__2__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Program__Group__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__BiImplForm__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDSLSAT.g:360:1: ( rule__BiImplForm__Group__0__Impl rule__BiImplForm__Group__1 )\n // InternalDSLSAT.g:361:2: rule__BiImplForm__Group__0__Impl rule__BiImplForm__Group__1\n {\n pushFollow(FOLLOW_3);\n rule__BiImplForm__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__BiImplForm__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__GenDSL__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:6810:1: ( rule__GenDSL__Group__2__Impl )\n // InternalDsl.g:6811:2: rule__GenDSL__Group__2__Impl\n {\n pushFollow(FOLLOW_2);\n rule__GenDSL__Group__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Implementation__Group__2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:5085:1: ( rule__Implementation__Group__2__Impl )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:5086:2: rule__Implementation__Group__2__Impl\r\n {\r\n pushFollow(FOLLOW_rule__Implementation__Group__2__Impl_in_rule__Implementation__Group__210732);\r\n rule__Implementation__Group__2__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Definition__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:594:1: ( rule__Definition__Group__2__Impl )\n // InternalWh.g:595:2: rule__Definition__Group__2__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Definition__Group__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets up the text area | private void setupTextArea() {
courseInfo = new JTextPane();
infoScrollPane = new JScrollPane(courseInfo);
infoScrollPane.setPreferredSize(new Dimension(350, 175));
courseInfo.setEditable(false);
display.add(infoScrollPane);
} | [
"private void setUpTextArea()\n\t{\n\t\tentryArea = new TextArea(\"Enter Diary Entry here!\");\n\t\tentryArea.setMaxHeight(300);\n\t\tentryArea.setMaxWidth(600);\n\t\tcenterSubPane.setCenter(entryArea);\n\t\tentryArea.setWrapText(true);\n\t\tBorderPane.setAlignment(entryArea, Pos.CENTER);\n\t}",
"void init(RichTextArea textArea, Config config);",
"TEXTAREA createTEXTAREA();",
"public void setUpTextAreas() {\n\t\tareaText.setFocusable(false);\n\t\tperimeterText.setFocusable(false);\n\t}",
"public TextArea() {\n\t\tsuper(Document.get().createTextAreaElement());\n\t}",
"private void createTextArea() {\n if (context.getIPDAdjust() == 0.0) {\n textArea = new TextArea();\n } else {\n textArea = new TextArea(width.getStretch(), width.getShrink(),\n adjust);\n }\n }",
"public void setAreaText(String text) {\n description.setText(text);\n }",
"public void textarea()\n\t{\n\t\teditor= new JTextArea(25,10);\n\t\tFont f= new Font(\"FreeSerif\",1,20);\n\t\teditor.setFont(f);\n\t\tint v= ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS;\n\t\tint h= ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS;\n\t\tJScrollPane s= new JScrollPane(editor,v,h);\n\t\tpanel1.add(s,BorderLayout.CENTER);\t\n\t}",
"JTextArea textSetup(String content) {\n JTextArea text = new JTextArea(13, 37);\n text.setBackground(Color.WHITE);\n text.setFont(new Font(\"MonoSpaced\", Font.PLAIN, 12));\n text.setEditable(false);\n text.setText(content);\n return text;\n }",
"public void setFrame(JTextArea text){\n\n this.text = text;\n }",
"public EditorTxt() {\n initComponents();\n }",
"public TextBasedEditor() {\n\t\t\tc = new JTextField();\n\t\t\tformat = createFormat();\n\t\t}",
"private void startTextArea() {\n\t\tthis.textArea = new JTextArea();\n\t\tthis.textArea.setEditable(false);\n\t\tthis.textArea.setBounds(6, 6, 438, 220);\n\t\tthis.frame.getContentPane().add(textArea);\n\t}",
"public void addTextArea() {\n\t\t// *TEXT AREA CREATION*\n\t\ttxtAreaInfoLogger = new JTextArea();\n\t\ttxtAreaInfoLogger.setFont(new Font(\"Consolas\", Font.PLAIN, 11));\n\t\ttxtAreaInfoLogger.setText(\"Welcome \" + SysInfo.getUserName() + \" . . . \\n\");\n\t\ttxtAreaInfoLogger.setEditable(false);\n\t\ttxtAreaInfoLogger.setLineWrap(true);\n\t\t\n\t\ttxtAreaNotes = new JTextArea();\n\t\ttxtAreaNotes.setText(\"Add Your Notes Here. . . \");\n\t\ttxtAreaNotes.setFont(new Font(\"lucida grande\", Font.ITALIC, 12));\n\t\ttxtAreaNotes.setEditable(true);\n\t\ttxtAreaNotes.setLineWrap(true);\n\t\t\n\t\t// *TEXT AREA SCROLL BAR CREATION*\n\t\tinfoLoggerAreaScroll = new JScrollPane(txtAreaInfoLogger);\n\t\tinfoLoggerAreaScroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n\t\tinfoLoggerAreaScroll.setBounds(20, 50, 300, 350);\n\n\t\tnotesAreaScroll = new JScrollPane(txtAreaNotes);\n\t\tnotesAreaScroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n\t\tnotesAreaScroll.setBounds(20, 430, 300, 80);\n\t\t\n\t\tmainPanel.add(infoLoggerAreaScroll);\n\t\tmainPanel.add(notesAreaScroll);\n\t}",
"WindowTextArea createTextArea();",
"public TextNote() {\n\t\tsuper();\n // Build out all the menus we need and add them to the JMenuBar in the parent\n addMenu(buildEditMenu());\n addMenu(buildFormatMenu());\n buildAlarmMenu();\n // Turn our JTextPane into a ScrollPane so people can type longer than 250x250.\n JScrollPane scroll = new JScrollPane(note);\n // Set the bgcolor to a true sticky note color\n note.setBackground(new Color(252,250,118));\n // Set our size for new notes\n this.setSize(250,250);\n // Everything is set. Add the scrollpanel to the JFrame and make visible.\n this.add(scroll);\n this.setVisible(true);\n\t}",
"private void updateTextAreaLenght() {\n //\n }",
"public TextFrame() {\n \n super();\n init(null, Toolkit.getDefaultToolkit().getSystemClipboard());\n }",
"public StringEditor() {\n\t\tsuper();\n\t\tmEditor = new JTextField();\n\t\t\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
.msggamedata.AccountOSType os = 2; | com.felania.msldb.AccountOSTypeOuterClass.AccountOSType getOs(); | [
"public com.felania.msldb.AccountOSTypeOuterClass.AccountOSType getOs() {\n com.felania.msldb.AccountOSTypeOuterClass.AccountOSType result = com.felania.msldb.AccountOSTypeOuterClass.AccountOSType.valueOf(os_);\n return result == null ? com.felania.msldb.AccountOSTypeOuterClass.AccountOSType.UNRECOGNIZED : result;\n }",
"public com.felania.msldb.AccountOSTypeOuterClass.AccountOSType getOs() {\n com.felania.msldb.AccountOSTypeOuterClass.AccountOSType result = com.felania.msldb.AccountOSTypeOuterClass.AccountOSType.valueOf(os_);\n return result == null ? com.felania.msldb.AccountOSTypeOuterClass.AccountOSType.UNRECOGNIZED : result;\n }",
"com.whiuk.philip.mmorpg.shared.Messages.ClientMessage.AuthData.AccountDataType getType();",
"com.whiuk.philip.mmorpg.shared.Messages.ServerMessage.GameData.Type getType();",
"com.whiuk.philip.mmorpg.shared.Messages.ClientMessage.GameData.Type getType();",
"public Builder setOs(com.felania.msldb.AccountOSTypeOuterClass.AccountOSType value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n os_ = value.getNumber();\n onChanged();\n return this;\n }",
"public int getOriAccountType() {\r\n return oriAccountType;\r\n }",
"com.whiuk.philip.mmorpg.shared.Messages.ServerMessage.AuthData.Type getType();",
"GameMessage.ServerRequest.GameType getGame();",
"pb4server.EnterGamePublicRtVo getEnterGamePublicRt();",
"public void setAccountType (String AccountType);",
"SteamMsgGameNotifications.CGameNotifications_UserStatus getStatus();",
"public void setOsType(com.profitbricks.api.ws.OsType osType) {\r\n this.osType = osType;\r\n }",
"com.whiuk.philip.mmorpg.shared.Messages.ServerMessage.ChatData.Type getType();",
"void setOsType(String osType) {\n\t\tthis.osType = osType;\n\t}",
"protocol.Message.SchoolGuard.Addr getHome();",
"public void setOriAccountType(int value) {\r\n this.oriAccountType = value;\r\n }",
"com.openmdmremote.harbor.HRPCProto.RemoteAuth.Type getType();",
"protocol.Message.ChatGroup.Member.Device getDevice();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates migration item. The operation to update the recovery settings of an ASR migration item. | public MigrationItemInner beginUpdate(String fabricName, String protectionContainerName, String migrationItemName) {
return beginUpdateWithServiceResponseAsync(fabricName, protectionContainerName, migrationItemName).toBlocking().single().body();
} | [
"@ServiceMethod(returns = ReturnType.SINGLE)\n MigrationItemInner update(\n String resourceName,\n String resourceGroupName,\n String fabricName,\n String protectionContainerName,\n String migrationItemName,\n UpdateMigrationItemInput input);",
"@ServiceMethod(returns = ReturnType.SINGLE)\n MigrationItemInner update(\n String resourceName,\n String resourceGroupName,\n String fabricName,\n String protectionContainerName,\n String migrationItemName,\n UpdateMigrationItemInput input,\n Context context);",
"public MigrationItemInner update(String fabricName, String protectionContainerName, String migrationItemName) {\n return updateWithServiceResponseAsync(fabricName, protectionContainerName, migrationItemName).toBlocking().last().body();\n }",
"public MigrationItemInner update(String fabricName, String protectionContainerName, String migrationItemName, UpdateMigrationItemInputProperties properties) {\n return updateWithServiceResponseAsync(fabricName, protectionContainerName, migrationItemName, properties).toBlocking().last().body();\n }",
"@ServiceMethod(returns = ReturnType.SINGLE)\n MigrationItemInner migrate(\n String resourceName,\n String resourceGroupName,\n String fabricName,\n String protectionContainerName,\n String migrationItemName,\n MigrateInput migrateInput);",
"@Override\r\n\tpublic RepairItem updateRepairItem(RepairItem repairItem) throws DataAccessException {\n\t\ttry {\r\n\t\t\tupdatePS.setString(1, repairItem.getName());\r\n\t\t\tupdatePS.setString(2, repairItem.getDanish());\r\n\t\t\tupdatePS.setInt(3, repairItem.getCategory().getCategoryId());\r\n\t\t\tupdatePS.setInt(4, repairItem.getRepairItemId());\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// e.printStackTrace();\r\n\t\t\tthrow new DataAccessException(DBMessages.COULD_NOT_BIND_PS_VARS_INSERT, e);\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tupdatePS.executeUpdate();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// e.printStackTrace();\r\n\t\t\tthrow new DataAccessException(DBMessages.COULD_NOT_INSERT, e);\r\n\t\t}\r\n\t\treturn repairItem;\r\n\t}",
"@ServiceMethod(returns = ReturnType.SINGLE)\n MigrationItemInner migrate(\n String resourceName,\n String resourceGroupName,\n String fabricName,\n String protectionContainerName,\n String migrationItemName,\n MigrateInput migrateInput,\n Context context);",
"@Override\n\t@Transactional\n\tpublic String updateItem(Item item) {\n\t\tsessionFactory.getCurrentSession().update(item);\n\t\treturn \"Item information updated successfully\";\n\t}",
"@ServiceMethod(returns = ReturnType.SINGLE)\n MigrationItemInner testMigrate(\n String resourceName,\n String resourceGroupName,\n String fabricName,\n String protectionContainerName,\n String migrationItemName,\n TestMigrateInput testMigrateInput);",
"public void updateItem(Item item) throws SQLException;",
"@ServiceMethod(returns = ReturnType.SINGLE)\n MigrationItemInner testMigrate(\n String resourceName,\n String resourceGroupName,\n String fabricName,\n String protectionContainerName,\n String migrationItemName,\n TestMigrateInput testMigrateInput,\n Context context);",
"@com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)\n\tpublic com.rcs.webform.model.FormItem updateFormItem(\n\t\tcom.rcs.webform.model.FormItem formItem)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public static system_settings update(nitro_service client, system_settings resource) throws Exception\r\n\t{\r\n\t\tresource.validate(\"modify\");\r\n\t\treturn ((system_settings[]) resource.update_resource(client))[0];\r\n\t}",
"public void updateActionItem() throws SQLException {\n actionItemClass obj = new actionItemClass();\n obj.updateActionItem(this);\n \n }",
"@ServiceMethod(returns = ReturnType.SINGLE)\n MigrationItemInner create(\n String resourceName,\n String resourceGroupName,\n String fabricName,\n String protectionContainerName,\n String migrationItemName,\n EnableMigrationInput input);",
"private void updateCalendarItem(CalendarItem item){\n\t\tDBObject updated = getCalendarItem(item);\r\n\t\t//System.out.println(\"Calendar \" + updated.toString());\r\n\t\t//db.getCollection(CALENDARITEMS).update(searchQuery, newDocument);\r\n\t\tdb.getCollection(CALENDARITEMS).save(updateDBObject(item, updated));\r\n\t}",
"public void setMigrationInfo(MigrationInfo migrationInfo);",
"@ServiceMethod(returns = ReturnType.SINGLE)\n MigrationItemInner resumeReplication(\n String resourceName,\n String resourceGroupName,\n String fabricName,\n String protectionContainerName,\n String migrationItemName,\n ResumeReplicationInput resumeReplicationInput);",
"@ServiceMethod(returns = ReturnType.SINGLE)\n MigrationItemInner create(\n String resourceName,\n String resourceGroupName,\n String fabricName,\n String protectionContainerName,\n String migrationItemName,\n EnableMigrationInput input,\n Context context);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests the case when 2 explicit namespaces are given with the second overwriting the first. | public void testOverwrittenExplicitNamespace() {
ExplicitNamespaceOverridingTestParentDTO obj = new ExplicitNamespaceOverridingTestParentDTO();
obj.attribute = "a";
obj.element = "b";
obj.elementList.add("c");
obj.element2 = new ExplicitNamespaceOverridingTestChildDTO();
obj.element2.attributeB = "d";
obj.element2.elementB = "e";
obj.element2.elementListB.add("f");
String serializationResult = JSefaTestUtil.serialize(XML, obj);
assertTrue(getAttributeNamespace(serializationResult, "attribute").equals("uriA"));
assertTrue(getElementNamespace(serializationResult, "element").equals("uriA"));
assertTrue(getElementNamespace(serializationResult, "elementList").equals("uriA"));
assertTrue(getElementNamespace(serializationResult, "item").equals("uriA"));
assertTrue(getElementNamespace(serializationResult, "element2").equals("uriA"));
assertTrue(getAttributeNamespace(serializationResult, "attributeB").equals("uriB"));
assertTrue(getElementNamespace(serializationResult, "elementB").equals("uriB"));
assertTrue(getElementNamespace(serializationResult, "elementListB").equals("uriB"));
assertTrue(getElementNamespace(serializationResult, "itemB").equals("uriB"));
JSefaTestUtil.assertRepeatedRoundTripSucceeds(XML, obj);
} | [
"@Test\n\tpublic void test_TCM__OrgJdomNamespace_getNamespace() {\n\t\tfinal Namespace ns = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attr = new Attribute(\"test\", \"value\", ns);\n\t\tfinal Namespace ns2 = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tassertTrue(\"incorrect Namespace\", attr.getNamespace().equals(ns2));\n\n\t}",
"public void testXmlns() {\n \n try {\n new Attribute(\"xmlns\", \"http://www.w3.org/TR\");\n fail(\"Created attribute with name xmlns\");\n }\n catch (IllegalNameException success) {\n assertNotNull(success.getMessage()); \n }\n\n try {\n new Attribute(\"xmlns:prefix\", \"http://www.w3.org/TR\");\n fail(\"Created attribute with name xmlns:prefix\");\n }\n catch (IllegalNameException success) {\n assertNotNull(success.getMessage()); \n }\n\n // Now try with namespace URI from errata\n try {\n new Attribute(\"xmlns\", \"http://www.w3.org/2000/xmlns/\", \"http://www.w3.org/\");\n fail(\"created xmlns attribute\");\n }\n catch (IllegalNameException success) {\n assertNotNull(success.getMessage()); \n }\n \n // Now try with namespace URI from errata\n try {\n new Attribute(\"xmlns:pre\", \"http://www.w3.org/2000/xmlns/\", \"http://www.w3.org/\");\n fail(\"created xmlns:pre attribute\");\n }\n catch (IllegalNameException success) {\n assertNotNull(success.getMessage()); \n }\n\n }",
"public void testOverwrittenDefaultNamespace() {\n DefaultNamespaceOverridingTestParentDTO obj = new DefaultNamespaceOverridingTestParentDTO();\n obj.attribute = \"a\";\n obj.element = \"b\";\n obj.elementList.add(\"c\");\n obj.element2 = new DefaultNamespaceOverridingTestChildDTO();\n obj.element2.attributeB = \"d\";\n obj.element2.elementB = \"e\";\n obj.element2.elementListB.add(\"f\");\n String serializationResult = JSefaTestUtil.serialize(XML, obj);\n\n assertTrue(getAttributeNamespace(serializationResult, \"attribute\").equals(\n NamespaceConstants.NO_NAMESPACE_URI));\n assertTrue(getElementNamespace(serializationResult, \"element\").equals(\"uriA\"));\n assertTrue(getElementNamespace(serializationResult, \"elementList\").equals(\"uriA\"));\n assertTrue(getElementNamespace(serializationResult, \"item\").equals(\"uriA\"));\n assertTrue(getElementNamespace(serializationResult, \"element2\").equals(\"uriA\"));\n\n assertTrue(getAttributeNamespace(serializationResult, \"attributeB\").equals(\n NamespaceConstants.NO_NAMESPACE_URI));\n assertTrue(getElementNamespace(serializationResult, \"elementB\").equals(\"uriB\"));\n assertTrue(getElementNamespace(serializationResult, \"elementListB\").equals(\"uriB\"));\n assertTrue(getElementNamespace(serializationResult, \"itemB\").equals(\"uriB\"));\n\n JSefaTestUtil.assertRepeatedRoundTripSucceeds(XML, obj);\n }",
"protected boolean compareNamespace(final XNode y, final ArrayReporter rep) {\n\t\tString ux = getNSUri();\n\t\tString uy = y.getNSUri();\n\t\tif (ux == null) {\n\t\t\tif (uy == null) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else if (ux.equals(uy)) {\n\t\t\treturn true;\n\t\t}\n\t\t//Namespace differs: &{0} and &{1}\n\t\trep.error(XDEF.XDEF288, getXDPosition(), y.getXDPosition());\n\t\treturn false;\n\t}",
"public void testGetNamespaceURI() throws RepositoryException {\n String result = \"namespace\" ;\n String prefix =\"prefix\";\n \n sessionControl.expectAndReturn(session.getNamespaceURI(prefix), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getNamespaceURI(prefix), result);\n }",
"boolean isNamespaceSensitive();",
"private boolean checkDuplicateNamespace(NamespaceDefinition def) {\n \n // create structures if not already done\n if (m_namespaces == null) {\n m_namespaces = new ArrayList();\n m_uriMap = new HashMap();\n }\n \n // check for conflict (or duplicate) definition\n String uri = def.getUri();\n NamespaceDefinition prior = (NamespaceDefinition)m_uriMap.get(uri);\n return prior != null && (prior.getPrefix() != null || def.getPrefix() == null);\n }",
"public void testGetNamespacePrefixes() throws RepositoryException {\n String result[] = { \"prefix1\", \"prefix2\" };\n \n sessionControl.expectAndReturn(session.getNamespacePrefixes(), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getNamespacePrefixes(), result);\n }",
"public boolean isInSameNamespace(NodeName other) {\n return qName.isInSameNamespace(other);\n }",
"protected abstract String getDefaultNamespace();",
"public boolean namespaceEquals(NodeId nodeId1, NodeId nodeId2) {\r\n\t\treturn nodeId1.getNamespaceIndex() == nodeId2.getNamespaceIndex();\r\n\t}",
"private Attributes fixNSbug(Attributes atts) {\n // fix: scan the attributes for the attribute \"xmlns\" and if found, add the correct namespace\n // for that attribute.\n for (int i = 0; i < atts.getLength(); i++) {\n if (\"xmlns\".equals(atts.getQName(i))) {\n AttributesImpl result = new AttributesImpl(atts); // make a copy of all the attributes, into\n // an impl-neutral impl.\n result.setURI(i, \"http://www.w3.org/2000/xmlns/\");\n return result;\n }\n }\n return atts;\n }",
"private boolean isNamespace(int start, int end) {\n int i;\n int nsLen = end - start;\n int offset = tokenStart - start;\n int tokenLen = tokenEnd - tokenStart;\n\n if (tokenLen < nsLen) {\n return false;\n }\n\n for (i = start; i < end; i++) {\n if (data.charAt(i) != data.charAt(i + offset)) {\n return false;\n }\n }\n\n if (nsLen == tokenLen) {\n return true;\n }\n return data.charAt(i + offset) == '.';\n }",
"boolean addDefaultNamespace();",
"public void testGetNamespacePrefix() throws RepositoryException {\n String result = \"namespace\";\n String uri = \"prefix\";\n \n sessionControl.expectAndReturn(session.getNamespacePrefix(uri), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getNamespacePrefix(uri), result);\n }",
"private QName importNamespace(final QName qname) {\n String prefix = qname.getPrefix();\n final String namespace = qname.getNamespaceURI();\n boolean prefixInUse = false;\n boolean namespaceInUse = false;\n\n // check if prefix is in use\n if (prefix != null && !prefix.isEmpty()) {\n prefixInUse = this.namespaceMap.containsKey(prefix);\n }\n\n // check if namespace is in use\n if (namespace != null && !namespace.isEmpty()) {\n namespaceInUse = this.namespaceMap.containsValue(namespace);\n }\n\n // TODO refactor this whole thing\n if (prefixInUse & namespaceInUse) {\n // both is already registered, this means we set the prefix of the\n // given qname to the prefix used in the system\n for (final String key : this.namespaceMap.keySet()) {\n if (this.namespaceMap.get(key).equals(namespace)) {\n prefix = key;\n }\n }\n } else if (!prefixInUse & namespaceInUse) {\n // the prefix isn't in use, but the namespace is, re-set the prefix\n for (final String key : this.namespaceMap.keySet()) {\n if (this.namespaceMap.get(key).equals(namespace)) {\n prefix = key;\n }\n }\n } else if (!prefixInUse & !namespaceInUse) {\n // just add the namespace and prefix to the system\n if (prefix == null || prefix.isEmpty()) {\n // generate new prefix\n prefix = \"ns\" + this.namespaceMap.keySet().size();\n }\n this.namespaceMap.put(prefix, namespace);\n this.addNamespaceToBPELDoc(new QName(namespace, qname.getLocalPart(), prefix));\n\n } else {\n if (prefix == null || prefix.isEmpty()) {\n // generate new prefix\n prefix = \"ns\" + this.namespaceMap.keySet().size();\n }\n this.namespaceMap.put(prefix, namespace);\n this.addNamespaceToBPELDoc(new QName(namespace, qname.getLocalPart(), prefix));\n }\n return new QName(namespace, qname.getLocalPart(), prefix);\n }",
"@Test\n public final void testGetXPathWithNamespace() {\n \n Document testDoc = TestDocHelper.createDocument(\n \"<d:a xmlns:d=\\\"http://test.com\\\"><b/></d:a>\");\n Element docEl = testDoc.getDocumentElement();\n \n //Move to beforeclass method\n XPathFactory xPathFac = XPathFactory.newInstance();\n XPath xpathExpr = xPathFac.newXPath();\n \n testXPathForNode(docEl, xpathExpr);\n testXPathForNode(docEl.getFirstChild(), xpathExpr);\n }",
"@Test\r\n public void testNamespaceInfo() {\r\n NamespaceInformation nsInfo = testXmlModule.getNamespaceInformation();\r\n assertEquals(0,nsInfo.getNamespaceCount());\r\n }",
"private void checkNamespaceUsage(TemplateElementBase base,\n ValidationContext vctx) {\n \n // check for namespace definitions needing to be handled\n if (base instanceof MappingElementBase &&\n ((MappingElementBase)base).isAbstract()) {\n \n // merge namespaces defined within this mapping\n DefinitionContext addc = vctx.getCurrentDefinitions();\n DefinitionContext defc = base.getDefinitions();\n if (defc != null) {\n mergeNamespaces(defc, addc, vctx);\n }\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Display that the login was successful. | private void makeToastLoginSuccessful() {
Toast.makeText(LoginActivity.this, "Login Successful", Toast.LENGTH_SHORT).show();
} | [
"private void login() {\n if (DataController.loginUser(usernameField.getText(), passwordField.getText())) {\n LoggedInUser.setLoggedInUser(usernameField.getText());\n responseLabel.setText(\"LOGGED IN\");\n } else {\n LoggedInUser.setLoggedInUser(null);\n responseLabel.setText(\"FAILED AUTH\");\n }\n }",
"public void loginStatus(Boolean success) {\n if (success.equals(true))\n System.out.println(\"Login Successful\");\n else {\n System.out.println(\"Login Failed -> Username or password may be incorrect\");\n }\n }",
"public String submitCredentials() {\n ResourceBundle resourceBundle = PropertyResourceBundle.getBundle(\"en_bundle\");\n LOGGER.info(String.format(\"Submitting the credentials where login is {} and password is {}\", login, password));\n if (Status.SUCCESS == loginService.checkCredentials(login, password)) {\n return \"main\";\n } else {\n FacesContext.getCurrentInstance().addMessage(\"signinButton\",\n new FacesMessage(FacesMessage.SEVERITY_ERROR, resourceBundle.getString(\"error.wrongCredentials\"),\n \"Wrong login or password or both.\"));\n return null;\n }\n }",
"public void login() {\n if(username.get() != null && !username.get().isEmpty() && password.get() != null && !password.get().isEmpty()) {\n model.login(username.get(), password.get());\n String response = model.loginResponse();\n loginResponse.set(response);\n }\n else{\n loginResponse.setValue(\"Must enter both, username and password\");\n username.setValue(null);\n password.setValue(null);\n }\n }",
"public void loginRegisterSuccess(){\r\n\t\tclient.setUsername(view.getTxtUsername().getText());\r\n\t\tclient.generateRSA();\r\n\t\thc = client.getHomeController();\r\n\t\thc.activate();\r\n\t}",
"private void login() {\n if (username.getText() != null && password.getText() != null) {\n controller.login(username.getText(), password.getText());\n }else{\n setErrorText(\"Need to fill in username and password\");\n }\n }",
"void loginDone();",
"void printLoginEntered() {\n printMessage(messagesBundle.getString(OUTPUT_LOGIN_YOU_ENTERED));\n }",
"public static void loginView() {\n\t\tSystem.out.println(OutputHelpers.timeStamp() + \"- SECTION: Login In. Method Called: logingView()\");\n\t\tuserLoginAction();\n\t}",
"@Override\n public void onSuccess(AuthResult authResult) {\n Toast.makeText(Login1.this, \"Successfully Login\", Toast.LENGTH_SHORT).show();\n\n }",
"private void logIn() {\n\t\tif(back_end.getLocalAccount() == null) {\n\t\t\t//sets the comment text to a failure message\n\t\t\t//waits for the main thread to be the JavaFX UI thread\n\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tlogin_comment.setText(\"Unable to log in. Email or password incorrect.\");\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//waits for the main thread to be the JavaFX UI thread\n\t\tPlatform.runLater(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t//if it can, removes all the entered text\n\t\t\t\tlogin_email.setText(\"\");\n\t\t\t\tlogin_password.setText(\"\");\n\t\t\t\t//sets the username text in the top right hand corner to the account's username\n\t\t\t\tsidebar.setUsernameText(back_end.getLocalAccount().getUsername());\n\t\t\t\tsidebar.showLogoutButton();\n\t\t\t\t//sets the comment text to a success message\n\t\t\t\tlogin_comment.setText(\"Logged in successfully!\");\n\t\t\t}\n\t\t\t\n\t\t});\n\t}",
"public void showSuccess() {\n System.out.println(successMessage);\n }",
"public void displayPublicLoginPage() {\n LoginController logCtrl = new LoginController();\n UserInputOutput.displayHeader(\"Customer Login\");\n boolean credentialCheck = false;\n System.out.println(\"Please input Email:\");\n Scanner sc = new Scanner(System.in);\n String email = sc.nextLine();\n credentialCheck = logCtrl.checkCustomer(email);\n if(!credentialCheck) {\n System.out.println(\"Invalid account.\");\n }\n\n if (credentialCheck == true) {\n Customer c = logCtrl.getCusCookie();\n\n System.out.println(\"Hi \" + c.getName() + \"!\");\n MovieGoerUI mui = new MovieGoerUI();\n UIDisplay uid = new UIDisplay(mui);\n uid.displayHomePage();\n }\n else{\n displayLoginRegisterPage();\n }\n }",
"public void LogInOkHandle()\n\t{\n\t\tBaseQueries base = new BaseQueries();\n\t\tString loginName = txtLoginUserName.getText();\n\t\tString loginPassword = pswLoginPassword.getText();\n\t\tif (base.isInBase(loginName,loginPassword))\n\t\t{\n\t\t\tId = base.getUserId(loginName);\n\t\t\tmonthly.setVisible(true);\n\t\t\tloginpane.setVisible(false);\n\t\t\tArrayInit();\n\t\t\tMonthLabel.setText(\"January\");\n\t\t\tYearLabel.setText(\"2020\");\n\t\t\tfor(int i=1; i<32;i++)\n\t\t\t{\n\t\t\t\tarrayButtons[i+4].setText(Integer.toString(i));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\talert.setVisible(true);\n\t\t}\n\t}",
"void notifyLoginSucceeded();",
"public static void login() {\n\t\trender();\n\t}",
"public void login()\r\n\t{\r\n\t\tJTextField userName = new JTextField(5);\r\n\t\tJTextField password = new JTextField(5);\r\n\t\tJPanel login = new JPanel();\r\n\t\tlogin.setLayout(new GridLayout(2, 2));\r\n\t\tlogin.add(new JLabel(\"Username\"));\r\n\t\tlogin.add(userName);\r\n\t\tlogin.add(new JLabel(\"password\"));\r\n\t\tlogin.add(password);\r\n\t\tboolean loginTrue;\r\n\t\tdo\r\n\t\t{\r\n\t\t\tint result = JOptionPane.showConfirmDialog(null, login,\r\n\t\t\t\t\t\"Please Enter login info\", JOptionPane.OK_CANCEL_OPTION);\r\n\r\n\t\t\tif (result == JOptionPane.OK_OPTION\r\n\t\t\t\t\t&& userName.getText().equals(\"\")\r\n\t\t\t\t\t&& password.getText().equals(\"\"))\r\n\t\t\t{\r\n\t\t\t\tloginTrue = true;\r\n\t\t\t}\r\n\t\t\telse if (result == JOptionPane.OK_OPTION)\r\n\t\t\t{\r\n\t\t\t\tloginTrue = false;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.exit(1);\r\n\t\t\t\tloginTrue = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\twhile (!loginTrue);\r\n\t}",
"public boolean loginSuccessful() {\n return (authed);\n }",
"private void displayLogin()\n {\n displayHeader(\"LOGIN\");\n getEvent().fetchUsersData();\n\n String email = acceptStringInput(\"Enter your email\");\n String regexEmail = \"^[\\\\w-_\\\\.+]*[\\\\w-_\\\\.]\\\\@([\\\\w]+\\\\.)+[\\\\w]+[\\\\w]$\";\n while(email.matches(regexEmail) != true){\n System.out.println(\"Please enter valid email address\");\n email = acceptStringInput(\"Enter your email\");\n }\n String password = acceptStringInput(\"Enter your password\");\n if(getEvent().isValidCredentials(email,password))\n {\n System.out.println(\"Login Successful!! Welcome to Prime Events\");\n displayHome();\n }\n else\n {\n char choice = acceptStringInput(\"Do you wish to continue with login(y/n)?\").toLowerCase().charAt(0);\n if(choice == 'y')\n {\n displayLogin();\n }\n else\n {\n showMenu();\n }\n }\n\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method deletes a booking record based on the bookingId | @Override
public void cancelBooking(Integer bookingId) throws Exception{
bookingRecord.remove(bookingId);
} | [
"Booking deleteBooking(int id);",
"boolean deleteRoomFromBooking(long bookingId) throws ServiceException;",
"public void deleteBooking(int id){\n try{\n this.statement = connection.createStatement();\n statement.executeUpdate(\"DELETE FROM bookings WHERE id = '\"+id+\"'\");\n System.out.println(\"Deleted booking with id = \"+id);\n }catch (Exception e){\n System.out.println(\"Delete booking failed for id = \"+ id);\n System.out.println(e.toString());\n }\n }",
"@Transactional\n\tpublic void deleteBookingById(Booking b)\n\t{\n\t\thibernateTemplate.delete(b);\n\t}",
"@Override\r\n\tpublic void removeBooking(Long bookingId) throws BookingException {\r\n\t\ttry {\r\n\t\t\tbookingDao.deleteById(bookingId);\r\n\t\t}catch(DataAccessException e) {\r\n\t\t\t//converting SQLException to EmployeeException\r\n\t\t\tthrow new BookingException(e.getMessage());\r\n\t\t}catch(Exception e) {\r\n\t\t\t//converting SQLException to EmployeeException\r\n\t\t\tthrow new BookingException(e.getMessage());\r\n\t\t}\r\n\t}",
"@RequestMapping(\"/delete\")\n\tpublic String delete(@RequestParam Long bookingId) {\n\t\tbookingRepository.delete(bookingId);\n\t return \"booking #\"+bookingId+\" deleted successfully\";\n\t}",
"Booking delete(Booking booking) throws Exception {\n log.info(\"BookingRepository.delete() - Deleting \" + booking.getId());\n \n if (booking.getId() != null) {\n /*\n * The Hibernate session (aka EntityManager's persistent context) is closed and invalidated after the commit(), \n * because it is bound to a transaction. The object goes into a detached status. If you open a new persistent \n * context, the object isn't known as in a persistent state in this new context, so you have to merge it. \n * \n * Merge sees that the object has a primary key (id), so it knows it is not new and must hit the database \n * to reattach it. \n * \n * Note, there is NO remove method which would just take a primary key (id) and a entity class as argument. \n * You first need an object in a persistent state to be able to delete it.\n * \n * Therefore we merge first and then we can remove it.\n */\n em.remove(em.merge(booking));\n \n } else {\n log.info(\"BookingRepository.delete() - No ID was found so can't Delete.\");\n }\n \n return booking;\n }",
"public Booking deleteBookingByBookingNumber(String bookingNumber) {\n return null;\r\n }",
"private void deleteEmployeeBooking() {\n BookingModel bookingModel1 = new BookingModel();\n try {\n bookingModel1.deleteBooking(employeeID);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }",
"public Boolean deleteBooking(int bookingNo) {\n String sql = \"DELETE FROM booking WHERE booking_no = ?\";\n return template.update(sql, bookingNo) < 0;\n }",
"@OnEvent(component = \"cancelBooking\")\r\n public Object cancelBooking(Long bookingId) {\r\n bookingService.delete(bookingId);\r\n return Search.class;\r\n }",
"public void deleteBooking() {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Please enter booking ID: \");\n int bookingID = Integer.parseInt(scanner.nextLine());\n System.out.println(\"Please enter facility name: \");\n String facilityName =scanner.nextLine();\n\n Request req = new DeleteBookingRequest(\n bookingID,\n facilityName\n );\n request(router, req);\n }",
"void delete(int reservationId);",
"public void deleteAll(int bookingId) {\n String sql = \"DELETE FROM tickets WHERE booking_id = ?;\";\n jdbc.update(sql, bookingId);\n }",
"public void cancelBooking() throws ClassNotFoundException, SQLException{\n spaceDBAdapter dbAdapter = new spaceDBAdapter();\n dbAdapter.deleteBooking(bookingID);\n }",
"public void delete() {\n\t\tTimelineUpdater timelineUpdater = TimelineUpdater.getCurrentInstance(\":mainForm:timeline\");\n\t\tmodel.delete(event, timelineUpdater);\n\n\t\tFacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"The booking \" + getRoom() + \" has been deleted\", null);\n\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\t}",
"public void deleteBookingClass(int id) throws ClassNotFoundException, SQLException{\n\tsave(\"DELETE FROM booking_class WHERE booking_id=?\", new Object[] {id});\n}",
"public void delete(Book book){\n try{\n String query = \"DELETE FROM testdb.book WHERE id=\" + book.getId();\n DbConnection.update(query);\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }",
"@Override\n public void deleteReservation(Integer id) {\n reservationDAO.deleteReservation(id);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column TRSDEAL_PROMISSORY_FX.DATE_REJECTED | public void setDATE_REJECTED(Date DATE_REJECTED)
{
this.DATE_REJECTED = DATE_REJECTED;
} | [
"public void setDATE_REJECTED(Date DATE_REJECTED) {\r\n this.DATE_REJECTED = DATE_REJECTED;\r\n }",
"public void setREJECT_DATE(Date REJECT_DATE) {\r\n this.REJECT_DATE = REJECT_DATE;\r\n }",
"public Date getDATE_REJECTED() {\r\n return DATE_REJECTED;\r\n }",
"public Date getDATE_REJECTED()\r\n {\r\n\treturn DATE_REJECTED;\r\n }",
"public Date getREJECT_DATE() {\r\n return REJECT_DATE;\r\n }",
"public void setAPPROVED_DATE(Date APPROVED_DATE)\r\n {\r\n\tthis.APPROVED_DATE = APPROVED_DATE;\r\n }",
"public void setEDLRetroactiveDate(java.util.Date value);",
"public void setDATE_APPROVED(Date DATE_APPROVED)\r\n {\r\n\tthis.DATE_APPROVED = DATE_APPROVED;\r\n }",
"public void setPROMISE_DATE(Date PROMISE_DATE)\r\n {\r\n\tthis.PROMISE_DATE = PROMISE_DATE;\r\n }",
"public void setDATE_APPROVED(Date DATE_APPROVED) {\r\n this.DATE_APPROVED = DATE_APPROVED;\r\n }",
"public void setPollutionRetroactiveDate(java.util.Date value);",
"public void setPremOpsProdsRetroactiveDate(java.util.Date value);",
"public void setOLD_PROMISSORY_SETTLEMENT_DATE(Date OLD_PROMISSORY_SETTLEMENT_DATE)\r\n {\r\n\tthis.OLD_PROMISSORY_SETTLEMENT_DATE = OLD_PROMISSORY_SETTLEMENT_DATE;\r\n }",
"public void setDATE_APPROVED2(Date DATE_APPROVED2)\r\n {\r\n\tthis.DATE_APPROVED2 = DATE_APPROVED2;\r\n }",
"public void setDATE_APPROVED1(Date DATE_APPROVED1)\r\n {\r\n\tthis.DATE_APPROVED1 = DATE_APPROVED1;\r\n }",
"public void setDATE_APPLIED(Date DATE_APPLIED) {\r\n this.DATE_APPLIED = DATE_APPLIED;\r\n }",
"public void setPROMISSORY_CANCEL_DATE(Date PROMISSORY_CANCEL_DATE)\r\n {\r\n\tthis.PROMISSORY_CANCEL_DATE = PROMISSORY_CANCEL_DATE;\r\n }",
"public void setLiquorRetroactiveDate(java.util.Date value);",
"public void setSERVER_APPROVED_DATE(Date SERVER_APPROVED_DATE)\r\n {\r\n\tthis.SERVER_APPROVED_DATE = SERVER_APPROVED_DATE;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule___AssignmentKey__Group_2__0" $ANTLR start "rule___AssignmentKey__Group_2__0__Impl" InternalGaml.g:9574:1: rule___AssignmentKey__Group_2__0__Impl : ( '>' ) ; | public final void rule___AssignmentKey__Group_2__0__Impl() throws RecognitionException {
int rule___AssignmentKey__Group_2__0__Impl_StartIndex = input.index();
int stackSize = keepStackSize();
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 543) ) { return ; }
// InternalGaml.g:9578:1: ( ( '>' ) )
// InternalGaml.g:9579:1: ( '>' )
{
// InternalGaml.g:9579:1: ( '>' )
// InternalGaml.g:9580:1: '>'
{
if ( state.backtracking==0 ) {
before(grammarAccess.get_AssignmentKeyAccess().getGreaterThanSignKeyword_2_0());
}
match(input,104,FollowSets000.FOLLOW_2); if (state.failed) return ;
if ( state.backtracking==0 ) {
after(grammarAccess.get_AssignmentKeyAccess().getGreaterThanSignKeyword_2_0());
}
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
if ( state.backtracking>0 ) { memoize(input, 543, rule___AssignmentKey__Group_2__0__Impl_StartIndex); }
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule___AssignmentKey__Group_2__1() throws RecognitionException {\n int rule___AssignmentKey__Group_2__1_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 544) ) { return ; }\n // InternalGaml.g:9597:1: ( rule___AssignmentKey__Group_2__1__Impl )\n // InternalGaml.g:9598:2: rule___AssignmentKey__Group_2__1__Impl\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule___AssignmentKey__Group_2__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 544, rule___AssignmentKey__Group_2__1_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule___AssignmentKey__Group_2__1__Impl() throws RecognitionException {\n int rule___AssignmentKey__Group_2__1__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 545) ) { return ; }\n // InternalGaml.g:9608:1: ( ( '>' ) )\n // InternalGaml.g:9609:1: ( '>' )\n {\n // InternalGaml.g:9609:1: ( '>' )\n // InternalGaml.g:9610:1: '>'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.get_AssignmentKeyAccess().getGreaterThanSignKeyword_2_1()); \n }\n match(input,104,FollowSets000.FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.get_AssignmentKeyAccess().getGreaterThanSignKeyword_2_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 545, rule___AssignmentKey__Group_2__1__Impl_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Key__Group_0__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:15314:1: ( rule__Key__Group_0__1__Impl )\r\n // InternalGo.g:15315:2: rule__Key__Group_0__1__Impl\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__Key__Group_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__S_Definition__Group__0__Impl() throws RecognitionException {\n int rule__S_Definition__Group__0__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 411) ) { return ; }\n // InternalGaml.g:7518:1: ( ( ( rule__S_Definition__TkeyAssignment_0 ) ) )\n // InternalGaml.g:7519:1: ( ( rule__S_Definition__TkeyAssignment_0 ) )\n {\n // InternalGaml.g:7519:1: ( ( rule__S_Definition__TkeyAssignment_0 ) )\n // InternalGaml.g:7520:1: ( rule__S_Definition__TkeyAssignment_0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_DefinitionAccess().getTkeyAssignment_0()); \n }\n // InternalGaml.g:7521:1: ( rule__S_Definition__TkeyAssignment_0 )\n // InternalGaml.g:7521:2: rule__S_Definition__TkeyAssignment_0\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Definition__TkeyAssignment_0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_DefinitionAccess().getTkeyAssignment_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 411, rule__S_Definition__Group__0__Impl_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__S_Other__Group__0__Impl() throws RecognitionException {\n int rule__S_Other__Group__0__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 381) ) { return ; }\n // InternalGaml.g:7051:1: ( ( ( rule__S_Other__KeyAssignment_0 ) ) )\n // InternalGaml.g:7052:1: ( ( rule__S_Other__KeyAssignment_0 ) )\n {\n // InternalGaml.g:7052:1: ( ( rule__S_Other__KeyAssignment_0 ) )\n // InternalGaml.g:7053:1: ( rule__S_Other__KeyAssignment_0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_OtherAccess().getKeyAssignment_0()); \n }\n // InternalGaml.g:7054:1: ( rule__S_Other__KeyAssignment_0 )\n // InternalGaml.g:7054:2: rule__S_Other__KeyAssignment_0\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Other__KeyAssignment_0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_OtherAccess().getKeyAssignment_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 381, rule__S_Other__Group__0__Impl_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule___AssignmentKey__Group_2__0() throws RecognitionException {\n int rule___AssignmentKey__Group_2__0_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 542) ) { return ; }\n // InternalGaml.g:9566:1: ( rule___AssignmentKey__Group_2__0__Impl rule___AssignmentKey__Group_2__1 )\n // InternalGaml.g:9567:2: rule___AssignmentKey__Group_2__0__Impl rule___AssignmentKey__Group_2__1\n {\n pushFollow(FollowSets000.FOLLOW_43);\n rule___AssignmentKey__Group_2__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FollowSets000.FOLLOW_2);\n rule___AssignmentKey__Group_2__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 542, rule___AssignmentKey__Group_2__0_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__AnnotationKey__Group_0__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:3477:1: ( rule__AnnotationKey__Group_0__2__Impl )\n // InternalReflex.g:3478:2: rule__AnnotationKey__Group_0__2__Impl\n {\n pushFollow(FOLLOW_2);\n rule__AnnotationKey__Group_0__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Assignment__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMGPL.g:3068:1: ( rule__Assignment__Group__2__Impl )\n // InternalMGPL.g:3069:2: rule__Assignment__Group__2__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Assignment__Group__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__S_Reflex__Group__0__Impl() throws RecognitionException {\n int rule__S_Reflex__Group__0__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 395) ) { return ; }\n // InternalGaml.g:7268:1: ( ( ( rule__S_Reflex__KeyAssignment_0 ) ) )\n // InternalGaml.g:7269:1: ( ( rule__S_Reflex__KeyAssignment_0 ) )\n {\n // InternalGaml.g:7269:1: ( ( rule__S_Reflex__KeyAssignment_0 ) )\n // InternalGaml.g:7270:1: ( rule__S_Reflex__KeyAssignment_0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_ReflexAccess().getKeyAssignment_0()); \n }\n // InternalGaml.g:7271:1: ( rule__S_Reflex__KeyAssignment_0 )\n // InternalGaml.g:7271:2: rule__S_Reflex__KeyAssignment_0\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Reflex__KeyAssignment_0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_ReflexAccess().getKeyAssignment_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 395, rule__S_Reflex__Group__0__Impl_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__KeyAST__Group__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:4147:1: ( ( ( rule__KeyAST__AnnotationAssignment_0 )? ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:4148:1: ( ( rule__KeyAST__AnnotationAssignment_0 )? )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:4148:1: ( ( rule__KeyAST__AnnotationAssignment_0 )? )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:4149:1: ( rule__KeyAST__AnnotationAssignment_0 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getKeyASTAccess().getAnnotationAssignment_0()); \n }\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:4150:1: ( rule__KeyAST__AnnotationAssignment_0 )?\n int alt48=2;\n int LA48_0 = input.LA(1);\n\n if ( (LA48_0==55) ) {\n alt48=1;\n }\n switch (alt48) {\n case 1 :\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:4150:2: rule__KeyAST__AnnotationAssignment_0\n {\n pushFollow(FOLLOW_rule__KeyAST__AnnotationAssignment_0_in_rule__KeyAST__Group__0__Impl8946);\n rule__KeyAST__AnnotationAssignment_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.getKeyASTAccess().getAnnotationAssignment_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__KeyAST__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:4164:1: ( rule__KeyAST__Group__1__Impl )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:4165:2: rule__KeyAST__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__KeyAST__Group__1__Impl_in_rule__KeyAST__Group__18977);\n rule__KeyAST__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__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___AssignmentKey__Group_4__0__Impl() throws RecognitionException {\n int rule___AssignmentKey__Group_4__0__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 547) ) { return ; }\n // InternalGaml.g:9643:1: ( ( '>' ) )\n // InternalGaml.g:9644:1: ( '>' )\n {\n // InternalGaml.g:9644:1: ( '>' )\n // InternalGaml.g:9645:1: '>'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.get_AssignmentKeyAccess().getGreaterThanSignKeyword_4_0()); \n }\n match(input,104,FollowSets000.FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.get_AssignmentKeyAccess().getGreaterThanSignKeyword_4_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 547, rule___AssignmentKey__Group_4__0__Impl_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__S_Experiment__Group__0__Impl() throws RecognitionException {\n int rule__S_Experiment__Group__0__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 329) ) { return ; }\n // InternalGaml.g:6249:1: ( ( ( rule__S_Experiment__KeyAssignment_0 ) ) )\n // InternalGaml.g:6250:1: ( ( rule__S_Experiment__KeyAssignment_0 ) )\n {\n // InternalGaml.g:6250:1: ( ( rule__S_Experiment__KeyAssignment_0 ) )\n // InternalGaml.g:6251:1: ( rule__S_Experiment__KeyAssignment_0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_ExperimentAccess().getKeyAssignment_0()); \n }\n // InternalGaml.g:6252:1: ( rule__S_Experiment__KeyAssignment_0 )\n // InternalGaml.g:6252:2: rule__S_Experiment__KeyAssignment_0\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Experiment__KeyAssignment_0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_ExperimentAccess().getKeyAssignment_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 329, rule__S_Experiment__Group__0__Impl_StartIndex); }\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__XAssignment__Group_1_1_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:4456:1: ( rule__XAssignment__Group_1_1_0__0__Impl )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:4457: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__09499);\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 \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__S_Set__Group__0__Impl() throws RecognitionException {\n int rule__S_Set__Group__0__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 473) ) { return ; }\n // InternalGaml.g:8488:1: ( ( ( rule__S_Set__KeyAssignment_0 ) ) )\n // InternalGaml.g:8489:1: ( ( rule__S_Set__KeyAssignment_0 ) )\n {\n // InternalGaml.g:8489:1: ( ( rule__S_Set__KeyAssignment_0 ) )\n // InternalGaml.g:8490:1: ( rule__S_Set__KeyAssignment_0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_SetAccess().getKeyAssignment_0()); \n }\n // InternalGaml.g:8491:1: ( rule__S_Set__KeyAssignment_0 )\n // InternalGaml.g:8491:2: rule__S_Set__KeyAssignment_0\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Set__KeyAssignment_0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_SetAccess().getKeyAssignment_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 473, rule__S_Set__Group__0__Impl_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__S_If__Group__0__Impl() throws RecognitionException {\n int rule__S_If__Group__0__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 367) ) { return ; }\n // InternalGaml.g:6834:1: ( ( ( rule__S_If__KeyAssignment_0 ) ) )\n // InternalGaml.g:6835:1: ( ( rule__S_If__KeyAssignment_0 ) )\n {\n // InternalGaml.g:6835:1: ( ( rule__S_If__KeyAssignment_0 ) )\n // InternalGaml.g:6836:1: ( rule__S_If__KeyAssignment_0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_IfAccess().getKeyAssignment_0()); \n }\n // InternalGaml.g:6837:1: ( rule__S_If__KeyAssignment_0 )\n // InternalGaml.g:6837:2: rule__S_If__KeyAssignment_0\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_If__KeyAssignment_0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_IfAccess().getKeyAssignment_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 367, rule__S_If__Group__0__Impl_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the bit mask to use when looking up materials by data value. | public void setDataMask(byte val)
{
dataMask = val;
} | [
"void setMask();",
"void setMask(Mask newMask) throws MatrixException;",
"public void setBitmask(long m) {\n\t\tthis.bitmask = m;\n\t}",
"public void setMask(BitSet imageMask) {\r\n mask = imageMask;\r\n }",
"public void setBitSetMask(BitSet mask) {\r\n newMask = mask;\r\n }",
"public void setMask(String mask){\r\n\t\tthis.mask = mask;\r\n\t}",
"public void setMask(BitSet newMask) {\r\n mask = newMask;\r\n entireImage = false;\r\n }",
"void setNetworkMask(byte[] networkMask);",
"void setMaskFormatter(MaskFormatter maskFormatter);",
"static void setBitMaskedByte(ArrowBuf data, int byteIndex, byte bitMask) {\n byte currentByte = data.getByte(byteIndex);\n currentByte |= bitMask;\n data.setByte(byteIndex, currentByte);\n }",
"@DISPID(21) //= 0x15. The runtime will prefer the VTID if present\n @VTID(46)\n void editMask(\n String pVal);",
"public static void \nsetColorMaterial(SoState state, boolean value)\n{\n// SoLazyElement curElt = SoLazyElement.getInstance(state);\n// if (value != curElt.ivState.colorMaterial)\n// getWInstance(state).setColorMaterialElt(value);\n// else if (state.isCacheOpen())\n// curElt.registerRedundantSet(state, masks.COLOR_MATERIAL_MASK.getValue());\n}",
"public void setMaterial(String mat){\r\n material = mat;\r\n }",
"public boolean setMaterial(int index) {\n if (isValidIndex(index, MATERIALS)) {\n material = index;\n return true;\n } else {\n return false;\n }\n }",
"public static synchronized void setMask( final long mask ) {\r\n Logger lgr = null;\r\n for ( final Enumeration<Logger> en = LogKernel.nameToLogger.elements(); en.hasMoreElements(); ) {\r\n lgr = en.nextElement();\r\n if ( !lgr.isLocked() ) {\r\n lgr.setMask( mask );\r\n }\r\n }\r\n }",
"void setApplyMask(boolean applyMask);",
"public Mask(long mask ) {\r\n\t\tsuper();\r\n\t\tsetBools(mask);\r\n\t}",
"void xsetMaterial(org.apache.xmlbeans.XmlNonNegativeInteger material);",
"public void\n\t setColorMaterialElt( boolean value )\n\t \n\t {\n//\t if (ivState.lightModel == LightModel.BASE_COLOR.getValue()) value = false;\n//\t ivState.colorMaterial = value;\n\t }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for the Range object. This ensures that only a limited number of bytes can be consumed from a backing input stream giving the impression of an independent stream of bytes for a segmented region of the parent buffer. | public Range(InputStream source, int length) {
super(source);
this.length = length;
} | [
"public abstract Self byteRange(byte min, byte max);",
"public ChunkRange(final long from, final Long to) {\n rangeRequested = true;\n if (from < 0) {\n throw new IllegalArgumentException(\"from < 0\");\n }\n this.from = from;\n if (to != null && to >= 0) {\n if (from > to) {\n throw new IllegalArgumentException(\"from > to\");\n } else if (to < from) {\n throw new IllegalArgumentException(\"to < from\");\n }\n }\n this.to = to;\n }",
"public LengthLimitedInputStream(InputStream in, int limit) {\n\tsuper(in);\n\tleft = limit;\n }",
"public DataRange (Range range, InputStream instream) throws IOException{\r\n\t\t\r\n\t\tthis.range = range;\r\n\t\tthis.data = new BufferingOutputStream( threshold );\r\n\t\t\r\n\t\tlong length = range.getFinish() - range.getStart();\r\n\t\tPartialGetHelper.sendBytes( instream , data, length);\r\n\r\n\t\tthis.data.close();\r\n\t\t\r\n\t}",
"public LimitedInputStream(InputStream stream, int limit) {\r\n super();\r\n this.stream = stream;\r\n this.remaining = limit;\r\n }",
"public Range() {\n }",
"public OERInputStream(InputStream src, int maxByteAllocation)\n {\n super(src);\n this.maxByteAllocation = maxByteAllocation;\n }",
"public PortRange() {\n this(UNBOUND, UNBOUND);\n }",
"private RangeFilter(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public CopyingRangeMarker(int offset, int length) {\n super(offset, length);\n }",
"private ContentRange parseRange(HttpRequest request, long payloadSize)\n throws ByteRange.RangeFormatException {\n Header rangeHeader = request.getFirstHeader(CONTENT_RANGE);\n if (rangeHeader == null || rangeHeader.getValue() == null) {\n // The payload is the full file.\n return new ContentRange(new ByteRange(0), payloadSize);\n }\n\n return ContentRange.parse(rangeHeader.getValue());\n }",
"protected InputStream createBufferedBoundedStream(long offset, int size, boolean pread) {\n return new BufferedInputStream(new BoundedRangeFileInputStream(istream, offset, size, pread),\n Math.min(DEFAULT_BUFFER_SIZE, size));\n }",
"public charRange() {\n start = -1;\n end = -1;\n }",
"public DataRange( Range range, RandomAccessFile randAccess) throws IOException{\r\n\t\t\r\n\t\tthis.range = range;\r\n\t\tthis.data = new BufferingOutputStream( threshold );\r\n\t\t\r\n\t\trandAccess.seek( range.getStart() );\r\n\t\tlong length = range.getFinish() - range.getStart();\r\n\t\t\r\n\t\tbyte[] buffer = new byte[2048];\r\n\t\tint bytesLeft = (int) length;\r\n\t\tint bytesRead = Math.min( bytesLeft, buffer.length );\r\n\t\t\r\n\t\twhile ( bytesLeft > 0 ) {\r\n\t\t\trandAccess.read(buffer, 0, bytesRead);\r\n\t\t\tdata.write( buffer, 0, bytesRead );\r\n\t\t\tbytesLeft -= bytesRead;\r\n\t\t\tbytesRead = Math.min( bytesLeft, buffer.length );\r\n\t\t}\r\n\t\t\r\n\t\tdata.close();\r\n\t\t\r\n\t}",
"@Override\n protected void initLengthRange()\n {\n setLengthRange( 10);\n }",
"public Range(int length) {\n assert (length != 0);\n this.name = null;\n this.first = 0;\n this.last = length - 1;\n this.stride = 1;\n this.length = length;\n }",
"public MonitorableInputStream(InputStream aIn, int aMaximum) throws IOException {\n this(aIn, false);\n iMaxSet = true;\n }",
"abstract public Range createRange();",
"public Range(int min, int max){\n this.min=min;\n this.max=max;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fetch records that have create_time BETWEEN lowerInclusive AND upperInclusive | public List<com.wuda.foundation.jooq.code.generation.commons.tables.pojos.TaskPhase> fetchRangeOfCreateTime(LocalDateTime lowerInclusive, LocalDateTime upperInclusive) {
return fetchRange(TaskPhase.TASK_PHASE.CREATE_TIME, lowerInclusive, upperInclusive);
} | [
"public List<com.wuda.foundation.jooq.code.generation.commons.tables.pojos.PropertyValue> fetchRangeOfCreateTime(LocalDateTime lowerInclusive, LocalDateTime upperInclusive) {\n return fetchRange(PropertyValue.PROPERTY_VALUE.CREATE_TIME, lowerInclusive, upperInclusive);\n }",
"public List<com.wuda.foundation.jooq.code.generation.user.tables.pojos.UserEmail> fetchRangeOfCreateTime(LocalDateTime lowerInclusive, LocalDateTime upperInclusive) {\n return fetchRange(UserEmail.USER_EMAIL.CREATE_TIME, lowerInclusive, upperInclusive);\n }",
"public List<com.wuda.foundation.jooq.code.generation.commons.tables.pojos.MenuItemCore> fetchRangeOfCreateTime(LocalDateTime lowerInclusive, LocalDateTime upperInclusive) {\n return fetchRange(MenuItemCore.MENU_ITEM_CORE.CREATE_TIME, lowerInclusive, upperInclusive);\n }",
"public List<com.wuda.foundation.user.impl.jooq.generation.tables.pojos.Role> fetchRangeOfCreateTime(LocalDateTime lowerInclusive, LocalDateTime upperInclusive) {\n return fetchRange(Role.ROLE.CREATE_TIME, lowerInclusive, upperInclusive);\n }",
"public LogEntrySet createTimeStampCondition(long lower, long upper)\n {\n LogEntrySet result = new LogEntrySet();\n \n for (LogEntry obj : this)\n {\n if (lower <= obj.getTimeStamp() && obj.getTimeStamp() <= upper)\n {\n result.add(obj);\n }\n }\n \n return result;\n }",
"public List<TaskEntity> fetchRangeOfStartTime(Long lowerInclusive, Long upperInclusive) {\n return fetchRange(Task.TASK.START_TIME, lowerInclusive, upperInclusive);\n }",
"public List<com.wuda.foundation.jooq.code.generation.commons.tables.pojos.TaskPhase> fetchRangeOfCreateUserId(ULong lowerInclusive, ULong upperInclusive) {\n return fetchRange(TaskPhase.TASK_PHASE.CREATE_USER_ID, lowerInclusive, upperInclusive);\n }",
"public List<cn.edu.nju.teamwiki.jooq.tables.pojos.Document> fetchRangeOfUploadedTime(LocalDateTime lowerInclusive, LocalDateTime upperInclusive) {\n return fetchRange(Document.DOCUMENT.UPLOADED_TIME, lowerInclusive, upperInclusive);\n }",
"List<Ticket> findAllByDateTimeBetween(LocalDateTime minDateTime, LocalDateTime maxDateTime);",
"@Query(\"select t from Ticket t where t.dateTime between ?1 and ?2\")\n List<Ticket> fetchAllTicketsBetweenDates(LocalDateTime minDate, LocalDate maxDate);",
"public LogEntrySet filterTimeStamp(long lower, long upper)\n {\n LogEntrySet result = new LogEntrySet();\n \n for (LogEntry obj : this)\n {\n if (lower <= obj.getTimeStamp() && obj.getTimeStamp() <= upper)\n {\n result.add(obj);\n }\n }\n \n return result;\n }",
"List<Record> getFilteredRecords(LocalDateTime from, LocalDateTime to);",
"List<Visitor> getAllByEnterTimeBetween(LocalDateTime startTime, LocalDateTime endTime);",
"List<Record> getFilteredRecords(long userId, LocalDateTime from, LocalDateTime to);",
"List<Alert> getAlertsInCreatedRange(Instant inclusiveStart, Instant inclusiveEnd, List<String> wellFilter, int limit) throws SQLException;",
"public List<UUID> findPostUUIDsByTimeRange( DateTime start, DateTime end ) {\n // this method assumes the number of keys for the range is \"not too big\" so as to blow\n // out thrift's frame buffer or cause cassandra to take too long and \"time out\"\n DateTime firstRow = calculatePostTimeGranularity(start);\n DateTime lastRow = calculatePostTimeGranularity(end);\n\n MultigetSliceQuery<String, UUID, byte[]> q = HFactory.createMultigetSliceQuery(keyspace, StringSerializer.get(), UUIDSerializer.get(), BytesArraySerializer.get());\n q.setColumnFamily(CF_POSTS_BY_TIME);\n\n // determine all the rows required to satisfy the time range and set as the 'row keys' for the query\n // each row key is \"pre-decided\" to be hours of the day\n DateTime current = firstRow;\n List<String> rowKeys = new LinkedList<String>();\n while ( current.isBefore(lastRow) || current.isEqual(lastRow) ) {\n rowKeys.add(hourFormatter.print(current));\n current = current.plusHours(1);\n }\n q.setKeys(rowKeys);\n q.setRange(null, null, false, 1000); // this is an assumption that there will not be more than 1000 posts in one hour\n\n QueryResult<Rows<String, UUID, byte[]>> qr = q.execute();\n Rows<String, UUID, byte[]> rows = qr.get();\n if ( null == rows || 0 == rows.getCount() ) {\n return null;\n }\n\n long startAsLong = start.getMillis();\n long endAsLong = end.getMillis();\n\n // loop over result rows, only adding to uuidList if Post time is between range\n List<UUID> uuidList = new LinkedList<UUID>();\n for ( Row<String, UUID, byte[]> row : rows ) {\n ColumnSlice<UUID, byte[]> slice = row.getColumnSlice();\n for ( HColumn<UUID, byte[]> col : slice.getColumns() ) {\n long t = TimeUUIDUtils.getTimeFromUUID(col.getName());\n if ( t > endAsLong ) {\n break;\n }\n\n if ( t >= startAsLong ) {\n uuidList.add(col.getName());\n }\n }\n }\n\n return uuidList;\n }",
"public List<Measurement> findMeasurementsByTimeRange(Date fromDate, Date toDate) {\n return entityManager.createQuery(\"SELECT m from \" +\n \"Measurement m where m.date >= :fromDate and m.date <= :toDate\", Measurement.class)\n .setParameter(\"fromDate\", fromDate)\n .setParameter(\"toDate\", toDate)\n .getResultList();\n\n }",
"List<Reservation> getReservationsByInterval(LocalDateTime fromTime, LocalDateTime tillTime);",
"public List<com.wuda.foundation.jooq.code.generation.commons.tables.pojos.PropertyValue> fetchRangeOfCreateUserId(ULong lowerInclusive, ULong upperInclusive) {\n return fetchRange(PropertyValue.PROPERTY_VALUE.CREATE_USER_ID, lowerInclusive, upperInclusive);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Builds the ATR data structures for an action parameter from the corresponding XML structures. | private void paramsToAtr(final List<ParamType> paramsXml,
final Modality modality,
final String version,
final String namespace,
List<ATRParameter> params,
Map<String, ATRTerm> actionPropMap)
throws PALException {
for (ParamType paramXml : paramsXml) {
/* Build the ATRParameter. */
String name = paramXml.getId();
ATRVariable var = ctrBuilder.createVariable(name);
String paramTypeStr = paramXml.getTypeRef().getTypeId();
TypeName paramTypeName = TypeNameFactory.makeName(paramTypeStr,
version, namespace);
String typeStr = paramTypeName.getFullName();
ATRTerm defValTerm = null;
if (modality == Modality.INPUT) {
String defValStr = paramXml.getDefaultValue();
if (defValStr != null) {
TypeDef type = (TypeDef) getActionModel().getType(
paramTypeName);
if (type instanceof CustomTypeDef
|| type instanceof EnumeratedTypeDef
|| type instanceof PrimitiveTypeDef) {
defValTerm = ctrBuilder.createLiteral(defValStr, typeStr);
} else if (type instanceof CollectionTypeDef
|| type instanceof StructDef) {
try {
defValTerm = ATRSyntax.CTR.termFromSource(defValStr);
defValTerm = normalize(defValTerm, version,
namespace);
} catch (LumenSyntaxError e) {
throw new PALException(
"Cannot parse default value for " + name
+ ": " + defValStr, e);
}
} else {
throw new RuntimeException("Unknown type " + type
+ " of param " + name);
}
}
}
ATRParameter param = ctrBuilder.createParameter(var, modality,
typeStr, defValTerm);
params.add(param);
/*
* Each parameter has its own map in the action's properties. Start
* by putting this parameter's class into the map.
*/
Map<String, ATRTerm> propMap = new HashMap<String, ATRTerm>();
ParamClassType paramClassXml = paramXml.getClazz();
ParamClass paramClass;
Boolean violable = null;
if (paramClassXml != null) {
paramClass = ParamClass.getValueOf(paramClassXml.getClazz());
violable = paramClassXml.isViolable();
} else {
if (modality == Modality.INPUT) {
paramClass = ParamClass.GENERALIZABLE;
} else {
paramClass = ParamClass.EXTERNAL;
}
}
if (paramClass.isInput()) {
if (modality != Modality.INPUT) {
throw new IllegalArgumentException("Param " + name
+ " is class " + paramClass
+ " which must be input");
}
} else {
if (modality != Modality.OUTPUT) {
throw new IllegalArgumentException("Param " + name
+ " is class " + paramClass
+ " which must be output");
}
}
propMap.put(TypeUtil.PARAM_CLASS,
ctrBuilder.createLiteral(paramClass.getName(), null));
if (violable != null) {
propMap.put(TypeUtil.PARAM_CLASS_VIOLABLE,
ctrBuilder.createLiteral(violable.toString(), null));
}
/*
* Bindings between this parameter and any action families the
* action belongs to.
*/
Map<TypeName, Set<String>> bindings = new HashMap<TypeName, Set<String>>();
for (ActionIdiomParamType binding : paramXml.getIdiomParam()) {
String familyStr = binding.getFamily();
String role = binding.getRole();
SimpleTypeName familyName = (SimpleTypeName) TypeNameFactory
.makeName(familyStr, version, namespace);
/* Does this action belong to that family? */
boolean found = false;
ATRList actFams = (ATRList) actionPropMap
.get(TypeUtil.ACTION_FAMILIES);
for (ATRTerm t : actFams.getTerms()) {
ATRLiteral actFamLit = (ATRLiteral) t;
String actFamStr = actFamLit.getString();
SimpleTypeName actFamName = (SimpleTypeName) TypeNameFactory
.makeName(actFamStr, version, namespace);
if (actFamName.equals(familyName)) {
found = true;
}
}
if (!found) {
throw new PALException("Param " + name
+ " bound to family " + familyName
+ ", but action isn't bound to " + familyName);
}
/* Does that family contain the role we bind to? */
ActionFamilyDef famDef = (ActionFamilyDef) getActionModel()
.getType(familyName);
if (famDef.getParamNum(role) == -1) {
throw new PALException("Param " + name
+ "bound to non-existent role " + role
+ " of family " + familyName);
}
Set<String> familyBindings = bindings.get(familyName);
if (familyBindings == null) {
familyBindings = new HashSet<String>();
bindings.put(familyName, familyBindings);
}
familyBindings.add(role);
}
/* Convert it to an ATR structure. */
Map<String, ATRTerm> bindingsMap = new HashMap<String, ATRTerm>();
for(Entry<TypeName, Set<String>> entry : bindings.entrySet()) {
TypeName key = entry.getKey();
Set<String> rolesStr = entry.getValue();
List<ATRTerm> rolesTerm = new ArrayList<ATRTerm>();
for (String role : rolesStr) {
ATRLiteral roleLit = ctrBuilder.createLiteral(role, null);
rolesTerm.add(roleLit);
}
Collections.sort(rolesTerm, termSorter);
bindingsMap.put(key.getFullName(),
ctrBuilder.createList(rolesTerm));
}
propMap.put(TypeUtil.PARAM_ROLE, ctrBuilder.createMap(bindingsMap));
/* Parameter description. */
String descr = paramXml.getDescription();
if (descr == null) {
descr = "";
}
ATRLiteral descrTerm = ctrBuilder.createLiteral(descr, null);
propMap.put(TypeUtil.PARAM_DESCRIPTION, descrTerm);
/* Other metadata. */
for (MetadataType meta : paramXml.getMetadata()) {
String key = meta.getKey();
String value = meta.getValue();
ATRLiteral valueTerm = ctrBuilder.createLiteral(value, null);
propMap.put(key, valueTerm);
}
/*
* Finally, add the new properties map for this parameter to the
* parent action's props.
*/
ATRMap props = ctrBuilder.createMap(propMap);
actionPropMap.put("$" + name, props);
}
} | [
"public ATRActionDeclaration toAtr(ActionType xml,\n String version,\n String namespace)\n throws PALException {\n String id = xml.getId();\n SimpleTypeName name = (SimpleTypeName) TypeNameFactory.makeName(id,\n version, namespace);\n\n Map<String, ATRTerm> propMap = new HashMap<String, ATRTerm>();\n InheritType inheritXml = xml.getInherit();\n if (inheritXml != null) {\n String parentName = inheritXml.getParent();\n SimpleTypeName parentTypeName = (SimpleTypeName) TypeNameFactory\n .makeName(parentName, version, namespace);\n ActionModelDef parentRawType = getActionModel().getType(\n parentTypeName);\n if (parentRawType == null) {\n throw new PALException(\"Couldn't retrieve parent type \"\n + parentTypeName + \" of \" + name);\n }\n if (!(parentRawType instanceof ActionDef)) {\n throw new IllegalArgumentException(\"Action \" + id\n + \"'s parent \" + parentName + \" must be an action\");\n }\n propMap.put(TypeUtil.PARENT,\n ctrBuilder.createLiteral(parentTypeName.getFullName(), null));\n }\n String description = xml.getDescription();\n description = trimWhitespace(description);\n\n ATRTerm descrTerm = ctrBuilder.createLiteral(description, null);\n propMap.put(TypeDef.DESCRIPTION, descrTerm);\n for (MetadataType metadataXml : xml.getMetadata()) {\n String key = metadataXml.getKey();\n String value = metadataXml.getValue();\n value = trimWhitespace(value);\n ATRTerm valueTerm = ctrBuilder.createLiteral(value, null);\n propMap.put(key, valueTerm);\n }\n\n List<ActionIdiomFamilyType> familiesXml = xml.getIdiomFamily();\n List<ATRTerm> familiesAtr = new ArrayList<ATRTerm>();\n for (ActionIdiomFamilyType family : familiesXml) {\n String familyStr = family.getFamily();\n SimpleTypeName familyName = (SimpleTypeName) TypeNameFactory\n .makeName(familyStr, version, namespace);\n ActionModelDef amDef = getActionModel().getType(familyName);\n if (amDef == null) {\n throw new PALException(\"Couldn't retrieve family \" + familyName\n + \" of action \" + name);\n }\n if (!(amDef instanceof ActionFamilyDef)) {\n throw new IllegalArgumentException(familyName + \" of action \"\n + name + \" is not an action family\");\n }\n familiesAtr.add(ctrBuilder.createLiteral(familyName.getFullName(), null));\n }\n Collections.sort(familiesAtr, termSorter);\n ATRList familiesTerm = ctrBuilder.createList(familiesAtr);\n propMap.put(TypeUtil.ACTION_FAMILIES, familiesTerm);\n\n String categoryStr = xml.getCategory();\n ActionCategory category = null;\n if (categoryStr != null) {\n category = ActionCategory.getValueOf(categoryStr);\n }\n if (category == null) {\n category = ActionCategory.EFFECTOR;\n }\n ATRLiteral categoryTerm = ctrBuilder.createLiteral(category.getName(), null);\n propMap.put(TypeUtil.ACTION_CATEGORY, categoryTerm);\n\n ConstraintsType xmlCons = xml.getConstraints();\n ATRNoEvalTerm atrCons = atrConstraints(xmlCons, version, namespace);\n propMap.put(TypeUtil.CONSTRAINTS, atrCons);\n\n List<ATRParameter> params = new ArrayList<ATRParameter>();\n paramsToAtr(xml.getInputParam(), Modality.INPUT, version, namespace,\n params, propMap);\n paramsToAtr(xml.getOutputParam(), Modality.OUTPUT, version, namespace,\n params, propMap);\n\n if (xml.isBenign() != null && xml.isBenign()) {\n propMap.put(TypeUtil.BENIGN, ctrBuilder.createLiteral(\"true\", null));\n }\n\n /* Deal with collapsibility. */\n CollapsibleType collapse = xml.getCollapsible();\n if (collapse != null) {\n Map<String, ATRTerm> collapseMap = new HashMap<String, ATRTerm>();\n CollapsibleOptionType inside = collapse.getInsideGesture();\n CollapsibleOptionType outside = collapse.getOutsideGesture();\n if (inside == null) {\n inside = CollapsibleOptionType.ALL;\n }\n if (outside == null) {\n outside = CollapsibleOptionType.ALL;\n }\n collapseMap.put(TypeUtil.COLLAPSIBLE_INSIDE_GESTURE,\n ctrBuilder.createLiteral(inside.value(), null));\n collapseMap.put(TypeUtil.COLLAPSIBLE_OUTSIDE_GESTURE,\n ctrBuilder.createLiteral(outside.value(), null));\n\n for (CollapsibleParamType param : collapse.getParam()) {\n String paramName = param.getId();\n /* Does that param exist? */\n boolean found = false;\n for (ATRParameter atrParam : params) {\n if (atrParam.getVariable().getVariableName()\n .equals(paramName)) {\n found = true;\n }\n }\n if (!found) {\n throw new PALException(\n \"Collapsible refers to non-existent param \"\n + paramName);\n }\n\n String keep = param.getKeep();\n collapseMap\n .put(\"$\" + paramName, ctrBuilder.createLiteral(keep, null));\n }\n\n propMap.put(TypeUtil.COLLAPSIBLE, ctrBuilder.createMap(collapseMap));\n }\n\n ATRSig sig = ctrBuilder.createSignature(name.getFullName(), params);\n ATRMap props = ctrBuilder.createMap(propMap);\n\n /*\n * EXECUTEJ is used by the Agave actions, noted as a metadata\n * annotation.\n */\n ATRActionDeclaration result;\n if (propMap.containsKey(TypeUtil.EXECUTEJ)) {\n ATRTerm callMethodTerm = propMap.get(TypeUtil.EXECUTEJ);\n String callMethod = ((ATRLiteral) callMethodTerm).getString();\n result = ctrBuilder.createActionDeclaration(sig, callMethod, props);\n } else {\n result = ctrBuilder.createActionDeclaration(sig, (ATRTask) null,\n props);\n }\n if (log.isDebugEnabled()) {\n log.debug(\"Built action: {}\", ATRSyntax.toSource(result));\n }\n return result;\n }",
"public void assembleParameters() throws ConversionException {\n parameters = new ArrayList<>();\n List<ParameterValueAttribute> params = ((ProtocolApplicationNode)node).parameterValues;\n for(ParameterValueAttribute param : params) {\n // Code to retrieve the run number, if any - an artificial parameter.\n if(RUN_PARAM.equalsIgnoreCase(SDRFUtils.parseHeader(param.getAttributeType()))) {\n setRunNumber(param.getAttributeValue());\n }\n else {\n ProtocolApplicationParameter parameter = new ProtocolApplicationParameter(name, param, addition);\n parameters.add(parameter);\n }\n }\n }",
"public LCActionParameter()\r\n\t{\r\n\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n private static void parseActions() throws DataConversionException {\n \t\n \tlogger.info(\"Parsing actions !\");\n \t\n imagingActions = new ArrayList<ImagingAction>();\n \n SAXBuilder sxb = new SAXBuilder();\n Document document = null;\n try {\n String url = \"imaging-fdsdocument-actions.xml\";\n URI uri = ImagingActionsParser.class.getClassLoader().getResource(url).toURI();\n File actionsFileDefinition = new File(uri);\n document = sxb.build(actionsFileDefinition);\n } catch (Exception e) {\n logger.error(\"Cannot parse imaging actions xml !\");\n }\n\n Element racine = document.getRootElement();\n List<Element> actions = (List<Element>) racine.getChildren(\"action\");\n Iterator<Element> actionsIterator = actions.iterator();\n while (actionsIterator.hasNext()) {\n Element currentAction = actionsIterator.next();\n \n //Constructor put default values\n ImagingAction imagingAction = new ImagingAction();\n //ACTION NAME\n imagingAction.setName(currentAction.getChild(\"name\").getText());\n //ACTION TYPE\n Attribute attrType = currentAction.getAttribute(\"type\");\n if (attrType != null) {\n imagingAction.setType(attrType.getValue());\n if (attrType.getValue().equals(\"url\")) {\n \t//ACTION URL TARGET\n \tAttribute attrTarget = currentAction.getAttribute(\"target\");\n \timagingAction.setUrlTarget(attrTarget.getValue());\n }\n }\n //ACTION URL\n Element urlElement = currentAction.getChild(\"url\");\n if (urlElement != null) {\n imagingAction.setUrl(urlElement.getText());\n }\n //ACTION EVALUATOR\n Element evaluatorsElement = currentAction.getChild(\"evaluators\");\n if (evaluatorsElement != null) {\n\t List<Element> evaluators = (List<Element>) evaluatorsElement.getChildren(\"evaluator\");\n\t Iterator<Element> evalIterator = evaluators.iterator();\n\t while (evalIterator.hasNext()) {\n\t Element evaluator = evalIterator.next();\n\t Attribute negateAttribute = evaluator.getAttribute(\"negate\");\n\t boolean negate = false;\n\t if (negateAttribute != null && negateAttribute.getBooleanValue()) {\n\t negate = true;\n\t }\n\t imagingAction.addEvaluator(new ImagingActionEvaluator(evaluator.getText(), negate));\n\t }\n }\n //ACTION DISPLAY VIEWS\n Element displayElement = currentAction.getChild(\"display\");\n if (displayElement != null) {\n\t List<Element> views = (List<Element>) displayElement.getChildren(\"view\");\n\t Iterator<Element> viewIterator = views.iterator();\n\t while (viewIterator.hasNext()) {\n\t Element view = viewIterator.next();\n\t imagingAction.addView(view.getText());\n\t }\n }\n imagingActions.add(imagingAction);\n }\n }",
"private Tree buildAttributeTree() throws ActionException {\n\t\tStringBuilder sql = new StringBuilder(100);\n\t\tsql.append(\"SELECT c.ATTRIBUTE_ID, c.PARENT_ID, c.ATTRIBUTE_NM, p.ATTRIBUTE_NM as PARENT_NM \");\n\t\tsql.append(\"FROM \").append(customDbSchema).append(\"BIOMEDGPS_COMPANY_ATTRIBUTE c \");\n\t\tsql.append(LEFT_OUTER_JOIN).append(customDbSchema).append(\"BIOMEDGPS_COMPANY_ATTRIBUTE p \");\n\t\tsql.append(\"ON c.PARENT_ID = p.ATTRIBUTE_ID \");\n\t\tlog.debug(sql);\n\t\tList<Node> attributes = new ArrayList<>();\n\t\ttry (PreparedStatement ps = dbConn.prepareStatement(sql.toString())) {\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tNode n = new Node(rs.getString(\"ATTRIBUTE_ID\"), rs.getString(\"PARENT_ID\"));\n\t\t\t\tif (\"profile\".equals(rs.getString(\"ATTRIBUTE_NM\"))) {\n\t\t\t\t\tn.setNodeName(rs.getString(\"PARENT_NM\"));\n\t\t\t\t} else {\n\t\t\t\t\tn.setNodeName(rs.getString(\"ATTRIBUTE_NM\"));\n\t\t\t\t}\n\t\t\t\tattributes.add(n);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tthrow new ActionException(e);\n\t\t}\n\t\tTree t = new Tree(attributes);\n\t\tt.buildNodePaths(t.getRootNode(), Tree.DEFAULT_DELIMITER, true);\n\t\treturn t;\n\t}",
"private void handleParameters(Node node, ParamType paramType) {\n\n Parameters parameters = new Parameters();\n parameters.setName(node.attributes().get(\"name\").toString());\n Map<String, Object> parameter = new HashMap<String, Object>();\n\n Iterator<Node> itr = node.childNodes();\n while (itr.hasNext()) {\n Node childNode = itr.next();\n String key = childNode.attributes().get(\"name\").toString();\n String value = childNode.attributes().get(\"value\").toString();\n parameter.put(key, value);\n }\n parameters.setParameter(parameter);\n switch (paramType) {\n\n case TESTSUITE:\n testSuite.addParameters(parameters);\n break;\n case TESTCASE:\n currentTestCase.addParameters(parameters);\n break;\n case TESTSTEP:\n currentTestStep.addParameters(parameters);\n break;\n case PERMUTATION:\n currentPermutation.addParameters(parameters);\n break;\n }\n\n }",
"ATRActionDeclaration toAtr(FamilyType familyXml,\n String version,\n String namespace) {\n String id = familyXml.getId();\n TypeName name = TypeNameFactory.makeName(id, version, namespace);\n List<ActionFamilyParamType> inputsXml = familyXml.getInputParam();\n List<ActionFamilyParamType> outputsXml = familyXml.getOutputParam();\n List<ATRParameter> params = new ArrayList<ATRParameter>();\n for (ActionFamilyParamType inputXml : inputsXml) {\n String role = inputXml.getRole();\n ATRVariable var = ctrBuilder.createVariable(role);\n ATRParameter param = ctrBuilder.createParameter(var,\n Modality.INPUT, null, null);\n params.add(param);\n }\n for (ActionFamilyParamType outputXml : outputsXml) {\n String role = outputXml.getRole();\n ATRVariable var = ctrBuilder.createVariable(role);\n ATRParameter param = ctrBuilder.createParameter(var,\n Modality.OUTPUT, null, null);\n params.add(param);\n }\n ATRSig sig = ctrBuilder.createSignature(name.getFullName(), params);\n\n Map<String, ATRTerm> propMap = new HashMap<String, ATRTerm>();\n propMap.put(TypeUtil.TYPE, ctrBuilder.createLiteral(TypeUtil.TYPE_FAMILY, null));\n ATRMap props = ctrBuilder.createMap(propMap);\n ATRActionDeclaration result = ctrBuilder.createActionDeclaration(sig, (ATRTask) null, props);\n if (log.isDebugEnabled()) {\n log.debug(\"Built action family: {}\", ATRSyntax.toSource(result));\n }\n return result;\n }",
"public ATRFunctionDeclaration toAtr(ConstraintDeclarationType xml,\n String version,\n String namespace) {\n String id = xml.getId();\n SimpleTypeName name = (SimpleTypeName) TypeNameFactory.makeName(id,\n version, namespace);\n\n Map<String, ATRTerm> propMap = new HashMap<String, ATRTerm>();\n for (MetadataType metadataXml : xml.getMetadata()) {\n String key = metadataXml.getKey();\n String value = metadataXml.getValue();\n value = trimWhitespace(value);\n ATRTerm valueTerm = ctrBuilder.createLiteral(value, null);\n propMap.put(key, valueTerm);\n }\n\n List<ConstraintDeclParamType> paramsXml = xml.getParam();\n List<ATRTerm> paramDescrs = new ArrayList<ATRTerm>();\n List<ATRParameter> params = new ArrayList<ATRParameter>();\n for (int i = 0; i < paramsXml.size(); i++) {\n ConstraintDeclParamType paramXml = paramsXml.get(i);\n\n // Build a parameter for this field.\n ATRVariable var = ctrBuilder.createVariable(paramXml.getId());\n ATRParameter param = ctrBuilder.createParameter(var,\n Modality.INPUT, null, null);\n params.add(param);\n\n // Also get the description for this field.\n String descrStr = paramXml.getDescription();\n if (descrStr == null) {\n descrStr = \"\";\n }\n ATRLiteral descr = ctrBuilder.createLiteral(descrStr, null);\n paramDescrs.add(descr);\n }\n propMap.put(TypeUtil.CONSTRAINT_DESCRIPTIONS,\n ctrBuilder.createList(paramDescrs));\n\n ATRMap props = ctrBuilder.createMap(propMap);\n ATRSig sig = ctrBuilder.createSignature(name.getFullName(), params);\n ATRNoEvalTerm eval = ctrBuilder.createNoEval(ctrBuilder\n .createSymbol(name.getFullName()));\n ATRFunctionDeclaration atr = ctrBuilder.createFunctionDeclaration(sig,\n eval, null, props);\n return atr;\n }",
"public UrlRewriteActionParameters() {\n odatatype = \"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRewriteActionParameters\";\n }",
"private void retrieveArchives(ActionRequest req) throws ActionException {\n\t\tString attributeType = req.getParameter(TYPE_CD);\n\t\tString companyAttributeGroupId = req.getParameter(\"companyAttributeGroupId\");\n\t\tList<Object> params = new ArrayList<>();\n\n\t\tStringBuilder sql = new StringBuilder(150);\n\t\tsql.append(DBUtil.SELECT_FROM_STAR);\n\t\tsql.append(customDbSchema).append(\"BIOMEDGPS_COMPANY_ATTRIBUTE_XR xr \");\n\t\tsql.append(LEFT_OUTER_JOIN).append(customDbSchema).append(\"BIOMEDGPS_COMPANY_ATTRIBUTE a \");\n\t\tsql.append(\"on a.ATTRIBUTE_ID = xr.ATTRIBUTE_ID \");\n\t\tsql.append(DBUtil.WHERE_1_CLAUSE);\n\t\tif (!StringUtil.isEmpty(attributeType)) {\n\t\t\tsql.append(\"and TYPE_NM = ? \");\n\t\t\tparams.add(attributeType);\n\t\t}\n\t\tsql.append(\"and xr.company_attribute_group_id = ? and xr.company_attribute_id != ?\");\n\t\tsql.append(\"ORDER BY xr.create_dt desc \");\n\t\tparams.add(companyAttributeGroupId);\n\t\tparams.add(companyAttributeGroupId);\n\n\t\tlog.debug(sql+\"|\"+companyAttributeGroupId+\"|\"+attributeType);\n\t\tDBProcessor db = new DBProcessor(dbConn);\n\n\t\t// DBProcessor returns a list of objects that need to be individually cast to attributes\n\t\tList<Object> results = db.executeSelect(sql.toString(), params, new CompanyAttributeVO());\n\t\tTree t = buildAttributeTree();\n\n\t\tfor (Object o : results) {\n\t\t\tCompanyAttributeVO c = (CompanyAttributeVO)o;\n\t\t\tNode n = t.findNode(c.getAttributeId());\n\t\t\tString[] split = n.getFullPath().split(Tree.DEFAULT_DELIMITER);\n\t\t\tif (\"LINK\".equals(c.getAttributeTypeName()) ||\n\t\t\t\t\t\"ATTACH\".equals(c.getAttributeTypeName())) {\n\t\t\t\tc.setGroupName(StringUtil.capitalizePhrase(c.getAttributeName()));\n\t\t\t} else if (split.length >= 1) {\n\t\t\t\tc.setGroupName(split[0]);\n\t\t\t}\n\t\t}\n\n\t\tputModuleData(results, results.size(), false);\n\t}",
"protected void parseParameters(VoltXMLElement root) {\n VoltXMLElement paramsNode = null;\n for (VoltXMLElement node : root.children) {\n if (node.name.equalsIgnoreCase(\"parameters\")) {\n paramsNode = node;\n break;\n }\n }\n if (paramsNode == null) {\n return;\n }\n\n for (VoltXMLElement node : paramsNode.children) {\n if (node.name.equalsIgnoreCase(\"parameter\")) {\n long id = Long.parseLong(node.attributes.get(\"id\"));\n String typeName = node.attributes.get(\"valuetype\");\n String isVectorParam = node.attributes.get(\"isvector\");\n\n // Get the index for this parameter in the EE's parameter vector\n String indexAttr = node.attributes.get(\"index\");\n assert(indexAttr != null);\n int index = Integer.parseInt(indexAttr);\n\n VoltType type = VoltType.typeFromString(typeName);\n ParameterValueExpression pve = new ParameterValueExpression();\n pve.setParameterIndex(index);\n pve.setValueType(type);\n if (isVectorParam != null && isVectorParam.equalsIgnoreCase(\"true\")) {\n pve.setParamIsVector();\n }\n m_paramsById.put(id, pve);\n m_paramsByIndex.put(index, pve);\n }\n }\n }",
"public final void action() throws RecognitionException {\r\n GrammarAST amp=null;\r\n GrammarAST id1=null;\r\n GrammarAST id2=null;\r\n GrammarAST a1=null;\r\n GrammarAST a2=null;\r\n\r\n\r\n \tString scope=null;\r\n \tGrammarAST nameAST=null, actionAST=null;\r\n\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/DefineGrammarItemsWalker.g:168:2: ( ^(amp= AMPERSAND id1= ID (id2= ID a1= ACTION |a2= ACTION ) ) )\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/DefineGrammarItemsWalker.g:168:4: ^(amp= AMPERSAND id1= ID (id2= ID a1= ACTION |a2= ACTION ) )\r\n {\r\n amp=(GrammarAST)match(input,AMPERSAND,FOLLOW_AMPERSAND_in_action279); if (state.failed) return ;\r\n\r\n match(input, Token.DOWN, null); if (state.failed) return ;\r\n id1=(GrammarAST)match(input,ID,FOLLOW_ID_in_action283); if (state.failed) return ;\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/DefineGrammarItemsWalker.g:169:4: (id2= ID a1= ACTION |a2= ACTION )\r\n int alt10=2;\r\n int LA10_0 = input.LA(1);\r\n\r\n if ( (LA10_0==ID) ) {\r\n alt10=1;\r\n }\r\n else if ( (LA10_0==ACTION) ) {\r\n alt10=2;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return ;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 10, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n switch (alt10) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/DefineGrammarItemsWalker.g:169:6: id2= ID a1= ACTION\r\n {\r\n id2=(GrammarAST)match(input,ID,FOLLOW_ID_in_action292); if (state.failed) return ;\r\n\r\n a1=(GrammarAST)match(input,ACTION,FOLLOW_ACTION_in_action296); if (state.failed) return ;\r\n\r\n if ( state.backtracking==0 ) {scope=(id1!=null?id1.getText():null); nameAST=id2; actionAST=a1;}\r\n\r\n }\r\n break;\r\n case 2 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/DefineGrammarItemsWalker.g:171:6: a2= ACTION\r\n {\r\n a2=(GrammarAST)match(input,ACTION,FOLLOW_ACTION_in_action312); if (state.failed) return ;\r\n\r\n if ( state.backtracking==0 ) {scope=null; nameAST=id1; actionAST=a2;}\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n match(input, Token.UP, null); if (state.failed) return ;\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t grammar.defineNamedAction(amp,scope,nameAST,actionAST);\r\n \t\t }\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\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return ;\r\n }",
"@Before\n public void setUpParams() {\n params = new LinkedHashMap<>();\n\n //Nested map authenticate level 1\n Map<String, Object> authenticate = new LinkedHashMap<>();\n authenticate.put(\"user\", \"admin\");\n authenticate.put(\"password\", \"xxxxx\");\n\n //Nested map transaction level 1\n Map<String, Object> transaction = new LinkedHashMap<>();\n transaction.put(\"ProfileID\", \"999\");\n transaction.put(\"CustomerID\", \"777\");\n transaction.put(\"CustomerTransID\", \"x789dsahj67679\");\n\n /*//Map rdata level 2\n Map<String, Object> rdata = new LinkedHashMap<>();\n rdata.put(\"level-2-1\", \"param-1\");\n rdata.put(\"level-2-2\", \"param-2\");\n\n transaction.put(\"rdata\", rdata);*/\n\n params.put(\"authenticate\", authenticate);\n params.put(\"transaction\", transaction);\n\n// params.put(\"list\", Arrays.asList(\"Val0 Val0\", \"Val1\", \"Val2\"));\n }",
"void parseTablesAndParams(VoltXMLElement root) {\n // Parse parameters first to satisfy a dependency of expression parsing\n // which happens during table scan parsing.\n parseParameters(root);\n\n for (VoltXMLElement node : root.children) {\n if (node.name.equalsIgnoreCase(\"tablescan\")) {\n parseTable(node);\n }\n else if (node.name.equalsIgnoreCase(\"tablescans\")) {\n parseTables(node);\n }\n }\n }",
"public static void getParams() {\n\t\tAutoClicker.bankDelay = Integer.parseInt(bankDelayField.getText());\n\t\tAutoClicker.spaceDelay = Integer.parseInt(spaceDelayField.getText());\n\t\tAutoClicker.item1Amount = Integer.parseInt(amountField1.getText());\n\t\tAutoClicker.item2Amount = Integer.parseInt(amountField2.getText());\n\t\t\n\t\tif (!propertiesFlag) {AutoClicker.resetFlag = false;}\n\t\telse {AutoClicker.resetFlag = resetToggle.isSelected();}\n\t}",
"private void populateAdditionalFields(final File sessionDIR) throws ActionException {\r\n //prepare params by removing non xml path names\r\n final Map<String, Object> cleaned = XMLPathShortcuts.identifyUsableFields(session.getAdditionalValues(), XMLPathShortcuts.EXPERIMENT_DATA, false);\r\n\r\n if (cleaned.size() > 0) {\r\n final SAXReader reader = new SAXReader(user);\r\n final File xml = new File(sessionDIR.getParentFile(), sessionDIR.getName() + \".xml\");\r\n\r\n try {\r\n XFTItem item = reader.parse(xml.getAbsolutePath());\r\n\r\n try {\r\n item.setProperties(cleaned, true);\r\n } catch (Exception e) {\r\n failed(\"unable to map parameters to valid xml path: \" + e.getMessage());\r\n throw new ClientException(\"unable to map parameters to valid xml path: \", e);\r\n }\r\n\r\n FileWriter fw = null;\r\n try {\r\n fw = new FileWriter(xml);\r\n item.toXML(fw, false);\r\n } catch (IllegalArgumentException | IOException | SAXException e) {\r\n throw new ServerException(e);\r\n } finally {\r\n try {\r\n if (fw != null) {\r\n fw.close();\r\n }\r\n } catch (IOException ignored) {\r\n }\r\n }\r\n } catch (IOException | SAXException e1) {\r\n throw new ServerException(e1);\r\n }\r\n }\r\n }",
"@Override\n public void doInit() {\n action = (String) getRequestAttributes().get(\"action\");\n }",
"private static JAXBElement<ArrayOfAPIActionStep> GetActionStepsListFromNodeList(Node node) {\n //ActionStep\n JAXBElement<ArrayOfAPIActionStep> actionSteps = null;\n\n try {\n List actionStepsList = node.selectNodes(\"StepList\");\n\n if (actionStepsList.size() > 0) {\n Node actionStepsNode = (Node) actionStepsList.get(0);\n\n List childNodes = actionStepsNode.selectNodes(\"API_ActionStep\");\n\n if (childNodes.size() > 0) {\n\n ArrayOfAPIActionStep arrActionSteps = new ArrayOfAPIActionStep();\n for (int i = 0; i < childNodes.size(); i++) {\n\n Node childNode = (Node) childNodes.get(i);\n\n APIActionStep API_ActionStep = new APIActionStep();\n\n API_ActionStep.setAttributeID(\"\".equals(childNode.valueOf(\"AttributeID\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"AttributeID\"), \"\".getClass(),\n childNode.valueOf(\"AttributeID\")));\n\n API_ActionStep.setAttributeType(\"\".equals(childNode.valueOf(\"AttributeType\")) ? null\n : APIEnumAttributeTypes.valueOf(APIEnumAttributeTypes.fromValue(childNode.valueOf(\"AttributeType\")).toString()));\n\n API_ActionStep.setAnalogValue(\"\".equals(childNode.valueOf(\"AnalogValue\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"AnalogValue\"), Integer.class,\n Integer.parseInt(childNode.valueOf(\"AnalogValue\"))));\n\n API_ActionStep.setDigitalValue(\"\".equals(childNode.valueOf(\"DigitalValue\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"DigitalValue\"), Boolean.class,\n Boolean.parseBoolean(childNode.valueOf(\"DigitalValue\"))));\n\n API_ActionStep.setSerialValue(\"\".equals(childNode.valueOf(\"SerialValue\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"SerialValue\"), \"\".getClass(),\n childNode.valueOf(\"SerialValue\")));\n\n API_ActionStep.setOrderIndex(\"\".equals(childNode.valueOf(\"OrderIndex\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"OrderIndex\"), Integer.class,\n Integer.parseInt(childNode.valueOf(\"OrderIndex\"))));\n\n API_ActionStep.setLastModified(\"\".equals(childNode.valueOf(\"LastModified\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"LastModified\"), XMLGregorianCalendar.class,\n DatatypeFactory.newInstance().newXMLGregorianCalendar(childNode.valueOf(\"LastModified\"))));\n\n arrActionSteps.getAPIActionStep().add(API_ActionStep);\n }\n\n actionSteps = new JAXBElement<ArrayOfAPIActionStep>(\n new QName(API_Constants.NamespaceURI, \"StepList\"), ArrayOfAPIActionStep.class, arrActionSteps);\n actionSteps.setValue(arrActionSteps);\n\n }\n }\n } catch (Exception ex) {\n ApiLog.One.WriteException(ex);\n }\n return actionSteps;\n }",
"public HashMap<String, String> getAcsFilterParams() throws Exception {\n try {\n HashMap<String, String> fltParams = new HashMap<String, String>();\n String exprAcsParm = Messages.exprAcsParam;\n XPath xpath = XPathFactory.newInstance().newXPath();\n NodeList params = (NodeList) xpath.evaluate(exprAcsParm,\n \t\tdoc, XPathConstants.NODESET);\n String paramName = \"./param-name/text()\";\n String paramVal = \"./param-value/text()\";\n if (params != null) {\n for (int i = 0; i < params.getLength(); i++) {\n Element param = (Element) params.item(i);\n fltParams.put(xpath.evaluate(paramName, param),\n \t\txpath.evaluate(paramVal, param));\n }\n }\n return fltParams;\n } catch (Exception ex) {\n Activator.getDefault().log(ex.getMessage(), ex);\n throw new Exception(String.format(\"%s%s\",\n \t\tMessages.acsGetParamErr, ex.getMessage()));\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the picked ModelVertice. if there is no picked Vertice, this method returns null. | public Vertice getPickedModelVertice(){
Vertice pickVertice;
for(int i = 0; i < getModelVerticesCount(); i++){
pickVertice = getModelVertice(i);
if(pickVertice.isPicked){
return pickVertice;
}
}
return null;
} | [
"public Vertice selectPickedModelVertice(){\n\t\tunselectAllVertices();\n\t\tVertice pickVertice = getPickedModelVertice();\n\t\tif(pickVertice != null){\n\t\t\tselectModelVertice(pickVertice);\n\t\t\treturn pickVertice;\n\t\t}\n\t\treturn null;\n\t}",
"public Vertice getModelVertice(Vector3f _pos){\n\t\tint shortestIndex = -1;\n\t\tfloat shortestDistance = Float.MAX_VALUE;\n\t\tfloat dist = Float.MAX_VALUE;\n\t\tVertice pickVertice;\n\t\tfor(int i = 0; i < getModelVerticesCount(); i++){\n\t\t\tpickVertice = getModelVertice(i);\n\t\t\tdist = _pos.distance(pickVertice);\n\t\t\tif(dist < shortestDistance){\n\t\t\t\tshortestDistance = dist;\n\t\t\t\tshortestIndex = i;\n\t\t\t}\n\t\t}\n\t\treturn modelVertices.get(shortestIndex);\n\t}",
"public Vertice obtenerVertice() {\n return vertex;\n }",
"public boolean pickModelVertice(Linef pickray){\n\t\tint shortestIndex = -1;\n\t\tint oldPickedIndex = -1;\n\t\tfloat shortestDistance = -1;\n\t\tfloat dist = 0;\n\t\tVertice pickVertice;\n\t\tfor(int i = 0; i < getModelVerticesCount(); i++){\n\t\t\tpickVertice = getModelVertice(i);\n\t\t\tif(pickVertice.isPickable){\n\t\t\t\tif(pickVertice.isPicked){\n\t\t\t\t\toldPickedIndex = i;\n\t\t\t\t\tpickVertice.isPicked = false;\n\t\t\t\t}\n\t\t\t\tdist = pickray.getDistance(pickVertice);\n\t\t\t\t// make sure the picked vertice lies in the direction of the pickray\n\t\t\t\tif(pickray.direction.angle(pickVertice.subMake(pickray.theOrigin).normalize()) > 0){\n\t\t\t\t\tif(shortestDistance > 0){\n\t\t\t\t\t\tif(shortestDistance > dist){\n\t\t\t\t\t\t\tshortestDistance = dist;\n\t\t\t\t\t\t\tshortestIndex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tshortestDistance = dist;\n\t\t\t\t\t\tshortestIndex = i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(shortestIndex != -1){\n\t\t\tmodelVertices.get(shortestIndex).isPicked = true;\n//\t\t\tDebugger.verbose(\"PickRayAngle\", \"\" + pickray.direction.angle(getModelVertice(shortestIndex).subMake(pickray.theOrigin).normalize()));\n\t\t}\n\t\treturn (shortestIndex != oldPickedIndex)? true: false;\n\t}",
"public Vertice[] getSelectedVertices(){\n\t\tVertice selectedVertice;\n\t\tVertice[] vertices = new Vertice[getSelectedModelVerticeCount()];\n\t\tint index = 0;\n\t\tfor(int i = 0; i < getModelVerticesCount(); i++){\n\t\t\tselectedVertice = getModelVertice(i);\n\t\t\tif(selectedVertice.isSelected)\n\t\t\t\tvertices[index++] = selectedVertice;\n\t\t}\n\t\treturn vertices;\n\t}",
"public void selectModelVertice(Vertice vertice) {\n\n\t\tSegment tmpModelSegment;\n\t\tFace tmpSegmentFace;\n\t\tVertice tmpTextureVertice, tmpVertice;\n\n\t\tfor (int s = 0; s < getSegmentCount(); s++) {\n\t\t\ttmpModelSegment = segments.get(s);\n\t\t\tfor (int f = 0; f < tmpModelSegment.getFaceCount(); f++) {\n\t\t\t\ttmpSegmentFace = tmpModelSegment.getFace(f);\n\t\t\t\tfor (int v = 0; v < tmpSegmentFace.getVertexCount(); v++) {\n\t\t\t\t\ttmpVertice = tmpSegmentFace.getVertice(v);\n\t\t\t\t\tif(tmpVertice == vertice){\n\t\t\t\t\t\tif(tmpSegmentFace.hasUVs(v)){\n\t\t\t\t\t\t\ttmpTextureVertice = tmpSegmentFace.getUvs(v);\n\t\t\t\t\t\t\ttmpTextureVertice.isSelected = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttmpVertice.isSelected = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// even if this vertice is not use inside a face it can be selected\n\t\tvertice.isSelected = true;\n\t}",
"public Vehicle getModel(String model) {\n\t\tfor (int i = 0; i < vehicles.size(); i++) {\n\t\t\tVehicle temp = vehicles.get(i);\n\n\t\t\tif (temp.getModel().equals(model)) {\n\t\t\t\treturn temp;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}",
"public Object getSelectedItem() {\n\t\tint i = model.getSelectedIndex();\n\t\tif (i > -1) {\n\t\t\treturn model.getItemAt(i);\n\t\t}\n\t\treturn null;\n\t}",
"public Vertice getVertice(int elem){\n\t\treturn this.conjunto.get(elem);\n\t}",
"V getTargetVertex();",
"public V getValorVertice()\n\t{\n\t\treturn valorVertice;\n\t}",
"public Vertice GetExtremoInicial(){\r\n return this.Vi;\r\n }",
"public Vertex findVertById(int id) throws SQLException {\n\t\treturn rDb.findVertById(id);\n\t}",
"public VaultItem getSelectedItem() {\n VaultItem item = null;\n int rowIndex = getSelectedRow();\n if(rowIndex >= 0) {\n item = model.getItem(convertRowIndexToModel(rowIndex));\n }\n return item;\n }",
"public Vertex getVertice(int pos){\r\n \treturn adjacencyList[pos];\r\n }",
"public Vertice getVerticePosible(int elem){\n\t\treturn this.posibles.get(elem);\n\t}",
"public Vector3f getFirstVertex ()\n {\n return _v1;\n }",
"public Pattern getVertPattern() {\n\t\treturn vertPattern;\n\t}",
"public Object getVertex(){\r\n return this.vertex;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a Builder by copying an existing YChannel instance | private Builder(org.acalio.dm.model.avro.YChannel other) {
super(SCHEMA$);
if (isValidValue(fields()[0], other.id)) {
this.id = data().deepCopy(fields()[0].schema(), other.id);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.title)) {
this.title = data().deepCopy(fields()[1].schema(), other.title);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.description)) {
this.description = data().deepCopy(fields()[2].schema(), other.description);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.country)) {
this.country = data().deepCopy(fields()[3].schema(), other.country);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.verified)) {
this.verified = data().deepCopy(fields()[4].schema(), other.verified);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.likedVideosPlaylistId)) {
this.likedVideosPlaylistId = data().deepCopy(fields()[5].schema(), other.likedVideosPlaylistId);
fieldSetFlags()[5] = true;
}
if (isValidValue(fields()[6], other.viewCount)) {
this.viewCount = data().deepCopy(fields()[6].schema(), other.viewCount);
fieldSetFlags()[6] = true;
}
if (isValidValue(fields()[7], other.subscriberCount)) {
this.subscriberCount = data().deepCopy(fields()[7].schema(), other.subscriberCount);
fieldSetFlags()[7] = true;
}
if (isValidValue(fields()[8], other.hiddensubscribercount)) {
this.hiddensubscribercount = data().deepCopy(fields()[8].schema(), other.hiddensubscribercount);
fieldSetFlags()[8] = true;
}
if (isValidValue(fields()[9], other.videoCount)) {
this.videoCount = data().deepCopy(fields()[9].schema(), other.videoCount);
fieldSetFlags()[9] = true;
}
if (isValidValue(fields()[10], other.publishedAt)) {
this.publishedAt = data().deepCopy(fields()[10].schema(), other.publishedAt);
fieldSetFlags()[10] = true;
}
} | [
"public static org.acalio.dm.model.avro.YChannel.Builder newBuilder(org.acalio.dm.model.avro.YChannel.Builder other) {\n if (other == null) {\n return new org.acalio.dm.model.avro.YChannel.Builder();\n } else {\n return new org.acalio.dm.model.avro.YChannel.Builder(other);\n }\n }",
"public static org.acalio.dm.model.avro.YChannel.Builder newBuilder(org.acalio.dm.model.avro.YChannel other) {\n if (other == null) {\n return new org.acalio.dm.model.avro.YChannel.Builder();\n } else {\n return new org.acalio.dm.model.avro.YChannel.Builder(other);\n }\n }",
"public static org.acalio.dm.model.avro.YChannel.Builder newBuilder() {\n return new org.acalio.dm.model.avro.YChannel.Builder();\n }",
"public Builder() {}",
"private Builder() {}",
"public DescriptiveFramework clone();",
"public static com.demo.Demo.Builder newBuilder(com.demo.Demo.Builder other) {\n return new com.demo.Demo.Builder(other);\n }",
"PulsarAdminBuilder clone();",
"public interface ChannelBuilder {\n\n /**\n * Configure this class with the given key-value pairs\n */\n void configure(Map<String, ?> configs) throws KafkaException;\n\n\n /**\n * returns a Channel with TransportLayer and Authenticator configured.\n * @param id channel id\n * @param key SelectionKey\n */\n KafkaChannel buildChannel(String id, SelectionKey key, int maxReceiveSize) throws KafkaException;\n\n\n /**\n * Closes ChannelBuilder\n */\n void close();\n\n}",
"private Builder() {\n super();\n }",
"public static Configuration.Builder newBuilder(Configuration.Builder other) {\n if (other == null) {\n return new Configuration.Builder();\n } else {\n return new Configuration.Builder(other);\n }\n }",
"public static eu.rawfie.uxv.ProxyConnectData.Builder newBuilder(eu.rawfie.uxv.ProxyConnectData.Builder other) {\n return new eu.rawfie.uxv.ProxyConnectData.Builder(other);\n }",
"public Builder toBuilder() {\n return new Builder(this);\n }",
"public static com.vladkrava.converter.test.domain.DummyObject.Builder newBuilder(com.vladkrava.converter.test.domain.DummyObject.Builder other) {\n return new com.vladkrava.converter.test.domain.DummyObject.Builder(other);\n }",
"public static guru.learningjournal.kafka.examples.StockData.Builder newBuilder(guru.learningjournal.kafka.examples.StockData.Builder other) {\n return new guru.learningjournal.kafka.examples.StockData.Builder(other);\n }",
"public BidBuilder(Bid bidToCopy) {\n propertyId = bidToCopy.getPropertyId();\n bidderId = bidToCopy.getBidderId();\n bidAmount = bidToCopy.getBidAmount();\n }",
"protected T copyFrom(BodyBuilder other) {\n _pos = other._pos;\n _scale = other._scale;\n _angleRadians = other._angleRadians;\n _density = other._density;\n _restitution = other._restitution;\n\n _type = other._type;\n _isSensor = other._isSensor;\n return self();\n }",
"public static Builder factory(){\n return new Builder();\n }",
"private macd_pb(Builder builder) {\n super(builder);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
///HttpClientDownloader httpClientDownloader = proxyDownloader(" OOSpider.create(new ProxyIPSpider2()) .setDownloader(httpClientDownloader) .addUrl(" .addPipeline(proxyIPPipeline) .thread(1) .run(); | @Override
public void proxyIPCrawl2() {
} | [
"@Override\n\tpublic void proxyIPCrawl() {\n\t}",
"public static void main (String[] args) throws IOException, InterruptedException {\n for (String proxyHost : proxies.keySet()) {\n\n int proxyPort = proxies.get(proxyHost);\n\n // Creating scrapper\n YouTubeCallerThread.spawn(proxyHost, proxyPort, 0);\n\n }\n\n System.out.println(\"\");\n\n }",
"void startDownloader();",
"public WebCrawler(Downloader downloader, int downloaders, int extractors, int perHost) {\n downloaderPool = Executors.newFixedThreadPool(downloaders);\n extractorPool = Executors.newFixedThreadPool(extractors);\n handler = new LinkHandler(perHost);\n this.downloader = downloader;\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic Indexer crawl (int limit) \n\t{\n\t\n\t\t////////////////////////////////////////////////////////////////////\n\t // Write your Code here as part of Priority Based Spider assignment\n\t // \n\t ///////////////////////////////////////////////////////////////////\n\t\tPQueue q=new PQueue();\n \t\n\t\ttry\n \t{\n\t\t\t final String authUser = \"iiit-63\";\n\t\t\t\tfinal String authPassword = \"MSIT123\";\n\n\t\t\t\tSystem.setProperty(\"http.proxyHost\", \"proxy.iiit.ac.in\");\n\t\t\t\tSystem.setProperty(\"http.proxyPort\", \"8080\");\n\t\t\t\tSystem.setProperty(\"http.proxyUser\", authUser);\n\t\t\t\tSystem.setProperty(\"http.proxyPassword\", authPassword);\n\n\t\t\t\tAuthenticator.setDefault(\n\t\t\t\t new Authenticator() \n\t\t\t\t {\n\t\t\t\t public PasswordAuthentication getPasswordAuthentication()\n\t\t\t\t {\n\t\t\t\t return new PasswordAuthentication(authUser, authPassword.toCharArray());\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t);\n\n\t\t\t\tSystem.setProperty(\"http.proxyUser\", authUser);\n\t\t\t\tSystem.setProperty(\"http.proxyPassword\", authPassword);\n \t\tURLTextReader in = new URLTextReader(u);\n \t\t// Parse the page into its elements\n \t\tPageLexer elts = new PageLexer(in, u);\t\t\n \t\tint count1=0;\n \t\t// Print out the tokens\n \t\tint count = 0;\n \t\t\n \t\twhile (elts.hasNext()) \n \t\t{\n \t\t\tcount++;\n \t\t\tPageElementInterface elt = (PageElementInterface)elts.next();\t\t\t \n \t\t\tif (elt instanceof PageHref)\n \t\t\tif(count1<limit)\n \t\t\t{\n \t\t\t\tif(q.isempty())\n \t\t\t\t{\n \t\t\t\t\tq.enqueue(elt.toString(),count);\n\t\t\t\t\t}\n \t\t\t\telse\n \t\t\t\t{\n \t\t\t\t\tif(q.search(elt.toString(),count))\n \t\t\t\t\t{\n \t\t\t\t\t\tq.enqueue(elt.toString(),count);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tcount1++;\n \t\t\t\tSystem.out.println(\"link: \"+elt);\n \t\t\t\t\n \t\t\t}\n \t\t}\n \t\tSystem.out.println(\"links retrieved: \"+count1);\n \t\tq.display();\n \t\twhile(limit !=0)\n \t\t{\n \t\t\tObject elt=q.dequeue();\n \t\t\tURL u1=new URL(elt.toString());\n \t\t\tURLTextReader in1= new URLTextReader(u1);\n \t\t\t// Parse the page into its elements\n \t\t\tPageLexer elt1 = new PageLexer(in1, u1);\n \t\t\twhile (elt1.hasNext()) \n \t\t\t{\n \t\t\t\tPageElementInterface elts2= (PageElementInterface)elt1.next();\n \t\t\t\tif (elts2 instanceof PageWord)\n \t\t\t\t{\n \t\t\t\t\tv.add(elts2);\n \t\t\t\t}\n \t\t\t\tSystem.out.println(\"words:\"+elts2);\n \t\t\t} \t\t\t\n\t\t\t\tObjectIterator OI=new ObjectIterator(v);\n\t\t\t\ti.addPage(u1,OI);\n\t\t\t\tfor(int j=0;j<v.size();j++);\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"hello\"+v.get(count));\n\t\t\t\t}\n\t\t\t\tlimit--;\n \t\t}\n \t\t\n \t}\n \tcatch (Exception e)\n \t{\n \t\tSystem.out.println(\"Bad file or URL specification\");\n \t}\n return i;\n\t}",
"public static void main(String[] main) throws IOException {\n \tPoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager();\n cm.setDefaultMaxPerRoute(20);\n cm.setMaxTotal(100);\n CloseableHttpClient httpClient = HttpClients.custom().setConnectionManager(cm).build();\n FailoverHttpClient failoverHttpClient = new FailoverHttpClient(httpClient);\n \n \t//the old way\n /*PoolingClientConnectionManager cmOld = new PoolingClientConnectionManager();\n cmOld.setDefaultMaxPerRoute(20);\n cmOld.setMaxTotal(100);\n FailoverHttpClient failoverHttpClientOld = new FailoverHttpClient(cmOld);*/\n\n\n // have ready a list of hosts to try the call\n List<HttpHost> hosts = Arrays.asList(\n new HttpHost(\"localhost\", 9090),\n new HttpHost(\"localhost\", 9191)\n );\n\n // create the request\n HttpGet request = new HttpGet(URI.create(\"/file.txt\"));\n\n // invoke the request on localhost:9090 first,\n // and localhost:9191 if that fails.\n\n try {\n \tHttpResponse response = failoverHttpClient.execute(hosts, request);\n // HttpResponse response = failoverHttpClientOld.execute(hosts, request); \t\n System.out.println(\"One of the hosts responded with \" + EntityUtils.toString(response.getEntity()));\n }\n catch(IOException ex) {\n System.err.println(\"both hosts failed. The last exception is \" + ex);\n }\n }",
"public static void main(String[] args) {\n HostPortPair httpServer = new HostPortPair(\"http-proxy-server\", 80);\n HostPortPair httpsServer = new HostPortPair(\"https-proxy-server\", 80);\n HostPortPair ftpServer = new HostPortPair(\"ftp-proxy-server\", 80);\n String exceptions = \"<local>\"; // bypass proxy server for local web pages\n\n Browser browser = new Browser(new CustomProxyConfig(httpServer,\n httpsServer, ftpServer, exceptions));\n\n // In order to handle proxy authorization you can use the following way\n browser.getContext().getNetworkService().setNetworkDelegate(new DefaultNetworkDelegate() {\n @Override\n public boolean onAuthRequired(AuthRequiredParams params) {\n if (params.isProxy()) {\n params.setUsername(\"proxy-username\");\n params.setPassword(\"proxy-password\");\n return false;\n }\n return true;\n }\n });\n }",
"WebCrawler addExtractor(Extractor extractor);",
"@Test\r\n public void littleProxyChainedProxy() throws Exception {\r\n log.info(\"start littleProxyChainedProxy()\");\r\n\r\n startLittleProxyAsProxy();\r\n\r\n ProxyConfig config = new ProxyConfig();\r\n config.setMode(ProxyMode.CHAINEDPROXY);\r\n config.setPort(10112);\r\n config.setChainedProxyHost(\"localhost\");\r\n config.setChainedProxyPort(10113);\r\n config.setName(\"p2\");\r\n Configuration.instance().startProxy(config);\r\n\r\n HttpHost proxy = new HttpHost(\"localhost\", 10112);\r\n client = HttpClients.custom().setProxy(proxy).build();\r\n\r\n HttpGet method = createHttpGetExtern(\"http://httpbin.org/ip\");\r\n HttpResponse response = client.execute(method);\r\n log.debug(\"STATUS: \" + response.getStatusLine().getStatusCode());\r\n String msg = readResponseBody(response);\r\n Assert.assertTrue(msg.startsWith(\"{ \\\"origin\\\": \\\"\"));\r\n String ev = response.getFirstHeader(\"CIBET_EVENTRESULT\").getValue();\r\n EventResult eventResult = CibetUtil.decodeEventResult(ev);\r\n log.debug(eventResult);\r\n Assert.assertEquals(ExecutionStatus.EXECUTED, eventResult.getExecutionStatus());\r\n Assert.assertEquals(\"HTTP-PROXY\", eventResult.getSensor());\r\n }",
"public static void main(String[] args) {\n Executor executor = new Executor();\n InvocationHandler handler = new DynamicProxy(executor);\n IProxy proxy = (IProxy) Proxy.newProxyInstance(handler.getClass().getClassLoader(), executor.getClass().getInterfaces(), handler);\n proxy.action();\n }",
"public void start(){\n log.info(\"PageDownloaderPool started.\");\n downloaders.forEach(PageDownloader::start);\n }",
"public void startMoviePosterDownloader() {\n DownloadImageFromInternet imageDownload = new DownloadImageFromInternet();\n imageDownload.execute(posterUrl);\n }",
"public interface NIOProxyDirector extends ProxyDirector\n{\n /**\n *\n * @return The number of continuous attempts to write all buffered bytes to a SocketChannel's write buffer. If all bytes\n * cannot be written the remaining bytes in the buffer will be held in memory until a write ready event is triggered for the SocketChannel.\n */\n int getMaxWriteAttempts();\n\n /**\n * @return The thread pool used to execute long running SSL operations (like CA verification). Can be null if not using SSL connections.\n */\n ExecutorService getSSLThreadPool();\n}",
"public interface CrawlerController {\n\n\tpublic void init(Observer observer) throws Exception;\n\n\t/**\n\t * get the id of the KScorption.\n\t * \n\t * @return the id of the KScorption, default value is 0.\n\t * \n\t */\n\tpublic int getKspId();\n\n\t/**\n\t * get the name of the KScorption.\n\t * \n\t * @return the name of the KScorpion, default value is \"\".\n\t * \n\t * \n\t */\n\tpublic String getKspName();\n\n\t/**\n\t * get the topic or message of the KScorpion.\n\t * \n\t * @return the topic or message.\n\t * \n\t */\n\tpublic String getTopic();\n\n\t/**\n\t * the core method of Controller, the method should analysis the url and put\n\t * the processor to thread pool.\n\t * \n\t * @throws IOException\n\t */\n\tpublic void run();\n\t\n\tpublic void execute() throws Exception;\n\n}",
"public static void main(String[] args) {\n final int DOWNLOAD_PARTS =3;\n DownLoadMgr downLoadMgr =new DownLoadMgr(DOWNLOAD_PARTS);\n\n for (int i = 0; i < DOWNLOAD_PARTS ; i++) {\n new Thread(new Downloader(downLoadMgr)).start(); //start 3 threads\n }\n\n // thread start downloading\n downLoadMgr.startDownLoad.countDown();\n System.out.println(\" Command thread to start downloading now! \" +\n \"and downloadMgr waiting for download to finish\");\n\n try {\n downLoadMgr.splitDownloader.await();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n System.out.println(\" Assembling download \");\n\n\n }",
"public ProxyImage(URL url, Component component)\n { super(url);\n this.component = component;\n ci = null; // no concrete image yet loaded\n imageAvailable = false;\n // load the temporary image\n tempIcon = new ImageIcon(getClass().getResource(\"downloading.gif\")); // local image\n // create a separate thread to get the desired image from URL\n Thread thread = new Thread(new ConcreteImageLoader());\n thread.start();\n }",
"public Spider downloader(Downloader downloader) {\n return setDownloader(downloader);\n }",
"public void HTTPproxy(boolean HTTPproxy);",
"void sendToSpider(\r\n java.net.URL url);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert .pem file to a PrivateKey | static PrivateKey PemToPrivateKey(String fileName) throws IOException, GeneralSecurityException {
PrivateKey pk = new PrivateKeyReader(fileName).getPrivateKey();
return pk;
} | [
"public static PrivateKey readPrivateKeyFromPEM (String fileName) throws IOException{\n\t\tJcaPEMKeyConverter converter = new JcaPEMKeyConverter().setProvider(\"BC\");\n\t\tString pemData = Tools.readFile(fileName);\n\t\tDebug.println(\"Reading \" + fileName);\n\t\tString privateKeyPem = null;\n\t\ttry{ \n\t\t\tprivateKeyPem = \"-----BEGIN RSA PRIVATE KEY-----\\n\"+pemData.split(\"-----BEGIN RSA PRIVATE KEY-----\")[1];\n\t\t}catch(Exception e){\t\t\t\n\t\t privateKeyPem = \"-----BEGIN PRIVATE KEY-----\\n\"+pemData.split(\"-----BEGIN PRIVATE KEY-----\")[1];\n\t\t}\n\t\tPEMParser pemParser = new PEMParser(new StringReader(privateKeyPem));\n\t\tObject object = pemParser.readObject();\n\t\tpemParser.close();\n\t\tPEMKeyPair ukp = (PEMKeyPair) object;\n\t\treturn converter.getKeyPair(ukp).getPrivate();\n\t}",
"public PrivateKey readPrivateKeyFromPem(File file) {\n FileReader reader = null;\n PEMParser parser = null;\n try {\n reader = new FileReader(file);\n parser = new PEMParser(reader);\n PrivateKeyInfo keyInfo = (PrivateKeyInfo) parser.readObject();\n return new JcaPEMKeyConverter().getPrivateKey(keyInfo);\n } catch (RuntimeException | IOException e) {\n throw new RuntimeException(\"Failed to load private key from [\"+file+\"]\", e);\n } finally {\n \tCloseablesExt.closeQuietly(parser);\n \tCloseablesExt.closeQuietly(reader);\n }\n }",
"private PrivateKey getPrivateKey(String filename) throws Exception \r\n {\r\n File f = new File(filename);\r\n FileInputStream fis = new FileInputStream(f);\r\n DataInputStream dis = new DataInputStream(fis);\r\n byte[] keyBytes = new byte[(int) f.length()];\r\n dis.readFully(keyBytes);\r\n dis.close();\r\n\r\n PKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(keyBytes);\r\n KeyFactory kf =\r\n KeyFactory.getInstance(\"RSA\");\r\n return kf.generatePrivate(spec);\r\n }",
"private PrivateKey private_key_reader(String filename)\r\n throws Exception {\r\n\r\n byte[] keyBytes = Files.readAllBytes(Paths.get(filename));\r\n\r\n PKCS8EncodedKeySpec spec =\r\n new PKCS8EncodedKeySpec(keyBytes);\r\n KeyFactory kf = KeyFactory.getInstance(\"RSA\");\r\n return kf.generatePrivate(spec);\r\n }",
"private PrivateKey createRSAPrivateKeyFromCert(FileReader fileReader) throws Exception {\n ByteArrayOutputStream outStream = new ByteArrayOutputStream();\n BASE64Decoder decoder = new BASE64Decoder();\n\n try {\n BufferedReader reader = new BufferedReader(fileReader);\n String line;\n boolean in = false;\n\n while ((line = reader.readLine()) != null) {\n if (line.startsWith(\"-----\")) {\n in = !in;\n continue;\n }\n if (in) {\n outStream.write(decoder.decodeBuffer(line));\n }\n // Another option to decode Base64 data: javax.xml.bind.DatatypeConverter\n // http://stackoverflow.com/questions/469695/decode-base64-data-in-java\n }\n } finally {\n fileReader.close();\n }\n\n DerInputStream dis = new DerInputStream(outStream.toByteArray());\n DerValue[] seq = dis.getSequence(0);\n\n BigInteger mod = seq[1].getBigInteger();\n BigInteger privExpo = seq[3].getBigInteger();\n\n KeyFactory kf = KeyFactory.getInstance(\"RSA\");\n return kf.generatePrivate(new RSAPrivateKeySpec(mod, privExpo));\n }",
"void readPrivateKey(CryptoParser parser);",
"public static PrivateKey loadPrivate(String keyfile) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException{\n\n\t\tPKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(loadFile(keyfile));\n\t\tKeyFactory kf = KeyFactory.getInstance(\"RSA\");\n\t\treturn kf.generatePrivate(spec);\n\t}",
"private static PrivateKey getPrivateKeyFromFile(File privateKeyFile)\r\n\t\t\tthrows IOException {\r\n\t\tFileInputStream fis = new FileInputStream(privateKeyFile);\r\n\t\tObjectInputStream oin = new ObjectInputStream(fis);\r\n\t\tPrivateKey privateKey;\r\n\r\n\t\ttry {\r\n\t\t\t// read the modulus & exponent values from the file.\r\n\t\t\tBigInteger modulus = (BigInteger) oin.readObject();\r\n\t\t\tBigInteger exponent = (BigInteger) oin.readObject();\r\n\r\n\t\t\t// Generate the private key from the mod & exp parts from the file.\r\n\t\t\tRSAPrivateKeySpec keySpec = new RSAPrivateKeySpec(modulus, exponent);\r\n\t\t\tKeyFactory fact = KeyFactory.getInstance(\"RSA\");\r\n\t\t\tprivateKey = fact.generatePrivate(keySpec);\r\n\r\n\t\t\treturn privateKey;\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new RuntimeException(\"Spurious serialisation error\", e);\r\n\t\t}\r\n\r\n\t\t// Close file input stream.\r\n\t\tfinally {\r\n\t\t\toin.close();\r\n\t\t}\r\n\t}",
"PrivateKey getPrivateKey(byte[] input) throws SJException;",
"public static RSAPrivateKey getPrivateKey () throws InvalidKeyException, FileNotFoundException, IOException, ClassNotFoundException, NoSuchAlgorithmException, InvalidKeySpecException, SignatureException {\n\t\tFile privKeyFile = new File(\"/Users/rajiv/layer4.pk8\");\n DataInputStream dis = new DataInputStream(new FileInputStream(privKeyFile));\n System.out.println((int) privKeyFile.length());\n byte[] privateBytes = new byte[(int) privKeyFile.length()];\n dis.readFully(privateBytes);\n dis.close();\n \n\t\tKeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n\t\tEncodedKeySpec privateKeySpec = new PKCS8EncodedKeySpec(privateBytes);\n PrivateKey privateKey = keyFactory.generatePrivate(privateKeySpec);\n \n return (RSAPrivateKey) privateKey;\n\t}",
"@Override\n public PrivateKey getPrivateKey(String s) {\n\n try {\n File file = new File(\"private key file\");\n byte buffer[] = Files.readAllBytes(file.toPath());\n\n KeySpec keySpec = new PKCS8EncodedKeySpec(buffer);\n KeyFactory factory = KeyFactory.getInstance(\"RSA\");\n\n return factory.generatePrivate(keySpec);\n }\n catch (NoSuchAlgorithmException | IOException | InvalidKeySpecException e) {\n e.printStackTrace();\n }\n\n return null;\n }",
"private KeyPair getPrivateKeyPair() throws IOException {\n final PEMParser pemParser = new PEMParser(new StringReader(sshKey));\n final PEMKeyPair keypair = (PEMKeyPair) pemParser.readObject();\n final JcaPEMKeyConverter converter = new JcaPEMKeyConverter();\n return new KeyPair(\n converter.getPublicKey(SubjectPublicKeyInfo.getInstance(keypair.getPublicKeyInfo())),\n converter.getPrivateKey(keypair.getPrivateKeyInfo()));\n }",
"public static byte[] getRsaPrivateKey() throws IOException {\n\t\tInputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(\"/configPros/java_private_key.pem\");\n\t\tByteArrayOutputStream bout = new ByteArrayOutputStream();\n\t\tbyte[] tmpbuf = new byte[1024];\n\t\tint count = 0;\n\t\twhile ((count = in.read(tmpbuf)) != -1) {\n\t\t\tbout.write(tmpbuf, 0, count);\n\t\t\ttmpbuf = new byte[1024];\n\t\t}\n\t\tin.close();\n\t\treturn bout.toByteArray();\n\t}",
"static PrivateKey getKeyFromClassPath(String filename) {\n ClassLoader loader = Thread.currentThread().getContextClassLoader();\n InputStream stream = loader.getResourceAsStream(\"certificates/\" + filename);\n if (stream == null) {\n throw new CertificateException(\n \"Could not read private key from classpath:\" + \"certificates/\" + filename\n );\n }\n\n BufferedReader br = new BufferedReader(new InputStreamReader(stream));\n\n try {\n Security.addProvider(new BouncyCastleProvider());\n PEMParser pp = new PEMParser(br);\n PEMKeyPair pemKeyPair = (PEMKeyPair) pp.readObject();\n KeyPair kp = new JcaPEMKeyConverter().getKeyPair(pemKeyPair);\n pp.close();\n return kp.getPrivate();\n } catch (IOException ex) {\n throw new CertificateException(\"Could not read private key from classpath\", ex);\n }\n }",
"public static RSAPrivateKey getPrivateKeyFromPemPKCS1(final String privateKeyStr) {\n try {\n String adjustStr = StringUtils.replace(privateKeyStr, \"-----BEGIN PRIVATE KEY-----\", \"\");\n adjustStr = StringUtils.replace(adjustStr, \"-----BEGIN RSA PRIVATE KEY-----\", \"\");\n adjustStr = StringUtils.replace(adjustStr, \"-----END PRIVATE KEY-----\", \"\");\n adjustStr = StringUtils.replace(adjustStr, \"-----END RSA PRIVATE KEY-----\", \"\");\n adjustStr = adjustStr.replace(\"\\n\", \"\");\n\n CryptoRuntime.enableBouncyCastle();\n\n byte[] buffer = BinaryUtil.fromBase64String(adjustStr);\n RSAPrivateKeySpec keySpec = CryptoRuntime.convertPemPKCS1ToPrivateKey(buffer);\n\n KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n\n return (RSAPrivateKey) keyFactory.generatePrivate(keySpec);\n\n } catch (Exception e) {\n throw new ClientException(\"get private key from PKCS1 pem String error.\" + e.getMessage(), e);\n }\n }",
"public static PrivateKey loadKeyData(String base64Key) throws FileNotFoundException, NoSuchAlgorithmException,\n NoSuchProviderException, InvalidKeySpecException, IOException {\n String pemEncodedKey = Base64Utils.fromBase64(base64Key, StandardCharsets.UTF_8);\n return PemUtils.parseRsaPrivateKey(new StringReader(pemEncodedKey));\n }",
"public HashNamePrivateKey readHashNamePrivateKeyFromFile(\n String filename\n ) throws TelehashException;",
"private static PrivateKey buildPrivateKeyFromString(String privateKeyAsString) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException, KeyStoreException, CertificateException {\n String privateKeyStrWithoutHeaderFooter = privateKeyAsString.\n replaceAll(\"-----BEGIN PRIVATE KEY-----\", \"\").\n replaceAll(\"-----END PRIVATE KEY-----\", \"\").\n replaceAll(\"\\n\", \"\");\n byte[] privateKeyBytes =\n Base64.getDecoder().decode(privateKeyStrWithoutHeaderFooter.getBytes());\n PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(privateKeyBytes);\n KeyFactory fact = KeyFactory.getInstance(\"RSA\");\n return fact.generatePrivate(keySpec);\n }",
"public static RSAPrivateKey getPrivateKeyFromPemPKCS8(final String privateKeyStr) {\n try {\n String adjustStr = StringUtils.replace(privateKeyStr, \"-----BEGIN PRIVATE KEY-----\", \"\");\n adjustStr = StringUtils.replace(adjustStr, \"-----BEGIN RSA PRIVATE KEY-----\", \"\");\n adjustStr = StringUtils.replace(adjustStr, \"-----END PRIVATE KEY-----\", \"\");\n adjustStr = StringUtils.replace(adjustStr, \"-----END RSA PRIVATE KEY-----\", \"\");\n adjustStr = adjustStr.replace(\"\\n\", \"\");\n\n byte[] buffer = BinaryUtil.fromBase64String(adjustStr);\n PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(buffer);\n KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n\n return (RSAPrivateKey) keyFactory.generatePrivate(keySpec);\n } catch (Exception e) {\n throw new ClientException(\"Get private key from PKCS8 pem String error: \" + e.getMessage(), e);\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XMemberFeatureCall__Group_1_0__0" $ANTLR start "rule__XMemberFeatureCall__Group_1_0__0__Impl" ../org.xtext.mongobeans.ui/srcgen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:6971:1: rule__XMemberFeatureCall__Group_1_0__0__Impl : ( ( rule__XMemberFeatureCall__Group_1_0_0__0 ) ) ; | public final void rule__XMemberFeatureCall__Group_1_0__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:6975:1: ( ( ( rule__XMemberFeatureCall__Group_1_0_0__0 ) ) )
// ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:6976:1: ( ( rule__XMemberFeatureCall__Group_1_0_0__0 ) )
{
// ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:6976:1: ( ( rule__XMemberFeatureCall__Group_1_0_0__0 ) )
// ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:6977:1: ( rule__XMemberFeatureCall__Group_1_0_0__0 )
{
if ( state.backtracking==0 ) {
before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_0_0());
}
// ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:6978:1: ( rule__XMemberFeatureCall__Group_1_0_0__0 )
// ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:6978:2: rule__XMemberFeatureCall__Group_1_0_0__0
{
pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_0_0__0_in_rule__XMemberFeatureCall__Group_1_0__0__Impl14444);
rule__XMemberFeatureCall__Group_1_0_0__0();
state._fsp--;
if (state.failed) return ;
}
if ( state.backtracking==0 ) {
after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_0_0());
}
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__XMemberFeatureCall__Group_1_1_0__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7344:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7345:1: ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) )\n {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7345:1: ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7346:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0_0()); \n }\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7347:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__0 )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7347:2: rule__XMemberFeatureCall__Group_1_1_0_0__0\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_0_0__0_in_rule__XMemberFeatureCall__Group_1_1_0__0__Impl15176);\n rule__XMemberFeatureCall__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.getXMemberFeatureCallAccess().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__XMemberFeatureCall__Group_1_1__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7191:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_0__0 ) ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7192:1: ( ( rule__XMemberFeatureCall__Group_1_1_0__0 ) )\n {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7192:1: ( ( rule__XMemberFeatureCall__Group_1_1_0__0 ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7193:1: ( rule__XMemberFeatureCall__Group_1_1_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0()); \n }\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7194:1: ( rule__XMemberFeatureCall__Group_1_1_0__0 )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7194:2: rule__XMemberFeatureCall__Group_1_1_0__0\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_0__0_in_rule__XMemberFeatureCall__Group_1_1__0__Impl14869);\n rule__XMemberFeatureCall__Group_1_1_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XMemberFeatureCall__Group_1_1_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7333:1: ( rule__XMemberFeatureCall__Group_1_1_0__0__Impl )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7334:2: rule__XMemberFeatureCall__Group_1_1_0__0__Impl\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_0__0__Impl_in_rule__XMemberFeatureCall__Group_1_1_0__015149);\n rule__XMemberFeatureCall__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__XMemberFeatureCall__Group_1_1_0_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7394:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__1__Impl )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7395:2: rule__XMemberFeatureCall__Group_1_1_0_0__1__Impl\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_0_0__1__Impl_in_rule__XMemberFeatureCall__Group_1_1_0_0__115269);\n rule__XMemberFeatureCall__Group_1_1_0_0__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XMemberFeatureCall__Group_1_0_0__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7035:1: ( ( ( rule__XMemberFeatureCall__Group_1_0_0_0__0 ) ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7036:1: ( ( rule__XMemberFeatureCall__Group_1_0_0_0__0 ) )\n {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7036:1: ( ( rule__XMemberFeatureCall__Group_1_0_0_0__0 ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7037:1: ( rule__XMemberFeatureCall__Group_1_0_0_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_0_0_0()); \n }\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7038:1: ( rule__XMemberFeatureCall__Group_1_0_0_0__0 )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7038:2: rule__XMemberFeatureCall__Group_1_0_0_0__0\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_0_0_0__0_in_rule__XMemberFeatureCall__Group_1_0_0__0__Impl14562);\n rule__XMemberFeatureCall__Group_1_0_0_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_0_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__XMemberFeatureCall__Group_1_0_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7024:1: ( rule__XMemberFeatureCall__Group_1_0_0__0__Impl )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7025:2: rule__XMemberFeatureCall__Group_1_0_0__0__Impl\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_0_0__0__Impl_in_rule__XMemberFeatureCall__Group_1_0_0__014535);\n rule__XMemberFeatureCall__Group_1_0_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__XMemberFeatureCall__Group_1_1_3_1_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7750:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0 )* ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7751:1: ( ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0 )* )\n {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7751:1: ( ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0 )* )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7752:1: ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0 )*\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_3_1_1_1()); \n }\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7753:1: ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0 )*\n loop63:\n do {\n int alt63=2;\n int LA63_0 = input.LA(1);\n\n if ( (LA63_0==53) ) {\n alt63=1;\n }\n\n\n switch (alt63) {\n \tcase 1 :\n \t // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7753:2: rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0\n \t {\n \t pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0_in_rule__XMemberFeatureCall__Group_1_1_3_1_1__1__Impl15976);\n \t rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop63;\n }\n } while (true);\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_3_1_1_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__XMemberFeatureCall__Group_1_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7220:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_1__0 )? ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7221:1: ( ( rule__XMemberFeatureCall__Group_1_1_1__0 )? )\n {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7221:1: ( ( rule__XMemberFeatureCall__Group_1_1_1__0 )? )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7222:1: ( rule__XMemberFeatureCall__Group_1_1_1__0 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_1()); \n }\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7223:1: ( rule__XMemberFeatureCall__Group_1_1_1__0 )?\n int alt58=2;\n int LA58_0 = input.LA(1);\n\n if ( (LA58_0==25) ) {\n alt58=1;\n }\n switch (alt58) {\n case 1 :\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7223:2: rule__XMemberFeatureCall__Group_1_1_1__0\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_1__0_in_rule__XMemberFeatureCall__Group_1_1__1__Impl14929);\n rule__XMemberFeatureCall__Group_1_1_1__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.getXMemberFeatureCallAccess().getGroup_1_1_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__XMemberFeatureCall__Group_1_1_1__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7498:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_1_2__0 )* ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7499:1: ( ( rule__XMemberFeatureCall__Group_1_1_1_2__0 )* )\n {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7499:1: ( ( rule__XMemberFeatureCall__Group_1_1_1_2__0 )* )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7500:1: ( rule__XMemberFeatureCall__Group_1_1_1_2__0 )*\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_1_2()); \n }\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7501:1: ( rule__XMemberFeatureCall__Group_1_1_1_2__0 )*\n loop61:\n do {\n int alt61=2;\n int LA61_0 = input.LA(1);\n\n if ( (LA61_0==53) ) {\n alt61=1;\n }\n\n\n switch (alt61) {\n \tcase 1 :\n \t // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7501:2: rule__XMemberFeatureCall__Group_1_1_1_2__0\n \t {\n \t pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_1_2__0_in_rule__XMemberFeatureCall__Group_1_1_1__2__Impl15482);\n \t rule__XMemberFeatureCall__Group_1_1_1_2__0();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop61;\n }\n } while (true);\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_1_2()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XMemberFeatureCall__Group_1_1_3_1_1_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7802:1: ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__1__Impl )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7803:2: rule__XMemberFeatureCall__Group_1_1_3_1_1_1__1__Impl\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3_1_1_1__1__Impl_in_rule__XMemberFeatureCall__Group_1_1_3_1_1_1__116073);\n rule__XMemberFeatureCall__Group_1_1_3_1_1_1__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__XMemberFeatureCall__Group_1_1_3_1_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7739:1: ( rule__XMemberFeatureCall__Group_1_1_3_1_1__1__Impl )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7740:2: rule__XMemberFeatureCall__Group_1_1_3_1_1__1__Impl\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3_1_1__1__Impl_in_rule__XMemberFeatureCall__Group_1_1_3_1_1__115949);\n rule__XMemberFeatureCall__Group_1_1_3_1_1__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__XMemberFeatureCall__Group_1_1_1_2__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7584:1: ( rule__XMemberFeatureCall__Group_1_1_1_2__1__Impl )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7585:2: rule__XMemberFeatureCall__Group_1_1_1_2__1__Impl\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_1_2__1__Impl_in_rule__XMemberFeatureCall__Group_1_1_1_2__115642);\n rule__XMemberFeatureCall__Group_1_1_1_2__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__XMemberFeatureCall__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:19776:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_0__0 ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19777:1: ( ( rule__XMemberFeatureCall__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:19777:1: ( ( rule__XMemberFeatureCall__Group_1_1_0__0 ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19778:1: ( rule__XMemberFeatureCall__Group_1_1_0__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().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:19779:1: ( rule__XMemberFeatureCall__Group_1_1_0__0 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19779:2: rule__XMemberFeatureCall__Group_1_1_0__0\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_0__0_in_rule__XMemberFeatureCall__Group_1_1__0__Impl39984);\r\n rule__XMemberFeatureCall__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.getXMemberFeatureCallAccess().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__XMemberFeatureCall__Group_1_1__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7278:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_3__0 )? ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7279:1: ( ( rule__XMemberFeatureCall__Group_1_1_3__0 )? )\n {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7279:1: ( ( rule__XMemberFeatureCall__Group_1_1_3__0 )? )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7280:1: ( rule__XMemberFeatureCall__Group_1_1_3__0 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_3()); \n }\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7281:1: ( rule__XMemberFeatureCall__Group_1_1_3__0 )?\n int alt59=2;\n alt59 = dfa59.predict(input);\n switch (alt59) {\n case 1 :\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7281:2: rule__XMemberFeatureCall__Group_1_1_3__0\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3__0_in_rule__XMemberFeatureCall__Group_1_1__3__Impl15050);\n rule__XMemberFeatureCall__Group_1_1_3__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.getXMemberFeatureCallAccess().getGroup_1_1_3()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XMemberFeatureCall__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:8241:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8242:1: ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8242:1: ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8243:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0_0()); \n }\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8244:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__0 )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8244:2: rule__XMemberFeatureCall__Group_1_1_0_0__0\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_0_0__0_in_rule__XMemberFeatureCall__Group_1_1_0__0__Impl16989);\n rule__XMemberFeatureCall__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.getXMemberFeatureCallAccess().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__XMemberFeatureCall__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:19929:1: ( ( ( rule__XMemberFeatureCall__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:19930:1: ( ( rule__XMemberFeatureCall__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:19930:1: ( ( rule__XMemberFeatureCall__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:19931:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().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:19932:1: ( rule__XMemberFeatureCall__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:19932:2: rule__XMemberFeatureCall__Group_1_1_0_0__0\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_0_0__0_in_rule__XMemberFeatureCall__Group_1_1_0__0__Impl40291);\r\n rule__XMemberFeatureCall__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.getXMemberFeatureCallAccess().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__XMemberFeatureCall__Group_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:19558:1: ( ( ( rule__XMemberFeatureCall__Group_1_0_0__0 ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19559:1: ( ( rule__XMemberFeatureCall__Group_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:19559:1: ( ( rule__XMemberFeatureCall__Group_1_0_0__0 ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19560:1: ( rule__XMemberFeatureCall__Group_1_0_0__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_0_0()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19561:1: ( rule__XMemberFeatureCall__Group_1_0_0__0 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19561:2: rule__XMemberFeatureCall__Group_1_0_0__0\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_0_0__0_in_rule__XMemberFeatureCall__Group_1_0__0__Impl39557);\r\n rule__XMemberFeatureCall__Group_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.getXMemberFeatureCallAccess().getGroup_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__XMemberFeatureCall__Group_1_1_3__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7674:1: ( rule__XMemberFeatureCall__Group_1_1_3__2__Impl )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7675:2: rule__XMemberFeatureCall__Group_1_1_3__2__Impl\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3__2__Impl_in_rule__XMemberFeatureCall__Group_1_1_3__215824);\n rule__XMemberFeatureCall__Group_1_1_3__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XMemberFeatureCall__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:6635:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:6636:1: ( ( rule__XMemberFeatureCall__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:6636:1: ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:6637:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0_0()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:6638:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__0 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:6638:2: rule__XMemberFeatureCall__Group_1_1_0_0__0\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_0_0__0_in_rule__XMemberFeatureCall__Group_1_1_0__0__Impl13735);\n rule__XMemberFeatureCall__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.getXMemberFeatureCallAccess().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"
]
]
}
} |
add the given Palette | public void addPalette(Palette palette); | [
"public void addPalette(Color color) {\n\t\tpalette.add(color);\n\t}",
"public void addPaletteColor(PaletteColor pc){\n // for logging\n Log.d(\"addColor\", pc.toString());\n\n // get reference to writable DB\n SQLiteDatabase db = this.getWritableDatabase();\n\n // create ContentValues to add key \"column\"/value\n ContentValues values = new ContentValues();\n values.put(KEY_COLOR, pc.getColor());\n values.put(KEY_COLOR_NAME, pc.getColorName());\n values.put(KEY_COLOR_RED, pc.getColorRed());\n values.put(KEY_COLOR_GREEN, pc.getColorGreen());\n values.put(KEY_COLOR_BLUE, pc.getColorBlue());\n values.put(KEY_COLOR_HEX, pc.getColorHex());\n\n // insert\n db.insert(TABLE_PALETTE, null, values);\n\n // close\n db.close();\n }",
"public Palette(Color color) {\n\t\tthis.colors = new ArrayList<>();\n\t\tthis.colors.add(color);\n\t\tthis.startingColor = color;\n\t}",
"public void setPalette(PaletteRecord pr)\n {\n palette = pr;\n }",
"private void drawCustomPalette()\n {\n if (ColorPaletteBuilder.getColorsCount() > 1) //If there are atleast 2 colors to build the palette from\n {\n try\n {\n int height = (int) canvases.get(5).getHeight();\n int width = (int) canvases.get(5).getWidth();\n ColorPalette palette = ColorPaletteBuilder.getInstance().build();\n PixelWriter writer = canvases.get(5).getGraphicsContext2D().getPixelWriter();\n for (int x = 0; x < width; x++)\n {\n for (int y = 0; y < height; y++)\n {\n writer.setColor(x, y, palette.getColor((double) x / width));\n }\n }\n } catch (IncorrectSplineDataException e)\n {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Error Dialog\");\n alert.setHeaderText(\"You cannot create a palette with just one color!\");\n alert.showAndWait();\n }\n\n }\n }",
"public NewCustomColorPalette() {\n\t\tsuper();\n\t\tbuildPalette();\n\t}",
"public void registerUI(PaletteUI ui){\n pUI = ui;\n }",
"public void add(Color c) {\r\n\t this.colors.add(c);\r\n }",
"public PaletteOrdered() {\n }",
"protected Panel createToolPalette() {\n Panel palette = new Panel();\n palette.setLayout(new PaletteLayout(2,new Point(2,2)));\n return palette;\n }",
"public void setPalette(FractalPalette palette){\r\n\t\tthis.palette = palette;\r\n\t}",
"@Test\r\n public void testDefinePalette_OneColor(){\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/geometric/green.png\");\r\n\r\n List<Tone> result = new Palettester().definePalette(image, 1);\r\n\r\n assertEquals(1, result.size());\r\n assertEquals(Color.GREEN, result.get(0).getColor());\r\n }",
"public void addColor(Color c) {\r\n colors.add(c);\r\n }",
"@Test\r\n public void testDefinePalette_Trivial_Fewer(){\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/geometric/redBlueHorizontal.png\");\r\n\r\n List<Tone> result = new Palettester().definePalette(image, 1);\r\n\r\n assertEquals(1, result.size());\r\n assertEquals(new Color(127, 0, 127), result.get(0).getColor());\r\n }",
"public void setColorPalette(ColorPalette palette) {\n this.colorPalette = palette;\n }",
"void refreshPalette();",
"protected Panel createToolPalette() {\n Panel palette = new Panel();\n palette.setBackground(Color.lightGray);\n palette.setLayout(new PaletteLayout(2,new Point(2,2)));\n return palette;\n }",
"void setPaletteIndex(int index, int red, int green, int blue);",
"static void update_palette( void )\n\t{\n\t//\tconst unsigned char *color_prom = memory_region( REGION_PROMS );\n\t/*\n\t\tThe actual contents of the color proms (unused by this driver)\n\t\tare as follows:\n\t\n\t\tD11 \"blue/green\"\n\t\t0000:\t00 00 8b 0b fb 0f ff 0b\n\t\t\t\t00 00 0f 0f fb f0 f0 ff\n\t\n\t\tC11 \"red\"\n\t\t0020:\t00 f0 f0 f0 b0 b0 00 f0\n\t\t\t\t00 f0 f0 00 b0 00 f0 f0\n\t*/\n\t\tint color;\n\t\tint shade;\n\t\tint i;\n\t\tint red,green,blue;\n\t\n\t\tfor( i=0; i<16; i++ )\n\t\t{\n\t\t\tcolor = paletteram.read(i);\n\t\t\tshade = 0xf^(color>>4);\n\t\n\t\t\tcolor &= 0xf; /* hue select */\n\t\t\tswitch( color )\n\t\t\t{\n\t\t\tdefault:\n\t\t\tcase 0x0: red = 0xff; green = 0xff; blue = 0xff; break; /* white */\n\t\t\tcase 0x1: red = 0xff; green = 0x00; blue = 0xff; break; /* purple */\n\t\t\tcase 0x2: red = 0x00; green = 0x00; blue = 0xff; break; /* blue */\n\t\t\tcase 0x3: red = 0x00; green = 0xff; blue = 0xff; break; /* cyan */\n\t\t\tcase 0x4: red = 0x00; green = 0xff; blue = 0x00; break; /* green */\n\t\t\tcase 0x5: red = 0xff; green = 0xff; blue = 0x00; break; /* yellow */\n\t\t\tcase 0x6: red = 0xff; green = 0x00; blue = 0x00; break; /* red */\n\t\t\tcase 0x7: red = 0x00; green = 0x00; blue = 0x00; break; /* black? */\n\t\n\t\t\tcase 0x8: red = 0xff; green = 0x7f; blue = 0x00; break; /* orange */\n\t\t\tcase 0x9: red = 0x7f; green = 0xff; blue = 0x00; break; /* ? */\n\t\t\tcase 0xa: red = 0x00; green = 0xff; blue = 0x7f; break; /* ? */\n\t\t\tcase 0xb: red = 0x00; green = 0x7f; blue = 0xff; break; /* ? */\n\t\t\tcase 0xc: red = 0xff; green = 0x00; blue = 0x7f; break; /* ? */\n\t\t\tcase 0xd: red = 0x7f; green = 0x00; blue = 0xff; break; /* ? */\n\t\t\tcase 0xe: red = 0xff; green = 0xaa; blue = 0xaa; break; /* ? */\n\t\t\tcase 0xf: red = 0xaa; green = 0xaa; blue = 0xff; break; /* ? */\n\t\t\t}\n\t\n\t\t/* combine color components with shade value (0..0xf) */\n\t\t\t#define APPLY_SHADE( C,S ) ((C*S)/0xf)\n\t\t\tred\t\t= APPLY_SHADE(red,shade);\n\t\t\tgreen\t= APPLY_SHADE(green,shade);\n\t\t\tblue\t= APPLY_SHADE(blue,shade);\n\t\n\t\t\tpalette_set_color( i,red,green,blue );\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
// addBeam // // Insert a beam as attached to this chord | public void addBeam (Beam beam)
{
if (!beams.contains(beam)) {
beams.add(beam);
// Keep the sequence sorted
Collections.sort(beams, byLevel);
}
} | [
"public void addChordBass(Chord chord) throws InvalidMidiDataException {\n _bass.addChord(chord);\n }",
"public void handleBeamBuffer(ByteBuffer beamBuf) {\n\t_beamQueue.push(beamBuf);\n }",
"void addChord(ChordModel newChord);",
"public void addBeat(Beat beat)\r\n\t{\r\n\t\tthis.beats.add(beat);\r\n\t}",
"public void setBeamNumber(int beam) {\n beamNum = beam;\n }",
"public void addAmulet(Equipment equipment) {\n if (amulet == null && equipment.getEquipmentPart() == EquipmentPart.AMULET)\n this.amulet = equipment;\n }",
"public void addChordTreble(Chord chord) throws InvalidMidiDataException {\n _treble.addChord(chord);\n }",
"public void add(BindRecord record) {\n map.put(record.getPeptide(), record);\n }",
"public void addBehaviour(Behaviour b) {\n b.setAgent(this);\n myScheduler.add(b);\n }",
"private void addLetterChain() {\n LetterChain letterChain = LetterChain.generateChain(level.getLevel(), letterGrid);\n letterGrid.addLetterChain(letterChain);\n drawLetterButtons();\n }",
"public void addPlant(PowerPlant plant) {\n plants.add(plant);\n }",
"public void addBelt(Equipment equipment) {\n if (belt == null && equipment.getEquipmentPart() == EquipmentPart.BELT)\n this.belt = equipment;\n }",
"public void addAttachment(Attachment a);",
"public void addSheep(Sheep sheep) {\r\n\t\tsheeps.add(sheep);\r\n\t}",
"abstract public void addWarp(Warp warp);",
"public abstract void addAttachmentPart(AttachmentPart attachmentpart);",
"public void addBoneRef(BoneRef ref){\n \t\tthis.boneRefs[bonePointer++] = ref;\n \t}",
"public void add(Aircraft obj){\n\t\tlockBuffer();\n\t\tbuffer.add(obj);\n\t\tunlockBuffer();\n\t}",
"void addActor(ActorDesc actor) {\n myODB.putObject(\"a-\" + actor.id(), actor, null, false, null);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validate if user typed first, last name and uploaded a picture, if he does, send him to updateAccountSettings method. | private void validateProfile() {
String newFirstname = firstname.getText().toString();
String newLastname = lastname.getText().toString();
if (newFirstname.isEmpty())
Toast.makeText(this, "You can't leave first name empty!", Toast.LENGTH_SHORT).show();
else if (newLastname.isEmpty())
Toast.makeText(this, "You can't leave last name empty!", Toast.LENGTH_SHORT).show();
else updateAccountSettings(newFirstname, newLastname);
} | [
"@Override\r\n public void signUp() {\r\n invalidSignUp = false;\r\n\r\n File file = new File(\"signedUpAccounts.txt\");\r\n\r\n if(file.length() != 0) {\r\n personData.readSignedUp();\r\n }\r\n\r\n String firstName = tfFirstName.getText();\r\n String lastName = tfLastName.getText();\r\n String username = tfUsername.getText();\r\n String email = tfEmail.getText();\r\n String password = pfPassword.getText();\r\n\r\n if(firstName.isEmpty() || lastName.isEmpty() || username.isEmpty() || email.isEmpty() || password.isEmpty()) {\r\n Alert a = new Alert(Alert.AlertType.WARNING);\r\n a.setTitle(\"Warning\");\r\n a.setContentText(\"All data must be filled!\");\r\n a.show();\r\n invalidSignUp = true;\r\n } else if(!email.endsWith(\"@gmail.com\") && !email.endsWith(\"@yahoo.com\") || email.length() <= 10) {\r\n Alert a = new Alert(Alert.AlertType.WARNING);\r\n a.setTitle(\"Warning\");\r\n a.setContentText(\"Invalid email!\");\r\n a.show();\r\n invalidSignUp = true;\r\n } else if(password.length() < 8) {\r\n Alert a = new Alert(Alert.AlertType.WARNING);\r\n a.setTitle(\"Warning\");\r\n a.setContentText(\"Password must contain at least 8 characters!\");\r\n a.show();\r\n invalidSignUp = true;\r\n } else if(!password.matches(\"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9]).+$\")) {\r\n Alert a = new Alert(Alert.AlertType.WARNING);\r\n a.setTitle(\"Warning\");\r\n a.setContentText(\"Password must contain at least a lowercase letter, an uppercase letter and a digit!\");\r\n a.show();\r\n invalidSignUp = true;\r\n } else {\r\n for (Person person : personData.getSignedUp()) {\r\n if (person.getAccount().getUsername().equals(username)) {\r\n Alert a = new Alert(Alert.AlertType.WARNING);\r\n a.setTitle(\"Warning\");\r\n a.setContentText(\"Username has been taken!\");\r\n a.show();\r\n invalidSignUp = true;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if(invalidSignUp) {\r\n return;\r\n }\r\n\r\n personData.addSignedUp(firstName, lastName, username, email, password);\r\n\r\n personData.writeSignedUp();\r\n\r\n Alert a = new Alert(Alert.AlertType.INFORMATION);\r\n a.setTitle(\"Information\");\r\n a.setContentText(\"Sign Up Successful!\");\r\n a.show();\r\n }",
"public void createProfile() {\n // Get string values from the text fields.\n String firstName = firstNameField.getText();\n String lastName = lastNameField.getText();\n String dateString = String.format(\"%4s-%2s-%2s\", yearField.getText(), monthField.getText(), dayField.getText()).replace(' ', '0');\n\n // Try to parse the date string to check that it is in a valid format.\n LocalDate dateOfBirth = null;\n boolean isValidDateFormat = false;\n try {\n dateOfBirth = LocalDate.parse(dateString);\n isValidDateFormat = true;\n } catch (Exception e) {\n isValidDateFormat = false;\n }\n\n // Try to parse the weight string to check that it is in a valid format for a double.\n double weight = 0.0;\n boolean isValidWeightDoubleString = false;\n try {\n weight = Double.parseDouble(weightField.getText());\n isValidWeightDoubleString = true;\n } catch (Exception e) {\n isValidWeightDoubleString = false;\n }\n\n // Try to parse the height string to check that it is in a valid format for a double.\n double height = 0.0;\n boolean isValidHeightDoubleString = false;\n try {\n height = Double.parseDouble(heightField.getText());\n isValidHeightDoubleString = true;\n } catch (Exception e) {\n isValidHeightDoubleString = false;\n }\n\n\n // Check that the given values are valid. If they are not, the user is displayed an appropriate error message.\n if (!Profile.isValidName(firstName)) {\n errorText.setText(String.format(\"First name must be between %s and %s characters.\", Profile.MIN_NAME_SIZE, Profile.MAX_NAME_SIZE));\n } else if (!Profile.isUniqueName(firstName, lastName)) {\n errorText.setText(String.format(\"User '%s %s' already exists.\", firstName, lastName));\n } else if (!Profile.isValidName(lastName)){\n errorText.setText(String.format(\"Last name must be between %s and %s characters.\", Profile.MIN_NAME_SIZE, Profile.MAX_NAME_SIZE));\n } else if (!isValidWeightDoubleString || !Profile.isValidWeight(weight)) {\n errorText.setText(String.format(\"Weight must be a number between %s and %s\", Profile.MIN_WEIGHT, Profile.MAX_WEIGHT));\n } else if (!isValidHeightDoubleString || !Profile.isValidHeight(height)) {\n errorText.setText(String.format(\"Height must be a number between %s and %s\", Profile.MIN_HEIGHT, Profile.MAX_HEIGHT));\n } else if (!isValidDateFormat) {\n errorText.setText(\"Date should be in the form dd/mm/yyyy.\");\n } else if (!Profile.isValidDateOfBirth(dateOfBirth)) {\n errorText.setText(String.format(\"Date should be between %s and %s.\", Profile.MIN_DOB, LocalDate.now()));\n } else {\n //Creates a new profile with the values provided by the user.\n Profile profile = new Profile(firstName, lastName, dateString, weight, height,\n String.format(\"images/profilePictures/ProfilePic%s.png\", currentImageIndex));\n applicationStateManager.setCurrentProfile(profile); //Sets the current profile to the new profile.\n System.out.println(\"profile Created!\");\n try {\n DataStorer.insertProfile(profile);\n applicationStateManager.switchToScreen(\"MainScreen\"); //Changes to main screen.\n ((MainScreenController) applicationStateManager.getScreenController(\"MainScreen\")).reset();\n this.reset();\n } catch (java.sql.SQLException e) {\n GuiUtilities.displayErrorMessage(\"An error occurred storing the profile from the database.\", e.getMessage());\n System.out.println(\"Error storing new profile in the data base.\");\n e.printStackTrace();\n }\n }\n\n }",
"public void uploadProfilePic(){\n if (currentUser!= null){\n if (profilePicUri != null)\n storageRepository.saveToStorage(profilePicUri);\n else\n saveUser(FirebaseAuth.getInstance().getCurrentUser().getUid(),Uri.parse(\"\"));\n }\n\n }",
"public void upload() {\n try {\n BufferedImage bufferedProfile = ImageIO.read(profilePicture.getInputStream());\n FaceImage face = new FaceImage(bufferedProfile);\n\n if (face.foundFace()) {\n\n face.setNoCropMultiplier(1);\n face.setAdditionPadding(20);\n face.setDimension(128, 128);\n BufferedImage profilePicture = face.getScaledProfileFace();\n\n File outfile = new File(Settings.NEW_PROFILE_IMAGE_PATH.replace(\"~~username~~\", student.getUserName()));\n ImageIO.write(profilePicture, \"png\", outfile);\n\n success = true;\n\n student.setProfilePicturePath(\"profile/\" + student.getUserName() + \".png\");\n save();\n\n } else {\n FacesContext.getCurrentInstance().addMessage(\"imageContainer:file\", new FacesMessage(\"Kein Gesicht gefunden!\"));\n\n }\n\n } catch (IOException e) {\n System.err.println(\"something went wrong \" + e.getMessage());\n }\n\n }",
"private void checkChangePicture(ActionEvent e) {\n\t\tif ((e.getSource() == ChP || e.getSource() == picture) && picture.getText().length() > 0) {\n\n\t\t\tif (s != null) {\n\t\t\t\tGImage image = null;\n\t\t\t\ttry {\n\t\t\t\t\timage = new GImage(picture.getText());\n\t\t\t\t} catch (ErrorException ex) {\n\t\t\t\t\t// Code that is executed if the filename cannot be opened.\n\t\t\t\t}\n\n\t\t\t\ts.setImage(image);\n\t\t\t\tif (image != null) {\n\t\t\t\t\tcanvas.displayProfile(s);\n\t\t\t\t\tcanvas.showMessage(\"Picture updated\");\n\t\t\t\t} else {\n\t\t\t\t\tcanvas.displayProfile(s);\n\t\t\t\t\tcanvas.showMessage(\"Unable to open image file: \" + picture.getText());\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcanvas.displayProfile(s);\n\t\t\t\tcanvas.showMessage(\"Please select a profile to change picture\");\n\t\t\t}\n\n\t\t}\n\t}",
"private void saveForm(){\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\n\n // Handling to make sure that all the fields have entries\n if (!uClear && !fClear && !pClear) {\n\n // Make sure that the user has entered a password that matches\n if (pMatch) {\n\n prefs.edit().putString(\"username\", username.getText().toString()).apply();\n\n prefs.edit().putString(\"fullname\", fullname.getText().toString()).apply();\n\n prefs.edit().putString(\"password\", password.getText().toString()).apply();\n\n prefs.edit().putString(\"pMatch\", String.valueOf(pMatch)).apply();\n\n String imagePath = storeImageFile(((BitmapDrawable)profPic.getDrawable()).getBitmap());\n prefs.edit().putString(\"photo\", imagePath).apply();\n\n\n } else {\n AlertDialog.Builder missingField = new AlertDialog.Builder(MainActivity.this);\n missingField.setTitle(\"Password not confirmed\");\n missingField.setMessage(\"Please retype your password in the box that appears.\");\n missingField.show();\n }\n\n } else {\n Log.d(\"tag\", uClear + \"-> user \" + pClear + \"-> pass \" + fClear + \"->full\");\n AlertDialog.Builder missingField = new AlertDialog.Builder(MainActivity.this);\n missingField.setTitle(\"Missing Fields\");\n missingField.setMessage(\"One of more fields in the form need to be entered.\");\n missingField.show();\n }\n\n }",
"private void codeToValidateUserData() {\n\n if (edFirstName.getText().toString().equalsIgnoreCase(\"\")) {\n clsDialogs.codeToGenerateAlertDialogs(\"Sign Up\", getString(R.string.dgEmptyField) + \" First Name!\");\n\n edFirstName.requestFocus();\n } else if (edMiddleName.getText().toString().equalsIgnoreCase(\"\")) {\n clsDialogs.codeToGenerateAlertDialogs(\"Sign Up\", getString(R.string.dgEmptyField) + \" Middle Name!\");\n\n edMiddleName.requestFocus();\n } else if (edSurname.getText().toString().equalsIgnoreCase(\"\")) {\n clsDialogs.codeToGenerateAlertDialogs(\"Sign Up\", getString(R.string.dgEmptyField) + \" Surname!\");\n\n edSurname.requestFocus();\n } else if (edRegNumber.getText().toString().equalsIgnoreCase(\"\")) {\n clsDialogs.codeToGenerateAlertDialogs(\"Sign Up\", getString(R.string.dgEmptyField) + \" Registration Number!\");\n\n edRegNumber.requestFocus();\n } else if (edUserName.getText().toString().equalsIgnoreCase(\"\")) {\n clsDialogs.codeToGenerateAlertDialogs(\"Sign Up\", getString(R.string.dgEmptyField) + \" Username!\");\n\n edUserName.requestFocus();\n } else if (edPassword.getText().toString().equalsIgnoreCase(\"\")) {\n clsDialogs.codeToGenerateAlertDialogs(\"Sign Up\", getString(R.string.dgEmptyField) + \" Password!\");\n\n edPassword.requestFocus();\n } else if (edConfirmPassword.getText().toString().equalsIgnoreCase(\"\")) {\n clsDialogs.codeToGenerateAlertDialogs(\"Sign Up\", getString(R.string.dgEmptyField) + \" Password Confirmation!\");\n\n edConfirmPassword.requestFocus();\n } else if (!radFullTime.isChecked() && !radPartTime.isChecked()) {\n clsDialogs.codeToGenerateAlertDialogs(\"Sign Up\", getString(R.string.dgEmptyField) + \" Mode of Study!\");\n } else {\n\n sFirstName = edFirstName.getText().toString();\n sMiddleName = edMiddleName.getText().toString();\n sSurname = edSurname.getText().toString();\n sRegNumber = edRegNumber.getText().toString();\n sUserName = edUserName.getText().toString();\n sPassword = edPassword.getText().toString();\n String sConfirmPassword = edConfirmPassword.getText().toString();\n\n if (radFullTime.isChecked()) {\n sModeOfStudy = this.getResources().getString(R.string.sFullTime);\n } else if (radPartTime.isChecked()) {\n sModeOfStudy = this.getResources().getString(R.string.sPartTime);\n }\n\n if (sPassword.equals(sConfirmPassword)) {\n codeToSaveUserData();\n } else {\n clsDialogs.codeToGenerateAlertDialogs(\"Sign Up\", getString(R.string.dgPasswordMismatch));\n\n edPassword.setText(\"\");\n edConfirmPassword.setText(\"\");\n edPassword.requestFocus();\n }\n }\n }",
"private void updatePicture() {\n \tif (!picture.getText().equals(\"\")) {\n\t\t\tif ( currentProfile != null ) {\n\t\t\t\t//Tries to open the given image fileName from user, throws an error if unable to open file.\n\t\t\t\tGImage image = null;\n\t\t\t\ttry {\n\t\t\t\t\timage = new GImage(picture.getText());\n\t\t\t\t} catch (ErrorException ex) {\n\t\t\t\t\tthrow ex;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Sets the currentProfile picture to the opened image and informs the user accordingly\n\t\t\t\tcurrentProfile.setImage(image);\n\t\t\t\tcanvas.displayProfile(currentProfile);\n\t\t\t\tcanvas.showMessage(\"Picture updated\");\n\t\t\t} else {\n\t\t\t\tcanvas.showMessage(\"Please select a profile to change picture\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"User updateProfile(MultipartFile image, String email) throws Exception;",
"private void checkProfilePicture(byte[] profilePicture, String mimeType) throws ValidationException {\n List<ValueError> errorList = new LinkedList<>();\n if (profilePicture == null) {\n // If mimeType is not null, then what is missing is the profile picture.\n ValidationHelper.objectNull(mimeType, errorList, ValueErrorConstants.MISSING_PICTURE);\n } else {\n ValidationHelper.objectNotNull(mimeType, errorList, ValueErrorConstants.MISSING_MIME_TYPE);\n }\n\n ValidationHelper.arrayNullOrLengthBetweenTwoNumbers(profilePicture,\n NumericConstants.PROFILE_PICTURE_MIN_SIZE, NumericConstants.PROFILE_PICTURE_MAX_SIZE,\n errorList, ValueErrorConstants.PICTURE_TOO_SMALL, ValueErrorConstants.PICTURE_TOO_BIG);\n\n ValidationHelper.stringNullOrLengthBetweenTwoValues(mimeType, NumericConstants.MIME_TYPE_MIN_LENGTH,\n NumericConstants.MIME_TYPE_MAX_LENGTH, errorList, ValueErrorConstants.MIME_TYPE_TOO_SHORT,\n ValueErrorConstants.MIME_TYPE_TOO_LONG);\n\n throwValidationException(errorList);\n }",
"public static void addProfilePhoto(File image) throws FileNotFoundException, IOException {\n if(image != null) {\n try {\n Photo photo = new Photo(user(), image);\n validation.match(photo.image.type(), IMAGE_TYPE);\n validation.max(photo.image.length(), MAX_FILE_SIZE);\n \n if (validation.hasErrors()) {\n validation.keep(); /* Remember errors after redirect. */}\n else {\n photo.save();\n User user = user();\n user.profile.profilePhoto = photo;\n user.profile.save();\n }\n } catch(FileNotFoundException f) {\n setProfilePhotoPage();//for if try to put in null file\n }\n }\n setProfilePhotoPage();//for if try to put in null file\n }",
"private boolean verifySignUpFields(){\n return !(firstName.getText().trim().isEmpty() || lastName.getText().trim().isEmpty() || emailSignUp.getText().trim().isEmpty() || passwordSignUp.getText().trim().isEmpty());\n }",
"private void updateProfileFields(){\n ParseUser user = ParseUser.getCurrentUser();\n if (user.get(\"name\")==null) {\n edtName.getText().clear();\n }else {\n edtName.setText(user.get(\"name\")+\"\");\n }\n if (user.get(\"profession\")== null) {\n edtProfession.getText().clear();\n }else {\n edtProfession.setText(user.get(\"profession\")+\"\");\n }\n if (user.get(\"hobbies\")== null) {\n edtHobbies.getText().clear();\n }else {\n edtHobbies.setText(user.get(\"hobbies\")+\"\");\n }\n\n if (user.get(\"favouriteSport\") == null) {\n edtFavSport.getText().clear();\n }else {\n edtFavSport.setText(user.get(\"favouriteSport\")+\"\");\n }\n\n }",
"private void updateUserInfo(final String name, Uri pickImage, String alamat, final FirebaseUser currentUser) {\n\n StorageReference mStorage = FirebaseStorage.getInstance().getReference().child(\"Foto_User\");\n final StorageReference imageFilePath = mStorage.child(PickImage.getLastPathSegment());\n imageFilePath.putFile(pickImage).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n\n //Foto Upload Sukses\n\n imageFilePath.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n\n UserProfileChangeRequest profileUpdate = new UserProfileChangeRequest.Builder()\n .setDisplayName(name)\n .setPhotoUri(uri)\n .build();\n\n currentUser.updateProfile(profileUpdate)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n if (task.isSuccessful()) {\n //info user upload sukses\n showMessage(\"Register Berhasil\");\n updateUI();\n }\n }\n });\n }\n });\n }\n });\n\n }",
"public void editProfile() {\n dialog = new Dialog(getContext());\n dialog.setContentView(R.layout.edit_profile);\n\n editUsername = dialog.findViewById(R.id.tv_uname);\n TextView editEmail = dialog.findViewById(R.id.tv_address);\n editImage = dialog.findViewById(R.id.imgUser);\n\n editUsername.setText(user.getUserID());\n editEmail.setText(user.getEmail());\n editEmail.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Toast.makeText(getContext(), \"Email cannot be changed.\", Toast.LENGTH_SHORT).show();\n }\n });\n decodeImage(user.getProfilePic(), editImage);\n editImage.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivityForResult(new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI), 3);\n }\n });\n\n TextView save = dialog.findViewById(R.id.save_edit);\n save.setOnClickListener(new View.OnClickListener() { // save changes\n @Override\n public void onClick(View v) {\n String username = editUsername.getText().toString();\n if(username.equals(\"\")) {\n Toast.makeText(getContext(), \"Username cannot be null\", Toast.LENGTH_SHORT).show();\n return;\n } else if (!checkUsername(username)) {\n Toast.makeText(getContext(), \"Username already exists\", Toast.LENGTH_SHORT).show();\n return;\n }\n user.setUserID(username);\n if(profilePicChanged) {\n user.setProfilePic(profilePic);\n profilePic = null;\n profilePicChanged = false;\n }\n docRef.set(user);\n dialog.dismiss();\n loadDataFromDB();\n }\n });\n\n TextView cancel = dialog.findViewById(R.id.cancel_edit);\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss(); // cancel changes\n }\n });\n\n dialog.show();\n dialog.getWindow().setLayout(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n }",
"private void validatedUrlButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_validatedUrlButtonActionPerformed\n\n clearInformation();\n String key = keyUploadTextField.getText();\n String secret = secretUploadTextField.getText();\n String title = titleUploadTextField.getText();\n String description = descUploadTextField.getText();\n String tag = tagUploadTextField.getText();\n String pathPhoto = pathPhotoUploadTextField.getText();\n\n if (key.equals(EMPTY) || secret.equals(EMPTY) || title.equals(EMPTY)\n || description.equals(EMPTY) || tag.equals(EMPTY)\n || pathPhoto.equals(EMPTY)) {\n displayInformation(PLEASE_EDIT_MISSING_INFORMATION);\n }\n Rsp respToken = flickrService.getToken(key, secret, frob);\n String token = ((Auth) (respToken.getAny())).getToken();\n\n if (flickrService.uploadPhotos(key, secret, title,\n description, tag, pathPhoto, token)) {\n displayInformation(SUCCESSFUL_UPLOAD);\n } else {\n displayInformation(FAIL_UPLOAD);\n }\n validatedUrlButton.setEnabled(false);\n }",
"private void changeImage(){\n if(currentProfile!=null){\n GImage image = null; \n try { \n if(containsLetters(pic.getText())==true){\n image = new GImage(pic.getText());\n currentProfile.setImage(image);\n canvas.displayProfile(currentProfile);\n canvas.showMessage(\"Picture updated\");\n } else{\n \tcanvas.showMessage(\"Unable to open image file: \"+pic.getText());\n }\n } catch (ErrorException ex) {\n canvas.showMessage(\"Unable to open image file: \"+pic.getText());\n }\n } else{\n canvas.showMessage(\"Please select a profile to change picture\");\n }\n }",
"private void checkIfSignup() {\n }",
"public static void setGravatar(String gravatarEmail) throws FileNotFoundException, IOException {\n //first takes the user's email and makes it into the correct hex string\n User u = user();\n String hash = md5Hex((gravatarEmail.trim()).toLowerCase());\n String urlPath = \"http://www.gravatar.com/avatar/\"+hash+\".jpg\"+\n \"?\" +//parameters\n \"size=120&d=mm\";\n URL url = new URL(urlPath);\n BufferedImage image = ImageIO.read(url);\n if(u.profile.gravatarPhoto == null) { // don't yet have a gravatarPhoto\n try {\n File gravatar = new File(hash+\".jpg\");\n ImageIO.write(image, \"jpg\",gravatar);\n \n if(gravatar != null) {\n Photo photo = new Photo(user(), gravatar);\n validation.match(photo.image.type(), IMAGE_TYPE);\n validation.max(photo.image.length(), MAX_FILE_SIZE);\n \n if (validation.hasErrors()) {\n validation.keep(); /* Remember errors after redirect. */}\n else {\n photo.save();\n User user = user();\n user.profile.profilePhoto = photo;\n \n //set gravatarPhoto id\n u.profile.gravatarPhoto = photo;\n user.profile.save();\n }\n gravatar.delete();\n }\n } catch(Exception f) {\n redirect(\"https://en.gravatar.com/site/signup/\");\n }\n }\n else { // have already added the gravatar picture, so we need to displace pic.\n Photo oldPhoto = Photo.findById(u.profile.gravatarPhoto.id);\n try{\n File gravatar = new File(hash+\".jpg\");\n ImageIO.write(image, \"jpg\",gravatar);\n \n if(gravatar != null){\n oldPhoto.updateImage(gravatar);\n validation.match(oldPhoto.image.type(), IMAGE_TYPE);\n validation.max(oldPhoto.image.length(), MAX_FILE_SIZE);\n \n if (validation.hasErrors()) {\n validation.keep(); /* Remember errors after redirect. */}\n else {\n oldPhoto.save();\n User user = user();\n user.profile.profilePhoto = oldPhoto;\n \n //set gravatarPhoto id\n u.profile.gravatarPhoto = oldPhoto;\n user.profile.save();\n }\n \n }\n \n gravatar.delete();//delete file. We don't need it\n }\n catch(Exception f) {\n redirect(\"https://en.gravatar.com/site/signup/\");\n }\n }\n \n //if reach here have successfully changed the gravatar so we reset the email\n u.profile.gravatarEmail = gravatarEmail;\n u.profile.save();\n \n setProfilePhotoPage();//render page\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Produces a sysex patch dump suitable to send to a remote synthesizer. If you return a zerolength byte array, nothing will be sent. If tempModel is nonnull, then it should be used to extract metaparameters such as the bank and patch number (stuff that's specified by gatherPatchInfo(...). Otherwise the primary model should be used. The primary model should be used for all other parameters. toWorkingMemory indicates whether the patch should be directed to working memory of the synth or to the patch number in tempModel. If TOFILE is true, then we are emitting to a file, not to the synthesizer proper. Note that this method will only be called by emitAll(...). So if you have overridden emitAll(...) you don't need to implement this method. | public byte[] emit(Model tempModel, boolean toWorkingMemory, boolean toFile) { return new byte[0]; } | [
"public byte[] emit(Model tempModel, boolean toWorkingMemory, boolean toFile) \n {\n return new byte[0]; \n }",
"public Object[] emitAll(Model tempModel, boolean toWorkingMemory, boolean toFile)\n {\n byte[] result = emit(tempModel, toWorkingMemory, toFile);\n if (result == null ||\n result.length == 0)\n return new Object[0];\n else\n return new Object[] { result };\n }",
"public byte[] requestDump(Model tempModel) \n {\n return requestCurrentDump(); \n }",
"public void performRequestDump(Model tempModel, boolean changePatch)\n {\n if (changePatch)\n performChangePatch(tempModel);\n \n tryToSendSysex(requestDump(tempModel));\n }",
"public void changePatch(Model tempModel) \n {\n int bank = tempModel.get(\"bank\");\n int number = tempModel.get(\"number\");\n\n switch (getSynthType())\n {\n case TYPE_DX21:\n {\n if (number >= 32)\n {\n System.err.println(\"Warning (Yamaha4Op): Patch number is invalid (\" + number + \", changing to \" + (number % 32));\n number = number % 32;\n }\n tryToSendMIDI(buildPC(getChannelOut(), number));\n }\n case TYPE_DX27_DX100:\n {\n if (number >= 24)\n {\n System.err.println(\"Warning (Yamaha4Op): Patch number is invalid (\" + number + \", changing to \" + (number % 24));\n number = number % 24;\n }\n number = number + bank * 24;\n tryToSendMIDI(buildPC(getChannelOut(), number));\n }\n break;\n case TYPE_DX11:\n case TYPE_TX81Z:\n {\n // [Note: I don't know if this will work for the DX11, but I'm taking a shot here.]\n // \n // A program change in the TX81Z is a complicated affair. We need to do three things:\n //\n // 1. Modify a slot in the program change table to the patch we want. We'll modify slot 127.\n //\n // 2. At this point the TX81Z is in a strange \"I got edited via MIDI\" mode. We need to get\n // out of that and into standard program mode. We do this by using sysex commands to virtually press\n // the PLAY/PERFORM switch.\n //\n // 3. Now we're either in PLAY mode or we're in PERFORM mode. At this point we send a PC 127, which\n // causes the system to look up slot 127 in its table, discover it's a performance patch,\n // and switch to that, while also changing to PERFORM mode. \n\n // Change program change table position 127 to our desired patch\n int val = bank * 32 + number;\n byte lo = (byte)(val & 127);\n byte hi = (byte)(val >>> 7);\n byte[] table = new byte[9];\n table[0] = (byte)0xF0;\n table[1] = (byte)0x43;\n table[2] = (byte)(16 + getChannelOut());\n table[3] = (byte)0x10;\n table[4] = (byte)127; // really!\n table[5] = (byte)127; // we're changing table position 127\n table[6] = hi;\n table[7] = lo;\n table[8] = (byte)0xF7;\n tryToSendSysex(table);\n\n // Instruct the TX81Z to press its \"PLAY/PERFORM\" button. Or \"SINGLE\" on the DX11\n byte PP = getSynthType() == TYPE_TX81Z ? (byte) 68 : (byte) 118; // 119 is \"PERFORM\", 118 is \"SINGLE\"\n byte VV = (byte) 0;\n byte[] data = new byte[] { (byte)0xF0, (byte)0x43, (byte)(16 + getChannelOut()), REMOTE_SWITCH_GROUP, PP, (byte)0x7F, (byte)0xF7 };\n tryToSendSysex(data);\n\n // Do the program change to program 127\n tryToSendMIDI(buildPC(getChannelOut(), 127));\n }\n break;\n case TYPE_TQ5_YS100_YS200_B200:\n {\n if (bank > 3) \n {\n System.err.println(\"Warning (Yamaha4Op): bank is invalid (\" + bank + \"), changing to 0\");\n bank = 0;\n }\n \n if (number >= 100)\n {\n System.err.println(\"Warning (Yamaha4Op): Patch number is invalid (\" + number + \", changing to \" + (number % 100));\n number = number % 100;\n }\n \n // First we'll attempt to switch to the right bank by pressing magic butons\n byte[] data = new byte[] { (byte)0xF0, (byte)0x43, (byte)(16 + getChannelOut()), TQ5_REMOTE_SWITCH_GROUP,\n \n // documentation is wrong here. The manual says 116 = card 117 = user 118 = preset\n // but in fact it's 116 = preset 117 = user 118 = card\n (byte)(bank == 0 ? 116 : // user\n (bank == 1 ? 117 : // preset\n 118)), // card\n (byte)127, (byte)0xF7 };\n tryToSendSysex(data);\n \n // Do the program change\n tryToSendMIDI(buildPC(getChannelOut(), number));\n }\n break; \n case TYPE_V50:\n {\n if (bank > 3) \n {\n System.err.println(\"Warning (Yamaha4Op): bank is invalid (\" + bank + \"), changing to 0\");\n bank = 0;\n }\n \n if (number >= 100)\n {\n System.err.println(\"Warning (Yamaha4Op): Patch number is invalid (\" + number + \", changing to \" + (number % 100));\n number = number % 100;\n }\n \n // We do two PCs\n // First to change banks, this is a weird way to do it.\n tryToSendMIDI(buildPC(getChannelOut(), bank + 122));\n // Next to select the patcb \n tryToSendMIDI(buildPC(getChannelOut(), number));\n }\n break; \n }\n \n \n // we assume that we successfully did it\n if (!isMerging()) // we're actually loading the patch, not merging with it\n {\n setSendMIDI(false);\n model.set(\"number\", number);\n model.set(\"bank\", bank);\n setSendMIDI(true);\n }\n }",
"public Patch createNewPatch() {\n byte[] sysex = new byte[patchSize];\n for (int i = 0; i < QSConstants.GENERIC_HEADER.length; i++) {\n sysex[i] = QSConstants.GENERIC_HEADER[i];\n }\n sysex[QSConstants.POSITION_OPCODE] = QSConstants.OPCODE_MIDI_USER_PROG_DUMP;\n sysex[QSConstants.POSITION_LOCATION] = 0;\n Patch p = new Patch(sysex, this);\n setPatchName(p, QSConstants.DEFAULT_NAME_PROG);\n return p;\n }",
"public void changePatch(Model tempModel)\n {\n // Here you do stuff that changes patches on the synth.\n // You probably want to look at tryToSendSysex() and tryToSendMIDI()\n //\n // This method is used primariily to switch to a new patch prior to loading it\n // from the synthesizer or emitting it to the synthesizer. Many synthesizers do \n // not report their patch location information when emitting a dump to Edisyn. \n // If this is the case, you might want add some code at the end of this method which\n // assumes that the patch change and subsequent parse were successful, so you can\n // just change the patch information in your model directly here in this method. \n // You should NOT do this when changing a patch for the purpose of merging. \n // So in this case (and ONLY in this case) you should end this method with something \n // along the lines of:\n //\n // // My synth doesn't report patch info in its parsed data, so here assume that we successfully did it\n // if (!isMerging())\n // {\n // boolean midi = getSendMIDI(); // is MIDI turned off right now?\n // setSendMIDI(false); // you should always turn off MIDI prior to messing with the model so nothing gets emitted, just in case\n // model.set(\"number\", number);\n // model.set(\"bank\", bank);\n // setSendMIDI(midi); // restore to whatever state it was\n // }\n }",
"void createPatch(@Nullable List<File> pFileToDiff, @Nullable ICommit pCompareWith, @NonNull OutputStream pWriteTo);",
"public StringBuffer shallow() {\n StringBuffer buffer = new StringBuffer();\n returnType.write(buffer);\n buffer.append(\" \");\n name.write(buffer);\n buffer.append(\"(\");\n argument.write(buffer);\n buffer.append(\") \");\n\n if (singleExampleCache) buffer.append(\"cached \");\n\n if (cacheIn != null) {\n buffer.append(\"cachedin\");\n\n if (cacheIn.toString().equals(ClassifierAssignment.mapCache))\n buffer.append(\"map\");\n else {\n buffer.append(\" \");\n cacheIn.write(buffer);\n }\n\n buffer.append(' ');\n }\n\n buffer.append(\"<- \");\n referent.write(buffer);\n return buffer;\n }",
"public Object[] emitBank(Model[] models, int bank, boolean toFile) \n {\n return new Object[0]; \n }",
"public IWorkingCopy getWorkingCopy();",
"void writeCallToFile(String fileName, CallTO callTO);",
"void doSaveAs()\n {\n FileDialog fd = new FileDialog((Frame)(SwingUtilities.getRoot(this)), \"Save Patch to Sysex File...\", FileDialog.SAVE);\n\n if (file != null)\n {\n fd.setFile(reviseFileName(file.getName()));\n fd.setDirectory(file.getParentFile().getPath());\n }\n else\n {\n if (getPatchName(getModel()) != null)\n fd.setFile(reviseFileName(getPatchName(getModel()).trim() + \".syx\"));\n else\n fd.setFile(reviseFileName(\"Untitled.syx\"));\n String path = getLastDirectory();\n if (path != null)\n fd.setDirectory(path);\n } \n \n fd.setVisible(true);\n File f = null; // make compiler happy\n FileOutputStream os = null;\n if (fd.getFile() != null)\n try\n {\n f = new File(fd.getDirectory(), ensureFileEndsWith(fd.getFile(), \".syx\"));\n os = new FileOutputStream(f);\n os.write(flatten(emitAll((Model)null, false, true)));\n os.close();\n file = f;\n setLastDirectory(fd.getDirectory());\n } \n catch (IOException e) // fail\n {\n showSimpleError(\"File Error\", \"An error occurred while saving to the file \" + (f == null ? \" \" : f.getName()));\n e.printStackTrace();\n }\n finally\n {\n if (os != null)\n try { os.close(); }\n catch (IOException e) { }\n }\n\n updateTitle();\n }",
"public String toFile() {\n return \"Labourer\\r\\n\" + staffName + \"\\r\\n\" + staffNum + \"\\r\\n\" + staffPassword + \"\\r\\n\" + wage + \"\\r\\n\" + hours + \"\\r\\n\";\n }",
"public void createTopologyFile(String topologyFile) {\n\t\tthis.createTempFile(\"inputs/temp\");\n\t\tthis.t_delta = this.setTDelta();\n\n\t\tProperties prop = new Properties();\n\t\tInputStream inputStream;\n\n\t\ttry {\n\t\t\tinputStream = new FileInputStream(\"inputs/temp\");\n\t\t\tprop.load(inputStream);\n\n\t\t\tOutputStream out = new FileOutputStream(topologyFile);\n\t\t\tOutputStreamWriter osw = new OutputStreamWriter(out);\n\n\t\t\tint numberOfPaths = Integer.parseInt(this.num_of_paths);\n\n\t\t\tosw.write(\"num_of_paths=\" + numberOfPaths + \"\\n\");\n\t\t\tosw.write(\"n_value=\" + n_value + \"\\n\");\n\t\t\tosw.write(\"t_delta=\" + t_delta + \"\\n\");\n\n\t\t\tfor (int i = 1; i <= numberOfPaths; i++) {\n\t\t\t\tosw.write(\"path_\" + i + \"=\" + prop.getProperty(\"path_\" + i) + \"\\n\");\n\t\t\t}\n\t\t\tosw.write(\"\\n\");\n\n\t\t\tfor (int i = 1; i <= numberOfPaths; i++) {\n\t\t\t\tosw.write(\"delay_\" + i + \"=\" + prop.getProperty(\"delay_\" + i) + \"\\n\");\n\t\t\t}\n\t\t\tosw.write(\"\\n\");\n\n\t\t\tfor (int i = 1; i <= numberOfPaths; i++) {\n\t\t\t\tosw.write(\"mal_\" + i + \"=\" + prop.getProperty(\"mal_\" + i) + \"\\n\");\n\t\t\t}\n\t\t\tosw.write(\"\\n\");\n\n\t\t\tosw.flush();\n\t\t\tosw.close();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public MidiFile toMidiFile() {\n try {\n // new sequence with song's num of ticks per beat ****\n midiSequence = new Sequence(javax.sound.midi.Sequence.PPQ, (int) timebase);\n\n // create first track\n currentTrack = midiSequence.createTrack();\n\n ////////////////////////////////////////////////////////\n /////////////////////// HEADER /////////////////////////\n ////////////////////////////////////////////////////////\n\n // general MIDI configuration\n // have to do (byte) casts because Java has unsigned int problems\n byte[] b = {(byte) 0xF0, 0x7E, 0x7F, 0x09, 0x01, (byte) 0xF7};\n SysexMessage sm = new SysexMessage();\n sm.setMessage(b, 6);\n\n MidiEvent me = new MidiEvent(sm, START_TICK);\n currentTrack.add(me);\n\n // calculate tempo in bytes\n float microPerMinute = 60000000;\n int microPerPulse = (int) (microPerMinute / outputTempo);\n byte[] bytes = ByteBuffer.allocate(4).putInt(microPerPulse).array();\n\n // three bytes represent number of microseconds per pulse\n byte[] bt = {bytes[1], bytes[2], bytes[3]};\n writeMetaEvent(SET_TEMPO, bt, 3, START_TICK);\n\n // set track name (meta event)\n String TrackName = \"Composerator Track 1\";\n writeMetaEvent(SET_TRACK_NAME, TrackName.getBytes(), TrackName.length(), START_TICK);\n\n // set omni on\n writeShortEvent(0xB0, 0x7D, 0x00, START_TICK);\n\n // set poly on\n writeShortEvent(0xB0, 0x7F, 0x00, START_TICK);\n\n // set instrument to Piano\n writeShortEvent(0xC0, 0x00, 0x00, START_TICK);\n\n ////////////////////////////////////////////////////////\n //////////////////////// BODY //////////////////////////\n ////////////////////////////////////////////////////////\n\n // iterate through note chain and call note events on each note\n for (Object c : noteChain.getList())\n {\n // cast object to Note class\n noteEvent((Note) c);\n }\n\n ////////////////////////////////////////////////////////\n ////////////////////// FOOTER //////////////////////////\n ////////////////////////////////////////////////////////\n\n // set end of track\n byte[] bet = {}; // empty array\n writeMetaEvent(SET_END_OF_TRACK, bet, 0, currentTick);\n\n }\n catch (Exception e)\n {\n System.out.println(\"Exception caught \" + e.toString());\n }\n\n // return a new MIDI file object with the constructed midi sequence\n return new MidiFile(midiSequence);\n }",
"public ReportWriter getScratchWriter() {\n\t\treturn writer.duplicate(new StringWriter());\n\t}",
"public IFileFragment createWorkFragment(IFileFragment iff) {\n URI uri = new File(getWorkflow().getOutputDirectory(this), iff.getName()).toURI();\n log.info(\"Work fragment: {}\", uri);\n final IFileFragment copy = new FileFragment(uri);\n copy.addSourceFile(iff);\n return copy;\n }",
"public void saveChartDataToFile(boolean bJustCurrTS) {\n String sFileName = \"\";\n java.io.FileWriter jOut = null;\n try {\n\n \t//Allow the user to save a text file\n ModelFileChooser jChooser = new ModelFileChooser();\n jChooser.setFileFilter(new sortie.gui.components.TextFileFilter());\n\n int iReturnVal = jChooser.showSaveDialog(m_oChartFrame);\n if (iReturnVal != javax.swing.JFileChooser.APPROVE_OPTION) return;\n \n // User chose a file - trigger the save\n java.io.File oFile = jChooser.getSelectedFile();\n sFileName = oFile.getAbsolutePath();\n if (sFileName.endsWith(\".txt\") == false) {\n sFileName += \".txt\";\n }\n if (new java.io.File(sFileName).exists()) {\n iReturnVal = javax.swing.JOptionPane.showConfirmDialog(m_oChartFrame,\n \"Do you wish to overwrite the existing file?\",\n \"Model\",\n javax.swing.JOptionPane.YES_NO_OPTION);\n if (iReturnVal == javax.swing.JOptionPane.NO_OPTION) return; \n }\n\n m_oChartFrame.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.\n Cursor.WAIT_CURSOR));\n\n DetailedOutputLegend oLegend = (DetailedOutputLegend) m_oManager.\n getLegend();\n\n //Start with the file header - reconstitute the full file name\n String sTitle = m_oChartFrame.getTitle();\n sTitle = sTitle.substring(0, sTitle.indexOf(\" - \"));\n sTitle = sTitle + \" - \" + m_oManager.getFileName();\n\n if (bJustCurrTS) {\n //Write the current timestep's data only\n jOut = new FileWriter(sFileName);\n jOut.write(sTitle + \"\\n\");\n jOut.write(\"Timestep\\t\" + String.valueOf(oLegend.getCurrentTimestep()) + \"\\n\");\n\n //Now write the timestep data\n writeChartDataToFile(jOut);\n jOut.close();\n } else {\n //Write the whole run to file\n int iNumTimesteps = oLegend.getNumberOfTimesteps(),\n iTimestepToReturnTo = oLegend.getCurrentTimestep(),\n iTs; //loop counter\n \n //Trim the \".txt\" back off the filename\n sFileName = sFileName.substring(0, sFileName.indexOf(\".txt\"));\n\n //Force the processing of each timestep\n for (iTs = 0; iTs <= iNumTimesteps; iTs++) {\n\n //Get this timestep's filename\n jOut = new java.io.FileWriter(sFileName + \"_\" + iTs + \".txt\");\n jOut.write(sTitle + \"\\n\");\n jOut.write(\"Timestep\\t\" + iTs + \"\\n\");\n\n //Make the file manager parse this file\n m_oManager.readFile(iTs);\n\n //Have the chart write this timestep's data\n writeChartDataToFile(jOut);\n\n jOut.close();\n }\n\n //Refresh all the existing charts back to the way they were\n m_oManager.readFile(iTimestepToReturnTo);\n m_oManager.updateCharts();\n }\n\n m_oChartFrame.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.\n Cursor.DEFAULT_CURSOR));\n\n //Tell the user\n javax.swing.JOptionPane.showMessageDialog(m_oChartFrame,\n \"File has been saved.\");\n }\n catch (java.io.IOException oErr) {\n sortie.data.simpletypes.ModelException oExp = new sortie.data.simpletypes.ModelException(\n ErrorGUI.BAD_FILE, \"JAVA\",\n \"There was a problem writing the file \" + sFileName + \".\");\n ErrorGUI oHandler = new ErrorGUI(m_oChartFrame);\n oHandler.writeErrorMessage(oExp);\n }\n catch (sortie.data.simpletypes.ModelException oErr) {\n ErrorGUI oHandler = new ErrorGUI(m_oChartFrame);\n oHandler.writeErrorMessage(oErr);\n }\n finally {\n try {\n if (jOut != null) {\n jOut.close();\n }\n }\n catch (java.io.IOException oErr) {\n ;\n }\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize an empty edge | public Edge() {} | [
"public UndirectedEdge() {\n \tthis(null,null);\n\t}",
"public Edge()\n {\n start = -1;\n end = -1;\n capacity = -1;\n }",
"public Vertex()\r\n\t{\r\n\t\tArrays.fill(edges, Double.POSITIVE_INFINITY);\r\n\t}",
"public DirectedEdge() {\n\t\t// TODO: Add your code here\n\t\tthis(null,null);\n\t}",
"public Edge(){\n\t\tvertices = null;\n\t\tnext = this;\n\t\tprev = this;\n\t\tpartner = null;\n\t\tweight = 0;\n\t}",
"Edge createEdge();",
"_Edge create_Edge();",
"public EdgeData(EdgeType edgeType) { this(EdgeConstants.DEFAULT_COLOR, edgeType, \n\t\t\tEdgeConstants.DEFAULT_WEIGHT); }",
"private static void InitializeEdges()\n {\n edges = new ArrayList<Edge>();\n\n for (int i = 0; i < Size -1; i++)\n {\n for (int j = 0; j < Size; j++)\n {\n edges.add(new Edge(cells[i][j].Point, cells[i + 1][ j].Point));\n edges.add(new Edge(cells[j][i].Point, cells[j][ i + 1].Point));\n }\n }\n\n for (Edge e : edges)\n {\n if ((e.A.X - e.B.X) == -1)\n {\n e.Direction = Edge.EdgeDirection.Vertical;\n }\n else\n {\n e.Direction = Edge.EdgeDirection.Horizontal;\n }\n }\n }",
"public DefaultEdge(int e, Table table) {\n super(e, table);\n }",
"public Wedge() {\r\n\t}",
"Graph(int v, int e) { \r\n V = v; \r\n E = e; \r\n edge = new Edge[e]; \r\n for (int i = 0; i < e; ++i) \r\n edge[i] = new Edge(); \r\n }",
"public Edge(Cell from, Cell to) {\n if (from != null && to != null) {\n this.from = from;\n this.to = to;\n }\n }",
"public EdgeData(double weight) { this(EdgeConstants.DEFAULT_COLOR, \n\t\t\tEdgeConstants.DEFAULT_EDGE_TYPE, weight); }",
"public Collision()\n {\n // INITIALISE _edges to the default values (0, 0):\n _edges = new Vector2<Integer>(0, 0);\n }",
"public EdgesRecord() {\n super(Edges.EDGES);\n }",
"public EdgeData() {\r\n\t\tthis.capacity = 1;\r\n\t\tthis.flow = 0;\r\n\t\tthis.isBackEdge = false;\r\n\t\t\r\n\t}",
"public Graph()\r\n {\r\n this.V = 0;\r\n this.E = 0;\r\n adj = new TreeMap<>();\r\n }",
"public RelationshipElement ()\n\t{\n\t\tthis(null, null);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getPulkovo1995GKZone16 method, of class GaussKrugerPulkovo1995. | @Test
public void testPulkovo1995GKZone16() {
testToWGS84AndBack(PROJ.getPulkovo1995GKZone16());
} | [
"@Test\n public void testPulkovo19953DegreeGKZone16() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone16());\n }",
"@Test\n public void testPulkovo1995GKZone24() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone24());\n }",
"@Test\n public void testPulkovo1995GKZone6() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone6());\n }",
"@Test\n public void testPulkovo1995GKZone24N() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone24N());\n }",
"@Test\n public void testPulkovo1995GKZone32() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone32());\n }",
"@Test\n public void testPulkovo1995GKZone2() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone2());\n }",
"@Test\n public void testPulkovo19953DegreeGKZone48() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone48());\n }",
"@Test\n public void testPulkovo1995GKZone6N() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone6N());\n }",
"@Test\n public void testPulkovo1995GKZone26N() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone26N());\n }",
"@Test\n public void testPulkovo1995GKZone32N() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone32N());\n }",
"@Test\n public void testPulkovo1995GKZone26() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone26());\n }",
"@Test\n public void testPulkovo1995GKZone5() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone5());\n }",
"@Test\n public void testPulkovo1995GKZone10N() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone10N());\n }",
"@Test\n public void testPulkovo1995GKZone11() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone11());\n }",
"@Test\n public void testPulkovo1995GKZone21() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone21());\n }",
"@Test\n public void testPulkovo1995GKZone8() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone8());\n }",
"@Test\n public void testPulkovo1995GKZone4() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone4());\n }",
"@Test\n public void testPulkovo1995GKZone20N() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone20N());\n }",
"@Test\n public void testPulkovo1995GKZone31() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone31());\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/~~~~~~~~~~~~ Removal ~~~~~~~~~~~~ / description: removes all references to messages from one user return: false if one of their messages can't be removed. precondition: void postcondition: all messages that can be removed will be | public Boolean removeAll(User user) {
Boolean flag = true;
for(Message message : fromUser(user)) {
flag = remove(message) && flag;
DashBoard.removeFromDatabase(message);
}
return flag;
} | [
"private void deleteMessagesForUser(UUID userId) {\n final Predicate<Message> matcher =\n m -> m.getSenderUserId().equals(userId) || m.getRecipientUserId().equals(userId);\n\n EntryStream.of(database.dataRoot().getAllGroupMessages())\n .filterValues(messageList -> messageList.stream().anyMatch(matcher))\n .values()\n .forEach(messageList -> {\n messageList.removeIf(matcher);\n database.persist(messageList);\n });\n }",
"public void deleteMessages() {\n\t\tmessageDAO.modifyMessageList(currentContact.getMsgId(), new LinkedList<Mensaje>());\n\t\tcurrentContact.removeMessages();\n\t\tcontactDAO.modifyContact(currentContact);\n\t\t// Groups share the message list, only single contacts has to be updated\n\t\tif (currentContact instanceof ContactoIndividual) {\n\t\t\tUsuario user = userCatalog.getUser(currentContact.getUserId());\n\t\t\tOptional<Contacto> result = user.getContacts().stream().filter(c -> c.getUserId() == currentUser.getId())\n\t\t\t\t\t.findFirst();\n\t\t\tif (!result.isPresent())\n\t\t\t\treturn;\n\t\t\tmessageDAO.modifyMessageList(result.get().getMsgId(), new LinkedList<Mensaje>());\n\t\t\tresult.get().removeMessages();\n\t\t\tcontactDAO.modifyContact(result.get());\n\t\t}\n\t}",
"public void delete() {\n messages.remove(this);\n if (replyOnMessage != null) {\n //replyOnMessage.replies.remove(this);\n }\n }",
"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 }",
"@Override\n public void deleteMessages(List<AndesRemovableMetadata> messagesToRemove,\n boolean moveToDeadLetterChannel) throws AndesException {\n List<Long> idsOfMessagesToRemove = new ArrayList<Long>();\n Map<String, List<AndesRemovableMetadata>> queueSeparatedRemoveMessages = new HashMap<String, List<AndesRemovableMetadata>>();\n\n for (AndesRemovableMetadata message : messagesToRemove) {\n idsOfMessagesToRemove.add(message.messageID);\n\n List<AndesRemovableMetadata> messages = queueSeparatedRemoveMessages\n .get(message.destination);\n if (messages == null) {\n messages = new ArrayList\n <AndesRemovableMetadata>();\n }\n messages.add(message);\n queueSeparatedRemoveMessages.put(message.destination, messages);\n\n //if to move, move to DLC. This is costy. Involves per message read and writes\n if (moveToDeadLetterChannel) {\n AndesMessageMetadata metadata = messageStore.getMetaData(message.messageID);\n messageStore\n .addMetaDataToQueue(AndesConstants.DEAD_LETTER_QUEUE_NAME, metadata);\n }\n }\n\n //remove metadata\n for (String queueName : queueSeparatedRemoveMessages.keySet()) {\n messageStore.deleteMessageMetadataFromQueue(queueName,\n queueSeparatedRemoveMessages\n .get(queueName));\n //decrement message count of queue\n decrementQueueCount(queueName, queueSeparatedRemoveMessages\n .get(queueName).size());\n }\n\n if (!moveToDeadLetterChannel) {\n //remove content\n //TODO: - hasitha if a topic message be careful as it is shared\n deleteMessageParts(idsOfMessagesToRemove);\n }\n\n if(moveToDeadLetterChannel) {\n //increment message count of DLC\n incrementQueueCount(AndesConstants.DEAD_LETTER_QUEUE_NAME, messagesToRemove.size());\n }\n }",
"public void remove(final String[] resourceKeys)\r\n\t{\r\n\r\n\t\tfinal Iterator<Message> iter = messageList.iterator();\r\n\t\twhile (iter.hasNext())\r\n\t\t{\r\n\t\t\tfinal Message message = iter.next();\r\n\t\t\tfor (int i = 0; i < resourceKeys.length; i++)\r\n\t\t\t{\r\n\t\t\t\tif (message.getResourceKey().equals(resourceKeys[i]))\r\n\t\t\t\t{\r\n\t\t\t\t\titer.remove();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void removeAllMessages() {\n messages.clear();\n }",
"public void clean() {\n\t\tList<List<List<AuditerMessage>>> topLevelTransactions = getTopLevelTransactions();\n\t\tif (topLevelTransactions.isEmpty()) {\n\t\t\tlog.trace(\"No messages to clean\");\n\t\t\treturn;\n\t\t}\n\n\t\tList<List<AuditerMessage>> transactionChain = topLevelTransactions.get(topLevelTransactions.size() - 1);\n\t\tif (transactionChain.isEmpty()) {\n\t\t\tlog.trace(\"No messages to clean\");\n\t\t}\n\n\t\tif (transactionChain.size() != 1) {\n\t\t\tlog.error(\"There should be only one list of messages while cleaning.\");\n\t\t}\n\n\t\t//log erased transactions to logfile\n\t\tfor (List<AuditerMessage> list : transactionChain) {\n\t\t\tfor (AuditerMessage message : list) {\n\t\t\t\ttransactionLogger.info(\"Unstored transaction message: {}\", message);\n\t\t\t}\n\t\t}\n\n\n\t\ttopLevelTransactions.remove(topLevelTransactions.size() - 1);\n\n\t\tif (topLevelTransactions.isEmpty()) {\n\t\t\tTransactionSynchronizationManager.unbindResourceIfPossible(this);\n\t\t}\n\t}",
"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}",
"public void deleteReplyMessage(String id, String userId);",
"public void removeMessage(Message message) throws NavajoException;",
"public void clearMessages() throws RemoteException {\r\n messages.removeAllElements();\r\n }",
"@FXML\n private void deleteUserMessage() {\n deleteMessages(deleteMessages_CB, warning_delete);\n updateAllMessagesToDelete();\n showMessageDelete();\n }",
"public void remove(Client user) {\n Client recipient = matches.get(user.getId());\n if (recipient != null) {\n matches.remove(recipient.getId());\n }\n matches.remove(user.getId());\n clientsWaiting.removeFirstOccurrence(user);\n }",
"@DELETE\n @Path(\"/mbox/{user}/{mid}\")\n void removeFromUserInbox(@HeaderParam(MessageService.HEADER_VERSION) Long version,\n @PathParam(\"user\") String user, @PathParam(\"mid\") long mid,\n @QueryParam(\"pwd\") String pwd) throws IOException;",
"public synchronized boolean remove (Message message) throws IOException {\n FileReader fileReader = null;\n BufferedReader bufferedReader = null;\n FileWriter fileWriter = null;\n BufferedWriter bufferedWriter = null;\n\n try {\n ImprovedFile temp = new ImprovedFile(file.getName() + \".backup\");\n file.renameTo(temp);\n fileReader = new FileReader(temp);\n fileWriter = new FileWriter(file);\n bufferedReader = new BufferedReader(fileReader);\n bufferedWriter = new BufferedWriter(fileWriter);\n\n String line = bufferedReader.readLine();\n while (line != null) {\n Message fileMessage = Message.readLongFormat(line);\n if (!fileMessage.equals(message)) {\n bufferedWriter.write(line);\n bufferedWriter.newLine();\n }\n line = bufferedReader.readLine();\n }\n } finally {\n if (bufferedReader != null) {\n bufferedReader.close();\n }\n\n if (fileReader != null) {\n fileReader.close();\n }\n\n if (bufferedWriter != null) {\n bufferedWriter.close();\n }\n\n if (fileWriter != null) {\n fileWriter.close();\n }\n }\n\n return list.remove(message);\n }",
"public void removeModelMessagesFor(Player player) {\n if (modelMessages.get(player) == null) {\n return;\n }\n Iterator<ModelMessage> messageIterator = modelMessages.get(player).iterator();\n while (messageIterator.hasNext()) {\n ModelMessage message = messageIterator.next();\n if (message.hasBeenDisplayed()) {\n messageIterator.remove();\n }\n }\n }",
"public void checkMessages(){\r\n if (messages.size() > threshold){\r\n messages.remove(0);\r\n }\r\n }",
"private void deleteMessage(int position) {\n final String currentUid=FirebaseAuth.getInstance().getCurrentUser().getUid();\n\n String timeOfMessage = chatList.get(position).getTimestamp().trim();\n DatabaseReference dbref = FirebaseDatabase.getInstance().getReference(\"chats\");\n Query query = dbref.orderByChild(\"timestamp\").equalTo(timeOfMessage);\n\n query.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for(DataSnapshot ds: dataSnapshot.getChildren()){\n\n //if you want to allow sender to only delete his message\n // then compare currentUId to sender uid and give\n // if they matches means sender trying to delete the message\n if(ds.child(\"sender\").getValue().equals(currentUid))\n {\n // we remove message and show the message\n // \" this message was deleted..\" in place of that message\n\n // 1 -- To remove message\n // ds.getRef().removeValue();\n\n //To add \" this message was deleted..\" in place of that message\n HashMap<String, Object> hashMap =new HashMap<>();\n hashMap.put(\"message\" +\n \"\",\" this message was deleted..\");\n ds.getRef().updateChildren(hashMap);\n Toast.makeText(context, \"message deleted..\", Toast.LENGTH_SHORT).show();\n }\n else{\n Toast.makeText(context, \"You can delete only your message\", Toast.LENGTH_SHORT).show();\n }\n\n\n\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Expose the internal AttributeTable so that the client can do some customized adding. | public AttributeTable getAttributeTable() {
return this.propTable;
} | [
"public TableAttributes getAttributes() {\n\treturn attrs;\n }",
"@Override\n protected void allocateAttributes() {\n super.allocateAttributes();\n\n owner = new ByteArrayAttribute(Attribute.OWNER);\n acIssuer = new ByteArrayAttribute(Attribute.AC_ISSUER);\n serialNumber = new ByteArrayAttribute(Attribute.SERIAL_NUMBER);\n attrTypes = new ByteArrayAttribute(Attribute.ATTR_TYPES);\n value = new ByteArrayAttribute(Attribute.VALUE);\n\n putAttributesInTable(owner, acIssuer, serialNumber, attrTypes, value);\n }",
"public AttributeTable getTable(String name);",
"public void setAttributes(TableAttributes attrs) {\n\tthis.attrs = attrs;\n }",
"private void createAttrTable(Composite parent) {\n\n\t\tuseColumnButton = new Button(parent, SWT.RADIO | SWT.LEFT);\n\t\tuseColumnButton.setText(Messages.btnUseColumn);\n\t\tuseColumnButton.setLayoutData(CommonUITool.createGridData(2, 1, -1, -1));\n\t\tuseColumnButton.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent event) {\n\t\t\t\tif (useColumnButton.getSelection()) {\n\t\t\t\t\tuseExprButton.setSelection(false);\n\t\t\t\t\tpartitionExprText.setText(\"\");\n\t\t\t\t\tpartitionExprText.setEnabled(false);\n\t\t\t\t\tsetErrorMessage(Messages.errNoSelectColumn);\n\t\t\t\t\tsetPageComplete(false);\n\t\t\t\t\tattributeTable.setEnabled(true);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tList<DBAttributeStatistic> dbAttrStatList = null;\n\t\tif (!isNewTable) {\n\t\t\tGetPartitionedClassListTask task = new GetPartitionedClassListTask(\n\t\t\t\t\tdbInfo);\n\t\t\tdbAttrStatList = task.getColumnStatistics(schemaInfo.getUniqueName());\n\t\t}\n\t\tattrList.addAll(schemaInfo.getAttributes());\n\t\tfor (int i = 0; dbAttrStatList != null && i < dbAttrStatList.size(); i++) {\n\t\t\tDBAttributeStatistic dbAttributeStatics = dbAttrStatList.get(i);\n\t\t\tfor (int j = 0; j < attrList.size(); j++) {\n\t\t\t\tDBAttribute dbAttribute = attrList.get(j);\n\t\t\t\tif (dbAttribute.getName().equals(dbAttributeStatics.getName())) {\n\t\t\t\t\tattrList.remove(j);\n\t\t\t\t\tattrList.add(dbAttributeStatics);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tattrTableView = new TableViewer(parent, SWT.FULL_SELECTION | SWT.SINGLE\n\t\t\t\t| SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);\n\n\t\tattributeTable = attrTableView.getTable();\n\t\tattributeTable.setLayout(TableViewUtil.createTableViewLayout(new int[]{\n\t\t\t\t20, 20, 20, 20, 20 }));\n\t\tattributeTable.setLayoutData(CommonUITool.createGridData(\n\t\t\t\tGridData.FILL_BOTH, 1, 1, -1, 200));\n\n\t\tattributeTable.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent event) {\n\t\t\t\tvalidate();\n\t\t\t}\n\t\t});\n\t\tattributeTable.setHeaderVisible(true);\n\t\tattributeTable.setLinesVisible(true);\n\n\t\tTableViewUtil.createTableColumn(attributeTable, SWT.CENTER,\n\t\t\t\tMessages.tblColColumnName);\n\t\tTableViewUtil.createTableColumn(attributeTable, SWT.CENTER,\n\t\t\t\tMessages.tblColDataType);\n\t\tTableViewUtil.createTableColumn(attributeTable, SWT.CENTER,\n\t\t\t\tMessages.tblColMiniValue);\n\t\tTableViewUtil.createTableColumn(attributeTable, SWT.CENTER,\n\t\t\t\tMessages.tblColMaxValue);\n\t\tTableViewUtil.createTableColumn(attributeTable, SWT.CENTER,\n\t\t\t\tMessages.tblColValueCount);\n\n\t\tattrTableView.setContentProvider(new PartitionTypeContentProvider());\n\t\tattrTableView.setLabelProvider(new PartitionTypeLabelProvider());\n\t\tattrTableView.setInput(attrList);\n\t}",
"public AttributeTable getNodeTable();",
"public void addAttribute(REntityEntry entry);",
"public javax.accessibility.AccessibleTable getAccessibleTable() {\n return this;\n }",
"protected static void putAttributesInTable(PrivateKey object) {\n\t\tif (object == null) {\n\t\t\tthrow new NullPointerException(\"Argument \\\"object\\\" must not be null.\");\n\t\t}\n\n\t\tobject.attributeTable_.put(Attribute.SUBJECT, object.subject_);\n\t\tobject.attributeTable_.put(Attribute.SENSITIVE, object.sensitive_);\n\t\tobject.attributeTable_.put(Attribute.SECONDARY_AUTH, object.secondaryAuth_);\n\t\tobject.attributeTable_.put(Attribute.AUTH_PIN_FLAGS, object.authPinFlags_);\n\t\tobject.attributeTable_.put(Attribute.DECRYPT, object.decrypt_);\n\t\tobject.attributeTable_.put(Attribute.SIGN, object.sign_);\n\t\tobject.attributeTable_.put(Attribute.SIGN_RECOVER, object.signRecover_);\n\t\tobject.attributeTable_.put(Attribute.UNWRAP, object.unwrap_);\n\t\tobject.attributeTable_.put(Attribute.EXTRACTABLE, object.extractable_);\n\t\tobject.attributeTable_.put(Attribute.ALWAYS_SENSITIVE, object.alwaysSensitive_);\n\t\tobject.attributeTable_.put(Attribute.NEVER_EXTRACTABLE, object.neverExtractable_);\n\t\tobject.attributeTable_.put(Attribute.WRAP_WITH_TRUSTED, object.wrapWithTrusted_);\n\t\tobject.attributeTable_.put(Attribute.UNWRAP_TEMPLATE, object.unwrapTemplate_);\n\t\tobject.attributeTable_.put(Attribute.ALWAYS_AUTHENTICATE, object.alwaysAuthenticate_);\n\t}",
"public void displayAttributeTable() {\n\t\tString s = \"| \";\n\t\tfor (int i = 0; i < getNumberOfAttrs(); i++) {\n\t\t\ts += getAttribute(i) + \": \" + (i + 1) + \" | \";\n\t\t}\n\t\tSystem.out.println(s);\n\n\t}",
"public void addAttribute(TLAttribute attribute);",
"protected static void putAttributesInTable(Certificate object) {\n if (object == null) {\n throw new NullPointerException(\"Argument \\\"object\\\" must not be null.\");\n }\n\n object.attributeTable_.put(Attribute.CERTIFICATE_TYPE, object.certificateType_);\n object.attributeTable_.put(Attribute.TRUSTED, object.trusted_);\n object.attributeTable_.put(Attribute.CERTIFICATE_CATEGORY,\n object.certificateCategory_);\n object.attributeTable_.put(Attribute.CHECK_VALUE, object.checkValue_);\n object.attributeTable_.put(Attribute.START_DATE, object.startDate_);\n object.attributeTable_.put(Attribute.END_DATE, object.endDate_);\n }",
"protected void allocateAttributes() {\n super.allocateAttributes();\n\n certificateType_ = new CertificateTypeAttribute();\n trusted_ = new BooleanAttribute(Attribute.TRUSTED);\n certificateCategory_ = new LongAttribute(Attribute.CERTIFICATE_CATEGORY);\n checkValue_ = new ByteArrayAttribute(Attribute.CHECK_VALUE);\n startDate_ = new DateAttribute(Attribute.START_DATE);\n endDate_ = new DateAttribute(Attribute.END_DATE);\n\n putAttributesInTable(this);\n }",
"public interface AttributeModel {\n\n /**\n * Returns the <b>node</b> table. Contains all the columns associated to\n * node elements.\n * <p>\n * An <code>AttributeModel</code> has always <b>node</b> and <b>edge</b>\n * tables by default.\n *\n * @return the node table, contains node columns\n */\n public AttributeTable getNodeTable();\n\n /**\n * Returns the <b>edge</b> table. Contains all the columns associated to\n * edge elements.\n * <p>\n * An <code>AttributeModel</code> has always <b>node</b> and <b>edge</b>\n * tables by default.\n *\n * @return the edge table, contains edge columns\n */\n public AttributeTable getEdgeTable();\n\n /**\n * Returns the <code>AttributeTable</code> which has the given <code>name</code>\n * or <code>null</code> if this table doesn't exist.\n *\n * @param name the table's name\n * @return the table that has been found, or <code>null</code>\n */\n public AttributeTable getTable(String name);\n\n /**\n * Returns all tables this model contains. By default, only contains\n * <b>node</b> and <b>edge</b> tables.\n *\n * @return all the tables of this model\n */\n public AttributeTable[] getTables();\n\n /**\n * Return the value factory.\n * \n * @return the value factory\n */\n public AttributeValueFactory valueFactory();\n\n /**\n * Returns the row factory.\n *\n * @return the row factory\n */\n public AttributeRowFactory rowFactory();\n\n /**\n * Adds <code>listener</code> to the listeners of this table. It receives\n * events when columns are added or removed, as well as when values are set.\n * @param listener the listener that is to be added\n */\n //public void addAttributeListener(AttributeListener listener);\n\n /**\n * Removes <code>listener</code> to the listeners of this table.\n * @param listener the listener that is to be removed\n */\n //public void removeAttributeListener(AttributeListener listener);\n\n /**\n * Merge <code>model</code> in this model. Makes the union of tables and\n * columns of both models. Copy tables this model don't\n * have and merge existing ones. For existing tables, call\n * {@link AttributeTable#mergeTable(AttributeTable)}\n * to merge columns.\n * <p>\n * Columns are compared according to their <code>id</code> and <code>type</code>.\n * Columns found in <code>model</code> are appended only if they no column\n * exist with the same <code>id</code> and <code>type</code>.\n *\n * @param model the model that is to be merged in this model\n */\n //public void mergeModel(AttributeModel model);\n}",
"protected void addRowAttributes(TableRowBuilder row) {\n }",
"public AttributeTableEditor() {\n\t\tdefaultEditor = createDefaultEditor();\n\t\tregisterEditors();\n\t}",
"public void addAttribute(int index, TLAttribute attribute);",
"public List<AttributeColumn> getAllAttributeColumns() {\n\t\treturn Collections.unmodifiableList(attributeColumns);\n\t}",
"public void addAttribut(AttributDescribe attribut){\r\n \tattributs.add(attribut);\r\n \tfireTableRowsInserted(attributs.size() -1, attributs.size() -1);\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks whether the 'var86' field has been set. | public boolean hasVar86() {
return fieldSetFlags()[87];
} | [
"public boolean hasVar85() {\n return fieldSetFlags()[86];\n }",
"public boolean hasVar112() {\n return fieldSetFlags()[113];\n }",
"public boolean hasField86() {\n return fieldSetFlags()[86];\n }",
"public boolean hasVar134() {\n return fieldSetFlags()[135];\n }",
"public boolean hasVar113() {\n return fieldSetFlags()[114];\n }",
"public boolean hasVar88() {\n return fieldSetFlags()[89];\n }",
"public boolean hasVar138() {\n return fieldSetFlags()[139];\n }",
"public boolean hasVar110() {\n return fieldSetFlags()[111];\n }",
"public boolean hasVar211() {\n return fieldSetFlags()[212];\n }",
"public boolean hasVar114() {\n return fieldSetFlags()[115];\n }",
"public boolean hasVar115() {\n return fieldSetFlags()[116];\n }",
"public boolean hasVar116() {\n return fieldSetFlags()[117];\n }",
"public boolean hasVar105() {\n return fieldSetFlags()[106];\n }",
"public boolean hasVar130() {\n return fieldSetFlags()[131];\n }",
"public boolean hasVar135() {\n return fieldSetFlags()[136];\n }",
"public boolean hasVar143() {\n return fieldSetFlags()[144];\n }",
"public boolean hasVar104() {\n return fieldSetFlags()[105];\n }",
"public boolean hasVar139() {\n return fieldSetFlags()[140];\n }",
"public boolean hasVar133() {\n return fieldSetFlags()[134];\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Note the given CrawlURI in the appropriate diversion log. | protected synchronized void divertLog(CrawlURI cauri, String target) {
if(recentlySeen(cauri)) {
return;
}
PrintWriter diversionLog = getDiversionLog(target);
diversionLog.print(cauri.getClassKey());
diversionLog.print(" ");
cauri.shortReportLineTo(diversionLog);
diversionLog.println();
} | [
"void log(CrawlerEventType crawlerEventType, Student student);",
"private void logAddURL(URL url) {\n if (logStream == null) {\n return;\n }\n if (url == null) return;\n // Extract the jar name (e.g. \"file:host/b/c.jar\" -> \"c\")\n String jarName = \"unknown\";\n String path = url.getPath();\n if (logPaths.containsKey(url)) return;\n if (path.endsWith(\".jar\") || path.endsWith(\".zip\")) {\n int lastSep = path.lastIndexOf('/');\n if (lastSep > 0) {\n jarName =\n path.substring(\n lastSep+1, path.length()-4);\n }\n }\n // Assign a short unique name for this url\n //\n // We could optimize this by keeping a\n // reverse (jar -> url) map, but for now we'll just \n // scan the (url -> jar) map.\n String givenName = jarName;\n int tryCounter = 0;\n while (logPaths.containsValue(givenName)) {\n givenName = jarName+\"#\"+(++tryCounter);\n }\n logPaths.put(url, givenName);\n // Log (jar, url)\n logStream.println(\"# URL \"+givenName+\" \"+url);\n }",
"public void logUriError(URIException e, UURI u, CharSequence l) {\n if (e.getReasonCode() == UURIFactory.IGNORED_SCHEME) { \n // don't log those that are intentionally ignored\n return;\n }\n Object[] array = {u, l};\n uriErrors.log(Level.INFO, e.getMessage(), array);\n }",
"public abstract void writeLog(String entry);",
"Log getHarvestLog(String dsID) throws RepoxException;",
"static void logUriMatchInfo(Uri uri, int matchCode, String matchCodeName) {\n \tLog.d(LOGTAG, \"uri=\" + uri.toString() + \" code=\" + matchCode + \" code_name=\" + matchCodeName);\n \tStringBuilder sb = new StringBuilder(\"\");\n \tList<String> pathSegments = uri.getPathSegments();\n \tfor(String segment : pathSegments)\n \t\tsb.append(segment + \";\");\n \tLog.d(LOGTAG, \"path_segments=\" + sb.toString());\n \tfor(int i = 0; i < pathSegments.size(); i++) {\n \t\tLog.d(LOGTAG, \"path_segment[\" + i + \"]=\" + pathSegments.get(i));\n \t}\n }",
"protected void handleDeepLinkData(Uri uri) {\n DebugLog.i(\"uri: \" + uri.toString());\n }",
"abstract protected void logRequest();",
"public void crawlSite()\n {\n /** Init the logger */\n WorkLogger.log(\"WebCrawler start at site \" + this.urlStart.getFullUrl() + \" and maxDepth = \" + this.maxDepth);\n WorkLogger.log(\"====== START ======\");\n WorkLogger.log(\"\");\n /** Save the start time of crawling */\n long startTime = System.currentTimeMillis();\n /** Start our workers */\n this.taskHandler.startTask(this.urlStart, maxDepth);\n /** Check workers finished their work; in case then all workers wait, then no ones work, that leads no more tasks -> the program finished */\n while(this.taskHandler.isEnd() == false)\n {\n /** Default timeout for 1 sec cause the socket timeout I set to 1 sec */\n try{Thread.sleep(1000);}catch(Exception e){}\n }\n this.taskHandler.stopTasks();\n /** End the log file and add the time elapsed and total sites visited */\n WorkLogger.log(\"\\r\\n====== END ======\");\n WorkLogger.log(\"Time elapsed: \" + (System.currentTimeMillis() - startTime)/1000.);\n WorkLogger.log(\"Total visited sites: \" + this.pool.getVisitedSize());\n }",
"@Override()\n public void log( ServiceReference sr, int level, String message ) {\n log( level, message );\n }",
"private void log() {\n long cnt = counter.get();\n double percCompleted = (double) cnt / (double) total;\n double percRemaining = 1d - percCompleted;\n long timeRemaining = (long) (stopWatch.getTime() * (percRemaining / percCompleted));\n LOG.info(\"{} documents ({}%) added in {}\", cnt, twoDForm.format(percCompleted * 100), stopWatch.toString());\n LOG.info(\"Expected remaining time to finish {}\", DurationFormatUtils.formatDurationHMS(timeRemaining));\n }",
"private void log(String message) {\n if (this.listener != null) {\n message = \"CollabNet Document Uploader: \" + message;\n this.listener.getLogger().println(message);\n }\n }",
"private void hitURL(String URL){\n Log.v(\".hitURL\", \" now crawling at: \" + URL);\n String refinedURL = NetworkUtils.makeURL(URL).toString();\n visitedLinks.add(refinedURL);\n browser.loadUrl(refinedURL);\n\n\n // OR, you can also load from an HTML string:\n// String summary = \"<html><body>You scored <b>192</b> points.</body></html>\";\n// webview.loadData(summary, \"text/html\", null);\n // ... although note that there are restrictions on what this HTML can do.\n // See the JavaDocs for loadData() and loadDataWithBaseURL() for more info.\n }",
"public Indexer crawl() \n\t{\n\t\t// This redirection may effect performance, but its OK !!\n\t\tSystem.out.println(\"Crawling: \"+u.toString());\n\t\treturn crawl(crawlLimitDefault);\n\t}",
"private static final void doMain(PageCrawler crawler, String arg) {\n final CrawledPage page = crawler.fetch(arg);\n\n if (page == null) {\n System.out.println(arg + \" --> FAILED!\");\n }\n else {\n System.out.println(arg);\n System.out.println(\"\\tresponseCode=\" + page.getResponseCode());\n System.out.println(\"\\tresponseMessage=\" + page.getResponseMessage());\n if (page.hasContent()) {\n System.out.println(\"\\tcontent=\\n\" + page.getContent());\n }\n if (page.hasError()) {\n System.out.println(\"\\terror=\");\n page.getError().printStackTrace(System.out);\n }\n final List<Link> links = page.getLinks();\n if (links.size() > 0) {\n System.out.println(\"\\tfound \" + links.size() + \" links:\");\n int linkNum = 0;\n for (Link link : links) {\n System.out.println((linkNum++) + \": \" + link);\n }\n }\n System.out.println();\n }\n }",
"@Override\r\n\t\t public boolean shouldVisit(Page referringPage, WebURL url) {\r\n\t\t\t String href = url.getURL().toLowerCase();\r\n\t\t\t BufferedWriter writer;\r\n\t\t\t\ttry {\r\n\t\t\t\t\t writer = new BufferedWriter(new FileWriter(\"c:/data/crawl/urls_BBC.csv\", true));\r\n\t\t\t\t\t writer.newLine(); //Add new line\r\n\t\t\t\t\t writer.write(href);\r\n\t\t\t\t\t writer.write(\",\");\r\n\t\t\t\t\t if(href.contains(\"bbc.com/\")) {\r\n\t\t\t\t\t\t writer.write(\"OK,,,,\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else {\r\n\t\t\t\t\t\t writer.write(\"N_OK,,,,\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t writer.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\t\r\n\t\t\t\t\r\n\t\t\t\t/*PageFetcher pageFetcher;\r\n\t\t\t\tCrawlController crawlController = getMyController();\r\n\t\t\t\tpageFetcher = crawlController.getPageFetcher();\r\n\t\t\t\tPageFetchResult fetchResult = null;\t\t\r\n\t\t\t try {\r\n\t\t\t\t\tfetchResult = pageFetcher.fetchPage(url);\r\n\t\t\t\t} catch (InterruptedException | IOException | PageBiggerThanMaxSizeException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\t\tString contentType = fetchResult.getEntity().getContentType().toString();\r\n\t\t\t\t\t*/\r\n\t\t\t\t\tString contentType = referringPage.getContentType();\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*if(url.toString().contains(\"banner-\")) {\r\n\t\t\t\t\t\tSystem.out.println(\"found it, url is: \" + url.toString() +\"contentType is \"+contentType +\"\\n\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(contentType != null && contentType.contains(\"image\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"image url is \" + url.toString()+ \"\\n\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}*/\r\n\t\t\t\t\t\r\n\t\t\t\t\t//if(contentType!= null) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(contentType.contains(\"text/html\")||contentType.contains(\"image/png\")||contentType.contains(\"image/jpg\")\r\n\t\t\t\t\t\t\t\t||contentType.contains(\"image/jpeg\") ||contentType.contains(\"image/bmp\") ||contentType.contains(\"image/gif\")\r\n\t\t\t\t\t\t\t\t||contentType.contains(\"image/tiff\")||contentType.contains(\"image/webp\")||contentType.contains(\"application/pdf\")\r\n\t\t\t\t\t\t\t\t||contentType.contains(\"application/msword\")||contentType.contains(\"application/vnd.openxmlformats-officedocument.wordprocessingml.document\")\r\n\t\t\t\t\t\t\t\t||url.toString().endsWith(\".jpg\")||url.toString().endsWith(\".pdf\")||url.toString().endsWith(\".jpeg\")||url.toString().endsWith(\".gif\"))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif(href.contains(\"bbc.com/\")) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t}\t\t\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t //}\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\treturn false;\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t}",
"abstract void logWarn(String warning);",
"public void trackReferral() {\n track(\"_referral\");\n }",
"private static void unreachableLinksConfig() {\r\n\t\ttry {\r\n\t\t\tLogManager.getLogManager().reset();\r\n\t\t\tfh = new FileHandler(\"UnreachablePages.log\", false);\r\n\t\t\tLogger l = Logger.getLogger(\"\");\r\n\t\t\tfh.setFormatter(new SimpleFormatter());\r\n\t\t\tl.addHandler(fh);\r\n\t\t\tl.setLevel(Level.CONFIG);\r\n\t\t}catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Globals which should be set before calling this function: int polyCorners = how many corners the polygon has (no repeats) float polyX[] = horizontal coordinates of corners float polyY[] = vertical coordinates of corners float x, y = point to be tested (Globals are used in this example for purposes of speed. Change as desired.) The function will return YES if the point x,y is inside the polygon, or NO if it is not. If the point is exactly on the edge of the polygon, then the function may return YES or NO. Note that division by zero is avoided because the division is protected by the "if" clause which surrounds it. | public boolean pointInPolygon(float x, float y) {
int i, j = polyCorners - 1;
boolean oddNodes = false;
float sx, sy, tx,ty, xinter;
for (i = 0; i < polyCorners; j = i,i++) {
sx = polyX[i];
sy = polyY[i];
tx = polyX[j];
ty = polyY[j];
// 点与多边形顶点重合
if((sx == x && sy == y) || (tx == x && ty == y)) {
System.out.println("点与多边形顶点重合");
return true;
}
// //点在多边形的水平边上
// if(sy == ty && y == sy){
// System.out.println("点在多边形的水平边上");
// return true;
// }
// 判断线段两端点是否在射线两侧
if((sy < y && ty >= y) || (sy >= y && ty < y)) {
// 线段上与射线 Y 坐标相同的点的 X 坐标
xinter = sx + (y - sy) * (tx - sx) / (ty - sy);
// 点在多边形的非水平边上
if(xinter == x){
System.out.println("点在多边形的边上");
return true;
}
if(xinter < x){
oddNodes = !oddNodes;
}
// oddNodes ^= (xinter < x);
}
// //表示测试点的纵坐标在两点纵坐标之间,并且只要有一个端点的横坐标在测试点横坐标的左边
// if ((polyY[i] < y && polyY[j] >= y || polyY[j] < y && polyY[i] >= y)
// && (polyX[i]<=x || polyX[j]<=x)) {
// //判断测试点向左的射线与多边形形成的交点是否在测试点的左边,Xinter= Xn + Xdelta = Xn + slope(x/y) * deltaY
// // judge whether Xinter < Xtest
//// if (polyX[i] + (y - polyY[i]) / (polyY[j] - polyY[i]) * (polyX[j] - polyX[i]) < x) {
//// oddNodes = !oddNodes;
////
//// }
//
// oddNodes^=(polyX[i]+(y-polyY[i])/(polyY[j]-polyY[i])*(polyX[j]-polyX[i])<x);
// }
}
return oddNodes;
} | [
"public static boolean pointInPolygon(List<? extends PointD> poly, PointD aPoint) {\n double xNew, yNew, xOld, yOld;\n double x1, y1, x2, y2;\n int i;\n boolean inside = false;\n int nPoints = poly.size();\n\n if (nPoints < 3) {\n return false;\n }\n\n xOld = (poly.get(nPoints - 1)).X;\n yOld = (poly.get(nPoints - 1)).Y;\n for (i = 0; i < nPoints; i++) {\n xNew = (poly.get(i)).X;\n yNew = (poly.get(i)).Y;\n if (xNew > xOld) {\n x1 = xOld;\n x2 = xNew;\n y1 = yOld;\n y2 = yNew;\n } else {\n x1 = xNew;\n x2 = xOld;\n y1 = yNew;\n y2 = yOld;\n }\n\n //---- edge \"open\" at left end\n if ((xNew < aPoint.X) == (aPoint.X <= xOld)\n && (aPoint.Y - y1) * (x2 - x1) < (y2 - y1) * (aPoint.X - x1)) {\n inside = !inside;\n }\n\n xOld = xNew;\n yOld = yNew;\n }\n\n return inside;\n }",
"public static boolean isInsidePolygon(int[] nPolyPoints, double nX, double nY)\n\t{\n\t\tint nCount = 0;\n\t\tSegIterator oSegIt = new SegIterator(nPolyPoints);\n\t\twhile (oSegIt.hasNext())\n\t\t{\n\t\t\tint[] oLine = oSegIt.next();\n\t\t\tint nX1 = oLine[1];\n\t\t\tint nX2 = oLine[3];\n\t\t\tint nY1 = oLine[0];\n\t\t\tint nY2 = oLine[2];\n\n\t\t\tif ((nY1 < nY && nY2 >= nY || nY2 < nY && nY1 >= nY)\n\t\t\t && (nX1 <= nX || nX2 <= nX)\n\t\t\t && (nX1 + (nY - nY1) / (nY2 - nY1) * (nX2 - nX1) < nX))\n\t\t\t\t++nCount;\n\t\t}\n\t\treturn (nCount & 1) != 0;\n\t}",
"boolean _ptPoly(PVector pt, PVector[] poly) { \n // count edges crossed by the line connecting the target point to \"the outside\"\n int count = 0;\n \n for(int i = 0; i < poly.length; i++) {\n PVector a = poly[i], b = poly[(i+1)%poly.length]; // edge points\n if(_clockwise(a, pt, out) != _clockwise(b, pt, out) && // a & b on different sides of line\n _clockwise(a, b, pt) != _clockwise(a, b, out)) { // tgt & out on diff sides of edge\n count++;\n }\n }\n \n return count % 2 == 1;\n // a convex poly would be crossed on one edge;\n // concave could be crossed on any odd # of edges\n }",
"public boolean pointInPolygon(double x, double y) {\n\t\tint numCrossings = 0;\n\t\tfor(int i = 0; i < points.size(); i++) {\n\t\t\tint next = (i + 1) % points.size();\n\t\t\tpointToWorldSpace(points.get(i), before);\n\t\t\tpointToWorldSpace(points.get(next), after);\n\t\t\t\n\t\t\tdouble beforeX = before.x;\n\t\t\tdouble beforeY = before.y;\n\t\t\tdouble afterX = after.x;\n\t\t\tdouble afterY = after.y;\n\t\t\t\n\t\t\t// Compute the intersection of the side with the horizontal line passing through (x,y)\n\t\t\tdouble slope = (afterY - beforeY) / (afterX - beforeX);\n\t\t\tdouble dy = y - beforeY;\n\t\t\tdouble dx = dy / slope;\n\t\t\tdouble intersection_x = beforeX + dx;\n\t\t\tif(intersection_x < x) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if(beforeY == y) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if(afterY == y) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// See if the side crosses the edge on the correct side of the ray\n\t\t\telse if((beforeY > y && afterY < y) || (beforeY < y && afterY > y)) {\n\t\t\t\tnumCrossings++;\n\t\t\t}\n\t\t}\n\t\treturn (numCrossings % 2 == 1);\n\t}",
"private static boolean isInside(Polygon polygon, Point point)\r\n\t{\r\n\t\tboolean contains = polygon.contains(point);\r\n\t\t// System.out.println(\"The point:\" + point.toString() + \" is \" + (contains ? \"\" : \"not \") + \"inside the polygon\");\r\n\t\treturn contains;\r\n\t}",
"boolean checkPointInsidePolygon(Point[] points, PVector input) {\n\t\tint i, j;\n\t\tboolean c = false;\n\t\tfor (i = 0, j = points.length - 1; i < points.length; j = i++) {\n\t\t\tif (((points[i].y > input.y) != (points[j].y > input.y))\n\t\t\t\t\t&& (input.x < (points[j].x - points[i].x) * (input.y - points[i].y) / (points[j].y - points[i].y)\n\t\t\t\t\t\t\t+ points[i].x))\n\t\t\t\tc = !c;\n\t\t}\n\t\treturn c;\n\t}",
"private boolean containsPoint(MatOfPoint2f polygon, List<Point> points) {\n boolean inPolygon = false;\n for(Point p : points) {\n if(Imgproc.pointPolygonTest(polygon, p, false) >= 0) { //returns value > 0 if in polygon, 0 if on the edge of the polygon, and < 0 if outside the polygon\n inPolygon = true;\n }\n }\n return inPolygon;\n }",
"private boolean inPolygonLineCount(Double[] p, double x, double y) {\n\t\t\t\tint crosscount = 0;\n\t\t\t\t\n\t\t\t\tfor (int i = 0; i < p.length ; i++) {\n\t\t\t\t\tdouble pix = p[i].x;\n\t\t\t\t\tdouble piy = p[i].y;\n\t\t\t\t\tdouble pi1x = p[(i+1) % p.length].x;\n\t\t\t\t\tdouble pi1y = p[(i+1) % p.length].y;\n\t\t\t\t\tdouble vx = pi1x - pix;\n\t\t\t\t\tdouble vy = pi1y - piy;\n\t\t\t\t\tdouble xint = pix + ((y-piy) / vy) * vx;\n\t\t\t\t\tif (pix > x || pi1x > x) {\n\t\t\t\t\t\tif (piy < y && y <= pi1y && xint > x) {\n\t\t\t\t\t\t\tcrosscount++;\n\t\t\t\t\t\t} else if (pi1y < y && y <= piy && xint > x) {\n\t\t\t\t\t\t\tcrosscount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn crosscount%2 == 1;\n\t\t\t}",
"public static boolean isInside(ArrayList<Location> polygon, Location p) {\n return coordinateInRegion(polygon, p);\r\n }",
"static boolean isInside(Point polygon[], int n, Point p)\n {\n // There must be at least 3 vertices in polygon[]\n if (n < 3)\n {\n return false;\n }\n\n // Create a point for line segment from p to infinite\n Point extreme = new Point(10000, p.getY());\n\n // Count intersections of the above line\n // with sides of polygon\n int count = 0, i = 0;\n do\n {\n int next = (i + 1) % n;\n\n // Check if the line segment from 'p' to\n // 'extreme' intersects with the line\n // segment from 'polygon[i]' to 'polygon[next]'\n if (doIntersect(polygon[i], polygon[next], p, extreme))\n {\n // If the point 'p' is colinear with line\n // segment 'i-next', then check if it lies\n // on segment. If it lies, return true, otherwise false\n if (orientation(polygon[i], p, polygon[next]) == 0)\n {\n return onSegment(polygon[i], p,\n polygon[next]);\n }\n\n count++;\n }\n i = next;\n } while (i != 0);\n\n // Return true if count is odd, false otherwise\n return (count % 2 == 1); // Same as (count%2 == 1)\n }",
"public boolean checkInside(Polygon polygon, double lat, double lon) {\r\n List<Line> lines = calculateLines(polygon);\r\n List<Line> intersectionLines = filterIntersectingLines(lines, lon);\r\n List<Point> intersectionPoints = calculateIntersectionPoints(intersectionLines, lon);\r\n sortPointsByLat(intersectionPoints);\r\n return calculateInside(intersectionPoints, lat);\r\n }",
"public static boolean pointInPolygon(LatLng point, List<LatLng> polygon) {\n int crossings = 0;\n int verticesCount = polygon.size();\n\n // For each edge\n for (int i = 0; i < verticesCount; i++) {\n int j = (i + 1) % verticesCount;\n LatLng a = polygon.get(i);\n LatLng b = polygon.get(j);\n if (rayCrossesSegment(point, a, b)) crossings++;\n }\n\n // Odd number of crossings?\n return crossings % 2 == 1;\n }",
"public int polygonClipper(int in, float inx[], float iny[], float outx[],\n float outy[], float x0, float y0, float x1, float y1, String c){\n\n //If there are no vertices left in the pologon, return 0\n if(in <= 0){\n return 0;\n }\n\n int outLength = 0;\n\n //set p to last point in poly\n float px = inx[in-1], py = iny[in-1],sx, sy;\n\n //point of intersections\n float i[];\n\n //for each point s in the polygon\n for(int j=0; j< in; j++){\n sx = inx[j];\n sy= iny[j];\n\n //If point s is inside\n if(inside(sx,sy,x0,y0,x1,y1,c)){\n //if point p is also inside, output s\n if(inside(px,py,x0,y0,x1,y1,c)){\n outLength = output(sx,sy,outx,outy,outLength);\n }\n\n //if point p is not inside, calculate intersection with edge\n //output the intersection and s\n else{\n i = intersect(px,py,sx,sy,x0,y0,x1,y1,c);\n outLength = output(i[0],i[1],outx, outy,outLength);\n outLength = output(sx,sy,outx, outy,outLength);\n }\n }\n //If point s is outside\n else{\n //If point p is inside, output intersection\n if(inside(px,py,x0,y0,x1,y1,c)){\n i = intersect(px, py, sx, sy, x0, y0, x1, y1, c);\n outLength = output(i[0],i[1],outx, outy,outLength);\n }\n }\n\n //set point p=s\n px = sx;\n py = sy;\n }\n\n return outLength; //Length of the new vertice list\n }",
"public static boolean checkIfPolygonIsCompletelyContainedInView(Rectangle2D screen, Point3f... pts)\r\n {\r\n//1. if all points are out of z-clipping planes, then return false\r\n boolean isWithinNearAndFarPlane = false;\r\n for (Point3f pt : pts)\r\n {\r\n if (pt.z > 0f && pt.z < 1f)\r\n {\r\n isWithinNearAndFarPlane = true;\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if (!isWithinNearAndFarPlane)\r\n {\r\n //System.out.println(\"all points are out of z clipping plane\");\r\n return false;\r\n }\r\n\r\n//2. if any *point* is not contained within the box, then we return false, \r\n//as the polygon is thus not completely contained.\r\n for (Point3f pt : pts)\r\n {\r\n if (!screen.contains(pt.x, pt.y))\r\n {\r\n return false;\r\n }\r\n\r\n }\r\n\r\n //if we are here then ALL corner points are in view\r\n return true;\r\n\r\n }",
"private boolean satisfiesPolygon() {\n \t\treturn this.markers.size() >= 3;\n \t}",
"private static boolean isCorner(int[][] area, int x, int y, boolean countEdges) {\r\n\t\t// Find the coordinates of the spaces adjacent to this one\r\n\t\tint[][] around = { { x - 1, y },// Left 1\r\n\t\t\t\t{ x + 1, y },// Right 1\r\n\t\t\t\t{ x, y - 1 },// Down 1\r\n\t\t\t\t{ x, y + 1 } };// Up 1\r\n\t\tint walls = 0; // Create a variable to store how many walls are next to\r\n\t\t\t\t\t // the current space\r\n\t\tfor (int[] coords : around) {// test each adjacent space\r\n\t\t\tif ((coords[1] < 0) || (coords[0] >= area.length)\r\n\t\t\t\t\t|| (coords[0] < 0) || (coords[1] >= area[x].length)) {\r\n\t\t\t\t// If this square is out of the map then it counts as a wall\r\n\t\t\t\tif (countEdges) {\r\n\t\t\t\t\twalls++;\r\n\t\t\t\t}\r\n\t\t\t} else if (area[coords[0]][coords[1]] >= 1) {\r\n\t\t\t\t// The space has a wall next to it\r\n\t\t\t\twalls++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (walls == 2 || walls == 3) { // if the block is surrounded by 2 or 3\r\n\t\t\t\t\t\t\t\t\t\t// walls, it's a corner \r\n\t\t\t\r\n\t\t\t//Check to see if this wall is just a corridor\r\n\t\t\tif( (isCorridor(area, around[0][0],around[0][1], around[1][0], around[1][1])) && \r\n\t\t\t\t\t(!isCorridor(area, around[2][0],around[2][1], around[3][0], around[3][1]))) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tif( (!isCorridor(area, around[0][0],around[0][1], around[1][0], around[1][1])) && \r\n\t\t\t\t\t(isCorridor(area, around[2][0],around[2][1], around[3][0], around[3][1]))) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public static boolean checkIfPolygonIsInView(Rectangle2D screen, Point3f... pts)\r\n {\r\n\r\n //1. if all points are out of z-clipping planes, then return false\r\n boolean isWithinNearAndFarPlane = false;\r\n for (Point3f pt : pts)\r\n {\r\n if (pt.z > 0f && pt.z < 1f)\r\n {\r\n isWithinNearAndFarPlane = true;\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if (!isWithinNearAndFarPlane)\r\n {\r\n //System.out.println(\"all points are out of z clipping plane\");\r\n return false;\r\n }\r\n\r\n//2. if any *point* is contained within the box, then we render the rectangle.\r\n//this is the most likely situation, so we check this before dealing with projection errors, etc.\r\n for (Point3f pt : pts)\r\n {\r\n if (screen.contains(pt.x, pt.y))\r\n {\r\n return true;\r\n }\r\n\r\n }\r\n\r\n //3. check for backwards guys -- this happens because of a strange behavior with \r\n //gluUnProject when points are nearly perpindicular to the viewport.\r\n //I am resolving by checking to see if z-value is > 1. If yes, flip the x and y vals\r\n for (Point3f pt : pts)\r\n {\r\n if (pt.z > 1)\r\n {\r\n pt.x *= -1;\r\n pt.y *= -1;\r\n }\r\n\r\n }\r\n\r\n\r\n //4. construct 2D projected shape from projected points\r\n //and make sure that it doesn't intersect with the screen shape\r\n GeneralPath p2f = new GeneralPath();\r\n p2f.moveTo(pts[0].x, pts[0].y);\r\n\r\n for (int i = 1; i <\r\n pts.length; i++)\r\n {\r\n p2f.lineTo(pts[i].x, pts[i].y);\r\n }\r\n\r\n p2f.closePath();\r\n\r\n\r\n if (p2f.intersects(screen))\r\n {\r\n //System.out.println(\"but line crosses a corner...\");\r\n return true; //then needs to be rendered\r\n }\r\n\r\n//System.out.println(\"point of rect is NOT in screen view\");\r\n return false;\r\n }",
"private boolean _polygon(final double xPoints[], final double yPoints[],\n\t\t\tfinal int nPoints) {\n\t\tif (nPoints < 3 || xPoints.length < nPoints || yPoints.length < nPoints)\n\t\t\treturn false;\n\t\tfinal EpsPoint start = _convert(xPoints[0], yPoints[0]);\n\t\t_buffer.append(\"newpath \" + round(start.x) + \" \" + round(start.y)\n\t\t\t\t+ \" moveto\\n\");\n\t\tfor (int i = 1; i < nPoints; i++) {\n\t\t\tfinal EpsPoint vertex = _convert(xPoints[i], yPoints[i]);\n\t\t\t_buffer.append(\"\" + round(vertex.x) + \" \" + round(vertex.y)\n\t\t\t\t\t+ \" lineto\\n\");\n\t\t}\n\t\treturn true;\n\t}",
"private boolean _polygon(int[] xPoints, int[] yPoints, int nPoints) {\n if ((nPoints < 3) || (xPoints.length < nPoints)\n || (yPoints.length < nPoints)) {\n return false;\n }\n\n Point start = _convert(xPoints[0], yPoints[0]);\n _buffer.append(\"newpath \" + start.x + \" \" + start.y + \" moveto\\n\");\n\n for (int i = 1; i < nPoints; i++) {\n Point vertex = _convert(xPoints[i], yPoints[i]);\n _buffer.append(\"\" + vertex.x + \" \" + vertex.y + \" lineto\\n\");\n }\n\n return true;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
bidirectional manytoone association to Rennfahrer | @ManyToOne
@JoinColumn(name="RennfahrerID", nullable=false, insertable=false, updatable=false)
public Rennfahrer getRennfahrer() {
return this.rennfahrer;
} | [
"@ManyToOne\r\n\t@JoinColumn(name=\"RennstallID\", nullable=false, insertable=false, updatable=false)\r\n\tpublic Rennstall getRennstall() {\r\n\t\treturn this.rennstall;\r\n\t}",
"public Relationship(String idR){\n\t\tid = idR;\n isAssocClass = false;\n\t}",
"public String getInverseRelationshipName ();",
"boolean isManyToOne();",
"public ForeignInfo foreignWhiteNonUniqueManyToOneToAsNonUniqueManyToOne() {\r\n Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnNonUniqueCode(), WhiteNonUniqueManyToOneToDbm.getInstance().columnNonUniqueCode());\r\n return cfi(\"FK_WHITE_NON_UNIQUE_MANY_TO_ONE_FROM_TO\", \"whiteNonUniqueManyToOneToAsNonUniqueManyToOne\", this, WhiteNonUniqueManyToOneToDbm.getInstance(), mp, 0, org.dbflute.optional.OptionalEntity.class, false, false, false, true, \"$$foreignAlias$$.BEGIN_DATE <= $$localAlias$$.BEGIN_DATE\\n and $$foreignAlias$$.END_DATE >= $$localAlias$$.BEGIN_DATE\", null, false, null, false);\r\n }",
"public Long getRelateId() {\n return relateId;\n }",
"public String getRelationshipId()\n {\n return mRelationshipId;\n }",
"public void setRelationship(Relationship r) {\n\t\trelationship = r;\n\t}",
"protected abstract String getIdRelatorio();",
"Relationship createRelationship();",
"public void onRelationshipChanged();",
"@JoinColumn(name = \"numero_affaire\")\n @ManyToOne(cascade = { PERSIST, MERGE }, fetch = LAZY)\n public Affaire getNumeroAffaire() {\n return numeroAffaire;\n }",
"RRelation getRRelation();",
"public T caseRelationshipDefinition(RelationshipDefinition object) {\n\t\treturn null;\n\t}",
"public SiebelCatalogRelationship()\n {\n mChildProducts = new HashSet<SiebelCatalogProduct>();\n }",
"public ReceptionPersonell getReceptionPersonell()\n{\n\treturn receptionPersonell;\n}",
"@OneToOne\n @PrimaryKeyJoinColumn(name = \"car_id\", referencedColumnName = \"id\")\n public Car getCar() {\n return car;\n }",
"boolean isOneToOne();",
"public abstract Relation getRelationTo(ConquerFaction faction);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleCORBA_SmartSoft" $ANTLR start "entryRuleDDS_SmartSoft" InternalComponentDefinition.g:1344:1: entryRuleDDS_SmartSoft : ruleDDS_SmartSoft EOF ; | public final void entryRuleDDS_SmartSoft() throws RecognitionException {
try {
// InternalComponentDefinition.g:1345:1: ( ruleDDS_SmartSoft EOF )
// InternalComponentDefinition.g:1346:1: ruleDDS_SmartSoft EOF
{
before(grammarAccess.getDDS_SmartSoftRule());
pushFollow(FOLLOW_1);
ruleDDS_SmartSoft();
state._fsp--;
after(grammarAccess.getDDS_SmartSoftRule());
match(input,EOF,FOLLOW_2);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
}
return ;
} | [
"public final void entryRuleACE_SmartSoft() throws RecognitionException {\n try {\n // InternalComponentDefinition.g:1270:1: ( ruleACE_SmartSoft EOF )\n // InternalComponentDefinition.g:1271:1: ruleACE_SmartSoft EOF\n {\n before(grammarAccess.getACE_SmartSoftRule()); \n pushFollow(FOLLOW_1);\n ruleACE_SmartSoft();\n\n state._fsp--;\n\n after(grammarAccess.getACE_SmartSoftRule()); \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }",
"public final void entryRuleCORBA_SmartSoft() throws RecognitionException {\n try {\n // InternalComponentDefinition.g:1320:1: ( ruleCORBA_SmartSoft EOF )\n // InternalComponentDefinition.g:1321:1: ruleCORBA_SmartSoft EOF\n {\n before(grammarAccess.getCORBA_SmartSoftRule()); \n pushFollow(FOLLOW_1);\n ruleCORBA_SmartSoft();\n\n state._fsp--;\n\n after(grammarAccess.getCORBA_SmartSoftRule()); \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }",
"public final void rule__DDS_SmartSoft__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:7390:1: ( ( 'DDS_SmartSoft' ) )\n // InternalComponentDefinition.g:7391:1: ( 'DDS_SmartSoft' )\n {\n // InternalComponentDefinition.g:7391:1: ( 'DDS_SmartSoft' )\n // InternalComponentDefinition.g:7392:2: 'DDS_SmartSoft'\n {\n before(grammarAccess.getDDS_SmartSoftAccess().getDDS_SmartSoftKeyword_1()); \n match(input,73,FOLLOW_2); \n after(grammarAccess.getDDS_SmartSoftAccess().getDDS_SmartSoftKeyword_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 ruleDDS_SmartSoft() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:1357:2: ( ( ( rule__DDS_SmartSoft__Group__0 ) ) )\n // InternalComponentDefinition.g:1358:2: ( ( rule__DDS_SmartSoft__Group__0 ) )\n {\n // InternalComponentDefinition.g:1358:2: ( ( rule__DDS_SmartSoft__Group__0 ) )\n // InternalComponentDefinition.g:1359:3: ( rule__DDS_SmartSoft__Group__0 )\n {\n before(grammarAccess.getDDS_SmartSoftAccess().getGroup()); \n // InternalComponentDefinition.g:1360:3: ( rule__DDS_SmartSoft__Group__0 )\n // InternalComponentDefinition.g:1360:4: rule__DDS_SmartSoft__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__DDS_SmartSoft__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getDDS_SmartSoftAccess().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__DDS_SmartSoft__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:7378:1: ( rule__DDS_SmartSoft__Group__1__Impl rule__DDS_SmartSoft__Group__2 )\n // InternalComponentDefinition.g:7379:2: rule__DDS_SmartSoft__Group__1__Impl rule__DDS_SmartSoft__Group__2\n {\n pushFollow(FOLLOW_53);\n rule__DDS_SmartSoft__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__DDS_SmartSoft__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__DDS_SmartSoft__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:7351:1: ( rule__DDS_SmartSoft__Group__0__Impl rule__DDS_SmartSoft__Group__1 )\n // InternalComponentDefinition.g:7352:2: rule__DDS_SmartSoft__Group__0__Impl rule__DDS_SmartSoft__Group__1\n {\n pushFollow(FOLLOW_16);\n rule__DDS_SmartSoft__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__DDS_SmartSoft__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void ruleACE_SmartSoft() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:1282:2: ( ( ( rule__ACE_SmartSoft__Group__0 ) ) )\n // InternalComponentDefinition.g:1283:2: ( ( rule__ACE_SmartSoft__Group__0 ) )\n {\n // InternalComponentDefinition.g:1283:2: ( ( rule__ACE_SmartSoft__Group__0 ) )\n // InternalComponentDefinition.g:1284:3: ( rule__ACE_SmartSoft__Group__0 )\n {\n before(grammarAccess.getACE_SmartSoftAccess().getGroup()); \n // InternalComponentDefinition.g:1285:3: ( rule__ACE_SmartSoft__Group__0 )\n // InternalComponentDefinition.g:1285:4: rule__ACE_SmartSoft__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__ACE_SmartSoft__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getACE_SmartSoftAccess().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__DDS_SmartSoft__Group_2__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:7432:1: ( rule__DDS_SmartSoft__Group_2__0__Impl rule__DDS_SmartSoft__Group_2__1 )\n // InternalComponentDefinition.g:7433:2: rule__DDS_SmartSoft__Group_2__0__Impl rule__DDS_SmartSoft__Group_2__1\n {\n pushFollow(FOLLOW_10);\n rule__DDS_SmartSoft__Group_2__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__DDS_SmartSoft__Group_2__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__DDS_SmartSoft__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:7416:1: ( ( ( rule__DDS_SmartSoft__Group_2__0 )? ) )\n // InternalComponentDefinition.g:7417:1: ( ( rule__DDS_SmartSoft__Group_2__0 )? )\n {\n // InternalComponentDefinition.g:7417:1: ( ( rule__DDS_SmartSoft__Group_2__0 )? )\n // InternalComponentDefinition.g:7418:2: ( rule__DDS_SmartSoft__Group_2__0 )?\n {\n before(grammarAccess.getDDS_SmartSoftAccess().getGroup_2()); \n // InternalComponentDefinition.g:7419:2: ( rule__DDS_SmartSoft__Group_2__0 )?\n int alt61=2;\n int LA61_0 = input.LA(1);\n\n if ( (LA61_0==70) ) {\n alt61=1;\n }\n switch (alt61) {\n case 1 :\n // InternalComponentDefinition.g:7419:3: rule__DDS_SmartSoft__Group_2__0\n {\n pushFollow(FOLLOW_2);\n rule__DDS_SmartSoft__Group_2__0();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n after(grammarAccess.getDDS_SmartSoftAccess().getGroup_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void ruleCORBA_SmartSoft() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:1332:2: ( ( ( rule__CORBA_SmartSoft__Group__0 ) ) )\n // InternalComponentDefinition.g:1333:2: ( ( rule__CORBA_SmartSoft__Group__0 ) )\n {\n // InternalComponentDefinition.g:1333:2: ( ( rule__CORBA_SmartSoft__Group__0 ) )\n // InternalComponentDefinition.g:1334:3: ( rule__CORBA_SmartSoft__Group__0 )\n {\n before(grammarAccess.getCORBA_SmartSoftAccess().getGroup()); \n // InternalComponentDefinition.g:1335:3: ( rule__CORBA_SmartSoft__Group__0 )\n // InternalComponentDefinition.g:1335:4: rule__CORBA_SmartSoft__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__CORBA_SmartSoft__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getCORBA_SmartSoftAccess().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__DDS_SmartSoft__Group_2__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:7444:1: ( ( 'description' ) )\n // InternalComponentDefinition.g:7445:1: ( 'description' )\n {\n // InternalComponentDefinition.g:7445:1: ( 'description' )\n // InternalComponentDefinition.g:7446:2: 'description'\n {\n before(grammarAccess.getDDS_SmartSoftAccess().getDescriptionKeyword_2_0()); \n match(input,70,FOLLOW_2); \n after(grammarAccess.getDDS_SmartSoftAccess().getDescriptionKeyword_2_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__ACE_SmartSoft__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:6973:1: ( rule__ACE_SmartSoft__Group__1__Impl rule__ACE_SmartSoft__Group__2 )\n // InternalComponentDefinition.g:6974:2: rule__ACE_SmartSoft__Group__1__Impl rule__ACE_SmartSoft__Group__2\n {\n pushFollow(FOLLOW_53);\n rule__ACE_SmartSoft__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__ACE_SmartSoft__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ACE_SmartSoft__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:6946:1: ( rule__ACE_SmartSoft__Group__0__Impl rule__ACE_SmartSoft__Group__1 )\n // InternalComponentDefinition.g:6947:2: rule__ACE_SmartSoft__Group__0__Impl rule__ACE_SmartSoft__Group__1\n {\n pushFollow(FOLLOW_52);\n rule__ACE_SmartSoft__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__ACE_SmartSoft__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__CORBA_SmartSoft__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:7243:1: ( rule__CORBA_SmartSoft__Group__1__Impl rule__CORBA_SmartSoft__Group__2 )\n // InternalComponentDefinition.g:7244:2: rule__CORBA_SmartSoft__Group__1__Impl rule__CORBA_SmartSoft__Group__2\n {\n pushFollow(FOLLOW_53);\n rule__CORBA_SmartSoft__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__CORBA_SmartSoft__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ACE_SmartSoft__Group_2__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:7027:1: ( rule__ACE_SmartSoft__Group_2__0__Impl rule__ACE_SmartSoft__Group_2__1 )\n // InternalComponentDefinition.g:7028:2: rule__ACE_SmartSoft__Group_2__0__Impl rule__ACE_SmartSoft__Group_2__1\n {\n pushFollow(FOLLOW_10);\n rule__ACE_SmartSoft__Group_2__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__ACE_SmartSoft__Group_2__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__DDS_SmartSoft__Group_2__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:7470:1: ( ( ( rule__DDS_SmartSoft__DescriptionAssignment_2_1 ) ) )\n // InternalComponentDefinition.g:7471:1: ( ( rule__DDS_SmartSoft__DescriptionAssignment_2_1 ) )\n {\n // InternalComponentDefinition.g:7471:1: ( ( rule__DDS_SmartSoft__DescriptionAssignment_2_1 ) )\n // InternalComponentDefinition.g:7472:2: ( rule__DDS_SmartSoft__DescriptionAssignment_2_1 )\n {\n before(grammarAccess.getDDS_SmartSoftAccess().getDescriptionAssignment_2_1()); \n // InternalComponentDefinition.g:7473:2: ( rule__DDS_SmartSoft__DescriptionAssignment_2_1 )\n // InternalComponentDefinition.g:7473:3: rule__DDS_SmartSoft__DescriptionAssignment_2_1\n {\n pushFollow(FOLLOW_2);\n rule__DDS_SmartSoft__DescriptionAssignment_2_1();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getDDS_SmartSoftAccess().getDescriptionAssignment_2_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 entryRuleDConcept() throws RecognitionException {\n try {\n // InternalSymboleoide.g:104:1: ( ruleDConcept EOF )\n // InternalSymboleoide.g:105:1: ruleDConcept EOF\n {\n before(grammarAccess.getDConceptRule()); \n pushFollow(FOLLOW_1);\n ruleDConcept();\n\n state._fsp--;\n\n after(grammarAccess.getDConceptRule()); \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }",
"public final void rule__CORBA_SmartSoft__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:7216:1: ( rule__CORBA_SmartSoft__Group__0__Impl rule__CORBA_SmartSoft__Group__1 )\n // InternalComponentDefinition.g:7217:2: rule__CORBA_SmartSoft__Group__0__Impl rule__CORBA_SmartSoft__Group__1\n {\n pushFollow(FOLLOW_55);\n rule__CORBA_SmartSoft__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__CORBA_SmartSoft__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"DeclRule createDeclRule();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the number of stored tracks. | public int getTrackNumber() {
return tracks.size();
} | [
"int getTrackCount();",
"@Override\r\n public int totalTrackCount() {\r\n\r\n return this.number_of_tracks;\r\n }",
"public int getTotalTracks(){\n\t\treturn this.total;\n\t}",
"public int getNumberOfSongs()\n {\n return songs.size();\n }",
"public int getSongCount() {\n return mSongs.size();\r\n }",
"int getPlayTimeTrackersCount();",
"int getStoreCount();",
"int getPlayEndTrackersCount();",
"public int size()\n\t{\n\t\treturn numOfSongs;\n\t}",
"public int getNumberOfSongs() {\n return numberOfSongs;\n }",
"public int getTotalNrOfWaves() {\n\t\treturn mTrackWaves.size();\n\t}",
"public Short getStoreCount() {\n return storeCount;\n }",
"public int numberOfSongs(){\n\t\tint i = 0;\n\t\tfor(Playable ele : this.playableList){\n\t\t\tif(ele instanceof Song){\n\t\t\t\ti += 1;\n\t\t\t}\n\t\t\tif(ele instanceof PlayList){ \n\t\t\t\tPlayList pl = (PlayList) ele;\n\t\t\t\ti += pl.getPlayableList().size();\n\t\t\t}\n\t\t}\n\t\treturn i;\n\t}",
"public int size() {\n\t\treturn plays.size();\n\t}",
"public native int getAlbumTrackCount() /*-{\n\t\treturn this.@com.pmt.wrap.titanium.media.Item::handler.albumTrackCount;\n\t}-*/;",
"public int getLength() {\n return songs.size();\n }",
"public int getPlaylistCount()\r\n\t{\r\n\t\treturn this.playlistItems.size();\r\n\t}",
"public int getNumPlays()\n\t{\n\t\treturn numPlays;\n\t}",
"public native int getPlayCount() /*-{\n\t\treturn this.@com.pmt.wrap.titanium.media.Item::handler.playCount;\n\t}-*/;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method shuffles the order of the cards in the deck | public void shuffle() {
Collections.shuffle(deckOfCards);
} | [
"private void shuffleDeck() {\n Collections.shuffle(deck);\n }",
"public void shuffle(){\n Collections.shuffle(this.deckOfCards);\n }",
"public void shuffle() {\n\t\tfor (int i = deck.length - 1; i > 0; i--) {\n\t\t\tint rand = (int) (Math.random() * (i + 1));\n\t\t\tCard temp = deck[i];\n\t\t\tdeck[i] = deck[rand];\n\t\t\tdeck[rand] = temp;\n\t\t}\n\t\tcardsUsed = 0;\n\t}",
"private void shuffleDeck() {\n\t\tCollections.shuffle(CARDS);\n\t\tCollections.shuffle(CARDS);\n\t\tCollections.shuffle(CARDS);\n\t\tCollections.shuffle(CARDS);\n\t\tCollections.shuffle(CARDS);\n\t}",
"public void shuffle(){\r\n Collections.shuffle(cards);\r\n }",
"public void shuffleDeck() {\n\t\tCollections.shuffle(cardDeck);\n\t\tdeckIndex = 0;\n\t}",
"public void shuffleCards() {\n ArrayList<Card> shuffledDeck = new ArrayList<Card>();\n while(!this.deckCards.isEmpty()) {\n shuffledDeck.add(this.deckCards.remove((int) (Math.random() * this.deckCards.size())));\n }\n this.deckCards = shuffledDeck;\n }",
"public void shuffleCardDeck() {\n\t\tfor(int i = 0; i< 4; i++){\n\t\t\tCollections.shuffle(cardDeck);\t\t\t\n\t\t}\n\t}",
"public void shuffle() {\r\n\t\t\r\n\t\t//init RNG\r\n\t\tRandom rng = new Random();\r\n\t\t\r\n\t\t//temp card\r\n\t\tCards temp;\r\n\t\t\r\n\t\tint j;\r\n\t\tfor (int i = 0; i < this.numCards; i++) {\r\n\t\t\t\t\r\n\t\t\t// get random card j to swap i\r\n\t\t\tj = rng.nextInt(this.numCards);\r\n\t\t\t\t\t\t\r\n\t\t\t//do swap\r\n\t\t\ttemp = this.deck[i];\r\n\t\t\tthis.deck[i] = this.deck[j];\r\n\t\t\tthis.deck[j] = temp;\r\n\t\t}\r\n\t}",
"public void shuffle()\n {\n\t for(int i = this.deck.size()- 1; i > 0; i--)\n\t {\n\t\t int j = r.nextInt(i + 1);\n\t\t Card temp = this.deck.get(i);\n\t\t this.deck.set(i, this.deck.get(j));\n\t\t this.deck.set(j, temp);\n\n\t }\n\t for(Card card: this.deck)\n\t {\n\t\t this.cardsInPlay.add(card);\n\t }\n\n }",
"public void shuffle() {\n for ( int i = deck.length-1; i > 0; i-- ) {\n int rand = (int)(Math.random()*(i+1));\n ZFCard temp = deck[i];\n deck[i] = deck[rand];\n deck[rand] = temp;\n }\n unused_deck = new ArrayList<ZFCard>(Arrays.asList(deck)); \n }",
"public void shuffle()\n {\n Collections.shuffle(cards);\n }",
"public void shuffle() {\r\n Random ram = new Random();\r\n for (int i = 0; i < NUMBER_OF_CARDS; i++) {\r\n int randomNum = ram.nextInt(NUMBER_OF_CARDS);\r\n // swap the element at position i with element at position randomNum\r\n Collections.swap(deck, i, randomNum);\r\n }\r\n\r\n }",
"public void shuffleCards() {\r\n\r\n\t\t// Shuffles the deck 5 times\r\n\t\tfor (int i = 0; i < 5; i++) {\r\n\t\t\tCollections.shuffle(deck);\r\n\t\t}\r\n\t}",
"public void shuffle()\r\n {\r\n // implement this method!\r\n Collections.shuffle(playDeck);\r\n }",
"public void shuffle(){\n this.cardsToPick.addAll(discardedCards);\n discardedCards.clear();\n Collections.shuffle(cardsToPick);\n }",
"public void shuffle() {\n Collections.shuffle(cardlist);\n }",
"public void shuffle(){\n\n // resetting the int counters\n nextCard = 0;\n nextDiscardedPlace = 0;\n discardPile = new PlayingCard[Constants.DECK_SIZE];\n\n PlayingCard temp = null;\n Random rand = new Random();\n\n for(int i = 0; i < MAX_SHUFFLE; i++) {\n int pos1 = rand.nextInt(Constants.DECK_SIZE);\n int pos2 = rand.nextInt(Constants.DECK_SIZE);\n\n temp = deck[pos1];\n deck[pos1] = deck[pos2];\n deck[pos2] = temp;\n }\n }",
"private void shuffleAndDeal() {\n\n deck.add(new Card('S', '9'));\n deck.add(new Card('S', 'T'));\n deck.add(new Card('S', 'J'));\n deck.add(new Card('S', 'Q'));\n deck.add(new Card('S', 'K'));\n deck.add(new Card('S', 'A'));\n deck.add(new Card('H', '9'));\n deck.add(new Card('H', 'T'));\n deck.add(new Card('H', 'J'));\n deck.add(new Card('H', 'Q'));\n deck.add(new Card('H', 'K'));\n deck.add(new Card('H', 'A'));\n deck.add( new Card('C', '9'));\n deck.add( new Card('C', 'T'));\n deck.add( new Card('C', 'J'));\n deck.add( new Card('C', 'Q'));\n deck.add( new Card('C', 'K'));\n deck.add( new Card('C', 'A'));\n deck.add( new Card('D', '9'));\n deck.add( new Card('D', 'T'));\n deck.add( new Card('D', 'J'));\n deck.add( new Card('D', 'Q'));\n deck.add( new Card('D', 'K'));\n deck.add( new Card('D', 'A'));\n Collections.shuffle(deck);\n\n\n for(int i = 0; i < 5; i++) {\n for (int j = 0; j < 4; j++) {\n players.get(j).addCard(deck.remove(0));\n }\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an unmodifiable list of squares that are next to the given square or connected with it by their corners. | public SmartList<Square> getNeighbors(Square square) {
return this.squares.select(x -> x.isNeighborOf(square)).freeze();
} | [
"private ArrayList<GameSquare> getAdjacentSquares()\n {\n ArrayList<GameSquare> list = new ArrayList<GameSquare>();\n for (int r = row - 1; r <= row + 1; r++)\n {\n if (r >= 0 && r < grid.length)\n {\n for (int c = col - 1; c <= col + 1; c++)\n {\n if (c >= 0 && c < grid[0].length)\n {\n list.add(grid[r][c]);\n }\n }\n }\n }\n return list;\n }",
"public List<SquareAbstract> getSquaresWithSameRow(SquareAbstract square){\n List<SquareAbstract> squareList = new ArrayList<>(); //TODO this method could be non static in SquareAbstract, invoking a static one here\n for(int i = 0; i<squares.size(); i++){\n for(int j = 0; j<squares.get(i).size(); j++){\n if(squares.get(i).get(j) != null)\n if(squares.get(i).get(j).getRow() == square.getRow() && squares.get(i).get(j) != square)\n squareList.add(squares.get(i).get(j));\n\n }\n }\n return squareList;\n }",
"private HashSet<Square> adjacentAvailableSquares(Square[][] squares, Square square) {\n int row = square.getRow();\n int column = square.getColumn();\n HashSet<Square> result = new HashSet<>();\n\n for (int i = -1; i <= 1; i++) {\n for (int j = -1; j <= 1; j++) {\n if (i != 0 || j != 0) {\n int adjacentRow = row + i;\n int adjacentColumn = column + j;\n if (adjacentRow >= 0 && adjacentRow <= 7 && adjacentColumn >= 0 && adjacentColumn <= 7) {\n Square squareToCheck = squares[adjacentRow][adjacentColumn];\n if (squareToCheck.getPiece() == null\n || squareToCheck.getPiece().getPlayer() != getOppositePlayer()) {\n result.add(squareToCheck);\n }\n }\n }\n }\n }\n return result;\n }",
"public List<SquareAbstract> getSquaresWithSameCol(SquareAbstract square){ //passed square won't be in the returned list\n List<SquareAbstract> squareList = new ArrayList<>();\n for(int i = 0; i<squares.size(); i++){\n for(int j = 0; j<squares.get(i).size(); j++){\n if(squares.get(i).get(j) != null)\n if(squares.get(i).get(j).getCol() == square.getCol() && squares.get(i).get(j) != square)\n squareList.add(squares.get(i).get(j));\n\n }\n }\n return squareList;\n }",
"public List<Square> getTargetSquares();",
"public Set<Square> getAccessibleNeighbours();",
"public List<Square> getSquaresInRoom(){\n return new ArrayList<>(squares);\n }",
"private HashSet<Square> squaresInBetween(Square[][] squares, Square square1, Square square2) {\n\n HashSet<Square> squaresInBetween = new HashSet<>();\n\n int square1Row = square1.getRow();\n int square1Column = square1.getColumn();\n int square2Row = square2.getRow();\n int square2Column = square2.getColumn();\n\n // horizontal line\n if (square1Row == square2Row) {\n if (square1Column < square2Column) {\n for (int column = square1Column + 1; column < square2Column; column++) {\n squaresInBetween.add(squares[square1Row][column]);\n }\n } else {\n for (int column = square1Column - 1; column > square2Column; column--) {\n squaresInBetween.add(squares[square1Row][column]);\n }\n }\n }\n\n // vertical line\n if (square1Column == square2Column) {\n if (square1Row < square2Row) {\n for (int row = square1Row + 1; row < square2Row; row++) {\n squaresInBetween.add(squares[row][square1Column]);\n }\n } else {\n for (int row = square1Row - 1; row > square2Row; row--) {\n squaresInBetween.add(squares[row][square1Column]);\n }\n }\n }\n\n // diagonal lines\n if (!(square1Row == square2Row) && !(square1Column == square2Column) && Math.abs(square1Row - square2Row) == Math.abs(square1Column - square2Column)) {\n if (square1Row < square2Row) {\n if (square1Column < square2Column) {\n for (int row = square1Row + 1, column = square1Column + 1; row < square2Row; row++, column++) {\n squaresInBetween.add(squares[row][column]);\n }\n } else {\n for (int row = square1Row + 1, column = square1Column - 1; row < square2Row; row++, column--) {\n squaresInBetween.add(squares[row][column]);\n }\n }\n } else if (square1Column < square2Column) {\n for (int row = square1Row - 1, column = square1Column + 1; row > square2Row; row--, column++) {\n squaresInBetween.add(squares[row][column]);\n }\n } else {\n for (int row = square1Row - 1, column = square1Column - 1; row > square2Row; row--, column--) {\n squaresInBetween.add(squares[row][column]);\n }\n }\n }\n\n return squaresInBetween;\n\n }",
"private List<Cell> nextAvailableSquares(Piece current, Piece rival, int row, int col) {\n ArrayList<Cell> toChange = new ArrayList<>(); // squares to change to the current's pieces\n ArrayList<Cell> currentList;\n\n for (int i = -1; i <= 1; i++)\n for (int j = -1; j <= 1; j++) {\n currentList = goDirection(current, rival, row, col, i, j);\n if (currentList != null)\n toChange.addAll(currentList);\n }\n\n if (toChange.size() != 0) // valid move\n toChange.add(new Cell(row, col)); // add the current empty cell to the ArrayList\n\n return toChange;\n }",
"private void colorSquares(Stack squares) {\n Border greenBorder = BorderFactory.createLineBorder(Color.GREEN, 3);\n while (!squares.empty()) {\n Square s = (Square) squares.pop();\n int location = s.getPosX() + ((s.getPosY()) * 8);\n JPanel panel = (JPanel) chessBoard.getComponent(location);\n panel.setBorder(greenBorder);\n }\n }",
"public Collection<String> surroundingEmptySquares(int row, int col) {\n Collection<String> adjacentEmpty = new HashSet<>();\n int currentRow; // the current row index to check\n int currentCol; // the current column index to check\n\n for (int i=-1; i <= 1; i++)\n for (int j=-1; j <= 1; j++) {\n currentRow = row + i; // right/left/neither\n currentCol = col + j; // up/down/neither\n\n if (isInBoard(currentRow, currentCol) // in the board\n && !(i == 0 && j == 0) // not same square\n && isSquareEmpty(currentRow, currentCol)) // empty square\n\n // add it to the set\n adjacentEmpty.add(Cell.toSquareTag(currentRow, currentCol));\n }\n\n return adjacentEmpty;\n }",
"private void getLandingSquares(Stack found) {\n Move tmp;\n Square landing;\n Stack<Square> squares = new Stack<>();\n while (!found.empty()) {\n tmp = (Move) found.pop();\n landing = tmp.getLanding();\n squares.push(landing);\n }\n colorSquares(squares);\n }",
"public Set<CoordBoard> get_neighbors(CoordBoard coord) {\n\n\t\tint i = coord.first();\n\t\tint j = coord.second();\n\n\t\tSet<CoordBoard> neighbors = new HashSet<CoordBoard>();\n\n\t\tint row = i - 1; // Upper row\n\t\tif (row >= 0) {\n\t\t\tfor (int col=j; col <= j+1; col++) { // col = j, j+1\n\t\t\t\tCoordBoard neigh = new CoordBoard(row, col);\n\t\t\t\tif (col >= 0 && col < edge_size) {\n\t\t\t\t\tadd_pair(neighbors, neigh);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\trow++; // Current row\n\t\tfor (int col=j-1; col <= j+1; col++) { // col = j-1, j+1\n\t\t\tCoordBoard neigh = new CoordBoard(row, col);\n\t\t\tif (col == j) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (col >= 0 && col < edge_size) {\n\t\t\t\tadd_pair(neighbors, neigh);\n\t\t\t}\n\t\t}\n\n\t\trow++; // Lower row\n\t\tif (row < edge_size){ // col = j-1, j\n\t\t\tfor (int col=j-1; col <= j; col++) {\n\t\t\t\tCoordBoard neigh = new CoordBoard(row, col);\n\t\t\t\tif (col >= 0 && col < edge_size) {\n\t\t\t\t\tadd_pair(neighbors, neigh);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn neighbors;\n\n\t}",
"public SmartList<Square> getSquares() {\n return new SmartList<Square>(this.squares).freeze();\n }",
"public List<Square> getAttackedSquaresAll(){\n List<Square> attacked = new ArrayList<>();\n int column = this.position.getColumn();\n int row = this.position.getRow();\n int plusOne = 1;\n if (!white){\n plusOne = - 1;\n }\n if (row < 8 && row > 1){\n if (column > 1){\n Square square = board.getSquare(column - 1, row + plusOne );\n attacked.add(square);\n }\n if (column < 8){\n Square square = board.getSquare(column + 1, row + plusOne);\n attacked.add(square);\n }\n }\n return attacked;\n }",
"public void addSquaresToList()\n {\n int i = 0;\n int size = 50;\n int spacing = 0;\n int interval = size + spacing;\n\n while (i < 8)\n {\n sqList.add(new Square(interval * i, 0, size, \"red\"));\n i++;\n }\n }",
"ArrayList<Square> getCurrentMoveSquares(Board board) {\n ArrayList<Square> currentMoveSquares = new ArrayList<>();\n ArrayList<Move> currentMoves = getLegalMoves(board, chosenSquare);\n for (Move m : currentMoves) {\n currentMoveSquares.add(board.getSquare(m.getRowEnd(), m.getColEnd()));\n }\n return currentMoveSquares;\n }",
"private void generateSquarePartners() {\r\n\t\t// 2 copies of each end point,\r\n\t\t// which will be \"shifted\" to simulate the 2 adjacent squares\r\n\t\tint[] point1Shift1 = Arrays.copyOf(point1, 2);\r\n\t\tint[] point1Shift2 = Arrays.copyOf(point1, 2);\r\n\t\tint[] point2Shift1 = Arrays.copyOf(point2, 2);\r\n\t\tint[] point2Shift2 = Arrays.copyOf(point2, 2);\r\n\t\t\r\n\t\t// used to indicate the orientation of the Line and which axis needs to be shifted\r\n\t\t// 0 == vertical, 1 == horizontal\r\n\t\tint index;\r\n\t\t\r\n\t\tif (point1[0] == point2[0]) {\r\n\t\t\tindex = 0;\r\n\t\t} else {\r\n\t\t\tindex = 1;\r\n\t\t}\r\n\t\t\r\n\t\tif (point1[index] - 1 > 0) {\r\n\t\t\t// square1Partners form the square to the left or above *this* Line\r\n\t\t\t// so shifted points get decremented\r\n\t\t\tpoint1Shift1[index] = point1[index] - 1;\r\n\t\t\tpoint2Shift1[index] = point2[index] - 1;\r\n\t\t\t\r\n\t\t\tsquare1Partners.add(new Line(point1, point1Shift1));\r\n\t\t\tsquare1Partners.add(new Line(point1Shift1, point2Shift1));\r\n\t\t\tsquare1Partners.add(new Line(point2Shift1, point2));\r\n\t\t}\r\n\t\tif (point1[index] + 1 < boardSize) {\r\n\t\t\t// square2Partners form the square to the right or below *this* Line\r\n\t\t\t// so shifted points get incremented\r\n\t\t\tpoint1Shift2[index] = point1[index] + 1;\r\n\t\t\tpoint2Shift2[index] = point2[index] + 1;\r\n\t\t\t\r\n\t\t\tsquare2Partners.add(new Line(point1, point1Shift2));\r\n\t\t\tsquare2Partners.add(new Line(point1Shift2, point2Shift2));\r\n\t\t\tsquare2Partners.add(new Line(point2Shift2, point2));\r\n\t\t}\r\n\t}",
"public Square getSquareRight(Square square) {\n int x = square.getCoordinateX();\n int y = square.getCoordinateY();\n Square squareNotVisible;\n final int nine = 9;\n if (!board.inRange(x, y, board) || x == nine) {\n squareNotVisible = new Square(-1, -1, board);\n return squareNotVisible;\n } else {\n if (square.board.isOpponent()) {\n return Board.squaresInGridOpponent.get(10 * y + x + 1);\n } else {\n return Board.squaresInGrid.get(10 * y + x + 1);\n }\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The format of the recipe. | public String getRecipeOutputFormat() {
return this.recipeOutputFormat;
} | [
"public void setRecipeOutputFormat(String recipeOutputFormat) {\n this.recipeOutputFormat = recipeOutputFormat;\n }",
"java.lang.String getOutputFormats();",
"private String inFormat() {\n File f = cfg.getReadFromFile();\n if (f != null) {\n return \" in format file \" + f.getPath();\n }\n return \" in format \" + StringUtils.defaultString(cfg.getName(), \"(unnamed)\");\n }",
"public String getFormatDescription();",
"Format getFormat();",
"public Object getFormat();",
"String getFormats();",
"String documentFormat();",
"public String getFormatPattern();",
"public Format getFormat();",
"@Override\n public void format() {\n extractPatternFromField(ENTRY, \"\", \"\\\\w*\", \" \", \"\", \"\");\n formatFieldReplace(REACTION, \"\\n\", \" \");\n formatFieldSplit(REACTION, \" \");\n formatFieldReplace(ENZYME, \"\\n\", \" \");\n formatFieldSplit(ENZYME, \" \");\n formatFieldReplace(RELATEDPAIR, \"\\n\", \" \");\n formatFieldSplit(RELATEDPAIR, \" \");\n extractPatternFromField(COMPOUND, \"\", \"\\\\w{6}\", \" \", \"\", \"\");\n }",
"public String getFormat() {\n return format;\n }",
"public String getFormatDesign() {\n return (String) getAttributeInternal(FORMATDESIGN);\n }",
"public String getFormatRaw() {\n return format;\n }",
"public Param getFormat() {\r\n return format;\r\n }",
"public String getFormatDesign() {\n return (String)getAttributeInternal(FORMATDESIGN);\n }",
"String getFormatter();",
"public String getShortFormatDesc();",
"FileFormat getFormat();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the DT value for this InsuranceINS. | public java.util.Calendar getDT() {
return DT;
} | [
"public int getSDT() {\n return sdt;\n }",
"public int getDtNasc() {\n return dtNasc;\n }",
"public Date getOisLstupddt() {\n return oisLstupddt;\n }",
"public Date getDtInclusao() {\n\t\treturn dtInclusao;\n\t}",
"public java.lang.CharSequence getINCUMBANCYDT() {\n return INCUMBANCY_DT;\n }",
"public java.lang.CharSequence getINCUMBANCYDT() {\n return INCUMBANCY_DT;\n }",
"public DataSourceDT getTheDataSourceDT()\n {\n return theDataSourceDT;\n }",
"public Vector<Double> getTiempoDDL(){\n return this.tiempoDDL;\n }",
"public double getDtOutput() {\r\n return dtOutput;\r\n }",
"public Date getDtmIns() {\n return dtmIns;\n }",
"public Integer getDit()\r\n {\r\n return (Integer) ( (IntegerMetricBO) getMetrics().get( DIT ) ).getValue();\r\n }",
"public String getCASH_DEDUCT_IND() {\r\n return CASH_DEDUCT_IND;\r\n }",
"public int getDtVencimento() {\n return dtVencimento;\n }",
"public Date getuDt() {\r\n\t\treturn uDt;\r\n\t}",
"public int getDtRegistro() {\n return dtRegistro;\n }",
"EObject getDINT();",
"public String getStructuredtimingDetailedtimingInterval() {\n\t\treturn structuredtimingDetailedtimingInterval;\n\t}",
"public Date getDataDimissioni() {\n return dataDimissioni;\n }",
"public double getDAmtSvcDtlIncome()\r\n {\r\n return this._dAmtSvcDtlIncome;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Test method for 'java.awt.FontMetrics.FontMetrics(Font)' | @SuppressWarnings("deprecation")
public final void testFontMetrics() {
FontMetrics fMetrics = Toolkit.getDefaultToolkit().getFontMetrics(physicalFont);
assertNotNull(fMetrics);
} | [
"public FontMetrics getFontMetrics() {\n FontMetrics fm = new FontMetrics();\n getFontMetrics(fm);\n return fm;\n }",
"public FontMetrics getFontMetrics(Font f)\r\n\t{\r\n\t\treturn _g2.getFontMetrics();\r\n\t}",
"@SuppressWarnings(\"deprecation\")\n public FontMetrics getFontMetrics(Font f) {\n return Toolkit.getDefaultToolkit().getFontMetrics(f);\n }",
"public FontMetrics getFontMetrics(Font font) {\r\n if (font == null) {\r\n throw new NullPointerException(\"font param must not\" + \" be null\");\r\n }\r\n if (font.equals(lastFont) && fontMetrics != null) {\r\n return fontMetrics;\r\n }\r\n lastFont = font;\r\n lastStyledFont = new Font(font.getFamily(), (bold ? Font.BOLD : 0) | (italic ? Font.ITALIC : 0),\r\n font.getSize());\r\n fontMetrics = Toolkit.getDefaultToolkit().getFontMetrics(lastStyledFont);\r\n return fontMetrics;\r\n }",
"public FontMetrics getFontMetrics(Font font) {\n return (FontMetrics) GFontPeer.getFontPeer(font);\n }",
"public FontMetrics getFontMetrics() {\n\t\tFontMetrics fm = new FontMetrics();\n\t\tgetFontMetrics(fm);\n\t\treturn fm;\n\t}",
"@NotNull\n public static FontMetrics getFontMetrics ( @Nullable final JComponent component, @NotNull final Graphics g, @NotNull final Font font )\n {\n final FontMetrics fontMetrics;\n if ( component != null )\n {\n fontMetrics = component.getFontMetrics ( font );\n }\n else\n {\n fontMetrics = g.getFontMetrics ( font );\n }\n return fontMetrics;\n }",
"@SuppressWarnings(\"deprecation\")\n public static FontMetrics getFontMetrics(JComponent c, Graphics g,\n Font font) {\n if (c != null) {\n // Note: We assume that we're using the FontMetrics\n // from the widget to layout out text, otherwise we can get\n // mismatches when printing.\n return c.getFontMetrics(font);\n }\n return Toolkit.getDefaultToolkit().getFontMetrics(font);\n }",
"public final void testGetLineMetricsStringGraphics() {\n String str = \"Hello world!\";\n LineMetrics lm = fm.getLineMetrics(str, g);\n\n lmEquals(physicalFont.getLineMetrics(str, ((Graphics2D)g).getFontRenderContext()), lm);\n }",
"public final void testGetFont() {\n assertEquals(physicalFont, fm.getFont());\n }",
"public final void testGetLineMetricsStringIntIntGraphics() {\n String str = \"Only Hello world! metrics\";\n\n LineMetrics lm = fm.getLineMetrics(str, 5, 17, g);\n\n lmEquals(physicalFont.getLineMetrics(str, 5, 17, ((Graphics2D) g)\n .getFontRenderContext()), lm);\n\n }",
"public final void testGetLineMetricsCharacterIteratorIntIntGraphics() {\n CharacterIterator ci = new StringCharacterIterator(\"Only Hello world! metrics\");\n\n LineMetrics lm = fm.getLineMetrics(ci, 5, 17, g);\n\n lmEquals(physicalFont.getLineMetrics(ci, 5, 17, ((Graphics2D)g).getFontRenderContext()), lm);\n }",
"@Override\n public FontMetrics getFontMetrics(final Font f) {\n final Graphics g = getOnscreenGraphics();\n if (g != null) {\n try {\n return g.getFontMetrics(f);\n } finally {\n g.dispose();\n }\n }\n synchronized (getDelegateLock()) {\n return delegateContainer.getFontMetrics(f);\n }\n }",
"public float getFontMetrics(FontMetrics metrics) {\n if (metrics != null) {\n metrics.top = metrics.ascent = this.ascent();\n metrics.bottom = metrics.descent = this.descent();\n }\n return 0;\n }",
"@NotNull\n public static FontMetrics getFontMetrics ( @Nullable final JComponent component, @NotNull final Graphics g )\n {\n return getFontMetrics ( component, g, g.getFont () );\n }",
"Size measureText(String text, double availWidth, double availHeight);",
"public final void testGetLineMetricsCharArrayIntIntGraphics() {\n char[] chars = new char[]{'H','e','l','l','o',' ','w','o','r','l','d','!'};\n\n LineMetrics lm = fm.getLineMetrics(chars, 0, chars.length, g);\n\n lmEquals(physicalFont.getLineMetrics(chars, 0, chars.length, ((Graphics2D) g)\n .getFontRenderContext()), lm);\n\n }",
"public int getFontSize();",
"public void testGetFontSize() {\n objectNode.setFontSize(8);\n assertEquals(\"Failed to get the font size correctly.\", 8, objectNode.getFontSize());\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
searchForActiveMember. Search in DB for active members | private int searchForActiveMember(final int userid) {
if (userid == 0) {
throw new IllegalArgumentException("Name has no content.");
}
int members = 0;
try {
members = templGame.queryForObject(sql3, new Object[] { userid }, Integer.class);
} catch (final EmptyResultDataAccessException e) {
LOGGER.error(e.getMessage());
}
return members;
} | [
"List<ImportedMember> search(ImportedMemberQuery params);",
"@Test\n\tpublic void testSearchByID2() {\n\t\tArrayList<Member> mbs = new ArrayList<>();\n\t\tmbs.add(new Member(\"Name1\", \"email1@email.com\", new ActivatedStatus()));\n\t\tmbs.add(new Member(\"Name2\", \"email2@email.com\", new ActivatedStatus()));\n\t\t\n\t\tMember mb = Member.searchMemberByID(mbs, 3);\n\t\tassertEquals(null, mb);\n\t}",
"List<User> findUsersByExactMatch(PerunSession sess, String searchString);",
"public List<Individual> getActiveMembers() {\n\n List<Individual> list1 = new ArrayList<Individual>();\n Iterator<Individual> itr = members.iterator();\n while (itr.hasNext()) {\n Individual ind = itr.next();\n Boolean a = true;\n\n Boolean b = ind.isActive();\n\n if (a == b) {\n\n list1.add(ind);\n }\n\n }\n\n return list1;\n }",
"public List<User> searchUser(String searchValue);",
"@Test\n public void testGetMemberships_Active_Found() {\n List<Membership> memberships = repo.getMemberships(Status.ACTIVE, MembershipBalance.ALL);\n\n assertNotNull(\"Ensure the memberships collection is not null!\", memberships);\n assertFalse(\"Ensure the memberships collection is not empty!\", memberships.isEmpty());\n assertEquals(\"Ensure we found the correct number of memberships!\", 4, memberships.size());\n }",
"public Account findAccountByMember(Member member);",
"List<Member> findByName(String name);",
"public List<User> searchPeople(String search, int id);",
"List<Member> findAll();",
"public void startMemberSearchActivity(View v) {\n\t\tIntent intent = new Intent(this, MemberSearchableActivity.class);\n\t\tintent.putExtra(\"members\", entity.getMembers());\n\n\t\tstartActivityForResult(intent, INTENT_ACTION_SEARCH);\n\t}",
"private void searchActorsByString() {\n\t\tmActorsStore.searchActors();\t\n\t}",
"List<User> findUsers(PerunSession sess, String searchString);",
"List<Election> searchActiveWithUser(long date, User user);",
"@GET\n @Timed\n @Produces(MediaType.APPLICATION_JSON)\n @Consumes(MediaType.APPLICATION_JSON)\n @AllowAnonymous\n public ApiResponse searchMember( @APIQueryParam(repClass = MemberSearch.class) MemberSearchRequest request,\n @Context SecurityContext\n securityContext) {\n\n try {\n AuthUser authUser = (AuthUser)securityContext.getUserPrincipal();\n QueryResult<List<Object>> queryResult = memberSearchManager.searchMembers(request, authUser);\n ApiResponse response = ApiResponseFactory.createResponse(queryResult.getData());\n Result result = response.getResult();\n Map<String, Integer> metadata = new HashMap<>();\n metadata.put(TOTAL_COUNT, queryResult.getRowCount());\n response.setResult(result.getSuccess(), result.getStatus(), metadata, result.getContent());\n return response;\n } catch (Throwable ex) {\n return ErrorHandler.handle(ex, LOGGER);\n }\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic List<User> search(String searchItem){\n \tif(count == 0) {\n \t\tsetFullTextEntityManager();\n \t\tcount++;\n \t}\n\t \tFullTextEntityManager fullTextEntityManager =\n\t \t\t Search.getFullTextEntityManager(entityManager);\n\t \t\n\t \tQueryBuilder queryBuilder = fullTextEntityManager.getSearchFactory() \n\t \t\t\t .buildQueryBuilder()\n\t \t\t\t .forEntity(User.class)\n\t \t\t\t .get();\n\t \t\n\t \tQuery query = queryBuilder\n\t \t\t\t .keyword()\n\t \t\t\t .fuzzy()\n\t \t\t\t .onField(\"user_name\")\n\t \t\t\t .matching(searchItem)\n\t \t\t\t .createQuery();\n\t \t\n\t \tFullTextQuery jpaQuery = fullTextEntityManager.createFullTextQuery(query, User.class);\n\t \tList<User> results = jpaQuery.getResultList();\n\t \t\n\t\treturn results;\n }",
"public List<Province> searchActive(String searchStr) {\n\t\treturn provinceRepository.findByNameIgnoreCaseStartingWithAndIsActiveTrue(searchStr);\n\t}",
"@Test\n\t public void testSearchMembersByEmail(){\n\t\t assertEquals(member, gymApi.searchMembersByEmail(\"joesoap@wit.ie\"));\n\t\t assertEquals(null, gymApi.searchMembersByEmail(\"Invalid Email\"));\n\t }",
"public MemberCQ queryMember() {\n return xdfgetConditionQueryMember();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the stat change for a particular stat based on the index provided. | public int getStatChange(int i) {
return statChanges[i];
} | [
"com.znl.proto.Common.AttrDifInfo getDiffs(int index);",
"public Statistic get(int index) {\n return this.statistics.get(index);\n }",
"public int getStat(Stat stat) {\n return stats.get(stat);\n }",
"org.tensorflow.proto.profiler.XStat getStats(int index);",
"public StatValue getStat(ZithiaStat stat) {\r\n return statValueArray[stat.ordinal()];\r\n }",
"com.znl.proto.Common.AttrDifInfoOrBuilder getDiffsOrBuilder(\n int index);",
"int getSkillChangeConjureTimeMapVals(int index);",
"public void setStatChange(int i, int change) {\r\n\t\tif(i<NUMSTATS){\r\n\t\t\tstatChanges[i] = change;\r\n\t\t}\r\n\t}",
"org.tensorflow.proto.profiler.XStatOrBuilder getStatsOrBuilder(\n int index);",
"long getEffectsIndex(int index);",
"public int get(int index){\n\t\treturn data[index];\n\t}",
"public int getStatAtLevel(int which, int iv, int ev,double naturemod, int level)\n\t{\n\t\tdouble top = iv + (2*baseStats[which])+ev/4.0;\n\t\ttop *= level;\n\t\ttop /= 100.0;\n\t\ttop += 5;\n\t\ttop *= naturemod;\n\t\treturn (int)top;\n\t\t//concatenates, which is the desired operation\n\t}",
"com.github.jtendermint.jabci.types.Types.Validator getDiffs(int index);",
"public int getStat(int which, int level, int iv, int ev,double naturemod)\n\t{\n\t\t//don't use this for hp\n\t\t//([iv+(2*Base)+ev/4]*level)/100+5*nature\n\t\tdouble top = iv + (2*baseStats[which])+ev/4.0;\n\t\ttop *= level;\n\t\ttop /= 100.0;\n\t\ttop += 5;\n\t\ttop *= naturemod;\n\t\treturn (int)top;\n\t\t//concatenates, which is the desired operation\n\t}",
"org.tdmx.server.pcs.protobuf.WSClient.ServiceStatistic getStatistics(int index);",
"public AttributeInSchema getAttribute(int index) {\n\t\treturn ts.getAttr(index);\n\t}",
"public int getSkillChangeConjureTimeMapVals(int index) {\n return skillChangeConjureTimeMapVals_.get(index);\n }",
"public int[] getStatChanges() {\r\n\t\treturn Arrays.copyOfRange(statChanges,0,NUMSTATS);\r\n\t}",
"public long getTime(int index)\r\n {\r\n if (index > this.expressions.length)\r\n {\r\n return -1;\r\n }\r\n return this.timing[index];\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validates the SignatureMustBeFunctionSignature constraint of 'Anonymous Function Expr'. | public boolean validateAnonymousFunctionExpr_SignatureMustBeFunctionSignature(AnonymousFunctionExpr anonymousFunctionExpr, DiagnosticChain diagnostics, Map<Object, Object> context) {
return
validate
(FpPackage.Literals.ANONYMOUS_FUNCTION_EXPR,
anonymousFunctionExpr,
diagnostics,
context,
"http://www.eclipse.org/emf/2002/Ecore/OCL",
"SignatureMustBeFunctionSignature",
ANONYMOUS_FUNCTION_EXPR__SIGNATURE_MUST_BE_FUNCTION_SIGNATURE__EEXPRESSION,
Diagnostic.ERROR,
DIAGNOSTIC_SOURCE,
0);
} | [
"public boolean validateAnonymousFunctionExpr_HasToOwnSignatureTypeDefinition(AnonymousFunctionExpr anonymousFunctionExpr, DiagnosticChain diagnostics, Map<Object, Object> context) {\n return\n validate\n (FpPackage.Literals.ANONYMOUS_FUNCTION_EXPR,\n anonymousFunctionExpr,\n diagnostics,\n context,\n \"http://www.eclipse.org/emf/2002/Ecore/OCL\",\n \"HasToOwnSignatureTypeDefinition\",\n ANONYMOUS_FUNCTION_EXPR__HAS_TO_OWN_SIGNATURE_TYPE_DEFINITION__EEXPRESSION,\n Diagnostic.ERROR,\n DIAGNOSTIC_SOURCE,\n 0);\n }",
"public boolean validateAnonymousFunctionExpr_TypeMustBeSignatureTypeDefinitionWithImplementation(AnonymousFunctionExpr anonymousFunctionExpr, DiagnosticChain diagnostics, Map<Object, Object> context) {\n return\n validate\n (FpPackage.Literals.ANONYMOUS_FUNCTION_EXPR,\n anonymousFunctionExpr,\n diagnostics,\n context,\n \"http://www.eclipse.org/emf/2002/Ecore/OCL\",\n \"TypeMustBeSignatureTypeDefinitionWithImplementation\",\n ANONYMOUS_FUNCTION_EXPR__TYPE_MUST_BE_SIGNATURE_TYPE_DEFINITION_WITH_IMPLEMENTATION__EEXPRESSION,\n Diagnostic.ERROR,\n DIAGNOSTIC_SOURCE,\n 0);\n }",
"public static boolean anonymous_function_signature(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"anonymous_function_signature\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_, \"<anonymous function signature>\");\n r = explicit_anonymous_function_signature(b, l + 1);\n if (!r) r = implicit_anonymous_function_signature(b, l + 1);\n exit_section_(b, l, m, ANONYMOUS_FUNCTION_SIGNATURE, r, false, null);\n return r;\n }",
"public FunctionSignature getSignature();",
"public boolean validateFunctionFromMethodExpr_MethodSignatureConformsToFunctionSignature(FunctionFromMethodExpr functionFromMethodExpr, DiagnosticChain diagnostics, Map<Object, Object> context) {\n return\n validate\n (FpPackage.Literals.FUNCTION_FROM_METHOD_EXPR,\n functionFromMethodExpr,\n diagnostics,\n context,\n \"http://www.eclipse.org/emf/2002/Ecore/OCL\",\n \"MethodSignatureConformsToFunctionSignature\",\n FUNCTION_FROM_METHOD_EXPR__METHOD_SIGNATURE_CONFORMS_TO_FUNCTION_SIGNATURE__EEXPRESSION,\n Diagnostic.ERROR,\n DIAGNOSTIC_SOURCE,\n 0);\n }",
"private void validateFunctionJsDoc(Node n, JSDocInfo info) {\n if (info == null) {\n return;\n }\n\n if (info.containsFunctionDeclaration() && !info.hasType() && !isJSDocOnFunctionNode(n, info)) {\n // This JSDoc should be attached to a FUNCTION node, or an assignment\n // with a function as the RHS, etc.\n\n reportMisplaced(\n n,\n \"function\",\n \"This JSDoc is not attached to a function node. \" + \"Are you missing parentheses?\");\n }\n }",
"@Test\n public void testGenerateAnonymousSignature() {\n }",
"public static ParsedFunctionSignature parseFunctionSignature(Node functionNode, FilePath fp) {\n FunctionSignatureParser parser = new FunctionSignatureParser(functionNode, fp);\n ParsedFunctionSignature result = parser.parseFunctionSignature();\n return result;\n }",
"private Stmt.Function funDeclaration(String kind){\n Token name = consume(IDENTIFIER, String.format(\"Expect %s name.\", kind));\n consume(LPAREN, String.format(\"Expect '(' after %s name.\", kind));\n List<Token> parameters = new ArrayList<>();\n\n /*Are there any parameters declared? */\n if (!check(RPAREN)) {\n do {\n if (parameters.size() >= MAX_PARAMETERS) {\n error(peek(), String.format(\"Cannot have more than %d parameters.\", MAX_PARAMETERS));\n }\n parameters.add(consume(IDENTIFIER, \"Expect parameter name.\"));\n }while (match(COMMA));\n }\n consume(RPAREN, \"Expect ')' after function parameters.\");\n\n consume(LBRACE, String.format(\"Expect '{' before %s body.\", kind));\n List<Stmt> body = block();\n return new Stmt.Function(name, parameters, body);\n }",
"void validateSecurityFunctionCreateRequest(SecurityFunctionCreateRequest request) throws IllegalArgumentException\n {\n request.setSecurityFunctionName(alternateKeyHelper.validateStringParameter(\"security function name\", request.getSecurityFunctionName()));\n }",
"public final void rule__FunctionType__Group__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:6118:1: ( ( ruleSignature ) )\r\n // InternalGo.g:6119:1: ( ruleSignature )\r\n {\r\n // InternalGo.g:6119:1: ( ruleSignature )\r\n // InternalGo.g:6120:2: ruleSignature\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getFunctionTypeAccess().getSignatureParserRuleCall_1()); \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.getFunctionTypeAccess().getSignatureParserRuleCall_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 }",
"protected void validateSignature(final Signature signature, final String idpEntityId,\n final TrustEngine<Signature> trustEngine) {\n\n\n SignaturePrevalidator validator = new SAMLSignatureProfileValidator();\n try {\n logger.debug(\"Validating profile signature for entity id {}\", idpEntityId);\n validator.validate(signature);\n } catch (final SignatureException e) {\n throw new SAMLSignatureValidationException(\"SAMLSignatureProfileValidator failed to validate signature\", e);\n }\n\n val criteriaSet = new CriteriaSet();\n criteriaSet.add(new UsageCriterion(UsageType.SIGNING));\n criteriaSet.add(new EntityRoleCriterion(IDPSSODescriptor.DEFAULT_ELEMENT_NAME));\n criteriaSet.add(new ProtocolCriterion(SAMLConstants.SAML20P_NS));\n criteriaSet.add(new EntityIdCriterion(idpEntityId));\n final boolean valid;\n try {\n logger.debug(\"Validating signature via trust engine for entity id {}\", idpEntityId);\n valid = trustEngine.validate(signature, criteriaSet);\n } catch (final SecurityException e) {\n throw new SAMLSignatureValidationException(\"An error occurred during signature validation\", e);\n }\n if (!valid) {\n throw new SAMLSignatureValidationException(\"Signature is not trusted\");\n }\n }",
"boolean isLambda();",
"public boolean hasValidFunctionCall()\n {\n if((m_functionCall == null) || (m_functionAlias == null))\n {\n return false;\n }\n else\n {\n return true;\n }\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 }",
"ExpressionFunction requireFunction(String name) {\n ExpressionFunction function = function(name);\n if (function == null)\n throw new IllegalArgumentException(\"No function named '\" + name + \"' in \" + this + \". Available functions: \" +\n functions.stream().map(f -> f.getName()).collect(Collectors.joining(\", \")));\n return function;\n }",
"public static boolean isValidSignature(String signature) {\n\t\tchar[] sig = signature.toCharArray();\n\t\tfor(char c : sig) {\n\t\t\tif(( c == ' ')) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"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 }",
"protected void setFunctionSignature(FunctionSignature signature)\n {\n assert (signature != null);\n \n m_signature = signature;\n \n for (FunctionSignature sig : this.getFunction().getFunctionSignatures())\n {\n if (sig.getName().equals(signature.getName())) return;\n }\n \n assert (false);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This will verify the Asset Allocation title | public boolean verifyAssetAllocationTitle(String assetAllocationTitle) throws Exception {
boolean flag = false;
SeleniumUtils objSeleniumUtils;
String actualassetAllocationTitleTitle = null;
try {
objSeleniumUtils = new SeleniumUtils();
SeleniumUtils.scrollToViewElement(driver, ASSETALLOCATION_TITLE);
Thread.sleep(1000);
SeleniumUtils.scrollToViewElement(driver, ASSETALLOCATION_TITLE);
if (SeleniumUtils.isElementPresent(driver, ASSETALLOCATION_TITLE)) {
actualassetAllocationTitleTitle = objSeleniumUtils.getTitleText(driver, ASSETALLOCATION_TITLE);
}
if (actualassetAllocationTitleTitle.equalsIgnoreCase(assetAllocationTitle)) {
flag = true;
TestBase.logInfo(String.format(TestBase.properties.getLogMessage("VerifyAssetAllocationTitlePassed"),
assetAllocationTitle, actualassetAllocationTitleTitle));
}
} catch (Exception e) {
TestBase.logError(String.format(TestBase.properties.getLogMessage("VerifyAssetAllocationTitleFailed"),
assetAllocationTitle, actualassetAllocationTitleTitle));
throw e;
}
return flag;
} | [
"public void validateTitle()\r\n\t{\r\n\t\tString titleDisplayed = this.heading.getText();\r\n\t\tassertEquals(titleDisplayed, \"Dashboard\");\r\n\t\tSystem.out.println(\"Value is asserted\");\r\n\t\t\t}",
"@Test\n public void assetNameTest() {\n // TODO: test assetName\n }",
"@Ignore\n public void AccountStatisticsToolbarTitleVerification() {\n onView(allOf(isAssignableFrom(TextView.class), withParent(isAssignableFrom(Toolbar.class))))\n .check(matches(withText(toolbarTitle)));\n }",
"private void checkTitle() {\n\t\tif (title == null) {\n\t\t\tinvalidArgs.add(MESSAGE_INVALID_TITLE);\n\t\t}\n\t}",
"@Test(priority = 1, enabled = true, description = \"Verify Page Title\")\n\tpublic void verifyPageTitle()throws Exception {\n\t\tSoftAssert softAssert = new SoftAssert();\n\t\ttry{\n\t\t\tCreditAppPage.navigateToCreditAppPage(webPage, softAssert);\n\n\t\t}catch(Throwable e){\n\t\t\tsoftAssert.fail(e.getLocalizedMessage());\n\t\t\tCreditAppPage.navigateToCreditAppPage(webPage, softAssert); \n\t\t}\n\t\tlog.info(\"Ending verifyPageTitle\");\n\t\tsoftAssert.assertAll();\n\t}",
"public void setAmusementObjectTitle(String title){\r\n amusementObjectTitle = title;\r\n }",
"public void verifyTitle() {\n String expectedTitle = \"Example.co/\";\n Assert.assertEquals(expectedTitle, driver.getTitle());\n }",
"public void verifyRecordingTitleDisplayInCorrectFormat() {\r\n if ((recording_titles_list.get(0).getText().startsWith(\"Recording:\")) &&\r\n (recording_titles_list.get(0).getText().substring(\"Recording: \".length()).length() > 0)) {\r\n System.out.println(\"Verifed recording title format.\");\r\n ATUReports.add(time + \" Verifed recording title format.\", \"True.\", \"True.\", LogAs.PASSED, null);\r\n } else {\r\n System.out.println(\"Not verifed recording title format.\");\r\n ATUReports.add(time + \" Verifed recording title format.\", \"True.\", \"False.\", LogAs.FAILED, new CaptureScreen(ScreenshotOf.BROWSER_PAGE));\r\n }\r\n }",
"public ArrayList<String> getTabsTitlePresentUnderAssetAllocationTitle() throws Exception {\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\t\tList<WebElement> element;\n\t\ttry {\n\t\t\telement = driver.findElements(By.xpath(\"//div[@id='Objectives']/child::div/child::table//td//a\"));\n\t\t\tint totalCount = element.size();\n\t\t\tfor (int i = 1; i <= totalCount; i++) {\n\t\t\t\tString elementText = driver\n\t\t\t\t\t\t.findElement(By.xpath(\"//div[@id='Objectives']/child::div/child::table//td[\" + i + \"]//a\"))\n\t\t\t\t\t\t.getText();\n\t\t\t\tarrayList.add(elementText);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow e;\n\t\t}\n\t\treturn arrayList;\n\t}",
"@Test(groups ={Slingshot,Regression})\n\tpublic void verifyTitleField() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the Title Field validations and its appropriate error message\"); \t \t \t \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDataspl\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUserCreation()\n\t\t.ValidateAddnewUserTitleField(userProfile);\t\t\t\t \t \t\t\t\t\t\t\n\t}",
"public void verifySourceTitleDisplayInCorrectFormat() {\r\n if ((source_titles_list.get(0).getText().startsWith(\"Source:\")) &&\r\n (source_titles_list.get(0).getText().substring(\"Recording: \".length()).length() > 0)) {\r\n System.out.println(\"Verifed source title format.\");\r\n ATUReports.add(time + \" Verifed source title format.\", \"True.\", \"True.\", LogAs.PASSED, null);\r\n } else {\r\n System.out.println(\"Not verifed source title format.\");\r\n ATUReports.add(time + \" Verifed source title format.\", \"True.\", \"False.\", LogAs.FAILED, new CaptureScreen(ScreenshotOf.BROWSER_PAGE));\r\n }\r\n }",
"public boolean ECbannertitleCheck(ExtentTest extentedReport) throws Exception {\n\t\ttry {\n\t\t\treturn GenericUtils.verifyWebElementTextEquals(txtBannerName, \"Engagement Centre\");\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tthrow new Exception(\"Exception while getting banner title\" + e);\n\t\t}\n\n\t}",
"public void verifyThatSourceTitleInTheFormatSourceLink() {\r\n if (source_titles_list.size() > 0) {\r\n if (source_titles_list.get(0).getText().equals(\"Source: Link\")) {\r\n System.out.println(\"Verifed source title format.\");\r\n ATUReports.add(time + \" Verifed source title format.\", \"True.\", \"True.\", LogAs.PASSED, null);\r\n } else {\r\n System.out.println(\"Not verifed source title format.\");\r\n ATUReports.add(time + \" Verifed source title format.\", \"True.\", \"False.\", LogAs.FAILED, new CaptureScreen(ScreenshotOf.BROWSER_PAGE));\r\n }\r\n } else {\r\n System.out.println(\"There is no source titles.\");\r\n }\r\n }",
"@Test(priority=0)\n\tpublic void titleVerification() {\n\t\tString expectedTitle = \"Facebook – log in or sign up\";\n\t\tString actualTitle = driver.getTitle();\n\t\tAssert.assertEquals(actualTitle, expectedTitle);\n\t}",
"public String getAgreementCheckTitle() \r\n\t{\r\n\t\treturn lookupValue(Param.AGREEMENT_CHECK_TITLE);\r\n\t}",
"@Test\n\tpublic void testGetTitle(){\n\t\tArticleEntry ae = new ArticleEntry();\n\t\tString expResult = \"NP-complete Problems Simplified on Tree Schemas.\";\n\t\tae.setTitle(\"NP-complete Problems Simplified on Tree Schemas.\");\n\t\tString result = ae.getTitle();\n\t\tassertEquals(expResult, result);\n\t}",
"String getAssetName();",
"public String assetName() {\n return assetName;\n }",
"public void titleResult() {\n resultTitle.shouldHave(text(RESULT_TITLE));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check whether the source of drag is the selected view(s) The check is performed by checking every view's extent | protected boolean isSelectedSource(
Stack<ComponentView<VisreedPayload, VisreedEdgeLabel, VisreedHigraph, VisreedWholeGraph, VisreedSubgraph, VisreedNode, VisreedEdge>> stack
){
if(this.dragSourcePoint == null){
return false;
}
List<VisreedNodeView> selection = this.getSelectedViews();
VisreedNodeView topView = this.getTopNodeView(stack);
if(selection.contains(topView)){
return true;
}
return false;
} | [
"protected boolean isSelectedSource(){\r\n if(this.dragSourcePoint == null){\r\n return false;\r\n// } else if (this.dragTargetPoint == null){\r\n// return false;\r\n// } else if (dragSourcePoint.distance(dragTargetPoint) < 5){\r\n// return false;\r\n }\r\n \r\n List<VisreedNodeView> selection = this.getSelectedViews();\r\n for(VisreedNodeView nv : selection){\r\n \tif(nv == null || nv.getNextShapeExtent() == null){\r\n \t\tcontinue;\r\n \t}\r\n if(nv.getNextShapeExtent().contains(this.dragSourcePoint)){\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"boolean isInview();",
"public abstract boolean getIsValidDragSource();",
"public boolean isAtLeastOneSourceSelected(ESelectionService selectionService) {\n\t\tObject selection = selectionService.getSelection(UnagiProjectExplorerView.VIEW_ID);\n\n\t\t// Single selection of a project tree element is OK.\n\t\tif ((selection != null) && ((selection instanceof SourceFileProjectTreeElement) || (selection instanceof SourcePackageProjectTreeElement)))\n\t\t\treturn true;\n\n\t\t// Otherwise it has to be an array (multiple selection).\n\t\tif (!(selection instanceof Object[]))\n\t\t\treturn false;\n\n\t\t// Checks if the array contains only sources and package elements.\n\t\tObject[] multipleSelection = (Object[]) selection;\n\t\tfor (Object obj : multipleSelection)\n\t\t\tif (!(obj instanceof SourceFileProjectTreeElement) && !(obj instanceof SourcePackageProjectTreeElement))\n\t\t\t\treturn false;\n\n\t\t// If it was an array and all elements were sources/packages, then it's OK.\n\t\treturn true;\n\t}",
"public abstract boolean getIsValidDragTarget();",
"public abstract boolean hasSelection();",
"private boolean selectionIntended() {\n\t\t\tif (selection.getHorizontalRange() != null\n\t\t\t\t\t&& selection.getVerticalRange() != null) {\n\n\t\t\t\treturn selection.getHorizontalRange().y\n\t\t\t\t\t\t- selection.getHorizontalRange().x > 15\n\t\t\t\t\t\t&& selection.getVerticalRange().y\n\t\t\t\t\t\t\t\t- selection.getVerticalRange().x > 15;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"@Override\n\tpublic boolean canExecute(Collection<? extends EObject> selections) {\n\t\tfor (EObject eo : selections) {\n//\t\t\tSystem.out.println(\"[CutSetAction] eobject class= \" + eo.getClass());\n\n\t\t\tif (eo instanceof DSemanticDiagramSpec) {\n\t\t\t\tDSemanticDiagramSpec ds = (DSemanticDiagramSpec) eo;\n\t\t\t\tEObject target = ds.getTarget();\n\n//\t\t\t\tSystem.out.println(\"[CutSetAction] eobject class= \" + eo.getClass());\n//\n//\t\t\t\tSystem.out.println(\"[CutSetAction] target = \" + target);\n\t\t\t}\n\n\t\t\tif (eo instanceof DNodeSpec) {\n\t\t\t\tDNodeSpec ds = (DNodeSpec) eo;\n\t\t\t\tEObject target = ds.getTarget();\n\n//\t\t\t\tSystem.out.println(\"[CutSetAction] eobject class= \" + eo.getClass());\n//\n//\t\t\t\tSystem.out.println(\"[CutSetAction] target = \" + target);\n\n\t\t\t\tif (target instanceof edu.cmu.emfta.Event) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tif (target instanceof edu.cmu.emfta.Tree) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tif (target instanceof edu.cmu.emfta.FTAModel) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\treturn false;\n\t}",
"boolean hasClickView();",
"public boolean isSomethingSelected() {\r\n \t\treturn graph.getSelectionCell() != null;\r\n \t}",
"private boolean checkSelected() {\r\n return selectedObject != null;\r\n }",
"boolean hasStablesSelected();",
"protected boolean liesInSelectedLinesOrLayers(Group point)\r\n {\r\n if (selectedLayers.size() + selectedLines.size() == 0)\r\n return true;\r\n \r\n ModelPoint p = (ModelPoint) point.getUserData();\r\n Point2d pOrig = p.getOriginal();\r\n \r\n for (ModelSegment line : selectedLines) {\r\n if (line.getOriginal().contains(pOrig))\r\n return true;\r\n }\r\n \r\n for (Layer layer : selectedLayers) {\r\n if (layer.contains(p))\r\n return true;\r\n }\r\n \r\n return false;\r\n }",
"static boolean sourceCoveredByProjectViewTargets(LocationContext context) {\n Collection<TargetKey> targetsBuildingSource =\n SourceToTargetMap.getInstance(context.project)\n .getRulesForSourceFile(new File(context.file.getPath()));\n return !targetsBuildingSource.isEmpty()\n && sourceInProjectTargets(context, targetsBuildingSource);\n }",
"protected boolean pathsAreSelected(TreePath[] paths){ \n boolean selected;\n //proceed only if source is selected\n if(paths != null && paths.length > 0){\n selected = true;\n } else {\n //if nothing is selected alert the user\n displayAlert(\"Select at least one folder or file\");\n selected = false;\n }\n return selected;\n }",
"public boolean isDragging()\n\t{\n\t\treturn dragged != null;\n\t}",
"public boolean isViewing() { RMShape p = getParent(); return p!=null && p.isViewing(); }",
"boolean hasMoveableInputPoints(EuclidianViewInterfaceSlim view);",
"@Override\n boolean selectionExists() {\n return nativeCheckSelectionExists();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns whether config for this application has converged in given zone | public boolean configConvergedIn(ZoneId zone, Controller controller, Optional<Version> version) {
if (!hasApplicationPackage()) {
return true;
}
return controller.serviceRegistry().configServer().serviceConvergence(new DeploymentId(id(), zone), version)
.map(ServiceConvergence::converged)
.orElse(false);
} | [
"boolean hasCloudRunConfig();",
"boolean hasFailedConfiguration();",
"public boolean hasZones() {\n return (zones != null);\n }",
"boolean hasTimezoneValidity();",
"public boolean isSetZone() {\n return this.zone != null;\n }",
"private static boolean isMonitoringTimeOver(Properties configuration) {\r\n String monitoringStartTime = configuration.getProperty(Constants.PROPERTY_MONITORING_START_TIME);\r\n if (monitoringStartTime == null) {\r\n return false;\r\n }\r\n DateTimeZone.setDefault(DateTimeZone.UTC);\r\n \r\n DateTime startTime = new DateTime(monitoringStartTime);\r\n String monitoringDuration = configuration.getProperty(Constants.PROPERTY_TIME_MONITORING_DURATION);\r\n \r\n int monitoringDurationMinutes = Integer.parseInt(monitoringDuration);\r\n DateTime endTime = startTime.plusMinutes(monitoringDurationMinutes);\r\n \r\n return endTime.isBeforeNow();\r\n }",
"public boolean isComplete() {\n return configComplete;\n }",
"public boolean configFileHasChanged() {\n\t\t\tFile file = getConfigFile(this.configFileName);\n\t\t\tlong currentModTime = file.lastModified();\n\n\t\t\tif (currentModTime > this.configFileModifiedTime) {\n\t\t\t\tthis.configFileModifiedTime = currentModTime;\n\t\t\t\treturn true;\n\t\t\t} else\n\t\t\t\treturn false;\n\n\t\t}",
"public boolean isConfigInitalized()\n\t{\n\t\treturn this.isInitialized;\n\t}",
"boolean updateNeeded() {\n if (!wasConfigUpdatedSinceLastCheck()) return false;\n if (updateOnChange) return true;\n\n for (Map.Entry<String, Object> entry : monitoredKeys.entrySet()) {\n Object configValue = configuration.getProperty(entry.getKey());\n // An update is needed; at least one of the monitored values differs from before.\n if (!Objects.equals(configValue, entry.getValue())) return true;\n }\n\n return false;\n }",
"boolean hasCheckpoints();",
"public boolean isUp() {\n return System.currentTimeMillis() < getFinishTime();\n }",
"public boolean verifyZonesBalanced(Cluster cluster) {\n int maxPartitions = Integer.MIN_VALUE;\n int minPartitions = Integer.MAX_VALUE;\n for(Integer zoneId: cluster.getZoneIds()) {\n int numPartitions = cluster.getNumberOfPartitionsInZone(zoneId);\n if(numPartitions > maxPartitions)\n maxPartitions = numPartitions;\n if(numPartitions < minPartitions)\n minPartitions = numPartitions;\n }\n int partitionsDiff = maxPartitions - minPartitions;\n if(partitionsDiff > 1 || partitionsDiff < 0) {\n return false;\n }\n return true;\n }",
"boolean isConfigurationReload();",
"boolean hasDnsCacheConfig();",
"boolean hasWorkerConfiguration();",
"public boolean hasConfigurationError();",
"@Override\n\tpublic boolean hasConfigChanged() {\n\t\treturn false;\n\t}",
"public synchronized boolean shouldRefresh() {\n long curTime = System.currentTimeMillis();\n if ((curTime - lastRefreshTime) > intervalTime) {\n lastRefreshTime = curTime;\n return true;\n }\n return false;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use this API to fetch a appfwconfidfield resource. | public static appfwconfidfield get(nitro_service service, appfwconfidfield obj) throws Exception{
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(obj));
appfwconfidfield response = (appfwconfidfield) obj.get_resource(service,option);
return response;
} | [
"public static appfwconfidfield[] get(nitro_service service) throws Exception{\n\t\tappfwconfidfield obj = new appfwconfidfield();\n\t\tappfwconfidfield[] response = (appfwconfidfield[])obj.get_resources(service);\n\t\treturn response;\n\t}",
"public static appfwconfidfield[] get(nitro_service service, options option) throws Exception{\n\t\tappfwconfidfield obj = new appfwconfidfield();\n\t\tappfwconfidfield[] response = (appfwconfidfield[])obj.get_resources(service,option);\n\t\treturn response;\n\t}",
"public static base_response delete(nitro_service client, appfwconfidfield resource) throws Exception {\n\t\tappfwconfidfield deleteresource = new appfwconfidfield();\n\t\tdeleteresource.fieldname = resource.fieldname;\n\t\tdeleteresource.url = resource.url;\n\t\treturn deleteresource.delete_resource(client);\n\t}",
"public static base_response update(nitro_service client, appfwconfidfield resource) throws Exception {\n\t\tappfwconfidfield updateresource = new appfwconfidfield();\n\t\tupdateresource.fieldname = resource.fieldname;\n\t\tupdateresource.url = resource.url;\n\t\tupdateresource.comment = resource.comment;\n\t\tupdateresource.state = resource.state;\n\t\treturn updateresource.update_resource(client);\n\t}",
"public static appfwconfidfield[] get(nitro_service service, appfwconfidfield obj[]) throws Exception{\n\t\tif (obj != null && obj.length > 0) {\n\t\t\tappfwconfidfield response[] = new appfwconfidfield[obj.length];\n\t\t\tfor (int i=0;i<obj.length;i++) {\n\t\t\t\toptions option = new options();\n\t\t\t\toption.set_args(nitro_util.object_to_string_withoutquotes(obj[i]));\n\t\t\t\tresponse[i] = (appfwconfidfield) obj[i].get_resource(service,option);\n\t\t\t}\n\t\t\treturn response;\n\t\t}\n\t\treturn null;\n\t}",
"public static base_response add(nitro_service client, appfwconfidfield resource) throws Exception {\n\t\tappfwconfidfield addresource = new appfwconfidfield();\n\t\taddresource.fieldname = resource.fieldname;\n\t\taddresource.url = resource.url;\n\t\taddresource.isregex = resource.isregex;\n\t\taddresource.comment = resource.comment;\n\t\taddresource.state = resource.state;\n\t\treturn addresource.add_resource(client);\n\t}",
"public static appfwconfidfield[] get_filtered(nitro_service service, String filter) throws Exception{\n\t\tappfwconfidfield obj = new appfwconfidfield();\n\t\toptions option = new options();\n\t\toption.set_filter(filter);\n\t\tappfwconfidfield[] response = (appfwconfidfield[]) obj.getfiltered(service, option);\n\t\treturn response;\n\t}",
"public static base_response delete(nitro_service client, String fieldname) throws Exception {\n\t\tappfwconfidfield deleteresource = new appfwconfidfield();\n\t\tdeleteresource.fieldname = fieldname;\n\t\treturn deleteresource.delete_resource(client);\n\t}",
"public static appfwconfidfield[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{\n\t\tappfwconfidfield obj = new appfwconfidfield();\n\t\toptions option = new options();\n\t\toption.set_filter(filter);\n\t\tappfwconfidfield[] response = (appfwconfidfield[]) obj.getfiltered(service, option);\n\t\treturn response;\n\t}",
"public static long count(nitro_service service) throws Exception{\n\t\tappfwconfidfield obj = new appfwconfidfield();\n\t\toptions option = new options();\n\t\toption.set_count(true);\n\t\tappfwconfidfield[] response = (appfwconfidfield[])obj.get_resources(service, option);\n\t\tif (response != null) {\n\t\t\treturn response[0].__count;\n\t\t}\n\t\treturn 0;\n\t}",
"public static base_response unset(nitro_service client, appfwconfidfield resource, String[] args) throws Exception{\n\t\tappfwconfidfield unsetresource = new appfwconfidfield();\n\t\tunsetresource.fieldname = resource.fieldname;\n\t\tunsetresource.url = resource.url;\n\t\treturn unsetresource.unset_resource(client,args);\n\t}",
"@java.lang.Override\n public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() {\n return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_;\n }",
"com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldIdOrBuilder();",
"public static long count_filtered(nitro_service service, String filter) throws Exception{\n\t\tappfwconfidfield obj = new appfwconfidfield();\n\t\toptions option = new options();\n\t\toption.set_count(true);\n\t\toption.set_filter(filter);\n\t\tappfwconfidfield[] response = (appfwconfidfield[]) obj.getfiltered(service, option);\n\t\tif (response != null) {\n\t\t\treturn response[0].__count;\n\t\t}\n\t\treturn 0;\n\t}",
"com.google.privacy.dlp.v2.FieldId getFieldId();",
"@Override\n\tpublic vdocField fetchByPrimaryKey(String fieldId) {\n\t\treturn fetchByPrimaryKey((Serializable)fieldId);\n\t}",
"com.google.privacy.dlp.v2.FieldId getField();",
"@Override\n\tpublic LegalField fetchByFieldId(long fieldId) {\n\t\treturn fetchByFieldId(fieldId, true);\n\t}",
"@Override\n\tpublic LegalField fetchByPrimaryKey(long fieldId) {\n\t\treturn fetchByPrimaryKey((Serializable)fieldId);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return path of the search requested page. | public String getSearchPagePath() {
return this.searchPagePath;
} | [
"public String getEncodedSearchPagePath() {\r\n \treturn getEncodedPagePath(this.searchPagePath);\r\n }",
"public String getSearchPath() {\n String path = null;\n if (parent != null) {\n path = parent.getSearchPath();\n path = String.format(\"%s/%s\", path, name);\n } else {\n path = String.format(\"%s\", name);\n }\n return path;\n }",
"public java.lang.String getPagePath () {\r\n\t\treturn pagePath;\r\n\t}",
"protected SearchPath getSearchPath()\r\n {\r\n if (this.searchPath == null)\r\n {\r\n try\r\n {\r\n // TODO: fix this\r\n /*\r\n ApplicationContext rootApplicationContext = FrameworkHelper.getApplicationContext();\r\n if (rootApplicationContext != null)\r\n {\r\n this.searchPath = (SearchPath) rootApplicationContext.getBean(this.searchPathBeanId);\r\n }\r\n */\r\n }\r\n catch(Exception e) { }\r\n }\r\n \r\n return this.searchPath; \r\n }",
"public String getSearchUrl();",
"private IPath getContentSearchLocation() {\n\t\tIPath searchDirectory = null;\r\n\t\t\r\n\t\tif (sisInfo != null) {\r\n\t\t\tString dir = sisInfo.getContentSearchLocation();\r\n\t\t\tif (dir.trim().length() > 0) {\r\n\t\t\t\tsearchDirectory = new Path(dir);\r\n\t\t\t}\r\n\t\t} else if (buildConfig != null) {\r\n\t\t\t// find the first sis info from the build config that matches the pkg\r\n\t\t\tfor (ISISBuilderInfo info : buildConfig.getSISBuilderInfoList()) {\r\n\t\t\t\tif (info.getPKGFullPath().equals(pkgFilePath)) {\r\n\t\t\t\t\tString dir = info.getContentSearchLocation();\r\n\t\t\t\t\tif (dir.trim().length() > 0) {\r\n\t\t\t\t\t\tsearchDirectory = new Path(dir);\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}\r\n\t\t\r\n\t\treturn searchDirectory;\r\n\t}",
"public String toString()\n {\n return searchPath;\n }",
"String getPageBasePath();",
"public String getSearchUrl() {\n return this.hasPermission() ? Constants.URL : null;\n }",
"String getStartpage();",
"public String getServletPath()\n {\n return this.xwiki.getServletPath(this.context.getWikiId(), this.context);\n }",
"private static String getPath (HttpServletRequest request) {\n String path = request.getServletPath();\n return path != null ? path : request.getPathInfo();\n }",
"String getUrlPath();",
"public String getEncodedNewPagePath() {\r\n \treturn getEncodedPagePath(this.newPagePath);\r\n }",
"public final String getPath() {\n\t\treturn getUrlInstance().getPath();\n\t}",
"public String getJspFile() {\r\n final String uri = pageInfo.getPage().getRelativePath();\r\n if (!uri.startsWith(\"/\")) {\r\n return \"/\" + uri;\r\n } else {\r\n return uri;\r\n }\r\n }",
"public void setSearchPagePath(String pagePath) {\r\n this.searchPagePath = pagePath;\r\n }",
"public HtmlPage clickContentPath();",
"protected String getItemPath(SlingHttpServletRequest request) {\n return request.getResource().getPath();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the state of all the edges incident with all the vertices in the graph. Constraints_Matrix[i,j] == 1 => this edge is not considered in the tour Constraints_Matrix[i,j] == 1 => this edge must be considered in the final tour Also takes care of the implicit exclusion inclusion of edges as a result of inclusion and exclusion of edge under consideration | private boolean updateConstraints_Matrix(int[][] Constraints_Matrix, Set<Integer> s) {
for (int i = 0; i < this.num_Cities; i++) {
// Tracks the total number of edges that should be incident with
// this vertex i
int includedEdges = 0;
// Tracks the remaining edges to be considered
int remainingEdges = 0;
for (int j = 0; j < this.num_Cities; j++) {
if (i != j && Constraints_Matrix[i][j] == 1) {
includedEdges++;
} else if (i != j && Constraints_Matrix[i][j] == 0) {
remainingEdges++;
}
}
if (includedEdges > 2 || (includedEdges + remainingEdges) < 2) {
return true;
}
if (includedEdges < 2) {
if ((remainingEdges == 2 && includedEdges == 0) || (remainingEdges == 1 && includedEdges == 1)) {
for (int j = 0; j < this.num_Cities; j++) {
if (i != j && Constraints_Matrix[i][j] == 0) {
Constraints_Matrix[i][j] = 1;
Constraints_Matrix[j][i] = 1;
s.add(j);
}
}
}
} else {
for (int j = 0; j < this.num_Cities; j++) {
if (i != j && Constraints_Matrix[i][j] == 0) {
Constraints_Matrix[i][j] = -1;
Constraints_Matrix[j][i] = -1;
s.add(j);
}
}
}
}
return false;
} | [
"private void updateConstraints_Matrix(int[][] Constraints_Matrix, int v) {\r\n\r\n\t\t// Tracks the total number of edges that should be incident with\r\n\t\t// this vertex i\r\n\t\tint includedEdges = 0;\r\n\r\n\t\t// Tracks the remaining edges to be considered\r\n\t\tint remainingEdges = 0;\r\n\r\n\t\tfor (int j = 0; j < this.num_Cities; j++) {\r\n\t\t\tif (v != j && Constraints_Matrix[v][j] == 1) {\r\n\t\t\t\tincludedEdges++;\r\n\t\t\t} else if (v != j && Constraints_Matrix[v][j] == 0) {\r\n\t\t\t\tremainingEdges++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (includedEdges < 2) {\r\n\t\t\tif ((remainingEdges == 2 && includedEdges == 0) || (remainingEdges == 1 && includedEdges == 1)) {\r\n\t\t\t\tfor (int j = 0; j < this.num_Cities; j++) {\r\n\t\t\t\t\tif (v != j && Constraints_Matrix[v][j] == 0) {\r\n\t\t\t\t\t\tConstraints_Matrix[v][j] = 1;\r\n\t\t\t\t\t\tConstraints_Matrix[j][v] = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (int j = 0; j < this.num_Cities; j++) {\r\n\t\t\t\tif (v != j && Constraints_Matrix[v][j] == 0) {\r\n\t\t\t\t\tConstraints_Matrix[v][j] = -1;\r\n\t\t\t\t\tConstraints_Matrix[j][v] = -1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void setGoalEdges() {\n\n for (Tile tile : goalStates) {\n\n Set<Reward> rewards = graph.incomingEdgesOf(tile);\n for (Reward r : rewards) {\n graph.setEdgeWeight(r, POSITIVE_REWARD);\n }\n }\n }",
"private void setAllUnvisited(){\n\t\tfor(int i = 0; i < this.getDimension(); i++)\n\t\t\tthis.getGraph().setUnvisited(i);\n\t\tthis.visited = 0;\n\t}",
"void informEdges() {\n this.incoming.head = this;\n this.outgoing.tail = this;\n }",
"public void optimize(){\n\n NfaState currState;\n HashMap<Integer, State> statesCloned = (HashMap)states.clone();\n\n\n boolean removed;\n\n for(Map.Entry<Integer, State> entry : statesCloned.entrySet()) {//for each state of the nfa\n\n do {\n removed=false;\n Integer id = entry.getKey();\n\n if (states.get(id) == null)//state already been removed\n continue;\n else\n currState = (NfaState) entry.getValue();\n\n HashMap<String, ArrayList<Integer>> startEdges = currState.getOut_edges();\n\n for (Map.Entry<String, ArrayList<Integer>> startEdge : startEdges.entrySet()) {//for each edge of the current state being optimezed\n\n ArrayList<Integer> transactions = new ArrayList(startEdge.getValue());\n\n\n for (Integer state2DegID : transactions) {// for each transaction the 2nd degree state\n NfaState stateDeg2 = (NfaState) states.get(state2DegID);\n\n if (stateDeg2.getOut_edges() == null)\n continue;\n\n\n\n ArrayList<Integer> edgesDeg2 = stateDeg2.getOut_edges().get(EPSILON);\n\n if (edgesDeg2 != null && edgesDeg2.size() == 1 && stateDeg2.getOut_edges().size() == 1) {//if the next state has only a epsilon transaction, we can remove this state\n NfaState successor = (NfaState) states.get(edgesDeg2.get(0));\n\n\n for (Map.Entry<String, ArrayList<Integer>> inEdgesDeg2 : stateDeg2.getIn_edges().entrySet()) {//for every in_edge of the state being removed, update the elements accordingly\n String key = inEdgesDeg2.getKey();\n\n if (inEdgesDeg2.getValue().size() > 0)\n removed = true;\n\n for (Integer stateBeingUpdatedId : inEdgesDeg2.getValue()) {//state to be updated\n NfaState stateBeingUpdated = (NfaState) states.get(stateBeingUpdatedId);\n //add new edge\n stateBeingUpdated.addEdge(key, successor);\n\n //remove out and in edge to intermediate\n stateBeingUpdated.getOut_edges().get(key).remove((Integer) stateDeg2.getId());\n }\n }\n\n //remove out_edges\n for (Map.Entry<String, ArrayList<Integer>> outEdgesDeg2 : stateDeg2.getOut_edges().entrySet()) {\n for (Integer sucId : outEdgesDeg2.getValue()){\n ((NfaState)states.get(sucId)).getIn_edges().get(outEdgesDeg2.getKey()).remove((Integer) stateDeg2.getId());\n }\n }\n //remove state\n states.remove(stateDeg2.getId());\n }\n }\n\n }\n\n }while (removed);\n }\n }",
"private void addVertexNonEdgeConstraint(){\n for (int i=0; i < g.nonEdges.size(); i++){\n Edge edge = g.nonEdges.get(i);\n int vertex1 = edge.from;\n int vertex2 = edge.to;\n for (int pCount =0; pCount < positionCount-1; pCount++){\n ArrayList<Integer> values = new ArrayList<>();\n values.add((variables[vertex1][pCount] * -1));\n values.add((variables[vertex2][pCount+1] * -1));\n clauses.add(values);\n values = new ArrayList<>();\n values.add((variables[vertex1][pCount+1] * -1));\n values.add((variables[vertex2][pCount] * -1));\n clauses.add(values);\n }\n\n }\n }",
"public void reactivateEqConstraints() {\n\t\t// NOP\n\t}",
"public void updateEdges() {\n Vertex prevVert = vertices.get(0);\n for(int i = 1; i < vertices.size(); i++){\n edges.add(new Edge(prevVert, vertices.get(i)));\n prevVert = vertices.get(i);\n }\n // At the end of the for loop, prevVert will get update to the last\n // vertex in the polygon, so just attach that one to the first\n edges.add(new Edge(prevVert, vertices.get(0)));\n }",
"protected void relaxEdges() {\n for (OrganizableTaskGraph.Edge e : g.getEdges()) {\n\n OrganizableTask v1 = e.getSource();\n OrganizableTask v2 = e.getDest();\n\n\n Point2D p1 = v1.getPoint();\n Point2D p2 = v2.getPoint();\n double vx = p1.getX() - p2.getX();\n double vy = p1.getY() - p2.getY();\n double len = Math.sqrt(vx * vx + vy * vy);\n\n // JY addition.\n int level1 = minLevels.get(v1);\n int level2 = minLevels.get(v2);\n\n // desiredLen *= Math.pow( 1.1, (v1.degree() + v2.degree()) );\n// double desiredLen = getLength(e);\n double desiredLen = lengthFunction;\n\n // round from zero, if needed [zero would be Bad.].\n len = (len == 0) ? .0001 : len;\n\n // force factor: optimal length minus actual length,\n // is made smaller as the current actual length gets larger.\n // why?\n\n // System.out.println(\"Desired : \" + getLength( e ));\n double f = force_multiplier * (desiredLen - len) / len;\n\n f = f * Math.pow(stretch / 100.0,\n (v1.getConnectionCount() + v2.getConnectionCount() - 2));\n\n // JY addition. If this is an edge which stretches a long way,\n // don't be so concerned about it.\n if (level1 != level2)\n f = f / Math.pow(Math.abs(level2 - level1), 1.5);\n\n // f= Math.min( 0, f );\n\n // the actual movement distance 'dx' is the force multiplied by the\n // distance to go.\n double dx = f * vx;\n double dy = f * vy;\n\n\n//\t\t\tSpringEdgeData<E> sed = getSpringEdgeData(e);\n//\t\t\tsed.f = f;\n\n v1.edgedx += dx;\n v1.edgedy += dy;\n v2.edgedx += -dx;\n v2.edgedy += -dy;\n\n }\n }",
"public void setNodesToUnvisited(){\n for(GraphNode node: graphNode){\n if(node.visited){\n node.visited = false;\n }\n }\n }",
"public void updateResidualGraph(){\n\t\tEdge ef;\n\t\tEdge efback;\n\t\n\t\tfor(int i = 0; i < pathEdges.size(); i++){\n\t\t\tef = pathEdges.get(i);\n\t\t\tef.setData((Double) ef.getData() - bottleneck);\n\t\t\tefback = fwdBack.get(ef);\n\t\t\tefback.setData((Double) efback.getData() + bottleneck);\n\t\t}\n\t}",
"public void adjustForCycles()\n\t{\n\t\tboolean continueLoop = true;\n\t\twhile (continueLoop == true)\n\t\t{\n\t\t\tCycleDetector<String, DefaultEdge> detector = new CycleDetector<String, DefaultEdge>(acyclicJGraph);\n\t\t\tif (detector.detectCycles() == false)\n\t\t\t{\n\t\t\t\tcontinueLoop = false;\n\t\t\t}\n\t\t\tif (continueLoop == true)\n\t\t\t{\n\t\t\t\tSet<String> cycleSet = null;\n\t\t\t\tfor (String key : acyclicAdjacencyMatrix.keySet())\n\t\t\t\t{\n\t\t\t\t\tcycleSet = detector.findCyclesContainingVertex(key);\n\t\t\t\t\tif (cycleSet.size() > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t//The break statement is used because there is no convenient way to exit a \n\t\t\t\t\t\t//for loop and the for each loop makes it much clearer that I'm iterating through a set\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\taddSuperNode(cycleSet);\n\t\t\t}\n\t\t}\n\n\t}",
"public void resetFeasible() {\r\n \tstillFeasible = true;\r\n }",
"public static void complementaryGraph(mxAnalysisGraph aGraph) {\n ArrayList<ArrayList<mxCell>> oldConnections = new ArrayList<ArrayList<mxCell>>();\n mxGraph graph = aGraph.getGraph();\n Object parent = graph.getDefaultParent();\n //replicate the edge connections in oldConnections\n Object[] vertices = aGraph.getChildVertices(parent);\n int vertexCount = vertices.length;\n\n for (int i = 0; i < vertexCount; i++) {\n mxCell currVertex = (mxCell)vertices[i];\n int edgeCount = currVertex.getEdgeCount();\n mxCell currEdge = new mxCell();\n ArrayList<mxCell> neighborVertexes = new ArrayList<mxCell>();\n\n for (int j = 0; j < edgeCount; j++) {\n currEdge = (mxCell)currVertex.getEdgeAt(j);\n\n mxCell source = (mxCell)currEdge.getSource();\n mxCell destination = (mxCell)currEdge.getTarget();\n\n if (!source.equals(currVertex)) {\n neighborVertexes.add(j, source);\n }\n else {\n neighborVertexes.add(j, destination);\n }\n\n }\n\n oldConnections.add(i, neighborVertexes);\n }\n\n //delete all edges and make a complementary model\n Object[] edges = aGraph.getChildEdges(parent);\n graph.removeCells(edges);\n\n for (int i = 0; i < vertexCount; i++) {\n ArrayList<mxCell> oldNeighbors = new ArrayList<mxCell>();\n oldNeighbors = oldConnections.get(i);\n mxCell currVertex = (mxCell)vertices[i];\n\n for (int j = 0; j < vertexCount; j++) {\n mxCell targetVertex = (mxCell)vertices[j];\n boolean shouldConnect = true; // the decision if the two current vertexes should be connected\n\n if (oldNeighbors.contains(targetVertex)) {\n shouldConnect = false;\n }\n else if (targetVertex.equals(currVertex)) {\n shouldConnect = false;\n }\n else if (areConnected(aGraph, currVertex, targetVertex)) {\n shouldConnect = false;\n }\n\n if (shouldConnect) {\n graph.insertEdge(parent, null, null, currVertex, targetVertex);\n }\n }\n\n }\n }",
"public void minimize() {\n\t\t//creates a dead state\n\t\tdeadState = new Node(\"dead-state\", stateNumber);\n\t\t\n\t\t//puts dead state in the map\n\t\tstates.put(stateNumber, deadState);\n\t\t\n\t\t//creates new state matrix of size (number of states)x(number of states)\n\t\tstateMatrix = new int[states.size()][states.size()];\n\t\t\n\t\t//adds transitions from dead state to itself on all characters of alphabet\n\t\tfor (int h = 0; h < alphabet.length(); h++) {\n\t\t\tdeadState.addTransition((alphabet.charAt(h)+\"\"), deadState);\n\t\t}\n\t\t\n\t\t//performs the first pass over the matrix\n\t\tfirstPass();\n\t\t\n\t\t//represents whether or not change was made to matrix\n\t\tboolean changeMade = true;\n\t\t\n\t\t//loop while changeMade == true; that is, while changes are occuring in the matrix\n\t\twhile (changeMade) {\n\n\t\t\tchangeMade = false;\n\t\t\t\n\t\t\t//traverse half the matrix (halves are equal)\n\t\t\tfor (int i = 0; i < states.size(); i++) {\n\t\t\t\tfor (int j = 0; j <= i; j++) {\n\t\t\t\t\t//fromState1 and fromState2 form a pair\n\t\t\t\t\tNode fromState1 = states.get(i);\n\t\t\t\t\tNode fromState2 = states.get(j);\n\t\t\t\t\n\t\t\t\t\t//for each character in the alphabet\n\t\t\t\t\tfor(int k = 0; k < alphabet.length(); k++) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//toState1 and toState2 form a pair\n\t\t\t\t\t\tNode toState1 = fromState1.getTransitions().get((alphabet.charAt(k)+\"\"));\n\t\t\t\t\t\tNode toState2 = fromState2.getTransitions().get((alphabet.charAt(k)+\"\"));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t//initialize states to deadState if they do not have a transition for a character\n\t\t\t\t\t\tif (toState1 == null) {\n\t\t\t\t\t\t\ttoState1 = deadState;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (toState2 == null) {\n\t\t\t\t\t\t\ttoState2 = deadState;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//if toState pair is marked as distinguishable, then marked fromState pair as distinguishable\n\t\t\t\t\t\t//and set changeMade to true\n\t\t\t\t\t\tif (stateMatrix[toState1.getNumber()][toState2.getNumber()]==1) {\n\t\t\t\t\t\t\tif (stateMatrix[fromState1.getNumber()][fromState2.getNumber()] == 0) {\n\t\t\t\t\t\t\t\tstateMatrix[fromState1.getNumber()][fromState2.getNumber()]=1;\n\t\t\t\t\t\t\t\tstateMatrix[fromState2.getNumber()][fromState1.getNumber()]=1;\n\t\t\t\t\t\t\t\tchangeMade = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//after matrix is complete, merge distinguishable states\n\t\tmerge();\n\t}",
"public void makeEdges()\n {\n GameState gs = GameState.instance(); \n Dungeon d = gs.getDungeon(); \n \n for(String key: d.collection.keySet())\n {\n Room room = d.getRoom(key); \n if(!room.roomExits.isEmpty())\n {\n for(Exit exit : room.roomExits)\n {\n Room dest = exit.getDest();\n String i = room.getTitle(); \n String j = dest.getTitle(); \n try\n {\n adjMatrix[rooms.indexOf(i)][rooms.indexOf(j)] = 1;\n }\n catch(ArrayIndexOutOfBoundsException index)\n {\n System.out.println(\"The vertices do not exist at make edge creation\"); \n }\n }\n }\n }\n }",
"void reset() {\n\t\t\t_orderID = UNMARKED;\n\t\t\t_outgoingEdges.clear();\n\t\t\t//TODO when do we call this? when should we mark all edges as received?\n\t\t\tfor(Edge e : _neighborEdges.keySet()) {\n\t\t\t\t_neighborEdges.put(e, false);\n\t\t\t}\n\t\t}",
"void setupEdge(GeomPlanarGraphEdge edge)\n {\n\t //System.out.println(\"enter setupEdge indexOnPath \" + indexOnPath + \" currentIndex \" + currentIndex);\n //System.out.println(\"startIndex \" + startIndex + \" endIndex \" + endIndex);\n // clean up on old edge -- take agent off the edge\n if (currentEdge != null)\n {\n \t \t\t//System.out.println(\"current edge not null\");\n \t \t\t//System.out.println(\"current edge: \" + currentEdge);\n \t \t\t//System.out.println(\"edgeTraffic: \" + world.edgeTraffic);\n\n ArrayList<Agent> traffic = this.state.edgeTraffic.get(currentEdge);\n //System.out.println(\"got current edge\");\n traffic.remove(this);\n //System.out.println(\"agent off current edge\");\n }\n currentEdge = edge;\n \n //System.out.println(currentEdge + \" current edge updated with \" + edge);\n //System.out.println(world.edgeTraffic);\n //System.out.println(\"Is HashMap Empty? \"+ world.edgeTraffic.isEmpty());\n //System.out.println(world.edgeTraffic.get(currentEdge));\n\n // update new edge traffic\n if (this.state.edgeTraffic.get(currentEdge) == null)\n {\n \t //System.out.println(\"no agents on edge\");\n this.state.edgeTraffic.put(currentEdge, new ArrayList<Agent>());\n //System.out.println(\"created new list of agent traffic on edge\");\n }\n //System.out.println(\"add agent \" + this.getEndID());\n this.state.edgeTraffic.get(currentEdge).add(this);\n //System.out.println(\"update edge\");\n\n // set up the new segment and index info\n LineString line = null;\n // post-impact some edges are destroyed, agents needs a reroute\n // if there is no line, reroute, else get the line\n if (edge.getLine() == null) {\n \t System.out.println(\"Agent>transitionToNextEdge>reroute\");\n \t setneedReroute(true);\n \t return;\n }\n else {\n \t line = edge.getLine();\n }\n segment = new LengthIndexedLine(line);\n //startIndex = Spacetime.degToKilometers(segment.getStartIndex());\n edge_end_p = Spacetime.degToKilometers(segment.getEndIndex());\n linkDirection = 1;\n //System.out.println(\"start index \" + startIndex + \" end index\" + endIndex);\n\n // check to ensure that Agent is moving in the right direction\n // then set currentIndex to start of path \n // and set the link direction\n double distanceToStart = line.getStartPoint().distance(location.geometry),\n distanceToEnd = line.getEndPoint().distance(location.geometry);\n\n if (distanceToStart <= distanceToEnd)\n { // closer to start\n currentIndex = startIndex;\n linkDirection = 1;\n } else if (distanceToEnd < distanceToStart)\n { // closer to end\n currentIndex = endIndex;\n linkDirection = -1;\n }\n //System.out.println(\"exit setupEdge indexOnPath \" + indexOnPath + \" currentIndex \" + currentIndex);\n //System.out.println(\"startIndex \" + startIndex + \" endIndex \" + endIndex + \" linkDirection \" + linkDirection);\n\n }",
"public void updateEdge() {\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the identifyNumber value for this InsuredEhm. | public void setIdentifyNumber(java.lang.String identifyNumber) {
this.identifyNumber = identifyNumber;
} | [
"public java.lang.String getIdentifyNumber() {\n return identifyNumber;\n }",
"public void setIdentify(String identify) {\n this.identify = identify == null ? null : identify.trim();\n }",
"public void xsetDatasetnumber(org.apache.xmlbeans.XmlInteger datasetnumber)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlInteger target = null;\r\n target = (org.apache.xmlbeans.XmlInteger)get_store().find_attribute_user(DATASETNUMBER$4);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlInteger)get_store().add_attribute_user(DATASETNUMBER$4);\r\n }\r\n target.set(datasetnumber);\r\n }\r\n }",
"public void setIdentityNumber(String IdentityNumber) {\n this.IdentityNumber = IdentityNumber;\n }",
"public void xsetDatasetnumber(org.apache.xmlbeans.XmlInteger datasetnumber)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlInteger target = null;\r\n target = (org.apache.xmlbeans.XmlInteger)get_store().find_attribute_user(DATASETNUMBER$4);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlInteger)get_store().add_attribute_user(DATASETNUMBER$4);\r\n }\r\n target.set(datasetnumber);\r\n }\r\n }",
"public void setIdNumber(Integer idNumber) {\n this.idNumber = idNumber;\n }",
"public void setIdentityNumber(java.lang.String identityNumber) {\r\n this.identityNumber = identityNumber;\r\n }",
"@Override\n public void setIdNumber(String changeIdNumber) {\n idNumber = changeIdNumber;\n }",
"public final void setHousenumber(java.lang.String housenumber)\n\t{\n\t\tsetHousenumber(getContext(), housenumber);\n\t}",
"public void setNumber(int number)\n {\n this.number = number;\n }",
"public void setDatasetnumber(java.math.BigInteger datasetnumber)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DATASETNUMBER$4);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(DATASETNUMBER$4);\r\n }\r\n target.setBigIntegerValue(datasetnumber);\r\n }\r\n }",
"public void setEinoNumber(Long einoNumber) {\r\n this.einoNumber = einoNumber;\r\n }",
"public void setEmployeeId(Number value) {\r\n setAttributeInternal(EMPLOYEEID, value);\r\n }",
"public void setEmployeeId(Number value) {\n setAttributeInternal(EMPLOYEEID, value);\n }",
"public void setOheId(Number value) {\n setAttributeInternal(OHEID, value);\n }",
"public void setIdentifyCode(String identifyCode) {\n this.identifyCode = identifyCode == null ? null : identifyCode.trim();\n }",
"void setExpediteNumber(java.lang.String expediteNumber);",
"public void setNumber(int value) {\n this.number = value;\n }",
"public void setImoNumber(String imoNumber);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Total pot after call calculation | public static Float totPotAfterCall (Float amountToCall, Float eq, Float potOdds, Float ev){
float totPotAfterCall;
eq /= 100;
potOdds /=100;
totPotAfterCall= (amountToCall+ev)/eq;
return totPotAfterCall;
} | [
"public double checkPot(){\r\n\t\treturn totalPot;\r\n\t}",
"public void addPot(double bet){\r\n\t\ttotalPot += bet;\r\n\t\tSystem.out.println(\"Total money in pot: \" + money.format(checkPot()));\r\n\t}",
"public int punteggioTotale();",
"private double prixTotal() \r\n\t{\r\n\t\tdouble pt = getPrix() ; \r\n\t\t\r\n\t\tfor(Option o : option) \r\n\t\t\tpt += o.getPrix();\t\r\n\t\treturn pt;\r\n\t}",
"public void calcTotalWinning() {\r\n\t\tdouble sum = 0;\r\n\t\tDecimalFormat df = new DecimalFormat(\"#\");\r\n\t\tdf.setMaximumFractionDigits(2);\r\n\r\n\t\tfor(Component bp : betPane.getComponents()) {\r\n\t\t\tif(bp instanceof BetPanel) {\r\n\t\t\t\tsum = sum + ((BetPanel)bp).getStake().doubleValue() * ((BetPanel)bp).getOdds();\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t\ttotwinLabel.setText(df.format(sum) + \"€\");\r\n\t}",
"public int calculateTotal() {\n int goal = 0;\n int leftoverNum = this.leftOvers;\n int specialNum = this.specialOrders;\n int parNum = this.parNumber;\n\n if (parNum > leftoverNum) {\n goal = parNum - leftoverNum;\n }\n piesToBake = goal + specialNum;\n\n return piesToBake;\n }",
"public int getBetTotal();",
"public double obtenerPotencia(){\r\n\t\treturn ((this.getEstado()/100) * (this.getPotenciaMax()-this.getRelieveSuperficie()));\r\n\t}",
"public void subPot(double bet) {\r\n\t\ttotalPot -= bet;\r\n\t}",
"public int calcularVolumen(){\r\n return ancho * alto * profundo;\r\n }",
"public double calcTotal()\n\t{\n\t\tdouble total = 0.0;\n\t\tfor (int g = 0; g < mySize; g++)\n\t\t\ttotal += (myItems[g].getPrice() * myItems[g].getQuant());\n\t\treturn total;\n\t}",
"public void caltotalprice(){\n \tthis.mTotalPrice = 0;\n \tif (this.isCoachSeat) {\n \t\tfor (Flight f: this.mLegs) {\n \t\t\tthis.mTotalPrice += f.coachprice();\n \t\t}\n \t}else {\n \t\tfor (Flight f: this.mLegs) {\n \t\t\tthis.mTotalPrice += f.firstclassprice();\n \t\t}\n \t}\n }",
"public double getTotalManPokok() {\n return this.totalManPokok;\n }",
"public String getPot() {\n\t\tDecimalFormat moneyFormat = new DecimalFormat(\"'$'0.00\");\n\t\treturn moneyFormat.format(thePot);\n\t}",
"public double obtenerPotencia(){\r\n\t\treturn ((this.getEstado()/100)* (this.getPotenciaMax()-this.getParticulasEnSuperficie()\r\n\t\t\t\t\t- this.getRugosidadSuperficie()));\r\n\t}",
"public void getTotalAmount(){\r\n totalAmount = (this.child * 2.50) + (this.adult * 5.00);\r\n }",
"private int puntajeTotal() {\r\n\t\tint puntajeTotal=0;\r\n\t\tfor (Huevo h : listaHuevo) {\r\n\t\t\tpuntajeTotal+= h.getPuntaje();\r\n\t\t}\r\n\t\treturn puntajeTotal;\r\n\t}",
"private double totalPrice(){\n\n double sum = 0;\n\n for (CarComponent carComponent : componentsCart) {\n sum += (carComponent.getCompPrice() * carComponent.getCompQuantity()) ;\n }\n return sum;\n }",
"public void modifyPot(int mod){\n this.pot += mod;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct the GUI of the given JADEX agent (player). | PlayerGui(final IExternalAccess a) {
super(a.getAgentName());
myAgent = a;
// -------------------------------- NORTH --------------------------------
JPanel p = new JPanel();
GroupLayout layout = new GroupLayout(p);
p.setLayout(layout);
valueField = new JTextField(15);
valueField.setText(((Double)myAgent.getBeliefbase().getBelief("utility").getFact()).toString());
valueField.setEnabled(false);
valueField.setBorder(BorderFactory.createTitledBorder("Current utility"));
JCheckBox cb = new JCheckBox("Extended view", false);
cb.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent ie) {
if (ie.getStateChange() == ItemEvent.SELECTED) {
changeView(EXTENDED);
} else {
changeView(COMPACT);
}
} // End of overridden ItemListener.itemStateChanged() method
}); // End of the anonym ItemListener class
// Create a sequential group for the horizontal axis.
GroupLayout.SequentialGroup hGroup = layout.createSequentialGroup();
hGroup.addGroup(layout.createParallelGroup().addComponent(valueField));
hGroup.addGroup(layout.createParallelGroup().addComponent(cb));
layout.setHorizontalGroup(hGroup);
// Create a sequential group for the vertical axis.
GroupLayout.SequentialGroup vGroup = layout.createSequentialGroup();
vGroup.addGroup(layout.createParallelGroup(Alignment.BASELINE).addComponent(valueField).addComponent(cb));
layout.setVerticalGroup(vGroup);
getContentPane().add(p, BorderLayout.NORTH);
// -------------------------------- CENTER --------------------------------
p = new JPanel();
p.setLayout(new GridLayout(1, 1));
tadata = new DefaultTableModel(new String[]{"Play", "OppsName", "OppsRole", "MyRole", "OppsStrat", "MyStrat", "OppsPayoff", "MyPayoff", "MyUtility"}, 0);
tatable = new JTable(tadata) {
private static final long serialVersionUID = 1L;
// Override this method to paint the columns (really cells) with an alternate color
public Component prepareRenderer (TableCellRenderer renderer, int index_row, int index_col) {
Component comp = super.prepareRenderer(renderer, index_row, index_col);
// If column index is even (for a cell), and it is not selected, then...
if(index_col % 2 == 0 && !isCellSelected(index_row, index_col)) {
comp.setBackground(Color.lightGray);
} else {
comp.setBackground(Color.white);
}
return comp;
} // End of JTable.prepareRenderer() method
// Override this method to render cells' value with central alignment
public TableCellRenderer getCellRenderer(int row, int column) {
// Return this kind of object...
return new DefaultTableCellRenderer() {
private static final long serialVersionUID = 1L;
// ...with this method overridden this way!
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
JLabel renderedLabel = (JLabel)super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
renderedLabel.setHorizontalAlignment(SwingConstants.CENTER);
return renderedLabel;
} // End of DefaultTableCellRenderer.getTableCellRendererComponent() method
}; // End of (returned anonym) DefaultTableCellRenderer class
} // End of JTable.getCellRenderer() method
}; // End of JTable class
tatable.setEnabled(false);
JScrollPane sp = new JScrollPane(tatable);
p.add(sp);
p.setBorder(BorderFactory.createTitledBorder("History"));
p.setPreferredSize(new Dimension(0, 0));
tablePanel = p;
getContentPane().add(tablePanel, BorderLayout.CENTER);
// -------------------------------- SOUTH --------------------------------
/*chdata = new DefaultCategoryDataset();
// Value - of What - Where
chdata.addValue(((Double)myAgent.getBeliefbase().getBelief("utility").getFact()).doubleValue(), myAgent.getAgentName(), "0");
chchart = createChart(chdata);
ChartPanel chartPanel = new ChartPanel(chchart);
chartPanel.setPreferredSize(new Dimension(500, 270));
chartPanel.setBorder(BorderFactory.createTitledBorder("Utility over rounds"));
getContentPane().add(chartPanel, BorderLayout.SOUTH);*/
// Add a WindowListener to this Window to listen to windowClosing events.
// When such an event occurs, the corresponding Agent should be terminated.
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
myAgent.killAgent();
}
});
setResizable(false);
} | [
"public InventoryGUI () {\n\t\tthis.buildGUI();\n\t}",
"public void createChooseGameUI()\n {\n \tHashMap<InventoryRunnable, InventoryItem> inventoryStuff = new HashMap<InventoryRunnable, InventoryItem>();\n \t\n \tInventoryRunnable gladiatorJoinRunnable = new GladiatorJoinInventoryRunnable(plugin);\n \t\n \tArrayList<String> gladiatorLore = new ArrayList<String>();\n \tgladiatorLore.add(\"FIGHT TO THE DEATH AND WIN YOUR FREEDOM\");\n \tgladiatorLore.add(\"GOOD LUCK WARRIOR!\");\n \tInventoryItem gladiatorItem = new InventoryItem(plugin, Material.SHIELD, \"GLADIATOR\", gladiatorLore, 1, true, 1);\n \tinventoryStuff.put(gladiatorJoinRunnable, gladiatorItem);\n \t\n \tchooseGameUI = new GUIInventory(plugin, \"MINIGAMES\", inventoryStuff, 3);\n }",
"public void makeGUI()\n\t{\n\t\tbuttonPanel = new ButtonPanel(this,ship,planet);\n\t\tgamePanel = new GamePanel(this,ship,planet);\n\n\t\tJMenuBar menubar = new JMenuBar();\n\t\tJMenu menuHelp = new JMenu(\"Help\");\n\t\thelpItem = new JMenuItem(\"Help\");\n\t\tmenuHelp.add(helpItem);\n\t\tmenubar.add(menuHelp);\n\t\tsetJMenuBar(menubar);\n\n\t\tsounds = new AudioClip[2];\n\n\t\ttry\n\t\t{\n\t\t\turl = new URL(getCodeBase() + \"/thrust.au\");\n\t\t\tsounds[0] = Applet.newAudioClip(url);\n\t\t\turl = new URL(getCodeBase() + \"/crash.au\");\n\t\t\tsounds[1] = Applet.newAudioClip(url);\n\t\t}\n\t\tcatch(Exception e){}\n\n\t\thelpItem.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tif(e.getSource() == helpItem)\n\t\t\t\t{\n\t\t\t\t\tString helpMessage = \"The goal of the game is to land\\nthe ship on the red lines (pads).\\nThe ship must be completely contained\\nwithin the bounds of the red pad.\\nThere are 10 levels total\\nand you will have a certain amount\\nof time to complete each level.\\nGood Landing: velocities must be <10\\nOK Landing: velocities must be <20\\nThe ship's bottom must be facing the ground.\";\n\t\t\t\t\tJOptionPane.showMessageDialog(lander, helpMessage, \"Help Display\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tgetContentPane().add(gamePanel, BorderLayout.PAGE_START);\n\t\tgetContentPane().add(buttonPanel, BorderLayout.PAGE_END);\n\t\tsetVisible(true);\n\t}",
"private void createAndShowGUI(Properties appProperties) {\n //Create and set up the window.\n viewerFrame = new ViewerFrame(\"Ephrin - Proteomics Project Tracker\", instance, retrieveSortOptions(),\n retrieveCategories(), retrieveRecordUnits());\n }",
"private void createGUI() {\n\t\tPreferenceScreen screen = getPreferenceManager().createPreferenceScreen(this);\n\t\tsetPreferenceScreen(screen);\n\n\t\tcreateProviderCategory(screen);\n\t\tcreateUICategory(screen);\n\t\tcreateFeatureDetectionCategory(screen);\n\t\tcreateLivePreviewCategory(screen);\n\t}",
"private static void createAndShowUI() {\n\t\tframe = new JFrame();\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setBounds(100, 100, 1480, 820);\n\n\t\tframe.setContentPane(new GameDriver().getPanel());\n\t\t//frame.getContentPane().add(new GameDriver().getPanel());\n\t\tframe.setLocationRelativeTo(null);\n\t\tframe.setVisible(true);\n\t}",
"public PlayerGui(String avatarID){\n setOpaque(false);\n if (avatarID ==\"1\"){\n createDealerComponents();\n setLblName(\"Dealer\");\n setDealerBounds();\n addDealerComponents();\n createCards();\n setDealerCardBounds();\n } else {\n createPlayerComponents();\n setLblName(\"\");\n setLblBetAmount(\"\");\n setLblBudget(\"\");\n setPlayerBounds();\n addPlayerComponents();\n createCards();\n setPlayerCardBounds();\n }\n setLblAvatar(avatarID);\n initialize();\n }",
"public newPlayerUI() {\n initComponents();\n }",
"public void createAndShowGUI() {\n exitMenuItem = new JMenuItem(\"Exit\");\n howToPlayMenuItem = new JMenuItem(\"How to play\");\n aboutMenuItem = new JMenuItem(\"About Fat Dominoes\");\n exitMenuItem.addActionListener(new ActionListener() {\n \t\tpublic void actionPerformed(ActionEvent actionEvent) {\n \t\t\tconfirmExit();\n \t\t}\n });\n \n // Load the file containing text for the help dialog and copy contents into helpText string\n ClassLoader classLoader = this.getClass().getClassLoader();\n\t\t\tInputStream inputStream = classLoader.getResourceAsStream(HELP_FILE_LOCATION);\n\t\t\tStringBuffer stringBuffer = new StringBuffer();\n\t\t\tif(inputStream == null)\n\t\t\t\thelpText = \"Help file not found\";\n\t\t\telse {\n\t\t\t\tScanner scanner = new Scanner(inputStream);\n\t\t\t\twhile (scanner.hasNext ())\n\t\t\t\t\tstringBuffer.append (scanner.nextLine ());\n\t\t\t\tscanner.close();\n\t\t\t\thelpText = new String(stringBuffer);\n\t\t\t}\n // create menu items and menu bar\n howToPlayMenuItem.addActionListener(new ActionListener() {\n \t\tpublic void actionPerformed(ActionEvent actionEvent) {\n \t\t\tboolean gameWasAlreadyPaused = isPaused();\n \t\t\tif(isGameInProgress() && !gameWasAlreadyPaused)\n \t\t\t\tpauseGame();\n \t\t\tJOptionPane.showMessageDialog(getContentPane(), helpText, \"Fat Dominoes Help\", JOptionPane.QUESTION_MESSAGE);\n \t\t\tif(isGameInProgress() && !gameWasAlreadyPaused)\n \t\t\t\tresumeGame();\n \t\t}\n });\n aboutMenuItem.addActionListener(new ActionListener() {\n \t\tpublic void actionPerformed(ActionEvent actionEvent) {\n \t\t\tboolean gameWasAlreadyPaused = isPaused();\n \t\t\tif(isGameInProgress() && !gameWasAlreadyPaused)\n \t\t\t\tpauseGame();\n \t\t\t\t\n \t\t\tBone bone = new Bone(6, 6);\n \t\t\tBoneIcon boneIcon = new BoneIcon(bone);\n \t\t\tboneIcon.rotate();\n \t\t\tString credits = \"This game was created by Matt Wildman and Ben Griffiths.\\n\"\n \t\t\t\t\t\t + \"The game logic was provided to us by Keith and Oded\";\n \t\t\tJOptionPane.showMessageDialog(getContentPane(), credits, \"About Fat Dominoes\", JOptionPane.INFORMATION_MESSAGE, boneIcon);\n \t\t\tif(isGameInProgress() && !gameWasAlreadyPaused)\n \t\t\t\tresumeGame();\n \t\t}\n });\n gameMenu = new JMenu(\"Game\");\n gameMenu.add(exitMenuItem);\n helpMenu = new JMenu(\"Help\");\n helpMenu.add(howToPlayMenuItem);\n helpMenu.add(aboutMenuItem);\n gameMenuBar = new JMenuBar();\n gameMenuBar.add(gameMenu);\n gameMenuBar.add(helpMenu);\n this.setJMenuBar(gameMenuBar);\n this.setTitle(\"Fat Dominoes\");\n \n // create config panel and game options\n configPanel = new ConfigPanel();\n this.setContentPane(configPanel);\n \tstartGameButton = configPanel.getStartGameButton();\n startGameButton.addActionListener(new ActionListener() {\n \t\tpublic void actionPerformed(ActionEvent actionEvent) {\n \t\t\tstartGame();\n \t\t}\n \t});\n startGameButton.setPreferredSize(DominoesStyle.getButtonDimension());\n \n // prepare window\n this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n this.setPreferredSize(DominoesStyle.getWindowDimension());\n this.setMinimumSize(DominoesStyle.getWindowDimension());\n this.addWindowListener(new WindowListener() {\n \t@Override\n\t\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\t\tconfirmExit();\n\t\t\t\t}\n\t\t\t\t@Override\n\t\t\t\tpublic void windowActivated(WindowEvent e) {\n\t\t\t\t}\n\t\t\t\t@Override\n\t\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\t}\n\t\t\t\t@Override\n\t\t\t\tpublic void windowDeactivated(WindowEvent e) {\t\n\t\t\t\t}\n\t\t\t\t@Override\n\t\t\t\tpublic void windowDeiconified(WindowEvent e) {\n\t\t\t\t}\n\t\t\t\t@Override\n\t\t\t\tpublic void windowIconified(WindowEvent e) {\n\t\t\t\t}\n\t\t\t\t@Override\n\t\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t}\n });\n this.setVisible(true);\n this.addComponentListener(new ComponentAdapter() { // component Listener to respond to window resizing\n public void componentResized(ComponentEvent e) {\n JFrame frame = (JFrame)e.getSource();\n frame.validate();\n }\n });\n }",
"public PlayerGUI() {\n initComponents();\n }",
"void buildGUI()\n { /* buildGUI */\n String displayMsg;\n Button\n yesButton= new Button(yesMsg),\n noButton= new Button(noMsg);\n Label label;\n \n yesButton.addActionListener(this);\n noButton.addActionListener(this);\n \n displayMsg= (msg!=null) ? msg : \"Choose \"+yesMsg+\" or \"+noMsg;\n label= new Label(displayMsg);\n \n Panel\n buttonPanel= new Panel(),\n mainPanel= new Panel(new BorderLayout());\n \n buttonPanel.add(yesButton);\n buttonPanel.add(noButton);\n mainPanel.add(label,BorderLayout.NORTH);\n mainPanel.add(buttonPanel,BorderLayout.SOUTH);\n \n this.add(mainPanel);\n this.setSize(250,300);\n this.setTitle(displayMsg);\n this.pack();\n \n /* put the Dialog box in the middle of the frame */\n Dimension\n myDim= getSize(),\n frameDim= f.getSize(),\n screenSize= getToolkit().getScreenSize();\n Point loc= f.getLocation();\n \n loc.translate((frameDim.width - myDim.width)/2,\n (frameDim.height - myDim.height)/2);\n loc.x= Math.max(0,Math.min(loc.x,screenSize.width - getSize().width));\n loc.y= Math.max(0,Math.min(loc.y, screenSize.height - getSize().height));\n \n setLocation(loc.x,loc.y);\n this.setVisible(true);\n }",
"protected void createAndShowGUI() {\n\t //Create and set up the window.\n\t\t \tjframe.setTitle(\"Tags Catalog\");\n\t jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); \n\t jframe.pack();\n\t jframe.setVisible(true);\n\t }",
"public BonusGUI createBonusGUI() {\n\t\tBonusGUI gui = new BonusGUI(gameView.getMainPanel(), bonusController);\n\t\t\n\t\t//Give bonus controller the reference to the bonus GUI\n\t\tbonusController.setBonusGUIView(gui);\n\t\treturn gui;\n\t}",
"public void showGUI() {\r\n\t\t\r\n\t\tthis.makeTextScroll();\r\n\t\tthis.makePanel();\r\n\t\tthis.makeFrame();\r\n\t}",
"public GUI()\n {\n createGUI(); \n }",
"public void createGUI() {\n\n\t\tcontents = getContentPane();\n\t\tcontents.setLayout(new GridLayout(size, size));\n\n\t\t// Set Up Menu Bar\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tsetJMenuBar(menuBar);\n\n\t\tJMenu game = new JMenu(\"Game\");\n\t\tmenuBar.add(game);\n\t\tJMenuItem clearBoard = new JMenuItem(\"New Game\");\n\t\tgame.add(clearBoard);\n\t\tJMenuItem boardSize = new JMenuItem(\"Change Size\");\n\t\tgame.add(boardSize);\n\t\tJMenuItem exit = new JMenuItem(\"Exit\");\n\t\tgame.add(exit);\n\n\t\tJMenu help = new JMenu(\"Help\");\n\t\tmenuBar.add(help);\n\t\tJMenuItem rules = new JMenuItem(\"How to Play\");\n\t\thelp.add(rules);\n\t\tJMenuItem about = new JMenuItem(\"About\");\n\t\thelp.add(about);\n\n\t\tJMenu playerSelect = new JMenu(\"Players: \" + players);\n\t\tmenuBar.add(playerSelect);\n\t\tJMenuItem players2 = new JMenuItem(\"2 Player Game\");\n\t\tplayerSelect.add(players2);\n\t\tJMenuItem players3 = new JMenuItem(\"3 Player Game\");\n\t\tplayerSelect.add(players3);\n\t\tJMenuItem players4 = new JMenuItem(\"4 Player Game\");\n\t\tplayerSelect.add(players4);\n\n\t\tmenuBar.add(Box.createHorizontalGlue());\n\n\t\tplayerTurnLbl.setFont(new Font(\"Lucida Grande\", Font.BOLD, 12)); // Player 1's Turn\n\t\tmenuBar.add(playerTurnLbl);\n\t\tplayerTurnLbl.setVisible(true);\n\n\t\tinvalidMoveLbl.setFont(new Font(\"Lucida Grande\", Font.BOLD, 12)); // Invalid Move Alert\n\t\tinvalidMoveLbl.setForeground(Color.RED);\n\t\tmenuBar.add(invalidMoveLbl);\n\t\tinvalidMoveLbl.setVisible(false);\n\n\t\t// Exit Button Action\n\t\texit.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\n\t\t// Board Size Button Action\n\t\tboardSize.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\trestartGame();\n\t\t\t}\n\t\t});\n\n\t\t// Reset Board Button Action\n\t\tclearBoard.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tresetBoard();\n\t\t\t}\n\t\t});\n\n\t\t// Rules Button Action\n\t\trules.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\"1. Players take turns moving up, down, left, or right to generate a self-avoiding walk.\\n\\tClick on a square to make your move.\\n\\n2. A player who makes a self-intersecting move loses the game. \\n\\n3. A player can win the game by making a self-intersecting move that creates a self-avoiding polygon.\\n\\tThis is only valid after at least 4 moves.\",\n\t\t\t\t\t\t\"Self-Avoiding Walk Game Rules\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t}\n\t\t});\n\n\t\t// About Button Action\n\t\tabout.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\"Self-Avoiding Walk Multiplayer Game\\nDeveloped by Adam Binder\\nCopyright 2019\", \"About\",\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\t\t}\n\t\t});\n\n\t\t// 2 Player Button Action\n\t\tplayers2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tplayers = 2;\n\t\t\t\tresetBoard();\n\t\t\t}\n\t\t});\n\n\t\t// 3 Player Button Action\n\t\tplayers3.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tplayers = 3;\n\t\t\t\tresetBoard();\n\t\t\t}\n\t\t});\n\n\t\t// 4 Player Button Action\n\t\tplayers4.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tplayers = 4;\n\t\t\t\tresetBoard();\n\t\t\t}\n\t\t});\n\n\t\t// Create event handlers:\n\t\tButtonHandler buttonHandler = new ButtonHandler();\n\n\t\t// Create and add board components:\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tfor (int j = 0; j < size; j++) {\n\t\t\t\tsquares[i][j] = new JButton();\n\t\t\t\tsquares[i][j].setBorder(null);\n\t\t\t\tsquares[i][j].setOpaque(true);\n\t\t\t\tsquares[i][j].setBorderPainted(false);\n\t\t\t\tif ((i + j) % 2 != 0) {\n\t\t\t\t\tsquares[i][j].setBackground(colorGray);\n\t\t\t\t\tsquares[i][j].setBorder(null);\n\t\t\t\t\tsquares[i][j].setOpaque(true);\n\t\t\t\t}\n\t\t\t\tcontents.add(squares[i][j]);\n\t\t\t\tsquares[i][j].addActionListener(buttonHandler);\n\t\t\t}\n\t\t}\n\t}",
"public void createSelectDealerScreen() {\r\n\t\t//Create the needed player labels.\r\n\t\tplayer1IsDealer.setLabel(\" \" + Main.player1);\r\n\t\tplayer2IsDealer.setLabel(\" \" + Main.player2);\r\n\t\tplayer3IsDealer.setLabel(\" \" + Main.player3);\r\n\t\tplayer4IsDealer.setLabel(\" \" + Main.player4);\r\n\t\t\r\n\t\t//Create the 3 panel components of the screen.\r\n\t\tupperPanel = FrameUtils.makeUpperPanel(\"select dealer\");\r\n\t\tmiddlePanel = FrameUtils.makeMiddlePanel();\r\n\t\tlowerPanel = FrameUtils.makeLowerPanel();\r\n\t\t\r\n\t\t//Makes all the needed buttons.\r\n\t\tbuttonReturnDealer = FrameUtils.makeButton(\" Return \", \"returnDealer\", false);\r\n\t\tbuttonReturnDealer.addActionListener(this);\r\n\t\t\r\n\t\t//Adds the buttons to the proper panels.\r\n\t\tlowerPanel.add(buttonReturnDealer);\r\n\r\n\t\t//Add items to the middle panel.\r\n\t\tmiddlePanel.setLayout(new GridBagLayout());\r\n\t\tmiddlePanel.add(player1IsDealer, FrameUtils.gbLayoutWest(0, 0));\r\n\t\tmiddlePanel.add(player2IsDealer, FrameUtils.gbLayoutWest(0, 1));\r\n\t\tmiddlePanel.add(player3IsDealer, FrameUtils.gbLayoutWest(0, 2));\r\n\t\t\r\n\t\t//Don't show fourth player if playing 3 handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tmiddlePanel.add(player4IsDealer, FrameUtils.gbLayoutWest(0, 3));\r\n\t\t}\r\n\t\t\r\n\t\t//Makes the selected dealer show if it was set already.\r\n\t\tUtils.showPreviousSelectedDealer();\r\n\t\t\r\n\t\t//This adds all the panels to the frame.\r\n\t\tframe.add(upperPanel, BorderLayout.NORTH);\r\n\t\tframe.add(middlePanel, BorderLayout.CENTER);\r\n\t\tframe.add(lowerPanel, BorderLayout.SOUTH);\r\n\t\t\r\n\t\tframe.setVisible(true);\r\n\t}",
"private static void createAndShowGUI() {\n\t\t//creating the GUI\n\t\tPhotoViewer myViewer = new PhotoViewer();\n\n\t\t//setting the title\n\t\tmyViewer.setTitle(\"Cameron Chiaramonte (ccc7sej)\");\n\n\t\t//making sure it will close when the x is clicked\n\t\tmyViewer.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\t//calling the method to add the components to the pane and then making it visible\n\t\tmyViewer.addComponentsToPane(myViewer.getContentPane());\n\t\tmyViewer.pack();\n\t\tmyViewer.setVisible(true);\n\t}",
"public AirbnbGUI() \n {\n makeFrame();\n createArray();\n nameToXs = new HashMap<String,Integer>();\n coordinates = new HashMap<Integer,Integer>();\n statistic = new Statistics();\n addBoroughXCoordinates();\n addStatisticsFrame();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the custom item manager. | public CustomItemManager getCustomItemManager() {
return plugin.getCustomItemManager();
} | [
"public final static ItemManager getItemManager() {\r\n\t\treturn itemManager;\r\n\t}",
"public abstract SpecialItemManager getSpecialItemManager();",
"public CXItemManager getItemManager() {\n \treturn iman;\n }",
"public static ItemManager getInstance() {\n synchronized (ItemManager.class) {\n if (ourInstance == null) {\n ourInstance = new ItemManager();\n }\n }\n\n return ourInstance;\n }",
"public static ItemManager getInstance() {\n return inst;\n }",
"Manager getManager() {\n return Manager.getInstance();\n }",
"private Manager getManager()\n {\n return Manager.getInstance();\n }",
"public Manager getManager();",
"public final T getManager() {\n return this.manager;\n }",
"public static KBmanager getMgr() {\n\n if (manager == null) \n manager = new KBmanager(); \n return manager;\n }",
"public static EntityManagerAPI getManager() {\n\t\treturn instance;\n\t}",
"public SootClassManager getManager() throws NotManagedException\n {\n return manager;\n }",
"public static InventoryManager getInventoryManager() {\n return INSTANCE;\n }",
"public static MenuManager getManager(PopupMenuExtender pm) {\r\n\t\t\r\n\t\t//3.3 and above supports\r\n\t\tif (jdtUIVer.compareTo(TripleInt.of(3,3,0)) >= 0 ){\r\n\t\t\t//get the method\r\n\t\t\ttry {\r\n\t\t\t\tMethod mth = PopupMenuExtender.class.getMethod(\"getManager\");\r\n\t\t\t\treturn (MenuManager) mth.invoke(pm);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tSystem.err.println(\"Issue stemming from method getManager in PopupMenuEvent\" + e);\r\n\t\t\t} \r\n\t\t}\r\n\t\t\r\n\t\tMenuManager theManager = null;\r\n\t\t\r\n\t\t//Below suited for eclipse 3.2\r\n\t\ttry{\r\n\t\t\tField theMenu = PopupMenuExtender.class.getDeclaredField(\"menu\");\r\n\t\t\ttheMenu.setAccessible(true);\r\n\t\t\t\r\n\t\t\ttheManager = (MenuManager) theMenu.get(pm);\r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.err.println(\"Issue with menu variable in PopupMenuExtender class: \" + e);\r\n\t\t}\r\n\t\treturn theManager;\r\n\t}",
"public java.lang.String getManager() {\n return manager;\n }",
"MobManager getMobManager();",
"public GUIManager getManager(){\n\t\treturn manager;\n\t}",
"public ObjectManager getObjectManager() {\n\treturn this.objectManager;\n }",
"public MusicManager getMusicManger() {\n return this.musicManager;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
forward all routes "/" except "/." to index.html | @GetMapping("/{angularRoute:^[^.]+$}")
public String index(@PathVariable String angularRoute) {
return "forward:/index.html";
} | [
"@Override\n protected String[] getServletMappings() {\n return new String[] { \"/\" };\n }",
"@GetMapping(value = \"{_:^(?!index\\\\.html|api).$}\")\n public String redirectApi() {\n LOG.info(\"URL entered directly into the Browser, so we need to redirect...\");\n return \"forward:/\";\n }",
"@GetMapping(value = {\"/\", \"\"})\n public String index(){\n\n return \"redirect:/home_admin\";\n }",
"public String redirectToIndex(){\n return \"index\";\n }",
"public Route http() {\n return route(\n pathEndOrSingleSlash(() ->\n redirect(Uri.create(\"index.html\"), StatusCodes.PERMANENT_REDIRECT)\n ),\n pathPrefix(\"conversations\", () ->\n conversations()\n ),\n getFromResourceDirectory(\"http\")\n );\n }",
"@RequestMapping(value=\"/\", method=RequestMethod.GET)\n \tpublic ModelAndView handleRoot(HttpServletRequest request){\n \t\tRedirectView rv = new RedirectView(\"/search\",true);\n \t\trv.setStatusCode(HttpStatus.MOVED_PERMANENTLY);\n \t\tModelAndView mv = new ModelAndView(rv);\n \t\treturn mv;\n \t}",
"@Override\n public void init(Router router) {\n\n // /////////////////////////////////////////////////////////////////////\n // some default functions\n // /////////////////////////////////////////////////////////////////////\n // simply render a page:\n router.GET().route(\"/\").with(ApplicationController.class, \"index\");\n router.GET().route(\"/examples\").with(ApplicationController.class, \"examples\");\n\n // render a page with variable route parts:\n router.GET().route(\"/user/{id}/{email}/userDashboard\").with(ApplicationController.class, \"userDashboard\");\n\n router.GET().route(\"/validation\").with(ApplicationController.class, \"validation\");\n\n // redirect back to /\n router.GET().route(\"/redirect\").with(ApplicationController.class, \"redirect\");\n\n router.GET().route(\"/session\").with(ApplicationController.class, \"session\");\n \n router.GET().route(\"/flash_success\").with(ApplicationController.class, \"flashSuccess\");\n router.GET().route(\"/flash_error\").with(ApplicationController.class, \"flashError\");\n router.GET().route(\"/flash_any\").with(ApplicationController.class, \"flashAny\");\n \n router.GET().route(\"/htmlEscaping\").with(ApplicationController.class, \"htmlEscaping\");\n\n // /////////////////////////////////////////////////////////////////////\n // Json support\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/api/person.json\").with(PersonController.class, \"getPersonJson\");\n router.POST().route(\"/api/person.json\").with(PersonController.class, \"postPersonJson\");\n \n router.GET().route(\"/api/person.xml\").with(PersonController.class, \"getPersonXml\");\n router.POST().route(\"/api/person.xml\").with(PersonController.class, \"postPersonXml\");\n\n // /////////////////////////////////////////////////////////////////////\n // Form parsing support\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/contactForm\").with(ApplicationController.class, \"contactForm\");\n router.POST().route(\"/contactForm\").with(ApplicationController.class, \"postContactForm\");\n\n // /////////////////////////////////////////////////////////////////////\n // Cache support test\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/test_caching\").with(ApplicationController.class, \"testCaching\");\n \n // /////////////////////////////////////////////////////////////////////\n // Lifecycle support\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/udpcount\").with(UdpPingController.class, \"getCount\");\n \n // /////////////////////////////////////////////////////////////////////\n // Route filtering example:\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/filter\").with(FilterController.class, \"filter\");\n router.GET().route(\"/teapot\").with(FilterController.class, \"teapot\");\n\n // /////////////////////////////////////////////////////////////////////\n // Route filtering example:\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/injection\").with(InjectionExampleController.class, \"injection\");\n\n // /////////////////////////////////////////////////////////////////////\n // Async example:\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/async\").with(AsyncController.class, \"asyncEcho\");\n\n // /////////////////////////////////////////////////////////////////////\n // I18n:\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/i18n\").with(I18nController.class, \"index\");\n router.GET().route(\"/i18n/{language}\").with(I18nController.class, \"indexWithLanguage\");\n\n // /////////////////////////////////////////////////////////////////////\n // Upload showcase\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/upload\").with(UploadController.class, \"upload\");\n router.POST().route(\"/uploadFinish\").with(UploadController.class, \"uploadFinish\");\n \n \n //this is a route that should only be accessible when NOT in production\n // this is tested in RoutesTest\n if (!ninjaProperties.isProd()) {\n router.GET().route(\"/_test/testPage\").with(ApplicationController.class, \"testPage\");\n }\n\n router.GET().route(\"/assets/.*\").with(AssetsController.class, \"serve\");\n }",
"@GetMapping(\"/\")\n public ModelAndView home() {\n return new ModelAndView(\"redirect:\" + \"swagger-ui.html\");\n }",
"@RequestMapping(value = {\"/\",\"/index\",\"/home\"})\n\tpublic ModelAndView index() {\n\t\t return new ModelAndView(\"form\").addObject(\"welcome\",\"Asalam o Alykum\");\n\t\t\t\n\t}",
"public void configureRoutes() {\n Service http = Service.ignite();\n\n http.port( 6001 );\n\n http.after( ( (request, response) -> response.type(\"application/json\" ) ) );\n\n http.post( \"/accounts/authenticate\", this.authRoutes.authenticate );\n http.post( \"/restaurants/authenticate\", this.authRoutes.authenticateRestaurant );\n\n http.post( \"*\", (req, res) -> {\n res.status( HttpStatus.NOT_FOUND_404 );\n\n return \"{}\";\n } );\n }",
"@Override protected void configureServlets() {\n serveRegex(\"^/(?!_ah).*\").with(HandlerServlet.class);\n // serves xmpp urls\n serveRegex(\"/_ah/xmpp/.*\").with(HandlerServlet.class);\n }",
"ModelAndView serveAppRoot() {\n if (runtimeConfiguration.showDebug()) {\n return serveDebugPage();\n } else {\n RedirectView rv = new RedirectView();\n rv.setStatusCode(HttpStatus.MOVED_PERMANENTLY);\n rv.setUrl(runtimeConfiguration.getRootRedirect());\n return new ModelAndView(rv);\n }\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n System.out.println(\"before redirect \");\n\n //response.sendRedirect(\"index.jsp\");//url - change to index.jsp\n //http://localhost:8080/2019211001001005XiaZikun_war_exploded/redirect\n //http://localhost:8080/2019211001001005XiaZikun_war_exploded/index.jsp\n // see the url - only last part of url changed ( redirect --> index.jsp )\n System.out.println(\"after redirect \");\n //2. start with/\n //response.sendRedirect(\"/2019211001001005XiaZikun_war_exploded/index.jsp\");//??? -- HTTP Status 404 - Not Found\n //http://localhost:8080/2019211001001005XiaZikun_war_exploded/redirect\n //http://localhost:8080/index.jsp\n //url change after 8080 - means tomcat\n\n //redirect - another server - Absolute URL\n response.sendRedirect(\"http://www.baidu.com/\");\n //http://www.baidu.com/\n }",
"public static Result index() {\n return redirect(routes.Login.profLogin());\n }",
"@GetMapping(\"\")\r\n @ResponseStatus(code = HttpStatus.OK)\r\n public void main() {\r\n LOGGER.info(\"GET /\");\r\n }",
"@SneakyThrows\n @GetMapping(\"/{path:(?!oauth|assets|webjars).*$}/**\")\n void fallback(final HttpServletResponse res) {\n System.out.println(servletContext.getContextPath());\n res.sendRedirect(servletContext.getContextPath());\n }",
"@RequestMapping(value = \"/\", method = RequestMethod.GET)\r\n\tpublic String openHomePage() {\r\n\t\treturn \"home\";\r\n\t}",
"private void registerRoutes() {\n get(\"/\", (req, res) -> \"Gateway api\");\n new PotenController();\n new MySensorMessagesController();\n }",
"@RequestMapping(\"/\")\n\tpublic String start() {\n\t\treturn \"response\"; //for home.jsp\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method corresponds to the database table wb_data | WbData selectByPrimaryKey(Integer dataId); | [
"BTable createBTable();",
"@SuppressWarnings(\"deprecation\")\n private void initDataTable() {\n dataTable = DataTable.create();\n \n // Columns have explicit ids so that they can addressed by Rhizosphere code\n // (see metamodel definition below).\n dataTable.addColumn(ColumnType.STRING, \"Name\", \"name\");\n dataTable.addColumn(ColumnType.NUMBER, \"Weight\", \"weight\");\n dataTable.addColumn(ColumnType.NUMBER, \"Height\", \"height\");\n dataTable.addColumn(ColumnType.DATE, \"Date Of Birth\", \"dob\");\n dataTable.addRows(5);\n dataTable.setValue(0, 0, \"Bob\");\n dataTable.setValue(0, 1, 8);\n dataTable.setValue(0, 2, 65);\n dataTable.setValue(0, 3, new Date(109, 9, 16));\n \n dataTable.setValue(1, 0, \"Alice\");\n dataTable.setValue(1, 1, 4);\n dataTable.setValue(1, 2, 56);\n dataTable.setValue(1, 3, new Date(110, 11, 4));\n \n dataTable.setValue(2, 0, \"Mary\");\n dataTable.setValue(2, 1, 11);\n dataTable.setValue(2, 2, 72);\n dataTable.setValue(2, 3, new Date(109, 6, 21));\n \n dataTable.setValue(3, 0, \"Victoria\");\n dataTable.setValue(3, 1, 3);\n dataTable.setValue(3, 2, 51);\n dataTable.setValue(3, 3, new Date(110, 3, 28));\n \n dataTable.setValue(4, 0, \"Robert\");\n dataTable.setValue(4, 1, 6);\n dataTable.setValue(4, 2, 60);\n dataTable.setValue(4, 3, new Date(108, 2, 3));\n }",
"@SuppressWarnings(\"all\")\npublic interface I_I_BankDataJP \n{\n\n /** TableName=I_BankDataJP */\n public static final String Table_Name = \"I_BankDataJP\";\n\n /** AD_Table_ID=1000307 */\n public static final int Table_ID = MTable.getTable_ID(Table_Name);\n\n KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);\n\n /** AccessLevel = 3 - Client - Org \n */\n BigDecimal accessLevel = BigDecimal.valueOf(3);\n\n /** Load Meta Data */\n\n /** Column name AD_Client_ID */\n public static final String COLUMNNAME_AD_Client_ID = \"AD_Client_ID\";\n\n\t/** Get Tenant.\n\t * Tenant for this installation.\n\t */\n\tpublic int getAD_Client_ID();\n\n /** Column name AD_OrgTrx_ID */\n public static final String COLUMNNAME_AD_OrgTrx_ID = \"AD_OrgTrx_ID\";\n\n\t/** Set Trx Organization.\n\t * Performing or initiating organization\n\t */\n\tpublic void setAD_OrgTrx_ID (int AD_OrgTrx_ID);\n\n\t/** Get Trx Organization.\n\t * Performing or initiating organization\n\t */\n\tpublic int getAD_OrgTrx_ID();\n\n /** Column name AD_Org_ID */\n public static final String COLUMNNAME_AD_Org_ID = \"AD_Org_ID\";\n\n\t/** Set Organization.\n\t * Organizational entity within tenant\n\t */\n\tpublic void setAD_Org_ID (int AD_Org_ID);\n\n\t/** Get Organization.\n\t * Organizational entity within tenant\n\t */\n\tpublic int getAD_Org_ID();\n\n /** Column name AccountNo */\n public static final String COLUMNNAME_AccountNo = \"AccountNo\";\n\n\t/** Set Account No.\n\t * Account Number\n\t */\n\tpublic void setAccountNo (String AccountNo);\n\n\t/** Get Account No.\n\t * Account Number\n\t */\n\tpublic String getAccountNo();\n\n /** Column name BankAccountType */\n public static final String COLUMNNAME_BankAccountType = \"BankAccountType\";\n\n\t/** Set Bank Account Type.\n\t * Bank Account Type\n\t */\n\tpublic void setBankAccountType (String BankAccountType);\n\n\t/** Get Bank Account Type.\n\t * Bank Account Type\n\t */\n\tpublic String getBankAccountType();\n\n /** Column name C_BankAccount_ID */\n public static final String COLUMNNAME_C_BankAccount_ID = \"C_BankAccount_ID\";\n\n\t/** Set Bank Account.\n\t * Account at the Bank\n\t */\n\tpublic void setC_BankAccount_ID (int C_BankAccount_ID);\n\n\t/** Get Bank Account.\n\t * Account at the Bank\n\t */\n\tpublic int getC_BankAccount_ID();\n\n\tpublic org.compiere.model.I_C_BankAccount getC_BankAccount() throws RuntimeException;\n\n /** Column name C_Bank_ID */\n public static final String COLUMNNAME_C_Bank_ID = \"C_Bank_ID\";\n\n\t/** Set Bank.\n\t * Bank\n\t */\n\tpublic void setC_Bank_ID (int C_Bank_ID);\n\n\t/** Get Bank.\n\t * Bank\n\t */\n\tpublic int getC_Bank_ID();\n\n\tpublic org.compiere.model.I_C_Bank getC_Bank() throws RuntimeException;\n\n /** Column name Created */\n public static final String COLUMNNAME_Created = \"Created\";\n\n\t/** Get Created.\n\t * Date this record was created\n\t */\n\tpublic Timestamp getCreated();\n\n /** Column name CreatedBy */\n public static final String COLUMNNAME_CreatedBy = \"CreatedBy\";\n\n\t/** Get Created By.\n\t * User who created this records\n\t */\n\tpublic int getCreatedBy();\n\n /** Column name DateAcct */\n public static final String COLUMNNAME_DateAcct = \"DateAcct\";\n\n\t/** Set Account Date.\n\t * Accounting Date\n\t */\n\tpublic void setDateAcct (Timestamp DateAcct);\n\n\t/** Get Account Date.\n\t * Accounting Date\n\t */\n\tpublic Timestamp getDateAcct();\n\n /** Column name I_BankDataJP_ID */\n public static final String COLUMNNAME_I_BankDataJP_ID = \"I_BankDataJP_ID\";\n\n\t/** Set I_BankDataJP.\n\t * JPIERE-0595:JPBP\n\t */\n\tpublic void setI_BankDataJP_ID (int I_BankDataJP_ID);\n\n\t/** Get I_BankDataJP.\n\t * JPIERE-0595:JPBP\n\t */\n\tpublic int getI_BankDataJP_ID();\n\n /** Column name I_BankDataJP_UU */\n public static final String COLUMNNAME_I_BankDataJP_UU = \"I_BankDataJP_UU\";\n\n\t/** Set I_BankDataJP_UU\t */\n\tpublic void setI_BankDataJP_UU (String I_BankDataJP_UU);\n\n\t/** Get I_BankDataJP_UU\t */\n\tpublic String getI_BankDataJP_UU();\n\n /** Column name I_ErrorMsg */\n public static final String COLUMNNAME_I_ErrorMsg = \"I_ErrorMsg\";\n\n\t/** Set Import Error Message.\n\t * Messages generated from import process\n\t */\n\tpublic void setI_ErrorMsg (String I_ErrorMsg);\n\n\t/** Get Import Error Message.\n\t * Messages generated from import process\n\t */\n\tpublic String getI_ErrorMsg();\n\n /** Column name I_IsImported */\n public static final String COLUMNNAME_I_IsImported = \"I_IsImported\";\n\n\t/** Set Imported.\n\t * Has this import been processed\n\t */\n\tpublic void setI_IsImported (boolean I_IsImported);\n\n\t/** Get Imported.\n\t * Has this import been processed\n\t */\n\tpublic boolean isI_IsImported();\n\n /** Column name IsActive */\n public static final String COLUMNNAME_IsActive = \"IsActive\";\n\n\t/** Set Active.\n\t * The record is active in the system\n\t */\n\tpublic void setIsActive (boolean IsActive);\n\n\t/** Get Active.\n\t * The record is active in the system\n\t */\n\tpublic boolean isActive();\n\n /** Column name JP_A_Name */\n public static final String COLUMNNAME_JP_A_Name = \"JP_A_Name\";\n\n\t/** Set Account Name\t */\n\tpublic void setJP_A_Name (String JP_A_Name);\n\n\t/** Get Account Name\t */\n\tpublic String getJP_A_Name();\n\n /** Column name JP_A_Name_Kana */\n public static final String COLUMNNAME_JP_A_Name_Kana = \"JP_A_Name_Kana\";\n\n\t/** Set Account Name(Kana)\t */\n\tpublic void setJP_A_Name_Kana (String JP_A_Name_Kana);\n\n\t/** Get Account Name(Kana)\t */\n\tpublic String getJP_A_Name_Kana();\n\n /** Column name JP_AcctDate */\n public static final String COLUMNNAME_JP_AcctDate = \"JP_AcctDate\";\n\n\t/** Set Date of Account Date\t */\n\tpublic void setJP_AcctDate (String JP_AcctDate);\n\n\t/** Get Date of Account Date\t */\n\tpublic String getJP_AcctDate();\n\n /** Column name JP_AcctMonth */\n public static final String COLUMNNAME_JP_AcctMonth = \"JP_AcctMonth\";\n\n\t/** Set Month of Account Date\t */\n\tpublic void setJP_AcctMonth (String JP_AcctMonth);\n\n\t/** Get Month of Account Date\t */\n\tpublic String getJP_AcctMonth();\n\n /** Column name JP_BankAccountType */\n public static final String COLUMNNAME_JP_BankAccountType = \"JP_BankAccountType\";\n\n\t/** Set Bank Account Type\t */\n\tpublic void setJP_BankAccountType (String JP_BankAccountType);\n\n\t/** Get Bank Account Type\t */\n\tpublic String getJP_BankAccountType();\n\n /** Column name JP_BankAccount_Value */\n public static final String COLUMNNAME_JP_BankAccount_Value = \"JP_BankAccount_Value\";\n\n\t/** Set Bank Account(Search Key)\t */\n\tpublic void setJP_BankAccount_Value (String JP_BankAccount_Value);\n\n\t/** Get Bank Account(Search Key)\t */\n\tpublic String getJP_BankAccount_Value();\n\n /** Column name JP_BankDataCustomerCode1 */\n public static final String COLUMNNAME_JP_BankDataCustomerCode1 = \"JP_BankDataCustomerCode1\";\n\n\t/** Set Bank Data Customer Code1\t */\n\tpublic void setJP_BankDataCustomerCode1 (String JP_BankDataCustomerCode1);\n\n\t/** Get Bank Data Customer Code1\t */\n\tpublic String getJP_BankDataCustomerCode1();\n\n /** Column name JP_BankDataCustomerCode2 */\n public static final String COLUMNNAME_JP_BankDataCustomerCode2 = \"JP_BankDataCustomerCode2\";\n\n\t/** Set Bank Data Customer Code2\t */\n\tpublic void setJP_BankDataCustomerCode2 (String JP_BankDataCustomerCode2);\n\n\t/** Get Bank Data Customer Code2\t */\n\tpublic String getJP_BankDataCustomerCode2();\n\n /** Column name JP_BankDataLine_ID */\n public static final String COLUMNNAME_JP_BankDataLine_ID = \"JP_BankDataLine_ID\";\n\n\t/** Set Import Bank Data Line\t */\n\tpublic void setJP_BankDataLine_ID (int JP_BankDataLine_ID);\n\n\t/** Get Import Bank Data Line\t */\n\tpublic int getJP_BankDataLine_ID();\n\n\tpublic I_JP_BankDataLine getJP_BankDataLine() throws RuntimeException;\n\n /** Column name JP_BankData_EDI_Info */\n public static final String COLUMNNAME_JP_BankData_EDI_Info = \"JP_BankData_EDI_Info\";\n\n\t/** Set BankData EDI Info\t */\n\tpublic void setJP_BankData_EDI_Info (String JP_BankData_EDI_Info);\n\n\t/** Get BankData EDI Info\t */\n\tpublic String getJP_BankData_EDI_Info();\n\n /** Column name JP_BankData_ID */\n public static final String COLUMNNAME_JP_BankData_ID = \"JP_BankData_ID\";\n\n\t/** Set Import Bank Data\t */\n\tpublic void setJP_BankData_ID (int JP_BankData_ID);\n\n\t/** Get Import Bank Data\t */\n\tpublic int getJP_BankData_ID();\n\n\tpublic I_JP_BankData getJP_BankData() throws RuntimeException;\n\n /** Column name JP_BankData_ReferenceNo */\n public static final String COLUMNNAME_JP_BankData_ReferenceNo = \"JP_BankData_ReferenceNo\";\n\n\t/** Set Bank Data ReferenceNo\t */\n\tpublic void setJP_BankData_ReferenceNo (String JP_BankData_ReferenceNo);\n\n\t/** Get Bank Data ReferenceNo\t */\n\tpublic String getJP_BankData_ReferenceNo();\n\n /** Column name JP_BankName_Kana */\n public static final String COLUMNNAME_JP_BankName_Kana = \"JP_BankName_Kana\";\n\n\t/** Set Bank Name(Kana)\t */\n\tpublic void setJP_BankName_Kana (String JP_BankName_Kana);\n\n\t/** Get Bank Name(Kana)\t */\n\tpublic String getJP_BankName_Kana();\n\n /** Column name JP_BankName_Kana_Line */\n public static final String COLUMNNAME_JP_BankName_Kana_Line = \"JP_BankName_Kana_Line\";\n\n\t/** Set Bank Name(Kana) Line\t */\n\tpublic void setJP_BankName_Kana_Line (String JP_BankName_Kana_Line);\n\n\t/** Get Bank Name(Kana) Line\t */\n\tpublic String getJP_BankName_Kana_Line();\n\n /** Column name JP_Bank_Name */\n public static final String COLUMNNAME_JP_Bank_Name = \"JP_Bank_Name\";\n\n\t/** Set Bank Name\t */\n\tpublic void setJP_Bank_Name (String JP_Bank_Name);\n\n\t/** Get Bank Name\t */\n\tpublic String getJP_Bank_Name();\n\n /** Column name JP_BranchCode */\n public static final String COLUMNNAME_JP_BranchCode = \"JP_BranchCode\";\n\n\t/** Set Branch Code\t */\n\tpublic void setJP_BranchCode (String JP_BranchCode);\n\n\t/** Get Branch Code\t */\n\tpublic String getJP_BranchCode();\n\n /** Column name JP_BranchName */\n public static final String COLUMNNAME_JP_BranchName = \"JP_BranchName\";\n\n\t/** Set Branch Name\t */\n\tpublic void setJP_BranchName (String JP_BranchName);\n\n\t/** Get Branch Name\t */\n\tpublic String getJP_BranchName();\n\n /** Column name JP_BranchName_Kana */\n public static final String COLUMNNAME_JP_BranchName_Kana = \"JP_BranchName_Kana\";\n\n\t/** Set Branch Name(Kana)\t */\n\tpublic void setJP_BranchName_Kana (String JP_BranchName_Kana);\n\n\t/** Get Branch Name(Kana)\t */\n\tpublic String getJP_BranchName_Kana();\n\n /** Column name JP_BranchName_Kana_Line */\n public static final String COLUMNNAME_JP_BranchName_Kana_Line = \"JP_BranchName_Kana_Line\";\n\n\t/** Set Branch Name(Kana) Line\t */\n\tpublic void setJP_BranchName_Kana_Line (String JP_BranchName_Kana_Line);\n\n\t/** Get Branch Name(Kana) Line\t */\n\tpublic String getJP_BranchName_Kana_Line();\n\n /** Column name JP_Date */\n public static final String COLUMNNAME_JP_Date = \"JP_Date\";\n\n\t/** Set Date.\n\t * Date\n\t */\n\tpublic void setJP_Date (String JP_Date);\n\n\t/** Get Date.\n\t * Date\n\t */\n\tpublic String getJP_Date();\n\n /** Column name JP_Line_Description */\n public static final String COLUMNNAME_JP_Line_Description = \"JP_Line_Description\";\n\n\t/** Set Line Description\t */\n\tpublic void setJP_Line_Description (String JP_Line_Description);\n\n\t/** Get Line Description\t */\n\tpublic String getJP_Line_Description();\n\n /** Column name JP_Month */\n public static final String COLUMNNAME_JP_Month = \"JP_Month\";\n\n\t/** Set Month\t */\n\tpublic void setJP_Month (String JP_Month);\n\n\t/** Get Month\t */\n\tpublic String getJP_Month();\n\n /** Column name JP_OrgTrx_Value */\n public static final String COLUMNNAME_JP_OrgTrx_Value = \"JP_OrgTrx_Value\";\n\n\t/** Set Trx Organization(Search Key)\t */\n\tpublic void setJP_OrgTrx_Value (String JP_OrgTrx_Value);\n\n\t/** Get Trx Organization(Search Key)\t */\n\tpublic String getJP_OrgTrx_Value();\n\n /** Column name JP_Org_Value */\n public static final String COLUMNNAME_JP_Org_Value = \"JP_Org_Value\";\n\n\t/** Set Organization(Search Key)\t */\n\tpublic void setJP_Org_Value (String JP_Org_Value);\n\n\t/** Get Organization(Search Key)\t */\n\tpublic String getJP_Org_Value();\n\n /** Column name JP_RequesterName */\n public static final String COLUMNNAME_JP_RequesterName = \"JP_RequesterName\";\n\n\t/** Set Requester Name\t */\n\tpublic void setJP_RequesterName (String JP_RequesterName);\n\n\t/** Get Requester Name\t */\n\tpublic String getJP_RequesterName();\n\n /** Column name JP_SalesRep_EMail */\n public static final String COLUMNNAME_JP_SalesRep_EMail = \"JP_SalesRep_EMail\";\n\n\t/** Set Sales Rep(E-Mail)\t */\n\tpublic void setJP_SalesRep_EMail (String JP_SalesRep_EMail);\n\n\t/** Get Sales Rep(E-Mail)\t */\n\tpublic String getJP_SalesRep_EMail();\n\n /** Column name JP_SalesRep_Name */\n public static final String COLUMNNAME_JP_SalesRep_Name = \"JP_SalesRep_Name\";\n\n\t/** Set Sales Rep(Name)\t */\n\tpublic void setJP_SalesRep_Name (String JP_SalesRep_Name);\n\n\t/** Get Sales Rep(Name)\t */\n\tpublic String getJP_SalesRep_Name();\n\n /** Column name JP_SalesRep_Value */\n public static final String COLUMNNAME_JP_SalesRep_Value = \"JP_SalesRep_Value\";\n\n\t/** Set Sales Rep(Search Key)\t */\n\tpublic void setJP_SalesRep_Value (String JP_SalesRep_Value);\n\n\t/** Get Sales Rep(Search Key)\t */\n\tpublic String getJP_SalesRep_Value();\n\n /** Column name Processed */\n public static final String COLUMNNAME_Processed = \"Processed\";\n\n\t/** Set Processed.\n\t * The document has been processed\n\t */\n\tpublic void setProcessed (boolean Processed);\n\n\t/** Get Processed.\n\t * The document has been processed\n\t */\n\tpublic boolean isProcessed();\n\n /** Column name Processing */\n public static final String COLUMNNAME_Processing = \"Processing\";\n\n\t/** Set Process Now\t */\n\tpublic void setProcessing (boolean Processing);\n\n\t/** Get Process Now\t */\n\tpublic boolean isProcessing();\n\n /** Column name RoutingNo */\n public static final String COLUMNNAME_RoutingNo = \"RoutingNo\";\n\n\t/** Set Routing No.\n\t * Bank Routing Number\n\t */\n\tpublic void setRoutingNo (String RoutingNo);\n\n\t/** Get Routing No.\n\t * Bank Routing Number\n\t */\n\tpublic String getRoutingNo();\n\n /** Column name SalesRep_ID */\n public static final String COLUMNNAME_SalesRep_ID = \"SalesRep_ID\";\n\n\t/** Set Sales Rep.\n\t * Sales Representative or Company Agent\n\t */\n\tpublic void setSalesRep_ID (int SalesRep_ID);\n\n\t/** Get Sales Rep.\n\t * Sales Representative or Company Agent\n\t */\n\tpublic int getSalesRep_ID();\n\n\tpublic org.compiere.model.I_AD_User getSalesRep() throws RuntimeException;\n\n /** Column name StatementDate */\n public static final String COLUMNNAME_StatementDate = \"StatementDate\";\n\n\t/** Set Statement date.\n\t * Date of the statement\n\t */\n\tpublic void setStatementDate (Timestamp StatementDate);\n\n\t/** Get Statement date.\n\t * Date of the statement\n\t */\n\tpublic Timestamp getStatementDate();\n\n /** Column name StmtAmt */\n public static final String COLUMNNAME_StmtAmt = \"StmtAmt\";\n\n\t/** Set Statement amount.\n\t * Statement Amount\n\t */\n\tpublic void setStmtAmt (BigDecimal StmtAmt);\n\n\t/** Get Statement amount.\n\t * Statement Amount\n\t */\n\tpublic BigDecimal getStmtAmt();\n\n /** Column name TrxAmt */\n public static final String COLUMNNAME_TrxAmt = \"TrxAmt\";\n\n\t/** Set Transaction Amount.\n\t * Amount of a transaction\n\t */\n\tpublic void setTrxAmt (BigDecimal TrxAmt);\n\n\t/** Get Transaction Amount.\n\t * Amount of a transaction\n\t */\n\tpublic BigDecimal getTrxAmt();\n\n /** Column name Updated */\n public static final String COLUMNNAME_Updated = \"Updated\";\n\n\t/** Get Updated.\n\t * Date this record was updated\n\t */\n\tpublic Timestamp getUpdated();\n\n /** Column name UpdatedBy */\n public static final String COLUMNNAME_UpdatedBy = \"UpdatedBy\";\n\n\t/** Get Updated By.\n\t * User who updated this records\n\t */\n\tpublic int getUpdatedBy();\n}",
"@DynamicDataSourceAutowired(name = \"his\")\n\t@Override\n\tpublic List<DataBloodGlucose> selectDataB() {\n\t\treturn dataBloodGluosedao.getAll(DataBloodGlucose.class);\n\t}",
"public interface I_IHC_JobDataChange \n{\n\n /** TableName=IHC_JobDataChange */\n public static final String Table_Name = \"IHC_JobDataChange\";\n\n /** AD_Table_ID=1100135 */\n public static final int Table_ID = MTable.getTable_ID(Table_Name);\n\n KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);\n\n /** AccessLevel = 3 - Client - Org \n */\n BigDecimal accessLevel = BigDecimal.valueOf(3);\n\n /** Load Meta Data */\n\n /** Column name AD_Client_ID */\n public static final String COLUMNNAME_AD_Client_ID = \"AD_Client_ID\";\n\n\t/** Get Client.\n\t * Client/Tenant for this installation.\n\t */\n\tpublic int getAD_Client_ID();\n\n /** Column name AD_Org_ID */\n public static final String COLUMNNAME_AD_Org_ID = \"AD_Org_ID\";\n\n\t/** Set Organization.\n\t * Organizational entity within client\n\t */\n\tpublic void setAD_Org_ID (int AD_Org_ID);\n\n\t/** Get Organization.\n\t * Organizational entity within client\n\t */\n\tpublic int getAD_Org_ID();\n\n /** Column name BPJSRegistrationDate */\n public static final String COLUMNNAME_BPJSRegistrationDate = \"BPJSRegistrationDate\";\n\n\t/** Set BPJS Registration Date\t */\n\tpublic void setBPJSRegistrationDate (Timestamp BPJSRegistrationDate);\n\n\t/** Get BPJS Registration Date\t */\n\tpublic Timestamp getBPJSRegistrationDate();\n\n /** Column name Created */\n public static final String COLUMNNAME_Created = \"Created\";\n\n\t/** Get Created.\n\t * Date this record was created\n\t */\n\tpublic Timestamp getCreated();\n\n /** Column name CreatedBy */\n public static final String COLUMNNAME_CreatedBy = \"CreatedBy\";\n\n\t/** Get Created By.\n\t * User who created this records\n\t */\n\tpublic int getCreatedBy();\n\n /** Column name Description */\n public static final String COLUMNNAME_Description = \"Description\";\n\n\t/** Set Description.\n\t * Optional short description of the record\n\t */\n\tpublic void setDescription (String Description);\n\n\t/** Get Description.\n\t * Optional short description of the record\n\t */\n\tpublic String getDescription();\n\n /** Column name DescriptionNew */\n public static final String COLUMNNAME_DescriptionNew = \"DescriptionNew\";\n\n\t/** Set Description New\t */\n\tpublic void setDescriptionNew (String DescriptionNew);\n\n\t/** Get Description New\t */\n\tpublic String getDescriptionNew();\n\n /** Column name HC_Compensation1 */\n public static final String COLUMNNAME_HC_Compensation1 = \"HC_Compensation1\";\n\n\t/** Set Compensation 1\t */\n\tpublic void setHC_Compensation1 (BigDecimal HC_Compensation1);\n\n\t/** Get Compensation 1\t */\n\tpublic BigDecimal getHC_Compensation1();\n\n /** Column name HC_Compensation2 */\n public static final String COLUMNNAME_HC_Compensation2 = \"HC_Compensation2\";\n\n\t/** Set Compensation 2\t */\n\tpublic void setHC_Compensation2 (BigDecimal HC_Compensation2);\n\n\t/** Get Compensation 2\t */\n\tpublic BigDecimal getHC_Compensation2();\n\n /** Column name HC_Compensation3 */\n public static final String COLUMNNAME_HC_Compensation3 = \"HC_Compensation3\";\n\n\t/** Set Compensation 3\t */\n\tpublic void setHC_Compensation3 (BigDecimal HC_Compensation3);\n\n\t/** Get Compensation 3\t */\n\tpublic BigDecimal getHC_Compensation3();\n\n /** Column name HC_Compensation4 */\n public static final String COLUMNNAME_HC_Compensation4 = \"HC_Compensation4\";\n\n\t/** Set Compensation 4\t */\n\tpublic void setHC_Compensation4 (BigDecimal HC_Compensation4);\n\n\t/** Get Compensation 4\t */\n\tpublic BigDecimal getHC_Compensation4();\n\n /** Column name HC_EffectiveSeq */\n public static final String COLUMNNAME_HC_EffectiveSeq = \"HC_EffectiveSeq\";\n\n\t/** Set Effective Sequence\t */\n\tpublic void setHC_EffectiveSeq (int HC_EffectiveSeq);\n\n\t/** Get Effective Sequence\t */\n\tpublic int getHC_EffectiveSeq();\n\n /** Column name HC_Employee_ID */\n public static final String COLUMNNAME_HC_Employee_ID = \"HC_Employee_ID\";\n\n\t/** Set Employee Data\t */\n\tpublic void setHC_Employee_ID (int HC_Employee_ID);\n\n\t/** Get Employee Data\t */\n\tpublic int getHC_Employee_ID();\n\n\tpublic I_HC_Employee getHC_Employee() throws RuntimeException;\n\n /** Column name HC_EmployeeGrade_ID */\n public static final String COLUMNNAME_HC_EmployeeGrade_ID = \"HC_EmployeeGrade_ID\";\n\n\t/** Set Employee Grade\t */\n\tpublic void setHC_EmployeeGrade_ID (int HC_EmployeeGrade_ID);\n\n\t/** Get Employee Grade\t */\n\tpublic int getHC_EmployeeGrade_ID();\n\n\tpublic I_HC_EmployeeGrade getHC_EmployeeGrade() throws RuntimeException;\n\n /** Column name HC_EmployeeGrade2_ID */\n public static final String COLUMNNAME_HC_EmployeeGrade2_ID = \"HC_EmployeeGrade2_ID\";\n\n\t/** Set Employee Grade To\t */\n\tpublic void setHC_EmployeeGrade2_ID (int HC_EmployeeGrade2_ID);\n\n\t/** Get Employee Grade To\t */\n\tpublic int getHC_EmployeeGrade2_ID();\n\n\tpublic I_HC_EmployeeGrade getHC_EmployeeGrade2() throws RuntimeException;\n\n /** Column name HC_EmployeeJob_ID */\n public static final String COLUMNNAME_HC_EmployeeJob_ID = \"HC_EmployeeJob_ID\";\n\n\t/** Set Employee Job Data\t */\n\tpublic void setHC_EmployeeJob_ID (int HC_EmployeeJob_ID);\n\n\t/** Get Employee Job Data\t */\n\tpublic int getHC_EmployeeJob_ID();\n\n\tpublic I_HC_EmployeeJob getHC_EmployeeJob() throws RuntimeException;\n\n /** Column name HC_Job_ID */\n public static final String COLUMNNAME_HC_Job_ID = \"HC_Job_ID\";\n\n\t/** Set Job\t */\n\tpublic void setHC_Job_ID (int HC_Job_ID);\n\n\t/** Get Job\t */\n\tpublic int getHC_Job_ID();\n\n\tpublic I_HC_Job getHC_Job() throws RuntimeException;\n\n /** Column name HC_JobAction */\n public static final String COLUMNNAME_HC_JobAction = \"HC_JobAction\";\n\n\t/** Set Job Action\t */\n\tpublic void setHC_JobAction (String HC_JobAction);\n\n\t/** Get Job Action\t */\n\tpublic String getHC_JobAction();\n\n /** Column name HC_JobDataChange_ID */\n public static final String COLUMNNAME_HC_JobDataChange_ID = \"HC_JobDataChange_ID\";\n\n\t/** Set Job Data Change\t */\n\tpublic void setHC_JobDataChange_ID (int HC_JobDataChange_ID);\n\n\t/** Get Job Data Change\t */\n\tpublic int getHC_JobDataChange_ID();\n\n\tpublic I_HC_JobDataChange getHC_JobDataChange() throws RuntimeException;\n\n /** Column name HC_Manager_ID */\n public static final String COLUMNNAME_HC_Manager_ID = \"HC_Manager_ID\";\n\n\t/** Set Manager Name\t */\n\tpublic void setHC_Manager_ID (int HC_Manager_ID);\n\n\t/** Get Manager Name\t */\n\tpublic int getHC_Manager_ID();\n\n\tpublic I_HC_Employee getHC_Manager() throws RuntimeException;\n\n /** Column name HC_ManagerTo_ID */\n public static final String COLUMNNAME_HC_ManagerTo_ID = \"HC_ManagerTo_ID\";\n\n\t/** Set Manager To ID\t */\n\tpublic void setHC_ManagerTo_ID (int HC_ManagerTo_ID);\n\n\t/** Get Manager To ID\t */\n\tpublic int getHC_ManagerTo_ID();\n\n\tpublic I_HC_Employee getHC_ManagerTo() throws RuntimeException;\n\n /** Column name HC_Org_ID */\n public static final String COLUMNNAME_HC_Org_ID = \"HC_Org_ID\";\n\n\t/** Set HC Organization\t */\n\tpublic void setHC_Org_ID (int HC_Org_ID);\n\n\t/** Get HC Organization\t */\n\tpublic int getHC_Org_ID();\n\n\tpublic I_HC_Org getHC_Org() throws RuntimeException;\n\n /** Column name HC_Org2_ID */\n public static final String COLUMNNAME_HC_Org2_ID = \"HC_Org2_ID\";\n\n\t/** Set HC Organization To\t */\n\tpublic void setHC_Org2_ID (int HC_Org2_ID);\n\n\t/** Get HC Organization To\t */\n\tpublic int getHC_Org2_ID();\n\n\tpublic I_HC_Org getHC_Org2() throws RuntimeException;\n\n /** Column name HC_PayGroup_ID */\n public static final String COLUMNNAME_HC_PayGroup_ID = \"HC_PayGroup_ID\";\n\n\t/** Set Payroll Group\t */\n\tpublic void setHC_PayGroup_ID (int HC_PayGroup_ID);\n\n\t/** Get Payroll Group\t */\n\tpublic int getHC_PayGroup_ID();\n\n\tpublic I_HC_PayGroup getHC_PayGroup() throws RuntimeException;\n\n /** Column name HC_PreviousJob_ID */\n public static final String COLUMNNAME_HC_PreviousJob_ID = \"HC_PreviousJob_ID\";\n\n\t/** Set Job Sekarang\t */\n\tpublic void setHC_PreviousJob_ID (int HC_PreviousJob_ID);\n\n\t/** Get Job Sekarang\t */\n\tpublic int getHC_PreviousJob_ID();\n\n\tpublic I_HC_Job getHC_PreviousJob() throws RuntimeException;\n\n /** Column name HC_Reason_ID */\n public static final String COLUMNNAME_HC_Reason_ID = \"HC_Reason_ID\";\n\n\t/** Set HC Reason\t */\n\tpublic void setHC_Reason_ID (int HC_Reason_ID);\n\n\t/** Get HC Reason\t */\n\tpublic int getHC_Reason_ID();\n\n\tpublic I_HC_Reason getHC_Reason() throws RuntimeException;\n\n /** Column name HC_Status */\n public static final String COLUMNNAME_HC_Status = \"HC_Status\";\n\n\t/** Set HC Status\t */\n\tpublic void setHC_Status (String HC_Status);\n\n\t/** Get HC Status\t */\n\tpublic String getHC_Status();\n\n /** Column name HC_WorkEndDate */\n public static final String COLUMNNAME_HC_WorkEndDate = \"HC_WorkEndDate\";\n\n\t/** Set Work End Date\t */\n\tpublic void setHC_WorkEndDate (Timestamp HC_WorkEndDate);\n\n\t/** Get Work End Date\t */\n\tpublic Timestamp getHC_WorkEndDate();\n\n /** Column name HC_WorkPeriodDate */\n public static final String COLUMNNAME_HC_WorkPeriodDate = \"HC_WorkPeriodDate\";\n\n\t/** Set WorkPeriodDate\t */\n\tpublic void setHC_WorkPeriodDate (String HC_WorkPeriodDate);\n\n\t/** Get WorkPeriodDate\t */\n\tpublic String getHC_WorkPeriodDate();\n\n /** Column name HC_WorkStartDate */\n public static final String COLUMNNAME_HC_WorkStartDate = \"HC_WorkStartDate\";\n\n\t/** Set WorkStartDate\t */\n\tpublic void setHC_WorkStartDate (Timestamp HC_WorkStartDate);\n\n\t/** Get WorkStartDate\t */\n\tpublic Timestamp getHC_WorkStartDate();\n\n /** Column name HC_WorkStartDate2 */\n public static final String COLUMNNAME_HC_WorkStartDate2 = \"HC_WorkStartDate2\";\n\n\t/** Set Work Start Date Baru\t */\n\tpublic void setHC_WorkStartDate2 (Timestamp HC_WorkStartDate2);\n\n\t/** Get Work Start Date Baru\t */\n\tpublic Timestamp getHC_WorkStartDate2();\n\n /** Column name IHC_JobDataChange_ID */\n public static final String COLUMNNAME_IHC_JobDataChange_ID = \"IHC_JobDataChange_ID\";\n\n\t/** Set IHC_JobDayaChange\t */\n\tpublic void setIHC_JobDataChange_ID (int IHC_JobDataChange_ID);\n\n\t/** Get IHC_JobDayaChange\t */\n\tpublic int getIHC_JobDataChange_ID();\n\n /** Column name IHC_JobDataChange_UU */\n public static final String COLUMNNAME_IHC_JobDataChange_UU = \"IHC_JobDataChange_UU\";\n\n\t/** Set IHC_JobDataChange_UU\t */\n\tpublic void setIHC_JobDataChange_UU (String IHC_JobDataChange_UU);\n\n\t/** Get IHC_JobDataChange_UU\t */\n\tpublic String getIHC_JobDataChange_UU();\n\n /** Column name IsActive */\n public static final String COLUMNNAME_IsActive = \"IsActive\";\n\n\t/** Set Active.\n\t * The record is active in the system\n\t */\n\tpublic void setIsActive (boolean IsActive);\n\n\t/** Get Active.\n\t * The record is active in the system\n\t */\n\tpublic boolean isActive();\n\n /** Column name IsCancelled */\n public static final String COLUMNNAME_IsCancelled = \"IsCancelled\";\n\n\t/** Set Cancelled.\n\t * The transaction was cancelled\n\t */\n\tpublic void setIsCancelled (boolean IsCancelled);\n\n\t/** Get Cancelled.\n\t * The transaction was cancelled\n\t */\n\tpublic boolean isCancelled();\n\n /** Column name NomorSK */\n public static final String COLUMNNAME_NomorSK = \"NomorSK\";\n\n\t/** Set Nomor SK\t */\n\tpublic void setNomorSK (String NomorSK);\n\n\t/** Get Nomor SK\t */\n\tpublic String getNomorSK();\n\n /** Column name NomorSK2 */\n public static final String COLUMNNAME_NomorSK2 = \"NomorSK2\";\n\n\t/** Set Nomor SK Baru\t */\n\tpublic void setNomorSK2 (String NomorSK2);\n\n\t/** Get Nomor SK Baru\t */\n\tpublic String getNomorSK2();\n\n /** Column name OriginalServiceData */\n public static final String COLUMNNAME_OriginalServiceData = \"OriginalServiceData\";\n\n\t/** Set Original Service Date\t */\n\tpublic void setOriginalServiceData (Timestamp OriginalServiceData);\n\n\t/** Get Original Service Date\t */\n\tpublic Timestamp getOriginalServiceData();\n\n /** Column name Processed */\n public static final String COLUMNNAME_Processed = \"Processed\";\n\n\t/** Set Processed.\n\t * The document has been processed\n\t */\n\tpublic void setProcessed (boolean Processed);\n\n\t/** Get Processed.\n\t * The document has been processed\n\t */\n\tpublic boolean isProcessed();\n\n /** Column name SeqNo */\n public static final String COLUMNNAME_SeqNo = \"SeqNo\";\n\n\t/** Set Sequence.\n\t * Method of ordering records;\n lowest number comes first\n\t */\n\tpublic void setSeqNo (int SeqNo);\n\n\t/** Get Sequence.\n\t * Method of ordering records;\n lowest number comes first\n\t */\n\tpublic int getSeqNo();\n\n /** Column name Updated */\n public static final String COLUMNNAME_Updated = \"Updated\";\n\n\t/** Get Updated.\n\t * Date this record was updated\n\t */\n\tpublic Timestamp getUpdated();\n\n /** Column name UpdatedBy */\n public static final String COLUMNNAME_UpdatedBy = \"UpdatedBy\";\n\n\t/** Get Updated By.\n\t * User who updated this records\n\t */\n\tpublic int getUpdatedBy();\n}",
"public Object[] convertDataTypeInBase(Table table , JdbcTemplate jdbcTemplate);",
"@Select({\n \"select\",\n \"datafile_code, order_code, datafile_name, datafile_time, data_consistency, data_url\",\n \"from t_dsdata_record\",\n \"where datafile_code = #{datafileCode,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"datafile_code\", property=\"datafileCode\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"order_code\", property=\"orderCode\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"datafile_name\", property=\"datafileName\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"datafile_time\", property=\"datafileTime\", jdbcType=JdbcType.DATE),\n @Result(column=\"data_consistency\", property=\"dataConsistency\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"data_url\", property=\"dataUrl\", jdbcType=JdbcType.VARCHAR)\n })\n TDsdataRecord selectByPrimaryKey(Integer datafileCode);",
"public void write() {\n\t\ttry {\n\t\t\tcreateTable(this.tableName, this.attrContainer);\n\t\t\tinsertData(this.tableName, this.dataContainer);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"com.factset.protobuf.stach.v2.RowOrganizedProto.RowOrganizedPackage.TableData getData();",
"public CreateExcelFileOfTable() {\n initComponents();\n getDatabaseTables();\n }",
"BSQL2Java2 createBSQL2Java2();",
"public String getBusinessTable() {\n return businessTable;\n }",
"void getdata_b() throws IOException, BiffException{\r\n bdata= jxl.Workbook.getWorkbook(new File(System.getProperty(\"user.dir\").toString()+\"\\\\bdata.xls\"));\r\n s1 = bdata.getSheet(0);\r\n for(int i = 1; i<s1.getRows(); i++){\r\n cell = s1.getCell(0, i);\r\n sa=cell.getContents();\r\n boyob[i-1].bname=sa;\r\n cell = s1.getCell(1, i);\r\n v1 =new Integer(Integer.parseInt(cell.getContents()));\r\n boyob[i-1].attr=v1;\r\n cell = s1.getCell(2, i);\r\n v1 =new Integer(Integer.parseInt(cell.getContents()));\r\n boyob[i-1].bud=v1;\r\n cell = s1.getCell(3, i);\r\n v1 =new Integer(Integer.parseInt(cell.getContents()));\r\n boyob[i-1].intel=v1;\r\n cell = s1.getCell(4, i);\r\n v1 =new Integer(Integer.parseInt(cell.getContents()));\r\n boyob[i-1].nat=v1;\r\n cell = s1.getCell(5, i);\r\n v1 =new Integer(Integer.parseInt(cell.getContents()));\r\n boyob[i-1].reqd_at=v1; \r\n }\r\n }",
"public void generateUserDefinedMapping() {// This method is used to\n\t\t// generate the user defined\n\t\t// mapping for OJB\n\t\tprintWriter\n\t\t\t\t.write(\"<!--********************\"\n\t\t\t\t\t\t+ \"*********OJB USER DEFINED MAPPING BEGINS HERE *********************************-->\");\n\t\tSolutionsAdapter sAdapter = saReader.getSA();\n\t\tDataObjectType dataObject = sAdapter.getDataObject();\n\t\tList listGroup = dataObject.getGroup();\n\t\tfor (Iterator groupIter = listGroup.iterator(); groupIter.hasNext();) {\n\t\t\tGroupList groupList = (GroupList) groupIter.next();\n\t\t\tList classList = groupList.getClasses();\n\t\t\tfor (int j = 0; j < classList.size(); j++) {\n\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\tprintWriter\n\t\t\t\t\t\t.write(\"<!--**************************** \"\n\t\t\t\t\t\t\t\t+ (j + 1)\n\t\t\t\t\t\t\t\t+ \" Object-Table Mapping *******************************************-->\");\n\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\tClassList classesList = (ClassList) classList.get(j);\n\t\t\t\tString className = classesList.getClassName();\n\t\t\t\tprintWriter.write(\"\\t\\t<class-descriptor \");\n\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\tprintWriter.write(\"\\t\\t\\tclass=\" + \"\\\"\" + className + \"\\\"\");// java\n\t\t\t\t// class\n\t\t\t\t// name\n\t\t\t\t// for\n\t\t\t\t// mapping\n\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\t// Specifies the table name for the class\n\t\t\t\tString onlyTableName = getTableName(className);\n\t\t\t\t// String onlyTableName =\n\t\t\t\t// className.substring(className.lastIndexOf(\".\")+1,className.length());\n\t\t\t\tprintWriter.write(\"\\t\\t\\ttable=\" + \"\\\"\" + onlyTableName + \"\\\"\");// table\n\t\t\t\t// name\n\t\t\t\t// for\n\t\t\t\t// mapping\n\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\tprintWriter.write(\"\\t\\t>\");// closing > of class descriptor\n\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\tList fieldList = classesList.getFields();\n\t\t\t\tfor (int k = 0; k < fieldList.size(); k++) {\n\t\t\t\t\tprintWriter.write(\"\\t\\t <field-descriptor\");\n\t\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\t\tFieldNameList listField = (FieldNameList) fieldList.get(k);\n\t\t\t\t\tprintWriter.write(\"\\t\\t\\tname=\" + \"\\\"\"\n\t\t\t\t\t\t\t+ listField.getFieldName() + \"\\\"\");\n\t\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\t\tList dodsMapList = listField.getDODSMap();\n\t\t\t\t\tfor (int l = 0; l < dodsMapList.size(); l++) {\n\t\t\t\t\t\tDSMapList dsType = (DSMapList) dodsMapList.get(l);\n\t\t\t\t\t\tprintWriter.write(\"\\t\\t\\tcolumn=\" + \"\\\"\"\n\t\t\t\t\t\t\t\t+ dsType.getFieldName() + \"\\\"\");\n\t\t\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\t\t\tString jdbcType = getJDBCType(listField.getFieldType());\n\t\t\t\t\t\tprintWriter.write(\"\\t\\t\\tjdbc-type=\" + \"\\\"\" + jdbcType\n\t\t\t\t\t\t\t\t+ \"\\\"\");// jdbc type\n\t\t\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\t\t\tif (dsType.getPrimaryKey().equals(\"true\")) {\n\t\t\t\t\t\t\tprintWriter\n\t\t\t\t\t\t\t\t\t.write(\"\\t\\t\\tprimarykey=\" + \"\\\"true\\\" \");\n\t\t\t\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\t\t\t\tprintWriter.write(\"\\t\\t\\tautoincrement=\"\n\t\t\t\t\t\t\t\t\t+ \"\\\"false\\\" \");\n\t\t\t\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// do nothing\n\t\t\t\t\t\t}\n\t\t\t\t\t\tprintWriter.write(\"\\t\\t/>\");// end tag for field\n\t\t\t\t\t\t// descriptor\n\t\t\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tprintWriter.write(\"\\t\\t</class-descriptor>\");// end tag for\n\t\t\t\t// class\n\t\t\t\t// descriptor\n\t\t\t}\n\t\t}\n\t}",
"@Select({\n \"select\",\n \"TRANDATE, CHECKTYPE, ACCOUNTDATE, STATUS, TRANTIME, FILENAME, JNLNO, \",\n \"CHECKNL, ISHANDLED\",\n \"from B_CHECK_STATUS\",\n \"where TRANDATE = #{trandate,jdbcType=VARCHAR}\",\n \"and CHECKTYPE = #{checktype,jdbcType=CHAR}\"\n })\n @Results({\n @Result(column=\"TRANDATE\", property=\"trandate\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"CHECKTYPE\", property=\"checktype\", jdbcType=JdbcType.CHAR, id=true),\n @Result(column=\"ACCOUNTDATE\", property=\"accountdate\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"STATUS\", property=\"status\", jdbcType=JdbcType.CHAR),\n @Result(column=\"TRANTIME\", property=\"trantime\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"FILENAME\", property=\"filename\", jdbcType=JdbcType.VARCHAR),\n // @Result(column=\"TMSMP\", property=\"tmsmp\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"JNLNO\", property=\"jnlno\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"CHECKNL\", property=\"checknl\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"ISHANDLED\", property=\"ishandled\", jdbcType=JdbcType.CHAR)\n })\n BCheckStatus selectByPrimaryKey(BCheckStatusKey key);",
"io.dstore.engine.procedures.ImGetBinariesForValues.Response.Row getRow(int index);",
"private void loadBtechData()\r\n\t{\r\n\t\tlist.clear();\r\n\t\tString qu = \"SELECT * FROM BTECHSTUDENT\";\r\n\t\tResultSet result = databaseHandler.execQuery(qu);\r\n\r\n\t\ttry {// retrieve student information form database\r\n\t\t\twhile(result.next())\r\n\t\t\t{\r\n\t\t\t\tString studendID = result.getString(\"studentNoB\");\r\n\t\t\t\tString nameB = result.getString(\"nameB\");\r\n\t\t\t\tString studSurnameB = result.getString(\"surnameB\");\r\n\t\t\t\tString supervisorB = result.getString(\"supervisorB\");\r\n\t\t\t\tString emailB = result.getString(\"emailB\");\r\n\t\t\t\tString cellphoneB = result.getString(\"cellphoneNoB\");\r\n\t\t\t\tString courseB = result.getString(\"stationB\");\r\n\t\t\t\tString stationB = result.getString(\"courseB\");\r\n\r\n\t\t\t\tlist.add(new StudentProperty(studendID, nameB, studSurnameB,\r\n\t\t\t\t\t\tsupervisorB, emailB, cellphoneB, courseB, stationB));\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t// Transfer the list data on the table\r\n\t\tstudentBTable.setItems(list);\r\n\t}",
"@Insert({\r\n \"insert into OP.T_CM_SET_CHANGE_SITE_STATE (ORG_CD, WORK_SEQ, \",\r\n \"CHANGE_NO, BRANCH_CD, \",\r\n \"SITE_CD, SITE_NM, \",\r\n \"DATA_TYPE, CLOSE_DATE, \",\r\n \"REOPEN_TYPE, REOPEN_DATE, \",\r\n \"SET_TYPE, OPER_START_TIME, \",\r\n \"OPER_END_TIME, CHECK_YN, \",\r\n \"APPLY_DATE, INSERT_UID, \",\r\n \"INSERT_DATE, UPDATE_UID, \",\r\n \"UPDATE_DATE)\",\r\n \"values (#{orgCd,jdbcType=VARCHAR}, #{workSeq,jdbcType=VARCHAR}, \",\r\n \"#{changeNo,jdbcType=DECIMAL}, #{branchCd,jdbcType=VARCHAR}, \",\r\n \"#{siteCd,jdbcType=VARCHAR}, #{siteNm,jdbcType=VARCHAR}, \",\r\n \"#{dataType,jdbcType=VARCHAR}, #{closeDate,jdbcType=VARCHAR}, \",\r\n \"#{reopenType,jdbcType=VARCHAR}, #{reopenDate,jdbcType=VARCHAR}, \",\r\n \"#{setType,jdbcType=VARCHAR}, #{operStartTime,jdbcType=VARCHAR}, \",\r\n \"#{operEndTime,jdbcType=VARCHAR}, #{checkYn,jdbcType=VARCHAR}, \",\r\n \"#{applyDate,jdbcType=VARCHAR}, #{insertUid,jdbcType=VARCHAR}, \",\r\n \"#{insertDate,jdbcType=TIMESTAMP}, #{updateUid,jdbcType=VARCHAR}, \",\r\n \"#{updateDate,jdbcType=TIMESTAMP})\"\r\n })\r\n int insert(TCmSetChangeSiteState record);",
"public void getTableValues(){\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Central Mongo specific converter interface which combines MongoWriter and MongoReader. | public interface MongoConverter extends
EntityConverter<MongoPersistentEntity<?>, MongoPersistentProperty, Object, DBObject>,
MongoWriter<Object>, EntityReader<Object, DBObject> {
/**
* Returns thw TypeMapper being used to write type information into
* DBObjects created with that converter.
*
* @return
*/
MongoTypeMapper getTypeMapper();
} | [
"public interface BsonWriter {\n /**\n * Flushes any pending data to the output destination.\n */\n void flush();\n\n /**\n * Writes a BSON Binary data element to the writer.\n *\n * @param binary The Binary data.\n */\n void writeBinaryData(BsonBinary binary);\n\n /**\n * Writes a BSON Binary data element to the writer.\n *\n * @param name The name of the element.\n * @param binary The Binary data value.\n */\n void writeBinaryData(String name, BsonBinary binary);\n\n /**\n * Writes a BSON Boolean to the writer.\n *\n * @param value The Boolean value.\n */\n void writeBoolean(boolean value);\n\n /**\n * Writes a BSON Boolean element to the writer.\n *\n * @param name The name of the element.\n * @param value The Boolean value.\n */\n void writeBoolean(String name, boolean value);\n\n /**\n * Writes a BSON DateTime to the writer.\n *\n * @param value The number of milliseconds since the Unix epoch.\n */\n void writeDateTime(long value);\n\n /**\n * Writes a BSON DateTime element to the writer.\n *\n * @param name The name of the element.\n * @param value The number of milliseconds since the Unix epoch.\n */\n void writeDateTime(String name, long value);\n\n /**\n * Writes a BSON DBPointer to the writer.\n *\n * @param value The DBPointer to write\n */\n void writeDBPointer(BsonDbPointer value);\n\n /**\n * Writes a BSON DBPointer element to the writer.\n *\n * @param name The name of the element.\n * @param value The DBPointer to write\n */\n void writeDBPointer(String name, BsonDbPointer value);\n\n /**\n * Writes a BSON Double to the writer.\n *\n * @param value The Double value.\n */\n void writeDouble(double value);\n\n /**\n * Writes a BSON Double element to the writer.\n *\n * @param name The name of the element.\n * @param value The Double value.\n */\n void writeDouble(String name, double value);\n\n /**\n * Writes the end of a BSON array to the writer.\n */\n void writeEndArray();\n\n /**\n * Writes the end of a BSON document to the writer.\n */\n void writeEndDocument();\n\n /**\n * Writes a BSON Int32 to the writer.\n *\n * @param value The Int32 value.\n */\n void writeInt32(int value);\n\n /**\n * Writes a BSON Int32 element to the writer.\n *\n * @param name The name of the element.\n * @param value The Int32 value.\n */\n void writeInt32(String name, int value);\n\n /**\n * Writes a BSON Int64 to the writer.\n *\n * @param value The Int64 value.\n */\n void writeInt64(long value);\n\n /**\n * Writes a BSON Int64 element to the writer.\n *\n * @param name The name of the element.\n * @param value The Int64 value.\n */\n void writeInt64(String name, long value);\n\n /**\n * Writes a BSON Decimal128 to the writer.\n *\n * @param value The Decimal128 value.\n * @since 3.4\n */\n void writeDecimal128(Decimal128 value);\n\n /**\n * Writes a BSON Decimal128 element to the writer.\n *\n * @param name The name of the element.\n * @param value The Decimal128 value.\n * @since 3.4\n */\n void writeDecimal128(String name, Decimal128 value);\n\n /**\n * Writes a BSON JavaScript to the writer.\n *\n * @param code The JavaScript code.\n */\n void writeJavaScript(String code);\n\n /**\n * Writes a BSON JavaScript element to the writer.\n *\n * @param name The name of the element.\n * @param code The JavaScript code.\n */\n void writeJavaScript(String name, String code);\n\n /**\n * Writes a BSON JavaScript to the writer (call WriteStartDocument to start writing the scope).\n *\n * @param code The JavaScript code.\n */\n void writeJavaScriptWithScope(String code);\n\n /**\n * Writes a BSON JavaScript element to the writer (call WriteStartDocument to start writing the scope).\n *\n * @param name The name of the element.\n * @param code The JavaScript code.\n */\n void writeJavaScriptWithScope(String name, String code);\n\n /**\n * Writes a BSON MaxKey to the writer.\n */\n void writeMaxKey();\n\n /**\n * Writes a BSON MaxKey element to the writer.\n *\n * @param name The name of the element.\n */\n void writeMaxKey(String name);\n\n /**\n * Writes a BSON MinKey to the writer.\n */\n void writeMinKey();\n\n /**\n * Writes a BSON MinKey element to the writer.\n *\n * @param name The name of the element.\n */\n void writeMinKey(String name);\n\n /**\n * Writes the name of an element to the writer.\n *\n * @param name The name of the element.\n */\n void writeName(String name);\n\n /**\n * Writes a BSON null to the writer.\n */\n void writeNull();\n\n /**\n * Writes a BSON null element to the writer.\n *\n * @param name The name of the element.\n */\n void writeNull(String name);\n\n /**\n * Writes a BSON ObjectId to the writer.\n *\n * @param objectId The ObjectId value.\n */\n void writeObjectId(ObjectId objectId);\n\n /**\n * Writes a BSON ObjectId element to the writer.\n *\n * @param name The name of the element.\n * @param objectId The ObjectId value.\n */\n void writeObjectId(String name, ObjectId objectId);\n\n /**\n * Writes a BSON regular expression to the writer.\n *\n * @param regularExpression the regular expression to write.\n */\n void writeRegularExpression(BsonRegularExpression regularExpression);\n\n /**\n * Writes a BSON regular expression element to the writer.\n *\n * @param name The name of the element.\n * @param regularExpression The RegularExpression value.\n */\n void writeRegularExpression(String name, BsonRegularExpression regularExpression);\n\n /**\n * Writes the start of a BSON array to the writer.\n *\n * @throws BsonSerializationException if maximum serialization depth exceeded.\n */\n void writeStartArray();\n\n /**\n * Writes the start of a BSON array element to the writer.\n *\n * @param name The name of the element.\n */\n void writeStartArray(String name);\n\n /**\n * Writes the start of a BSON document to the writer.\n *\n * @throws BsonSerializationException if maximum serialization depth exceeded.\n */\n void writeStartDocument();\n\n /**\n * Writes the start of a BSON document element to the writer.\n *\n * @param name The name of the element.\n */\n void writeStartDocument(String name);\n\n /**\n * Writes a BSON String to the writer.\n *\n * @param value The String value.\n */\n void writeString(String value);\n\n /**\n * Writes a BSON String element to the writer.\n *\n * @param name The name of the element.\n * @param value The String value.\n */\n void writeString(String name, String value);\n\n /**\n * Writes a BSON Symbol to the writer.\n *\n * @param value The symbol.\n */\n void writeSymbol(String value);\n\n /**\n * Writes a BSON Symbol element to the writer.\n *\n * @param name The name of the element.\n * @param value The symbol.\n */\n void writeSymbol(String name, String value);\n\n /**\n * Writes a BSON Timestamp to the writer.\n *\n * @param value The combined timestamp/increment value.\n */\n void writeTimestamp(BsonTimestamp value);\n\n /**\n * Writes a BSON Timestamp element to the writer.\n *\n * @param name The name of the element.\n * @param value The combined timestamp/increment value.\n */\n void writeTimestamp(String name, BsonTimestamp value);\n\n /**\n * Writes a BSON undefined to the writer.\n */\n void writeUndefined();\n\n /**\n * Writes a BSON undefined element to the writer.\n *\n * @param name The name of the element.\n */\n void writeUndefined(String name);\n\n /**\n * Reads a single document from a BsonReader and writes it to this.\n *\n * @param reader The source.\n */\n void pipe(BsonReader reader);\n\n}",
"public interface IDocumentCoder<T> {\n \n /**\n * This method encodes the object of type T into a {@code Document}.\n * \n * @return BSON-Document\n */\n public Document encode();\n\n /**\n * This method decodes a {@code Document} into an object of type T.\n * \n * @param doc The BSON-Document holding the object information.\n */\n public T decode(Document doc);\n\n /**\n * This method returns the unique identifier of the object, useful for quick lookups.\n * \n * @return The unique {@code String} identifier.\n */\n public String unique();\n\n}",
"public CustomConversions customConversions() {\r\n\t\tCustomConversions customConversions = new MongoCustomConversions(\r\n\t\t\t\tArrays.asList(new BinaryToBsonBinaryConverter(), new BsonBinaryToBinaryConverter()));\r\n\t\treturn customConversions;\r\n\t}",
"public interface MongoClient {\n\n /**\n * Initiate the MongoDB client.\n * @param servers MongoDB servers.\n * @param username MongoDB login user name.\n * @param db Database instance name.\n * @param password Password.\n * @throws UnknownHostException UnknownHostException\n */\n void init(final Map<String, Integer> servers, final String username, final String db, final String password) throws UnknownHostException;\n\n /**\n * Save an new entity in MongoDB.\n * @param key MongoDB key.\n * @param object Object to be saved.\n * @param collectionName Collection's name.\n * @return Manipulation result.\n */\n boolean save(final String key, final Object object, final String collectionName);\n}",
"private void initializeMongoConverter() {\n mongoTemplate = new MongoTemplate(new SimpleMongoDbFactory(new MongoClient(), databaseName));\n JaxbAnnotationModule jaxbAnnotationModule = new JaxbAnnotationModule();\n ObjectMapper objectMapper = new ObjectMapper();\n objectMapper.registerModule(jaxbAnnotationModule);\n }",
"public interface PrimaryRepository extends MongoRepository<PrimaryMongoObject, String> {\n}",
"MongoTypeMapper getTypeMapper();",
"void pipe(BsonReader reader);",
"public interface MongoTypeMapper extends TypeMapper<DBObject> {\r\n\r\n\t/**\r\n\t * Returns whether the given key is the type key.\r\n\t * \r\n\t * @param key\r\n\t * @return\r\n\t */\r\n\tboolean isTypeKey(String key);\r\n\r\n\t/**\r\n\t * Writes type restrictions to the given DBObject. This usually results in\r\n\t * an $in-clause to be generated that restricts the type-key (e.g. _class)\r\n\t * to be in the set of type aliases for the given restrictedTypes.\r\n\t * \r\n\t * @param result\r\n\t * @param restrictedTypes\r\n\t */\r\n\tvoid writeTypeRestrictions(DBObject result, Set<Class<?>> restrictedTypes);\r\n\r\n}",
"public interface Repository<E> {\n\n\t/**\n\t * Uses mongodb bson to find stored object\n\t * @param critera name-value paired\n\t * @return generic object\n\t */\n\tpublic E find(MongoDBCritera critera);\n\t\n\t/**\n\t * Alternative for find with MongoDBCritera\n\t * @param key key to filter\n\t * @param value value to find\n\t * @return found generic object\n\t */\n\tdefault E find(String key, Object value) {\n\t\tSearchCritera searchCritera = new SearchCritera(key, value);\n\t\treturn find(() -> searchCritera);\n\t}\n\t\n\t/**\n\t * Finds all stored generic objects\n\t * @return a collection of stored objects\n\t */\n\tpublic List<E> findAll();\n\t\n\t/**\n\t * Uses $set to override old data\n\t * @param entity to override\n\t */\n\tpublic void update(E entity);\n\t\n\t/**\n\t * Inserts generic type, won't add if already exists\n\t * @param entity entity to add\n\t */\n\tpublic void add(E entity);\n\t\n\t/**\n\t * Removes generic object, alternative form below\n\t * @param critera to search upon\n\t */\n\tpublic void remove(MongoDBCritera critera);\n\t\n\t/**\n\t * Optional method for filtering objects\n\t * @param key to search on\n\t * @param value to find\n\t */\n\tdefault void remove(String key, Object value) {\n\t\tSearchCritera searchCritera = new SearchCritera(key, value);\n\t\tremove(() -> searchCritera);\n\t}\n}",
"public static Document adaptToMongo(Object java) {\n\t\t\n\t\tGson gson = JsonUtil.getGson();\n\t\treturn Document.parse(gson.toJson(java));\n\t}",
"public interface IAllegro2MongoApi extends IAllegro2Api, IAllegro2MongoDecryptor\n{\n /**\n * Create a new EncryptedDocumentBuilder.\n * \n * This can be used to build an encrypted document which can be stored in a Mongo database.\n * \n * @return A new EncryptedDocumentBuilder.\n */\n EncryptedDocumentBuilder newEncryptedDocumentBuilder();\n\n @Override\n AllegroMongoConsumerManager.AbstractBuilder<?,?> newConsumerManagerBuilder();\n}",
"public interface Database extends MongoRepository<DataObject, String> {\n\t/**\n\t * Returns an entry with the specified \"uid\"\n\t * \n\t * This is implemented correctly by Spring simply because of the method\n\t * name. So cool!\n\t * \n\t * @param uid\n\t * \"uid\" of the entry to find\n\t * @return DataObject representation of the entry with the specified \"uid\"\n\t */\n\tpublic DataObject findByUid(String uid);\n}",
"public interface MongoRunnable {\r\n public void run(MongoSession ms);\r\n}",
"public interface RatingRepository extends MongoRepository<Rating,String> {\n\n}",
"public interface userRepository extends MongoRepository<User, String> {\n\n}",
"public interface TagRepository extends MongoRepository<Tag,String> {\n\n}",
"@Test\n\tpublic void testConversionToMongoFromUser() {\n\t\tUserConverter use = new UserConverter();\n\t\tUserModel user = new UserModel();\n\t\t//TODO start generating usernames since we're using indexes on user \n\t\tRandomGenerator rn = new RandomGenerator();\n\t\tString u = rn.randomIdentifier();\n\t\tuser.setUname(u);\n\t\t//if you accidentally delete the wrong mongo entries uncomment the following line and run tests once and recomment it\n\t\t//user.setName(\"matti.testi\")\n\t\tuser.setEmail(\"testiEmai@mail.com\");\n\t\tuser.setFname(\"matti\");\n\t\tuser.setLname(\"testi\");\n\t\tInteger[] i ={ 1,2,3};\n\t\tuser.setRoles(i);\n\t\t//send this user to converter\n\t\tDocument doc = use.toUserModel(user);\n\t\tMongoClient client = conn.getInstance();\n\t\tMongoDatabase db = client.getDatabase(\"testing\");\n\t\n\t\tMongoCollection<Document> collection = db.getCollection(\"Users\");\n\t\tcollection.insertOne(doc);\n\t\t\n\t\tDocument query = new Document(\"uname\", \"matti\");\n\t\t\t\t\n\t\t//DBObject data = this.col.findOne(query);\n\t\t//return PersonConverter.toPerson(data);\n\t\tFindIterable<Document> result ;\n\t\tresult = collection.find(query);\n\t\tSystem.out.println();\n\t\t//TODO add asserts to this \n\t}",
"public interface TeapotRepository extends MongoRepository<Teapot, String> {\n\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new SessionWriter for a specified session. This can be used in a clustered system to write messages outbound for a system on its primary node. In a clustered system the SessionProxy would be hooked so writing messages outbound on a normal Session object won't work. Messages written using this writer won't update the sent sequence number of any corresponding Session object. This is designed to support the intended usecase of hooking the session proxy. | public SessionWriter sessionWriter(
final long sessionId, final long connectionId, final int sequenceIndex)
{
return poller.sessionWriter(sessionId, connectionId, sequenceIndex);
} | [
"public RestOpSession.Builder createSession(RestSession session) throws Exception {\n\t\treturn RestOpSession.create(this, session).logger(callLogger).debug(debug.isDebug(this, session.getRequest()));\n\t}",
"public Session wrapSession(Session realSession)\n {\n if (sessionWrapperClass == null)\n {\n return realSession;\n }\n\n try\n {\n Constructor<? extends MockSession> constructor = sessionWrapperClass\n .getConstructor(MockingDatabaseInterceptor.class, Session.class);\n return constructor.newInstance(this, realSession);\n }\n catch (Exception e)\n {\n throw new RuntimeException(\"wrapSession failed\", e);\n }\n }",
"protected ProxySession createProxySession(Socket clientSock, Socket targetSock) {\n\t\treturn new ProxySession(\n\t\t\t\tnew LookupPayloadInjectingProxyThread(clientSock, targetSock, this._payload),\n\t\t\t\tnew PassThroughProxyThread(targetSock, clientSock)\n\t\t);\n\t}",
"@POST\n public Response createSession(Session session) throws URISyntaxException {\n log.debug(\"REST request to save Session : {}\", session);\n sessionRepository.create(session);\n return HeaderUtil.createEntityCreationAlert(Response.created(new URI(\"/resources/api/session/\" + session.getId())),\n \"session\", session.getId().toString())\n .entity(session).build();\n }",
"public void addSession(Session session) {\r\n sessionMap.put(session.id(), session);\r\n }",
"public void setSession(Session newSession);",
"public static Builder builder(Session session) {\n return new Builder(session);\n }",
"Session decorate(Session session);",
"public Session createSession() {\n\t\tSession session = new Session();\n\t\tput(session.getId(), session);\n\t\treturn session;\n\t}",
"SocketWriter newSocketWriter(SocketConnection connection);",
"public String toJSON(Session session) {\n\t\ttry {\n\t\t\tmapper.writeValue(new File(\"SessionFromJava.json\"), session);\n\t\t\treturn mapper.writeValueAsString(session);\n\t\t} catch (JsonGenerationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (JsonMappingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn null;\n\t}",
"protected void writeSessionInfoToMetrics(UserSession session) {\n Metrics metrics = getMetrics();\n if (metrics != null && session != null) {\n metrics.setSessionId(session.getInternalSessionToken());\n metrics.setUserId(session.getId());\n metrics.setStudy(session.getStudyIdentifier().getIdentifier());\n }\n }",
"void setSession(Session session);",
"public void setSession(Session session);",
"void saveSession(SessionData session);",
"public void add(S session);",
"protected AbstractMessageWriter<SimpleHttpResponse> makeHttpResponseWriter(final SessionOutputBuffer outputBuffer) {\n return new SimpleHttpResponseWriter();\n }",
"void setUnderlyingSessionName(String newSession);",
"private static String generateSessionNameLine(Session session){\n String sessionNameLineToWrite = \"\";\n sessionNameLineToWrite\n += \"Session : \"\n + SEPARATOR_COLUMN_CSV\n + session.getSessionName()\n + \"\\n\";\n return sessionNameLineToWrite;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Phase1b Event: Received a reply to my ballot preparation request. Action: If the reply contains a higher ballot, we must resign. Otherwise, if we acquired a majority with the receipt of this reply, send all previously accepted (but uncommitted) requests reported in the prepare replies, each in its highest reported ballot, to all replicas. These are the proposals that get carried over across a ballot change and must be reproposed. Return: A list of messages each of which has to be multicast (proposed) to all replicas. | private MessagingTask handlePrepareReply(PrepareReplyPacket prepareReply) {
// necessary to defragment first for safety
if ((prepareReply = PrepareReplyAssembler.processIncoming(prepareReply)) == null) {
return null;
}
this.paxosManager.heardFrom(prepareReply.acceptor); // FD optimization,
MessagingTask mtask = null;
ArrayList<ProposalPacket> preActiveProposals = null;
ArrayList<AcceptPacket> acceptList = null;
if ((preActiveProposals = PaxosCoordinator.getPreActivesIfPreempted(
this.coordinator, prepareReply, this.groupMembers)) != null) {
log.log(Level.INFO,
"{0} ({1}) election PREEMPTED by {2}",
new Object[] { this,
PaxosCoordinator.getBallotStr(this.coordinator),
prepareReply.ballot });
this.coordinator = null;
if (!preActiveProposals.isEmpty())
mtask = new MessagingTask(prepareReply.ballot.coordinatorID,
(preActiveProposals.toArray(new PaxosPacket[0])));
} else if ((acceptList = PaxosCoordinator.handlePrepareReply(
this.coordinator, prepareReply, this.groupMembers)) != null
&& !acceptList.isEmpty()) {
mtask = new MessagingTask(this.groupMembers,
((acceptList).toArray(new PaxosPacket[0])));
// can't have previous accepts as just became coordinator
for(AcceptPacket accept : acceptList)
this.getPaxosManager().setIssuedAccept(accept);
log.log(Level.INFO, "{0} elected coordinator; sending {1}",
new Object[] { this, mtask });
} else if(acceptList != null && this.coordinator.isActive())
/* This case can happen when a node runs for coordinator and gets
* elected without being prompted by a client request, which can
* happen upon the receipt of any paxos packet and the presumed
* coordinator has been unresponsive for a while.
*/
log.log(Level.INFO, "{0} elected coordinator; no ACCEPTs to send",
new Object[] { this});
else
log.log(Level.FINE, "{0} received prepare reply {1}", new Object[] {
this, prepareReply.getSummary(log.isLoggable(Level.INFO)) });
return mtask; // Could be unicast or multicast
} | [
"private MessagingTask handlePrepare(PreparePacket prepare) {\n\t\tpaxosManager.heardFrom(prepare.ballot.coordinatorID); // FD optimization\n\n\t\tBallot prevBallot = this.paxosState.getBallot();\n\t\tPrepareReplyPacket prepareReply = this.paxosState.handlePrepare(\n\t\t\t\tprepare, this.paxosManager.getMyID());\n\t\tif (prepareReply == null)\n\t\t\treturn null; // can happen only if acceptor is stopped\n\t\tif (prepare.isRecovery())\n\t\t\treturn null; // no need to get accepted pvalues from disk during\n\t\t\t\t\t\t\t// recovery as networking is disabled anyway\n\n\t\t// may also need to look into disk if ACCEPTED_PROPOSALS_ON_DISK is true\n\t\tif (PaxosAcceptor.GET_ACCEPTED_PVALUES_FROM_DISK\n\t\t// no need to gather pvalues if NACKing anyway\n\t\t\t\t&& prepareReply.ballot.compareTo(prepare.ballot) == 0)\n\t\t\tprepareReply.accepted.putAll(this.paxosManager.getPaxosLogger()\n\t\t\t\t\t.getLoggedAccepts(this.getPaxosID(), this.getVersion(),\n\t\t\t\t\t\t\tprepare.firstUndecidedSlot));\n\n\t\tfor (PValuePacket pvalue : prepareReply.accepted.values())\n\t\t\t// if I accepted a pvalue, my acceptor ballot must reflect it\n\t\t\tassert (this.paxosState.getBallot().compareTo(pvalue.ballot) >= 0) : this\n\t\t\t\t\t+ \":\" + pvalue;\n\n\t\tlog.log(Level.INFO,\n\t\t\t\t\"{0} {1} {2} with {3}\",\n\t\t\t\tnew Object[] {\n\t\t\t\t\t\tthis,\n\t\t\t\t\t\tprepareReply.ballot.compareTo(prepare.ballot) > 0 ? \"preempting\"\n\t\t\t\t\t\t\t\t: \"acking\", prepare.ballot,\n\t\t\t\t\t\tprepareReply.getSummary(log.isLoggable(Level.INFO)) });\n\n\t\tMessagingTask mtask = prevBallot.compareTo(prepareReply.ballot) < 0 ?\n\t\t// log only if not already logged (if my ballot got upgraded)\n\t\tnew LogMessagingTask(prepare.ballot.coordinatorID,\n\t\t// ensures large prepare replies are fragmented\n\t\t\t\tPrepareReplyAssembler.fragment(prepareReply), prepare)\n\t\t\t\t// else just send prepareReply\n\t\t\t\t: new MessagingTask(prepare.ballot.coordinatorID,\n\t\t\t\t\t\tPrepareReplyAssembler.fragment(prepareReply));\n\t\tfor (PaxosPacket pp : mtask.msgs)\n\t\t\tassert (((PrepareReplyPacket) pp).getLengthEstimate() < NIOTransport.MAX_PAYLOAD_SIZE) : Util\n\t\t\t\t\t.suicide(this\n\t\t\t\t\t\t\t+ \" trying to return unfragmented prepare reply of size \"\n\t\t\t\t\t\t\t+ ((PrepareReplyPacket) pp).getLengthEstimate()\n\t\t\t\t\t\t\t+ \" : \" + pp.getSummary() + \"; prevBallot = \"\n\t\t\t\t\t\t\t+ prevBallot);\n\t\treturn mtask;\n\t}",
"private MessagingTask[] handleBatchedAcceptReply(\n\t\t\tBatchedAcceptReply batchedAR) {\n\t\tthis.paxosManager.heardFrom(batchedAR.acceptor);\n\t\tArrayList<MessagingTask> preempts = new ArrayList<MessagingTask>();\n\t\tArrayList<MessagingTask> decisions = new ArrayList<MessagingTask>();\n\t\tArrayList<MessagingTask> undigestedAccepts = new ArrayList<MessagingTask>();\n\n\t\tInteger[] acceptedSlots = batchedAR.getAcceptedSlots();\n\t\t// DelayProfiler.updateCount(\"BATCHED_ACCEPT_REPLIES\", 1);\n\n\t\tLevel level = Level.FINER;\n\t\tlog.log(level, \"{0} handling batched accept reply {1}\", new Object[]{this, batchedAR.getSummary(log.isLoggable(level))});\n\n\t\t// sort out decisions from preempted proposals\n\t\tfor (Integer slot : acceptedSlots) {\n\t\t\tMessagingTask mtask = this.handleAcceptReply(new AcceptReplyPacket(\n\t\t\t\t\tbatchedAR.acceptor, batchedAR.ballot, slot,\n\t\t\t\t\tbatchedAR.maxCheckpointedSlot, 0, batchedAR));\n\t\t\tassert (mtask == null || mtask.msgs.length == 1);\n\n\t\t\tif (mtask != null)\n\t\t\t\t// preempted noop\n\t\t\t\tif (((PaxosPacket) mtask.msgs[0]).getType().equals(\n\t\t\t\t\t\tPaxosPacket.PaxosPacketType.REQUEST))\n\t\t\t\t\tpreempts.add(mtask);\n\t\t\t// good case\n\t\t\t\telse if (((PaxosPacket) mtask.msgs[0]).getType().equals(\n\t\t\t\t\t\tPaxosPacket.PaxosPacketType.DECISION))\n\t\t\t\t\tdecisions.add(mtask);\n\t\t\t// undigested accept\n\t\t\t\telse if (((PaxosPacket) mtask.msgs[0]).getType().equals(\n\t\t\t\t\t\tPaxosPacket.PaxosPacketType.ACCEPT))\n\t\t\t\t\t undigestedAccepts.add(mtask);\n\t\t\t\telse\n\t\t\t\t\tassert (false);\n\t\t}\n\n\t\t// batch each of the two into single messaging task\n\t\tPaxosPacket[] decisionMsgs = new PaxosPacket[decisions.size()];\n\t\tfor (int i = 0; i < decisions.size(); i++)\n\t\t\tdecisionMsgs[i] = decisions.get(i).msgs[0];\n\n\t\tMessagingTask decisionsMTask = new MessagingTask(this.groupMembers,\n\t\t\t\tdecisionMsgs);\n\n\t\treturn MessagingTask.combine(\n\t\t\t\tMessagingTask.combine(decisionsMTask,\n\t\t\t\t\t\tpreempts.toArray(new MessagingTask[0])),\n\t\t\t\tundigestedAccepts.toArray(new MessagingTask[0]));\n\t}",
"private void sendPrepareToReplicas (Request received_req) throws IOException {\r\n\t\t\tdisplayMessage(\"\\n\\nSending Prepare: request to all replicas.\");\r\n\t\t\t//for loop should be here\r\n\t\t\t//create prepare message\r\n\t\t\tPrepare prepare_msg = new Prepare();\r\n\t\t\tprepare_msg.m = received_req.op; //take message from the client \r\n\t\t\tprepare_msg.v = state.view_number; //send view number\r\n\t\t\tprepare_msg.n = state.op_number; //and current op_number\r\n\t\t\tprepare_msg.k = state.commit_number;\r\n\t\t\t\r\n\t\t\t//generate message\r\n\t\t\tString message = prepare_msg.toString();\r\n\t\t\tdisplayMessage( \"\\nPrepare: message\\n\" );\r\n\t\t\tbyte data[] = message.getBytes();\r\n\t\t\t\r\n\t\t\tDatagramPacket sendPacket1 = new DatagramPacket( \r\n\t\t\t\t\tdata, data.length,\r\n\t\t\t\t\tInetAddress.getByName(\"localhost\"), ports[1] ); //should be taken from config\r\n\t\t\t\r\n\t\t\tsocket.send( sendPacket1 ); // send packet to the first replica\r\n\t\t\tDatagramPacket sendPacket2 = new DatagramPacket( \r\n\t\t\t\t\tdata, data.length,\r\n\t\t\t\t\tInetAddress.getByName(\"localhost\"), ports[2] ); //should be taken from config\r\n\t\t\t\r\n\t\t\tsocket.send( sendPacket2 ); // send packet to the second replica\r\n\t\t\t\r\n\t\t\tdisplayMessage( \"Prepare sent\\n\" );\r\n\t\t}",
"pb4server.BuffBagAskReq getBuffBagAskReq();",
"private void sendPendingAcks()\r\n\t{\r\n\t\tsynchronized (_PendingAcks)\r\n\t\t{\r\n\t\t\tif (_PendingAcks.size() > 0)\r\n\t\t\t{\r\n\t\t\t\tPacketAckPacket acks = new PacketAckPacket();\r\n\t\t\t\tacks.ID = new int[_PendingAcks.size()];\r\n\t\t\t\tacks.getHeader().setReliable(false);\r\n\t\t\t\tint i = 0;\r\n\t\t\t\tIterator<Integer> iter = _PendingAcks.iterator();\r\n\t\t\t\twhile (iter.hasNext())\r\n\t\t\t\t{\r\n\t\t\t\t\tacks.ID[i++] = iter.next();\r\n\t\t\t\t}\r\n\t\t\t\t_PendingAcks.clear();\r\n\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tsendPacket(acks);\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception ex)\r\n\t\t\t\t{\r\n\t\t\t\t\tLogger.Log(\"Exception when sending Ack packet\", Logger.LogLevel.Error, _Client, ex);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void zabPropose() {\r\n\t\tif (!proposed && !msg_queue.isEmpty()) {\r\n\t\t\tproposed = true;\r\n\t\t\tList<Object> list = new LinkedList<Object>();\r\n\t\t\twhile (!msg_queue.isEmpty()) {\r\n\t\t\t\tfor (Object o : ((TotalOrderMessage) msg_queue.poll())\r\n\t\t\t\t\t\t.getMessages()) {\r\n\t\t\t\t\tlist.add(o);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tTotalOrderMessage tom = new TotalOrderMessage(list.toArray(new Object[0]));\r\n\t\t\ttom.setTotalOrderIdStart(toid);\r\n\t\t\ttom.setTotalOrderSequenceNumber(tosn++);\r\n\t\t\ttoid += tom.getMessages().length;\r\n\t\t\tPaxosObjectProposal proposal = new PaxosObjectProposal(tom);\r\n\t\t\ttry {\r\n\t\t\t\tPaxosPropose event = new PaxosPropose(this.channel,\r\n\t\t\t\t\t\tDirection.DOWN, this);\r\n\t\t\t\tevent.value = proposal;\r\n\t\t\t\tevent.epoch = this.epoch;\r\n\t\t\t\tevent.sn = ++this.sn;\r\n\t\t\t\tevent.init();\r\n\t\t\t\tevent.go();\r\n\t\t\t} catch (AppiaEventException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"synchronized public void processWaitingRequests(boolean processCertifiedMessagesAsWell) {\n if (processCertifiedMessagesAsWell) {\n CertifiedMessageManager cmmgr = CertifiedMessageManager.getSingleton();\n cmmgr.resumeConnectionPoolMessages(getName());\n }\n while (isStarted() && waitingQueue.size()>0 && super.getNumActive()<getPoolSize()) {\n WaitingConnectionRequest req = waitingQueue.remove(0);\n try {\n PooledAdapterConnection conn = this.getConnection(\"reserved-for-\" + req.activityInstId, req.activityInstId);\n boolean processed = processWaitingRequest(req, conn);\n if (!processed) {\n super.returnObject(req.connection);\n }\n } catch (Exception e) {\n StandardLogger logger = LoggerUtil.getStandardLogger();\n logger.severeException(\"Failed to process waiting request \" + req.assignee, e);\n }\n }\n }",
"private MessagingTask[] handleProposal(RequestPacket proposal) {\n\t\tassert (proposal.getEntryReplica() != IntegerMap.NULL_INT_NODE) : proposal;\n\t\t// could be multicast to all or unicast to coordinator\n\t\tMessagingTask[] mtasks = new MessagingTask[2];\n\t\tRequestInstrumenter.received(proposal, proposal.getForwarderID(),\n\t\t\t\tthis.getMyID());\n\t\tif (PaxosCoordinator.exists(this.coordinator,\n\t\t\t\tthis.paxosState.getBallot())) {\n\t\t\t// multicast ACCEPT to all\n\t\t\tproposal.addDebugInfoDeep(\"a\");\n\t\t\tAcceptPacket multicastAccept = this.getPaxosManager()\n\t\t\t\t\t.getPreviouslyIssuedAccept(proposal);\n\t\t\tif (multicastAccept == null || !multicastAccept.ballot.equals(this.coordinator.getBallot()))\n\t\t\t\tthis.getPaxosManager().setIssuedAccept(\n\t\t\t\t\t\tmulticastAccept = PaxosCoordinator.propose(\n\t\t\t\t\t\t\t\tthis.coordinator, this.groupMembers, proposal));\n\t\t\tif (multicastAccept != null) {\n\t\t\t\tassert (this.coordinator.getBallot().coordinatorID == getMyID() && multicastAccept.sender == getMyID());\n\t\t\t\tif (proposal.isBroadcasted())\n\t\t\t\t\tmulticastAccept = this.paxosManager.digest(multicastAccept);\n\t\t\t\tmtasks[0] = multicastAccept != null ? new MessagingTask(\n\t\t\t\t\t\tthis.groupMembers, multicastAccept) : null; // multicast\n\t\t\t\tRequestInstrumenter.sent(multicastAccept, this.getMyID(), -1);\n\t\t\t\tlog.log(Level.FINER,\n\t\t\t\t\t\t\"{0} issuing accept {1} \",\n\t\t\t\t\t\tnew Object[] {\n\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\tmulticastAccept.getSummary(log\n\t\t\t\t\t\t\t\t\t\t.isLoggable(Level.FINER)) });\n\t\t\t}\n\t\t} else if (!proposal.isBroadcasted()) { // else unicast to current\n\t\t\t\t\t\t\t\t\t\t\t\t// coordinator\n\t\t\tlog.log(Level.FINER,\n\t\t\t\t\t\"{0} is not the coordinator; forwarding to {1}: {2}\",\n\t\t\t\t\tnew Object[] { this, this.paxosManager.intToString(this.paxosState.getBallotCoordLog()),\n\t\t\t\t\t\t\tproposal.getSummary(log.isLoggable(Level.FINER)) });\n\t\t\tint coordinator = this.paxosState.getBallotCoord();\n\n\t\t\tmtasks[0] = new MessagingTask(\n\t\t\t\t\tthis.paxosManager.isNodeUp(coordinator) ? coordinator\n\t\t\t\t\t\t\t// send to next coordinator if current seems dead\n\t\t\t\t\t\t\t: (coordinator = this.getNextCoordinator(\n\t\t\t\t\t\t\t\t\tthis.paxosState.getBallot().ballotNumber + 1,\n\t\t\t\t\t\t\t\t\tgroupMembers)),\n\t\t\t\t\tproposal.setForwarderID(this.getMyID())); // unicast\n\t\t\tif ((proposal.isPingPonging() || coordinator == this.getMyID())) {\n\t\t\t\tif (proposal.isPingPonging())\n\t\t\t\t\tlog.warning(this + \" jugglinging ping-ponging proposal: \"\n\t\t\t\t\t\t\t+ proposal.getSummary() + \" forwarded by \"\n\t\t\t\t\t\t\t+ proposal.getForwarderID());\n\t\t\t\tLevel level = Level.INFO;\n\t\t\t\tlog.log(level,\n\t\t\t\t\t\t\"{0} force running for coordinator; forwardCount={1}; debugInfo = {2}; coordinator={3}\",\n\t\t\t\t\t\tnew Object[] { this, proposal.getForwardCount(),\n\t\t\t\t\t\t\t\tproposal.getDebugInfo(log.isLoggable(level)),\n\t\t\t\t\t\t\t\tcoordinator });\n\t\t\t\tif (proposal.getForwarderID() != this.getMyID())\n\t\t\t\t\tmtasks[1] = new MessagingTask(getMyID(), mtasks[0].msgs);\n\t\t\t\tmtasks[0] = this.checkRunForCoordinator(true);\n\t\t\t} else { // forwarding\n\t\t\t\tproposal.addDebugInfo(\"f\", coordinator);\n\t\t\t}\n\t\t}\n\t\treturn mtasks;\n\t}",
"pb4server.BuffBagAskReqOrBuilder getBuffBagAskReqOrBuilder();",
"private void processElectionPacket(){\n isElectionInProcess = true;\n try {\n StringWriter str = new StringWriter();\n str.write(Listener.BULLY + \";\" + server.getMyPID() + \";\" + server.getMyIP());\n DatagramPacket bullyPacket = new DatagramPacket(\n str.toString().getBytes(),\n str.toString().length(),\n InetAddress.getByName(IdServer.MULTICAST_ADDRESS),\n IdServer.MULTICAST_PORT);\n System.out.println(\"Sending Bully packet\");\n server.getSocket().send(bullyPacket);\n } catch (IOException e) {\n System.out.println(\"Error sending bully packet.\");\n }\n }",
"public void prepareTheBill(){\n Waiter w = (Waiter) Thread.currentThread();\n CommunicationChannel com = new CommunicationChannel(serverHostName, serverPortNumb);\n Object[] params = new Object[0];\n \tObject[] state_fields = new Object[2];\n state_fields[0] = w.getWaiterID();\n \tstate_fields[1] = w.getWaiterState();\n\n Message m_toServer = new Message(3, params, 0, state_fields, 2, null); \n Message m_fromServer;\n\n while (!com.open ()){ \n \ttry{ \n \t\tThread.currentThread ();\n \t\tThread.sleep ((long) (10));\n \t}\n \tcatch (InterruptedException e) {}\n }\n \n com.writeObject (m_toServer);\n \n m_fromServer = (Message) com.readObject(); \n\n w.setState((int) m_fromServer.getStateFields()[1]);\n \n com.close ();\n }",
"private void processBullyPacket(List<String> parsedPacket){\n ArrayList<String> pidList = new ArrayList<>();\n ArrayList<String> ipList = new ArrayList<>();\n pidList.add(parsedPacket.get(1));\n ipList.add(parsedPacket.get(2));\n\n // Receive bully packets until we timeout or get a non bully packet\n try {\n int timeout = server.getSocket().getSoTimeout();\n server.getSocket().setSoTimeout(4000);\n while (true) {\n byte[] buf = new byte[1024];\n DatagramPacket recv = new DatagramPacket(buf, buf.length);\n socket.receive(recv);\n System.out.println(\"Received Packet containing in bully: \" + new String(buf));\n List<String> bullyPacket = new ArrayList<>(Arrays.asList((new String(buf)).split(\";\")));\n if (bullyPacket.get(0).equals(BULLY)) {\n pidList.add(bullyPacket.get(1));\n ipList.add(bullyPacket.get(2));\n }\n else\n break;\n }\n server.getSocket().setSoTimeout(timeout);\n }catch (Exception e) {\n System.out.println(\"Stopped bully algorithm.\");\n }\n boolean isBiggest = true;\n for (String currPid: pidList) {\n System.out.print(\"Comparing PID: \" + currPid.trim());\n if (server.comparePids(currPid.trim()) > 0) {\n System.out.println(\", it was greater than our PID of \" + server.getMyPID());\n isBiggest = false;\n break;\n }\n }\n try {\n if (isBiggest) {\n StringWriter str = new StringWriter();\n str.write(Listener.IM_THE_COORDINATOR + \";\" + server.getMyPID());\n DatagramPacket coordPacket = new DatagramPacket(\n str.toString().getBytes(), str.toString().length(),\n InetAddress.getByName(IdServer.MULTICAST_ADDRESS),\n IdServer.MULTICAST_PORT);\n server.getSocket().send(coordPacket);\n server.setCoordinator(true);\n System.out.println(\"I AM THE COORDINATOR\");\n String name = \"//localhost:\" + server.getPort() + \"/Service\";\n RMIClientSocketFactory rmiClientSocketFactory = new SslRMIClientSocketFactory();\n RMIServerSocketFactory rmiServerSocketFactory = new SslRMIServerSocketFactory();\n Service stub;\n if (server.getStub() != null)\n stub = server.getStub();\n else\n stub = (Service) UnicastRemoteObject.exportObject((Service) server, 0, rmiClientSocketFactory, rmiServerSocketFactory);\n Registry registry = LocateRegistry.getRegistry(server.getPort());\n registry.rebind(name, stub);\n System.out.println(\"IdServer is bound!\");\n }\n } catch (RemoteException e) {\n System.out.println(\"Error setting up local registry.\");\n e.printStackTrace();\n }catch (IOException e) {\n System.out.println(\"Error sending i am coordinator.\");\n e.printStackTrace();\n }\n isElectionInProcess = false;\n }",
"private void prepareReply(ACLMessage msg) {\n\t\treply = msg.createReply();\n\t\treply.setPerformative(ACLMessage.REQUEST);\n\t\treply.setSender(getAID());\n\t}",
"@Override\n public void sendReliableProvisionalResponse(Response relResponse) throws SipException {\n if (this.pendingReliableResponseAsBytes != null) {\n throw new SipException(\"Unacknowledged response\");\n\n } else {\n SIPResponse reliableResponse = (SIPResponse) relResponse;\n this.pendingReliableResponseAsBytes = reliableResponse.encodeAsBytes(this.getTransport());\n this.pendingReliableResponseMethod = reliableResponse.getCSeq().getMethod();\n this.pendingReliableCSeqNumber = reliableResponse.getCSeq().getSeqNumber();\n }\n /*\n * In addition, it MUST contain a Require header field containing the option tag 100rel,\n * and MUST include an RSeq header field.\n */\n RSeq rseq = (RSeq) relResponse.getHeader(RSeqHeader.NAME);\n if (relResponse.getHeader(RSeqHeader.NAME) == null) {\n rseq = new RSeq();\n relResponse.setHeader(rseq);\n }\n\n try {\n if(rseqNumber < 0) {\n this.rseqNumber = (int) (Math.random() * 1000);\n }\n this.rseqNumber++;\n rseq.setSeqNumber(this.rseqNumber);\n this.pendingReliableRSeqNumber = rseq.getSeqNumber();\n\n // start the timer task which will retransmit the reliable response\n // until the PRACK is received. Cannot send a second provisional.\n this.lastResponse = (SIPResponse) relResponse;\n if ( this.getDialog() != null && interlockProvisionalResponses ) {\n boolean acquired = this.provisionalResponseSem.tryAcquire(1, TimeUnit.SECONDS);\n if (!acquired) {\n throw new SipException(\"Unacknowledged reliable response\");\n }\n }\n //moved the task scheduling before the sending of the message to overcome\n // Issue 265 : https://jain-sip.dev.java.net/issues/show_bug.cgi?id=265\n this.provisionalResponseTask = new ProvisionalResponseTask();\n this.sipStack.getTimer().scheduleWithFixedDelay(provisionalResponseTask, 0,\n SIPTransactionStack.BASE_TIMER_INTERVAL);\n this.sendMessage((SIPMessage) relResponse);\n } catch (Exception ex) {\n InternalErrorHandler.handleException(ex);\n }\n\n }",
"private void messageReceived(BodyCheckRequestsNext bagCheckNext) {\t\t\r\n\t\tif(queue.isEmpty()){\r\n\t\t\tisBodyCheckOccupied = false;\r\n\t\t} else {\r\n\t\t\tsendNextPassengerToBodyCheck();\r\n\t\t}\r\n\t\t\r\n\t\tif(!isAcceptingNewPassengers){\r\n\t\t\tshutdown();\r\n\t\t}\r\n\t}",
"private void sendPendingData() {\n assert(sendNextNumber >= sendUnackNumber);\n\n // Calculate congestion window difference\n long lastUnackNumber = sendUnackNumber + (long) Math.min(congestionWindow, MAX_WINDOW_SIZE);\n long difference = lastUnackNumber - sendNextNumber; // Available window\n\n // Send packets until either the congestion window is full\n // or there is no longer any flow to send\n long amountToSendByte = getFlowSizeByte(sendNextNumber);\n while (difference >= amountToSendByte && amountToSendByte > 0) {\n\n // If it has not yet been confirmed,actually send out the packet\n if (!acknowledgedSegStartSeqNumbers.contains(sendNextNumber)) {\n sendOutDataPacket(sendNextNumber, amountToSendByte);\n\n // If it has already been confirmed by selective acknowledgments, just move along\n } else {\n sendNextNumber += amountToSendByte;\n }\n\n // Determine next amount to send\n difference -= amountToSendByte;\n amountToSendByte = getFlowSizeByte(sendNextNumber);\n\n }\n\n }",
"private void deliverPackets() {\n\n\t\ttry {\n\t\t\tif (!mPendingNetMgmtPacketsQueue.isEmpty()) {\n\t\t\t\tdeliverNetMgmtPacket();\n\t\t\t} else if (!mDeviceQueue.isEmpty() || !mSecondDeviceQueue.isEmpty()) {\n\t\t\t\tdeliverNextCommandPacket();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.error(\"deliverPackets() {}\", e.toString());\n\t\t}\n\t}",
"public void collectPortion()\n {\n //Enters in critical region.\n mutex.down();\n\n //Get current thread.\n ClientProxy w = ( (ClientProxy) Thread.currentThread());\n\n //Waiter only updates his state to waiting portion when he is\n //delivering the first portion.\n if(numPortionsDelivered == 0)\n {\n //update waiter's state to waiting for portion.\n repoStub.updateWaiterState(WaiterStates.WAIPOR);\n w.setWaiterState(WaiterStates.WAIPOR);\n }\n\n //Waiter unlocks the chef, signaling him that the waiter has arrived.\n waitForWaiter.up();\n\n //Leaves critical region.\n mutex.up();\n\n //Waiter blocks here, waiting for to give him the food\n portionDelivered.down();\n\n }",
"private void receiveSellersProposals() {\n // Template is used to avoid loosing messages\n MessageTemplate messageTemplate = MessageTemplate.MatchPerformative(ACLMessage.PROPOSE);\n ACLMessage receivedProposal = this.getAgent().receive(messageTemplate);\n if (receivedProposal != null) {\n if (receivedProposal.getPerformative() == ACLMessage.PROPOSE) {\n // Take only responses addressed to this agent\n if (this.getAgent().getName().equals(receivedProposal.getContent().split(\",\")[0])) {\n sellerResponses.add(receivedProposal);\n String buyingQuantity = receivedProposal.getContent().split(\",\")[1];\n String buyingPrice = receivedProposal.getContent().split(\",\")[2];\n String sellerName = receivedProposal.getContent().split(\",\")[3];\n this.producerConsumerAgent.agentPrint(\"Received proposition from : \" + sellerName +\n \"\\toffers : \" + buyingQuantity + \" \" + this.producerConsumerAgent.getConsumingType() +\n \"\\tfor : \" + buyingPrice + \"€\");\n // Finding best selling ratio and agent must have enough money\n if (((Double.parseDouble(buyingPrice) / Double.parseDouble(buyingQuantity)) < (bestSellingPrice / bestSellerQuantity)) &&\n Double.parseDouble(buyingPrice) < this.producerConsumerAgent.getMoney()) {\n\n bestSellingPrice = Double.parseDouble(buyingPrice);\n bestSellerQuantity = Double.parseDouble(buyingQuantity);\n bestSellingAgentName = sellerName;\n }\n this.pendingReaching.remove(sellerName);\n }\n }\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Send the BarChart to the static BarChart controller which will return the series Y axis data as an list with integers. | protected List<Integer> getSerieData(){
return (List<Integer>) BarChartController.getSeriesData(bc);
} | [
"public BarChartApiBean getBarChart() {\n return barChart;\n }",
"public ChartYAxis getYAxis() { return _yaxis; }",
"private ArrayList<Entry> setYAxisValues(){\n ArrayList<Entry> yVals = new ArrayList<Entry>();\n for (int z = 0; z < 235; z++) {\n yVals.add(new Entry((float)graphArray[z], z));\n }\n return yVals;\n }",
"public void CreateDataBarChart();",
"@Configurable\r\n public YAxis[] getYAxes() {\r\n return yAxes.toArray(new YAxis[yAxes.size()]);\r\n }",
"public void showBarChart() {\r\n\r\n // Count classes\r\n int neutralCountPred = 0;\r\n int negativeCountPred = 0;\r\n int positiveCountPred = 0;\r\n\r\n int neutralCountAnsw = 0;\r\n int negativeCountAnsw = 0;\r\n int positiveCountAnsw = 0;\r\n\r\n for(Integer pred : predictions.values()) {\r\n switch (pred.intValue()) {\r\n case 0:\r\n negativeCountPred++;\r\n break;\r\n case 1:\r\n neutralCountPred++;\r\n break;\r\n case 2:\r\n positiveCountPred++;\r\n break;\r\n default:\r\n System.err.println(\"Illegal class index\");\r\n break;\r\n }\r\n }\r\n System.out.printf(\"PREDICTED \\nnegativeCountPred = %d, neutralCountPred = %d, positiveCountPred = %d\", negativeCountPred,\r\n neutralCountPred, positiveCountPred);\r\n\r\n for(Integer answer : rightAnswers.values()) {\r\n switch (answer.intValue()) {\r\n case 0:\r\n negativeCountAnsw++;\r\n break;\r\n case 1:\r\n neutralCountAnsw++;\r\n break;\r\n case 2:\r\n positiveCountAnsw++;\r\n break;\r\n default:\r\n System.err.println(\"Illegal class index\");\r\n break;\r\n }\r\n }\r\n System.out.printf(\"\\nRIGHT ANSWERS \\nnegativeCountAnsw = %d, neutralCountAnsw = %d, positiveCountAnsw = %d\", negativeCountAnsw,\r\n neutralCountAnsw, positiveCountAnsw);\r\n\r\n // Predicted classes\r\n XYChart.Series<String, Number> dataSeries1 = new XYChart.Series();\r\n dataSeries1.setName(\"Predicted\");\r\n dataSeries1.getData().add(new XYChart.Data(\"Neutral\", neutralCountPred));\r\n dataSeries1.getData().add(new XYChart.Data(\"Positive\", positiveCountPred));\r\n dataSeries1.getData().add(new XYChart.Data(\"Negative\", negativeCountPred));\r\n resultChart.getData().add(dataSeries1);\r\n\r\n // Predicted classes\r\n XYChart.Series<String, Number> dataSeries2 = new XYChart.Series();\r\n dataSeries2.setName(\"Right answers\");\r\n dataSeries2.getData().add(new XYChart.Data(\"Neutral\", neutralCountAnsw));\r\n dataSeries2.getData().add(new XYChart.Data(\"Positive\", positiveCountAnsw));\r\n dataSeries2.getData().add(new XYChart.Data(\"Negative\", negativeCountAnsw));\r\n resultChart.getData().add(dataSeries2);\r\n\r\n }",
"public Object[] getYValues() {\n return yValues;\n }",
"ArrayList<YChart> getChartList();",
"public void calculateYAxis()\n\t{\n\t\tyAxisValues = new int [5];\n\t\tfor (int i = 0; i < yAxisValues.length; i++)\n\t\t\tyAxisValues[i] = (int)(i*numericalVerticalSpacing);\n\t}",
"public BarData getData(){\n return values;\n }",
"private void createBarChart()\n {\n // Create the domain axis (performance ID names) and set its sizing\n // characteristics and font\n CategoryAxis domainAxis = new CategoryAxis(null);\n domainAxis.setMaximumCategoryLabelWidthRatio(0.8f);\n domainAxis.setLowerMargin(0.02);\n domainAxis.setUpperMargin(0.02);\n domainAxis.setTickLabelFont(STATS_Y_LABEL_FONT);\n\n // Create the range axis (statistics values) and set its tick label\n // format, minor grid line count, and font\n ValueAxis rangeAxis = new NumberAxis(PLOT_UNITS[0]);\n ((NumberAxis) rangeAxis).setNumberFormatOverride(new DecimalFormat(X_AXIS_LABEL_FORMAT));\n rangeAxis.setMinorTickCount(5);\n rangeAxis.setTickLabelFont(PLOT_LABEL_FONT);\n\n // Create a renderer to allow coloring the bars based on the user-\n // selected ID colors. Enable tool tips\n CPMBarRenderer renderer = new CPMBarRenderer();\n renderer.setBarPainter(new GradientBarPainter());\n renderer.setShadowVisible(false);\n renderer.setDrawBarOutline(true);\n renderer.setBaseOutlinePaint(Color.BLACK);\n renderer.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator());\n\n // Create the bar chart plot. Default to the first data set and 10 IDs\n // displayed. Display the bars horizontally\n barPlot = new CPMCategoryPlot(new SlidingCategoryDataset(barDataset,\n 0,\n 10),\n domainAxis,\n rangeAxis,\n renderer);\n barPlot.setOrientation(PlotOrientation.HORIZONTAL);\n\n // Position the statistics value label at the bottom of the chart and\n // make the minor grid lines visible\n barPlot.setRangeAxisLocation(AxisLocation.BOTTOM_OR_LEFT);\n barPlot.setRangeMinorGridlinesVisible(true);\n\n // Set the range (x-axis; values) so it can be panned. The CategoryPlot\n // class is extended to allow panning of the domain (y-axis; names)\n barPlot.setRangePannable(true);\n\n // Create the bar chart\n JFreeChart barChart = new JFreeChart(null, null, barPlot, false);\n\n // Set bar chart characteristics and create the chart panel\n barChartPanel = setChartCharacteristics(barChart);\n\n // Create a scroll bar\n barScrollBar = new JScrollBar(SwingConstants.VERTICAL);\n\n // Add a listener for scroll bar thumb position changes\n barScrollBar.getModel().addChangeListener(new ChangeListener()\n {\n /******************************************************************\n * Handle scroll bar thumb position changes\n *****************************************************************/\n @Override\n public void stateChanged(ChangeEvent ce)\n {\n // Update the y-axis based on the scroll bar thumb position\n adjustYAxisFromScrollBar();\n }\n });\n\n // Adjust the chart y-axis based on the mouse wheel movement\n barScrollBar.addMouseWheelListener(new MouseWheelListener()\n {\n /******************************************************************\n * Handle a y-axis mouse wheel movement event\n *****************************************************************/\n @Override\n public void mouseWheelMoved(MouseWheelEvent mwe)\n {\n // Adjust the new y-axis scroll bar thumb position by one unit\n // scroll amount based on mouse wheel rotation direction. The\n // scroll \"speed\" is reduced by half to make finer adjustment\n // possible\n barScrollBar.setValue(barScrollBar.getValue()\n + barScrollBar.getUnitIncrement()\n * (mwe.getUnitsToScroll() > 0\n ? 1\n : -1));\n }\n });\n\n // Create a panel for the bar chart scroll bar\n JPanel scrollBarPanel = new JPanel(new BorderLayout());\n scrollBarPanel.add(barScrollBar);\n scrollBarPanel.setBackground(barChartPanel.getBackground());\n\n // Create a panel to hold the bar chart and its associated scroll bar\n barPanel = new JPanel(new BorderLayout());\n barPanel.add(barChartPanel);\n barPanel.add(scrollBarPanel, BorderLayout.EAST);\n\n // Set the bar chart background and grid line colors\n setPlotColors();\n\n // Display/hide the bar chart grid lines\n setVerticalGridLines();\n\n // Listen for and take action on key presses\n createBarChartKeyListener();\n\n // Listen for and take action on chart (re)draw progress\n createBarChartProgressListener();\n\n // Listen for and take action on mouse wheel events\n createBarChartMouseWheelListener();\n }",
"private void setupBarChart(){\n\n // Basic BarChart Initialisation (Axis, Title, Legends)\n CategoryAxis xAxis = new CategoryAxis();\n NumberAxis yAxis = new NumberAxis();\n\n xAxis.setLabel(\"Patients\");\n barChart = new BarChart<String,Number>(xAxis,yAxis);\n\n barChart.setTitle(\"Total Cholesterol mg/dl\");\n barChart.setLegendVisible(false);\n\n // Prepares BarChart to handle data and display it\n series = new XYChart.Series();\n\n for (Object patient: this.getData()) {\n final XYChart.Data<String, Number> data = new XYChart.Data(((PatientModel) patient).getFirstName(), Double.parseDouble(((PatientModel) patient).getCholesterol()));\n data.nodeProperty().addListener(new ChangeListener<Node>() {\n @Override\n public void changed(ObservableValue<? extends Node> ov, Node oldNode, final Node node) {\n if (node != null) {\n setNodeStyle(data);\n displayLabelForData(data);\n }\n }\n });\n series.getData().add(data);\n }\n barChart.getData().addAll(series);\n }",
"public AxisViewY getAxisViewY()\n {\n AxisType axisType = getAxisTypeY();\n return (AxisViewY) _chartHelper.getAxisView(axisType);\n }",
"private void createBarChartAxes() {\n barChart.getData().add(teamData);\n try {\n // Create data series for boys and girls\n for (int i = 0; i < teams.length; i++) {\n final XYChart.Data<String, Number> data = new XYChart.Data<>(teams[i], readScoreFromFile(teams[i]));\n data.nodeProperty().addListener((ov, oldNode, node) -> {\n if (node != null) {\n displayLabelForData(data);\n }\n });\n stringProps[i].setValue(data.getYValue() + \"\");\n teamData.getData().add(data);\n }\n } catch (IOException e) {\n System.out.println(\"Failed to read file data\");\n }\n }",
"List<Axis> getyAxisValues() {\n\t\tfinal List<Axis> values = new ArrayList<Axis>();\n\t\ttry {\n\t\t\tfor (String result : analysisModel.getResultNames()) {\n\t\t\t\tvalues.add(AxisType.RESULT.newAxis(AxisName.Y1, result));\n\t\t\t}\n\t\t\tfor (Pair<String, DerivedData> pair : analysisModel\n\t\t\t\t\t.getDerivedDataModel().getDerivedData()) {\n\t\t\t\tfinal String name = pair.getFirst();\n\t\t\t\tfinal DerivedData derivedData = pair.getSecond();\n\t\t\t\tvalues.add(Axis.newDerivedAxis(AxisName.Y1, name, derivedData));\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tLOG.error(\"Failed to get result name list\", ex);\n\t\t}\n\t\treturn values;\n\t}",
"public int getYAxisValuesFrequency() {\n return yAxisValuesFrequency;\n }",
"final Rectangle[] getYTicks() {\n\n return yTicks;\n }",
"private void createBarChart(){\n HashMap<Character, Double> frequencies = countFrequency(proteinModel.getSequence());\n\n final CategoryAxis xAxis = new CategoryAxis();\n final NumberAxis yAxis = new NumberAxis();\n this.chart = new BarChart<String, Number>(xAxis, yAxis);\n this.chart.setTitle(\"Amino Acid Frequencies\");\n this.chart.setBarGap(2);\n xAxis.setLabel(\"Amino Acid\");\n yAxis.setLabel(\"Percent\");\n\n XYChart.Series<String, Number> series = new XYChart.Series<>();\n frequencies.forEach((Character key, Number value) -> {\n System.err.println(key);\n series.getData().add(new XYChart.Data<String, Number>(String.valueOf(key), value));\n });\n\n this.chart.getData().addAll(series);\n this.chart.setLegendVisible(false);\n }",
"public BarChartDataImpl(BarData values){\n this.values=values;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return list of blogs waiting for approval(0) / list of blogs approved(1) getBlogs(0) > list of blogs waiting for approval getBlogs(1) > list of blogs approved | List<BlogPost> getBlogs(int approved); | [
"@GetMapping(value = \"/listApprovedBlogs\")\n\t\t\t\tpublic ResponseEntity<List<Blog>> listApprovedBlog() {\n\t\t\t\t\tList<Blog> listBlogs = blogDAO.approvedBlogList();\n\t\t\t\t\tif (listBlogs.size() != 0) {\n\t\t\t\t\t\treturn new ResponseEntity<List<Blog>>(listBlogs, HttpStatus.OK);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn new ResponseEntity<List<Blog>>(listBlogs, HttpStatus.NOT_FOUND);\n\t\t\t\t\t}\n\t\t\t\t}",
"@GetMapping(value = \"/listRejectedBlogs\")\n\t\t\t\tpublic ResponseEntity<List<Blog>> listRejectedBlog() {\n\t\t\t\t\tList<Blog> listBlogs = blogDAO.rejectedBlogList();\n\t\t\t\t\tif (listBlogs.size() != 0) {\n\t\t\t\t\t\treturn new ResponseEntity<List<Blog>>(listBlogs, HttpStatus.OK);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn new ResponseEntity<List<Blog>>(listBlogs, HttpStatus.NOT_FOUND);\n\t\t\t\t\t}\n\t\t\t\t}",
"@RequestMapping(value = \"/PubBlogs\", method = RequestMethod.GET)\n @ResponseBody\n public List<Blog> getPubBlogs() {\n List<Blog> allBlogs = blogDAO.getAllBlogs();\n List<Blog> pubBlogs = new ArrayList<>();\n\n for (int i = 0; i < allBlogs.size(); i++) {\n if (allBlogs.get(i).isPublished()) {\n pubBlogs.add(allBlogs.get(i));\n }\n }\n\n return pubBlogs;\n }",
"@Test\n\tpublic void getApprovedBids() {\n\t\tList<Bid> b = bidRepo.listOfApprovedBids(\"Approved\");\n\t\tfor (Bid bid : b) {\n\t\t\tSystem.out.println(bid.getBidder().getBidderId() + \" \" + bid.getBidStatus());\n\t\t}\n\t}",
"public List<Blog> getAllBlogs();",
"List<BlogEntry> getUsersBlogEntries(BlogUser user);",
"@SuppressWarnings(\"unchecked\")\r\n public List<MemberBlog> getLatestBlogs()\r\n {\r\n return entityManager.createQuery(\r\n \"from MemberBlog b where b.member = :member order by b.entryDate desc\")\r\n .setParameter(\"member\", selectedMember)\r\n .setMaxResults(5)\r\n .getResultList();\r\n }",
"private JSONArray getBlogItems(){\n String reqUrl = \"https://www.tistory.com/apis/post/list\";\n String data = String.format(\"access_token=%s&output=%s&blogName=%s&count=%d\"\n ,blog.getAccess_token(),\"json\",blog.getBlogName(),itemCnt);\n try{\n HttpURLConnection conn = initConnGET(reqUrl,data);\n StringBuilder builder = new StringBuilder();\n String line = \"\";\n if (conn.getResponseCode() == conn.HTTP_OK) {\n InputStreamReader isr = new InputStreamReader(conn.getInputStream(), \"UTF-8\");\n BufferedReader reader = new BufferedReader(isr);\n while ((line = reader.readLine()) != null) {\n builder.append(line);\n }\n reader.close();\n }\n conn.disconnect();\n JSONArray items = new JSONObject(builder.toString())\n .getJSONObject(\"tistory\")\n .getJSONObject(\"item\")\n .getJSONArray(\"posts\");\n return items;\n }catch(Exception err){\n return null;\n }\n }",
"List<MSubmission> findSubmissionsUnfinished();",
"List<String> viewPendingApprovals();",
"public List<BlogPost> getBlogPostsOnBlog(Blog blog) {\n blogPost.setBlog(blog);\n List<BlogPost> blogPosts = new ArrayList<BlogPost>();\n List<BlogPost> tempList = blogPostFacade.findAll();\n for (BlogPost temp : tempList) {\n if (temp.getBlog().getId().equals(blogPost.getBlog().getId())) {\n blogPosts.add(temp);\n System.out.println(\"Blogs \" + temp.getTitle());\n }\n \n }\n return blogPosts;\n }",
"public List<Blog> list2(String permission,Page page);",
"@GetMapping(\"/getapprovals\")\n\t\tpublic @ResponseBody List<Approval> getapprovals()\n\t\t{\n\t\t\t\n\n\t\t\t/*\n\t\t\t * temporary list of approvals\n\t\t\t */\n\t\t\tList<Approval> tempList=new ArrayList<Approval>();\n\t\t\t\n\t\t\t//tempList=repository.findAll();\n\t\t\ttempList=service.getApprovals();\n\t\t\treturn tempList;\n\t\t}",
"private void getApprovalPendingNotices() {\n noOfRows = appParametersDAO.getIntParameter(MR_APPROVAL_ROWS_PER_PAGE);\n filterAndLoadMarriageNotices();\n }",
"List<BlogEntry> getBlogEntries(BlogUser user) throws DAOException;",
"AbstractList<BalanceChange> recentActivity() {\r\n\t\tArrayList<BalanceChange> activity = new ArrayList<BalanceChange>();\r\n\t\t\r\n\t\tint i=10;\r\n\t\twhile (i > 0) {\r\n\t\t\t//TODO\r\n\t\t\ti--;\r\n\t\t}\r\n\t\t\r\n\t\treturn activity;\r\n\t}",
"ResponseEntity<List<Priority>> findTaskPriorities();",
"List<Loan> getNotReturnedLoans();",
"private static List<Status> getStatuses(Twitter twitter){\n\t\tList<Status> mainList = new ArrayList<Status>(900);\n\t\tPaging page = new Paging();\n\t\twhile(true){\n\t\t\ttry{\n\t\t\t\tList<Status> list = twitter.getUserTimeline(USER,page);\n\t\t\t\t\n\t\t\t\tif(list.size() == 0) break;\n\t\t\t\t\n\t\t\t\tmainList.addAll(list);\n\t\t\t\tlong max_id = list.get(list.size()-1).getId();\n\t\t\t\t\n\t\t\t\tpage.setMaxId(max_id-1);\n\t\t\t}catch(TwitterException e){\n\t\t\t\tSystem.out.println(\"Exception caught :\" +\n\t\t\t\t\t\t\" some thing wrong, check internet connction or try after some time\");\n\t\t\t\tSystem.out.println(\"error message : \"+ e.toString());\n\t\t\t\tSystem.out.println(\"Program will quit now\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn mainList;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for f_Panel4 called 1 times. Type: DEFAULT. Build precedence: 3. | private org.gwtbootstrap3.client.ui.Panel get_f_Panel4() {
return build_f_Panel4();
} | [
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel34() {\n return build_f_Panel34();\n }",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel41() {\n return build_f_Panel41();\n }",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel24() {\n return build_f_Panel24();\n }",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel16() {\n return build_f_Panel16();\n }",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel48() {\n return build_f_Panel48();\n }",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel76() {\n return build_f_Panel76();\n }",
"CartogramWizardPanelFour getPanelFour ()\n\t{\n\t\treturn mPanelFour;\n\t}",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel17() {\n return build_f_Panel17();\n }",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel62() {\n return build_f_Panel62();\n }",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel137() {\n return build_f_Panel137();\n }",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel33() {\n return build_f_Panel33();\n }",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel23() {\n return build_f_Panel23();\n }",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel38() {\n return build_f_Panel38();\n }",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel108() {\n return build_f_Panel108();\n }",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel69() {\n return build_f_Panel69();\n }",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel90() {\n return build_f_Panel90();\n }",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel28() {\n return build_f_Panel28();\n }",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel128() {\n return build_f_Panel128();\n }",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel97() {\n return build_f_Panel97();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds information about the game's developers. | public GameBuilder developers(String developers) {
this.developers = developers;
return this;
} | [
"public String getDevelopers() {\n\t\treturn developers;\n\t}",
"@Override\n\tpublic java.lang.String getDevelopers() {\n\t\treturn _scienceApp.getDevelopers();\n\t}",
"public java.lang.String getDeveloperName() {\r\n return developerName;\r\n }",
"@Override\n\tpublic void setDevelopers(java.lang.String developers) {\n\t\t_scienceApp.setDevelopers(developers);\n\t}",
"public java.lang.String getDeveloperName() {\n return developerName;\n }",
"@Override\n\tpublic void setDevelopers(java.lang.String developers,\n\t\tjava.util.Locale locale) {\n\t\t_scienceApp.setDevelopers(developers, locale);\n\t}",
"public void setDeveloperName(java.lang.String developerName) {\r\n this.developerName = developerName;\r\n }",
"public void setDeveloperName(java.lang.String developerName) {\n this.developerName = developerName;\n }",
"public String getDeveloperId() {\n return developerId;\n }",
"public String getDeveloperId() {\n\t\treturn developerId;\n\t}",
"public User getDeveloper() {\n\t\treturn this.developer;\n\t}",
"public String getDeveloperContent() {\n return developerContent;\n }",
"@Override\n\tpublic java.util.Map<java.util.Locale, java.lang.String> getDevelopersMap() {\n\t\treturn _scienceApp.getDevelopersMap();\n\t}",
"public java.lang.String getExternalDeveloperName() {\r\n return externalDeveloperName;\r\n }",
"public String getDeveloperMessage() {\n return mDeveloperMessage;\n }",
"protected String getDeveloperMessage() {\n\t\treturn getMessage();\n\t}",
"int getRequiredDevelopers();",
"public String getCodeListDeveloper() {\r\n\t\treturn codeListDeveloper;\r\n\t}",
"public Integer getDeveloperId() {\n return developerId;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns value clamped between low and high boundaries. | public static int clamp(int value, int low, int high) {
return Math.max(low, Math.min(value, high));
} | [
"private double clamp(double v, double min, double max) { return (v < min ? min : (v > max ? max : v)); }",
"private double clamp(double val, double min, double max) { return Math.max(min, Math.min(max, val));\n }",
"private static double clamp(double min, double value, double max) {\n value = Math.abs(value);\n if (value >= min && value <= max) {\n return value;\n } else {\n return (value < min ? value : max);\n }\n }",
"public static double clamp(double value, double low, double high) {\n return Math.max(low, Math.min(value, high));\n }",
"public static int clamp(int val, int lowerBound, int upperBound)\r\n\t {\r\n\t return (val > upperBound) ? upperBound : (val < lowerBound ? lowerBound : val);\r\n\t }",
"private int clamp(int val, int min, int max){\n\t\tif(val > max){\n\t\t\tval = max;\n\t\t}\n\t\telse if(val < min){\n\t\t\tval = min;\n\t\t}\n\t\treturn val;\n\t}",
"private static final float clamp(float value, float min, float max) \n {\n if (value > max) // exceeds maximum value? ...\n {\n return max; // ... clamp it\n }\n else if (value > min) // within permissable range ...\n {\n return value; // ... use the value directly\n }\n else // less than minimum? ...\n {\n return min; // ... clamp it\n }\n }",
"public static int clamp(int value, int lower, int upper) {\n\t\tif (value < lower)\n\t\t\treturn lower;\n\t\telse if (value > upper)\n\t\t\treturn upper;\n\t\treturn value;\n\t}",
"public static int clamp(int value, int min, int max)\n {\n return value < min ? min : value > max ? max : value;\n }",
"public static double clamp(double min, double max, double val) {\n return (val < min) ? min : (val > max) ? max : val;\n }",
"public static float clamp(float min, float max, float val) {\n return (val < min) ? min : (val > max) ? max : val;\n }",
"private int clamp(int value) {\r\n\t\tif (value < 0)\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\telse if (value > 255)\r\n\t\t{\r\n\t\t\treturn 255;\r\n\t\t}\r\n\t\t\r\n\t\treturn value;\r\n\t\t\t\r\n\t}",
"public static int clamp(int x, int min, int max) {\n return x < min ? min : (x > max ? max : x);\n }",
"public static int clamp(int val) {\n if (val < 0) return 0;\n if (val > 127) return 127;\n return val;\n }",
"public static int clamp(int x, int min, int max) {\n if (x > max) {\n return max;\n }\n if (x < min) {\n return min;\n }\n return x;\n }",
"public static void clamp(Vec3i value, Vec3i lower, Vec3i upper) {\n\t\tvalue.x = clamp(value.x, lower.x, upper.x);\n\t\tvalue.y = clamp(value.y, lower.y, upper.y);\n\t\tvalue.z = clamp(value.z, lower.z, upper.z);\n\t}",
"public void setClampingValue(int value) {\r\n clampValue = value;\r\n }",
"static int clamp(int x, int a, int b) {\n if (x < a) {\n return a;\n }\n if (x > b) {\n return b;\n }\n return x;\n }",
"public JTensor clamp(JType minValue, JType maxValue) {\n JTensor r = new JTensor();\n TH.THTensor_(clamp)(r, this, minValue, maxValue);\n return r;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Can get a matrix column. | @Test
public void testGetMatrixColumn() {
final Matrix33d m = getMatrix();
final Vector3d expected = V2;
final Vector3d v = new Vector3d();
m.getMatrixColumn(v, 1);
assertEquals(v.toString(), expected.toString());
} | [
"int getColumn(int x, int y){\n return board[x][y].getColumn();\n }",
"public abstract int getCol(int x);",
"Column getCol();",
"String getColumn();",
"private static int getCol(int idx){\n return idx % dimension;\n }",
"public Column getColumn() {\r\n return column;\r\n }",
"public int getcolumn() {\r\n return column;\r\n }",
"public int getColumn() {\n return mColumn;\n }",
"public Object[] getColumn(int c) {\n// Object[] dta = new Object[data.rows];\n// for (int i = 0; i < data.rows; i++)\n// dta[i] = data.values[c][c];\n return data.values[c];\n }",
"@Test\r\n public void testColumns() {\r\n int expResult=2;\r\n int result=matrixA.columns();\r\n assertEquals(expResult, result);\r\n }",
"Column getColumn(String name);",
"public int get(int x, int y){\n return matriz[x][y];\n }",
"private int get(int i, int j){\r\n\t\treturn matrix[i][j];\r\n\t}",
"java.lang.String getColumn();",
"long getCellColumn();",
"public int getCol() {\n\t\treturn col_index;\n\t}",
"public int getProbeColumn(int column, int row);",
"public SQLColumn getColumn() {\r\n return this.column;\r\n }",
"public final static float[] getColumnVector(float[][] matrix, int column) {\n\t\tfloat[] cvector = new float[matrix.length];\n\t\tfor (int i = 0; i < matrix.length; i++) {\n\t\t\tcvector[i] = matrix[i][column];\n\t\t}\n\t\t\n\t\treturn cvector;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A list of suggestions. repeated .google.cloud.dataqna.v1alpha.Suggestion suggestions = 1; | @java.lang.Override
public com.google.cloud.dataqna.v1alpha.Suggestion getSuggestions(int index) {
return suggestions_.get(index);
} | [
"@java.lang.Override\n public java.util.List<? extends com.google.cloud.dataqna.v1alpha.SuggestionOrBuilder> \n getSuggestionsOrBuilderList() {\n return suggestions_;\n }",
"@java.lang.Override\n public java.util.List<com.google.cloud.dataqna.v1alpha.Suggestion> getSuggestionsList() {\n return suggestions_;\n }",
"@java.lang.Override\n public com.google.cloud.dataqna.v1alpha.SuggestionOrBuilder getSuggestionsOrBuilder(\n int index) {\n return suggestions_.get(index);\n }",
"public void setSuggestions(List<String> suggestions) {\n this.suggestions = suggestions;\n }",
"public java.util.List<? extends com.google.cloud.dataqna.v1alpha.SuggestionOrBuilder> \n getSuggestionsOrBuilderList() {\n if (suggestionsBuilder_ != null) {\n return suggestionsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(suggestions_);\n }\n }",
"public com.google.cloud.dataqna.v1alpha.SuggestionOrBuilder getSuggestionsOrBuilder(\n int index) {\n if (suggestionsBuilder_ == null) {\n return suggestions_.get(index); } else {\n return suggestionsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public List<String> getSuggestions() {\n return suggestions;\n }",
"public static List<Suggestion> getSuggestion() {\n\t\tEntityManager entitymanager = getEntityManager();\n\t\tList<Suggestion> sugs = entitymanager.createQuery(\"from Suggestion s\", Suggestion.class).getResultList();\n\t\tentitymanager.close();\n\t\treturn sugs;\n\t}",
"java.lang.String getSuggestions(int index);",
"String getSpellSuggestions();",
"private void createSuggestions() {\n String[][] content = Commands.printTable();\n for (String[] i : content){\n if (!i[1].equals(\"null\") && !i[2].equals(\"null\")){\n suggestions.add(\"Titel: \" + i[1] + \"; Komponist: \" + i[2]);\n }\n }\n }",
"@Test\r\n public void testGetSuggestions() {\r\n Backend backend = new Backend();\r\n \r\n List<String> suggestions = backend.getSuggestions(\"Abandone\");\r\n assertEquals(suggestions.toString(), \"[abandoned, abandon]\");\r\n \r\n suggestions = backend.getSuggestions(\"Journeyma\");\r\n assertEquals(suggestions.toString(), \"[journeyman]\");\r\n\r\n }",
"public com.google.protobuf.ByteString getSuggestionBytes() {\n java.lang.Object ref = suggestion_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n suggestion_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@ApiModelProperty(required = true, value = \"Short suggestions that are used to group attributes.\")\n\n public List<String> getSuggestions() {\n return suggestions;\n }",
"java.lang.String getSuggestion();",
"public String[] getSuggestions(){\n\t\t\tArrayList<Document> docList = theModel.getSuggestions(theSession.getUser(), 0, 15);\n\t\t\tString[] suggestionTitles = new String[docList.size()];\n\t\t\tfor(int i = 0; i < docList.size(); i++) {\n\t\t\t\tsuggestionTitles[i] = docList.get(i).getTitle();\n\t\t\t}\n\t\t\tsuggestions = docList;\n\t\t\t\n\t\t\treturn suggestionTitles;\n\t\t}",
"private static List<Address> getSuggestion() {\n List<Location> near = getNearestLocations(location);\n near.add(location);\n Log.i(TAG, \"getSuggestion: \" + near.size());\n List<Address> result = new ArrayList<Address>(near.size());\n for (int i = 0; i < Math.min(near.size(), 10); i++) {\n Location location = near.get(i);\n Address address = getCached(location);\n if (address == null) {\n address = getAddress(location);\n }\n Log.i(TAG, \"getSuggestion addressNull: \" + (address == null));\n if (address != null) {\n cache.put(location, address);\n result.add(address);\n }\n }\n return result;\n }",
"private void initializeSuggestionList() {\n\t\tArrayList<String> data = this.controller.getSuggestions();\n\t\tthis.casAdapter = new ContactAddSearchAdapter(this,\n\t\t\t\tR.layout.contact_addsearch_item_layout, data);\n\t\tthis.suggestion = (AutoCompleteTextView) this\n\t\t\t\t.findViewById(R.id.contact_addsearch_search_input);\n\t\tthis.suggestion.setDropDownAnchor(R.id.contact_addsearch_list);\n\t\tthis.suggestion.setDropDownBackgroundResource(R.color.grey_eleven);\n\t\tthis.suggestion.setAdapter(casAdapter);\n\t\t// Click event for single list row\n\t\tthis.suggestion.setOnItemClickListener(new OnItemClickListener() {\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\tcontroller.handleContactClick(casAdapter.getItem(position));\n\t\t\t}\n\t\t});\n\t}",
"int getSuggestionsCount();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a Builder by copying an existing Tordnsel instance | private Builder(trans.encoders.tordnsel.Tordnsel other) {
super(trans.encoders.tordnsel.Tordnsel.SCHEMA$);
if (isValidValue(fields()[0], other.descriptor_type)) {
this.descriptor_type = data().deepCopy(fields()[0].schema(), other.descriptor_type);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.src_date)) {
this.src_date = data().deepCopy(fields()[1].schema(), other.src_date);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.downloaded)) {
this.downloaded = data().deepCopy(fields()[2].schema(), other.downloaded);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.exit_nodes)) {
this.exit_nodes = data().deepCopy(fields()[3].schema(), other.exit_nodes);
fieldSetFlags()[3] = true;
}
} | [
"public static trans.encoders.tordnsel.Tordnsel.Builder newBuilder(trans.encoders.tordnsel.Tordnsel other) {\n return new trans.encoders.tordnsel.Tordnsel.Builder(other);\n }",
"public static trans.encoders.tordnsel.Tordnsel.Builder newBuilder(trans.encoders.tordnsel.Tordnsel.Builder other) {\n return new trans.encoders.tordnsel.Tordnsel.Builder(other);\n }",
"public static trans.encoders.tordnsel.Tordnsel.Builder newBuilder() {\n return new trans.encoders.tordnsel.Tordnsel.Builder();\n }",
"public static protocols.replication.Entity.Builder newBuilder(protocols.replication.Entity.Builder other) {\n return new protocols.replication.Entity.Builder(other);\n }",
"private Builder(com.trg.fms.api.Trip other) {\n super(SCHEMA$);\n if (isValidValue(fields()[0], other.id)) {\n this.id = data().deepCopy(fields()[0].schema(), other.id);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.driverId)) {\n this.driverId = data().deepCopy(fields()[1].schema(), other.driverId);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.carId)) {\n this.carId = data().deepCopy(fields()[2].schema(), other.carId);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.state)) {\n this.state = data().deepCopy(fields()[3].schema(), other.state);\n fieldSetFlags()[3] = true;\n }\n }",
"public Builder() {}",
"PulsarAdminBuilder clone();",
"private Builder() {}",
"private Builder() {\n super();\n }",
"private DVTEMPORAL(Builder builder) {\n super(builder);\n }",
"public Builder toBuilder() {\n return new Builder(this);\n }",
"private Builder(protocols.replication.Entity other) {\n super(SCHEMA$);\n if (isValidValue(fields()[0], other.id)) {\n this.id = data().deepCopy(fields()[0].schema(), other.id);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.ipadress)) {\n this.ipadress = data().deepCopy(fields()[1].schema(), other.ipadress);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.port)) {\n this.port = data().deepCopy(fields()[2].schema(), other.port);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.type)) {\n this.type = data().deepCopy(fields()[3].schema(), other.type);\n fieldSetFlags()[3] = true;\n }\n }",
"public static protocols.replication.Entity.Builder newBuilder() {\n return new protocols.replication.Entity.Builder();\n }",
"public static Builder factory(){\n return new Builder();\n }",
"protected T copyFrom(BodyBuilder other) {\n _pos = other._pos;\n _scale = other._scale;\n _angleRadians = other._angleRadians;\n _density = other._density;\n _restitution = other._restitution;\n\n _type = other._type;\n _isSensor = other._isSensor;\n return self();\n }",
"public static protocols.replication.Entity.Builder newBuilder(protocols.replication.Entity other) {\n return new protocols.replication.Entity.Builder(other);\n }",
"public BidBuilder(Bid bidToCopy) {\n propertyId = bidToCopy.getPropertyId();\n bidderId = bidToCopy.getBidderId();\n bidAmount = bidToCopy.getBidAmount();\n }",
"public static ProductBuilder builder() {\n return ProductBuilder.of();\n }",
"public abstract Building clone();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/Create Branch Manager by Admin | @RequestMapping(value="", method=RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
public @ResponseBody String createBranchManager(@RequestBody BranchManagerPOJO branchManager) throws JsonProcessingException {
String result=branchManagerService.insertBranchManager(branchManager);
return result;
} | [
"private void createAndSetNewBranch()\n {\n Date startDateOfArticle = getStartDateOfArticle();\n final String branchId = startDateOfArticle == null ? GWikiProps.formatTimeStamp(new Date()) : GWikiProps\n .formatTimeStamp(startDateOfArticle);\n\n wikiContext.runInTenantContext(branchId, getWikiSelector(), new CallableX<Void, RuntimeException>()\n {\n @Override\n public Void call() throws RuntimeException\n {\n final GWikiElement branchInfo = PlcUtils.createInfoElement(wikiContext, branchId, \"\", branchId, \"\");\n final GWikiElement branchFileStats = PlcUtils.createFileStats(wikiContext);\n wikiContext.getWikiWeb().getAuthorization().runAsSu(wikiContext, new CallableX<Void, RuntimeException>()\n {\n @Override\n public Void call() throws RuntimeException\n {\n wikiContext.getWikiWeb().saveElement(wikiContext, branchInfo, false);\n wikiContext.getWikiWeb().saveElement(wikiContext, branchFileStats, false);\n return null;\n }\n });\n GLog.note(GWikiLogCategory.Wiki, \"Autocreate branch: \" + branchId);\n return null;\n }\n });\n\n // set new created branch as selected\n selectedBranch = branchId;\n }",
"void createBranch(String name) throws GitException;",
"public BranchCreationPage clickNewBranchButton() {\r\n\t\tthis.newBranchButton.click();\r\n\t\treturn PageFactory.initElements(driver, BranchCreationPage.class);\r\n\t}",
"protected Branch createBranch(BranchCreateRequest request) {\n\t\tStringBuilder uuid = new StringBuilder();\n\t\twaitForJobs(() -> {\n\t\t\tBranchResponse response = call(() -> client().createBranch(PROJECT_NAME, request));\n\t\t\tassertThat(response).as(\"Created branch\").hasName(request.getName());\n\t\t\tif (request.isLatest()) {\n\t\t\t\tassertThat(response).as(\"Created branch\").isLatest();\n\t\t\t} else {\n\t\t\t\tassertThat(response).as(\"Created branch\").isNotLatest();\n\t\t\t}\n\t\t\tuuid.append(response.getUuid());\n\t\t}, COMPLETED, 1);\n\n\t\t// return new branch\n\t\treturn tx(() -> project().getBranchRoot().findByUuid(uuid.toString()));\n\t}",
"public BranchCreationPage clickNewBranchButton() {\n\t\tthis.newBranchButton.click();\n\t\treturn PageFactory.initElements(driver, BranchCreationPage.class);\n\t}",
"public void create(Branch branch) {\n branch_dao.create(branch);\n }",
"public InsertBranch() {\n initComponents();\n }",
"public void setBranchManager(String branchManager) {\n this.branchManager = branchManager;\n }",
"@PostMapping(\"/branches\")\n public ResponseEntity<Branch> createBranch(@RequestBody Branch branch)throws Exception{\n log.debug(\"REST request to create branch : {}\",branch);\n branch = branchService.save(branch);\n return ResponseEntity.created(new URI(\"/api/branches/\" + branch.getIfsc()))\n .headers(HeaderUtill.createEntityCreationAlert(\"Branch\", branch.getIfsc().toString()))\n .body(branch);\n }",
"@Transactional\n\t@Override\n\tpublic void createBranch(Branch branch) {\n\t\tcall = new SimpleJdbcCall(jdbcTemplate).withProcedureName(\"create_branch\");\n\t\tMap<String, Object> culoMap = new HashMap<String, Object>();\n\t\tculoMap.put(\"Pname_branch\", branch.getNameBranch());\n\t\tculoMap.put(\"Paddress_branch\", branch.getAddressBranch());\n\t\tculoMap.put(\"Pphone_branch\", branch.getPhoneBranch());\n\t\t\n\t\t\n\t\tSqlParameterSource src = new MapSqlParameterSource()\n\t\t\t\t.addValues(culoMap);\n\t\tcall.execute(src);\n\t}",
"HibJob enqueueBranchMigration(HibUser creator, HibBranch branch);",
"private void addBranch(TodoList todoList, String[] args) {\n String key = Util.get8BitIdFromString(args[2]);\n if (todoList.getAllBranches().containsKey(key)) {\n System.out.println(\n String.format(\"Branch %s (%s) already exists!\", key, todoList.getAllBranches().get(key).getName()));\n return;\n }\n Branch newBranch = new Branch(args[2]);\n todoList.getAllBranches().put(key, newBranch);\n System.out.println(String.format(\"Branch %s (%s) added successfully!\", newBranch.getId(), newBranch.getName()));\n if (todoList.getAllBranches().size() == 1) {\n todoList.setCurrentBranch(key);\n System.out.println(String.format(\"Branch %s (%s) is set to the current branch.\", key, newBranch.getName()));\n }\n Util.saveToListFile(todoList);\n }",
"public void createBranch(String branch)\r\n \t{\r\n \t\tif (this.hasBranch(branch))\r\n \t\t\tthrow new ExternalFileMgrException(ERR_BRANCH_ALREADY_EXISTS + branch);\r\n \t\tFile dstFolder= new File(this.externalDataFolder, branch);\r\n \t\tdstFolder.mkdir();\r\n \t}",
"public String getBranchManager() {\n return branchManager;\n }",
"public static void createMaster() {\n Master = new Branch(\"master\", Commit.defaultCommit.getSha1());\n File master = new File(Repository.GITLET_DIR, \"Master\");\n Repository.branchesMap.put(\"master\", Master);\n writeObject(master, Master);\n }",
"public static void createNewBranch(String[] args) throws IOException {\n if (!DOTFILE.exists()) {\n System.out.println(\"Not in an initialized Gitlet directory.\");\n System.exit(0);\n }\n validateNumArgs(\"branch\", args, 2);\n INITIALIZEDREPO.createNewBranch(args[1]);\n\n }",
"@Test\r\n public void addRestaurantBranchServiceTest()\r\n {\r\n numBranches = 1;\r\n\r\n RestaurantAdminServiceRequest service = rf.getRestaurantAdminService();\r\n\r\n RestaurantProxy rest = createRest(service,\r\n \"rest\",\r\n menuCats,\r\n menuCatCourses,\r\n numBranches,\r\n numBranchMenuCats,\r\n numBranchMenuCatCourses);\r\n\r\n rest = saveRest(service, rest, true);\r\n\r\n assertNotNull(rest);\r\n\r\n service = rf.getRestaurantAdminService(); // new service (service can be invoked once)\r\n rest = service.edit(rest); // make the restaurant editable\r\n\r\n // add course to the restaurant menu\r\n for (int i = 0; i < 2; ++i)\r\n {\r\n RestaurantBranchProxy branch = createRestBranch(service, 0, 0);\r\n branch.setAddress(\"Dror\" + i);\r\n service.addRestaurantBranch(rest, branch);\r\n ++numBranches;\r\n }\r\n\r\n rest = saveRest(service, rest, true);\r\n\r\n assertNotNull(rest);\r\n assertEquals(numBranches, rest.getBranches().size());\r\n }",
"public UpdateandRemoveBranch() {\n initComponents();\n }",
"public void insertBranch(Branches b) {\n \tdbHandler.insertBranch(b);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for the field indent. | public int getIndent() {
return indent;
} | [
"public int getIndent();",
"public String getTextIndent();",
"@ASTNodeAnnotation.Token(name=\"Indent\")\n public String getIndent() {\n return tokenString_Indent != null ? tokenString_Indent : \"\";\n }",
"int getIndentLevel();",
"int getIndentation() {\n return this.indentation;\n }",
"public String getIndentId() {\n return indentId;\n }",
"public java.lang.String getIndentLevel() {\n return indentLevel;\n }",
"public static String tab() {\n return indent;\n }",
"protected String getIndentString() {\n return indent.toString();\n }",
"@ManyToOne\n\t@JoinColumn(name=\"indent_id\", nullable=false)\n\tpublic Indent getIndent() {\n\t\treturn this.indent;\n\t}",
"int getIndentSize();",
"public IndentChar getIndentChar() {\n\t\treturn indentChar;\n\t}",
"protected String getIndent() \r\n\t{\r\n\tStringBuffer buffer = new StringBuffer();\r\n\tfor (int i = 0; i < indent; ++i)\r\n\t\tbuffer.append(' ');\r\n\treturn buffer.toString();\r\n\t}",
"private String getIndent() {\n\t\t// Create a buffer big enough to hold the whole indent.\n\t\tStringBuilder buffer = new StringBuilder(indentLevel * padding.length());\n\n\t\t// Repeatedly append the padding to the buffer, \"indentLevel\" number of times.\n\t\tfor (int i = 0; i < indentLevel; i++) {\n\t\t\tbuffer.append(padding);\n\t\t}\n\n\t\treturn buffer.toString();\n\t}",
"public int getIndentSize()\n\t{\n\t\treturn ((Integer)getProperty(\"indentSize\")).intValue();\n\t}",
"public String getIndentFiller() {\n return spaceFill;\n }",
"@VTID(44)\r\n boolean getAddIndent();",
"@VTID(148)\r\n int getCompactRowIndent();",
"protected short getIndentSize() {\n return (short) (tabLevel * tabSize);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convierte un objeto Json a una lista de mapa | public final static List<Map<String, Object>> convertirDesdeJsonAListaMapa(String json) {
ObjectMapper mapper = new ObjectMapper();
TypeReference<List<Map<String, Object>>> typeRef = new TypeReference<List<Map<String, Object>>>() {
};
try {
return mapper.readValue(json, typeRef);
} catch (IOException e) {
List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
list.add(Maps.newLinkedHashMap());
return list;
}
} | [
"public List<Map<String,Object>> jsonToList(String json) throws org.json.simple.parser.ParseException {\n\t\tList<Map<String,Object>> list=null;\n\t\tif(StringUtils.isNotBlank(json)) {\n\t\t\tJSONParser parser = new JSONParser();\n\t\t\tObject obj = parser.parse(json); \n\t\t\tlist = (List<Map<String, Object>>)obj;\n\t\t}\n\t\treturn list;\n\t}",
"private static List<DishMapping> parseMappingsFromJSON(JSONObject object) throws JSONException{\n List<DishMapping> mMappings = new ArrayList<DishMapping>();\n JSONArray mappings = object.getJSONArray(\"mappings\");\n for (int i = 0; i <mappings.length(); i++){\n JSONObject map = mappings.getJSONObject(i);\n List<Integer> mappedDishes = new ArrayList<Integer>();\n JSONArray mappingsJSON = map.getJSONArray(\"mapped_dishes\");\n for (int j = 0 ; j < mappingsJSON.length(); j++){\n mappedDishes.add(mappingsJSON.getInt(j));\n }\n DishMapping mapping = new DishMapping(map.getInt(\"restaurant_id\"), mappedDishes);\n mMappings.add(mapping);\n }\n return mMappings;\n }",
"private TrelloList mapToTrelloList(JsonValue JValue) {\n JsonObject obj = ((JsonObject) JValue);\n TrelloList tList = new TrelloList();\n tList.setId(obj.getString(ID));\n tList.setName(obj.getString(NAME));\n return tList;\n }",
"List<Movie> mapToMovieList(List<MovieResultJson> jsonResults);",
"protected static List<Map<String, String>> getListFromJsonArray(\n JSONArray jsonArray) {\n ArrayList<Map<String, String>> list = new ArrayList<Map<String, String>>();\n Map<String, String> map;\n // fill the list\n for (int i = 0; i < jsonArray.length(); i++) {\n map = new HashMap<String, String>();\n try {\n JSONObject jo = (JSONObject) jsonArray.get(i);\n // fill map\n Iterator iter = jo.keys();\n while (iter.hasNext()) {\n String currentKey = (String) iter.next();\n map.put(currentKey, jo.getString(currentKey));\n }\n // add map to list\n list.add(map);\n } catch (JSONException e) {\n Log.e(\"JSON\", e.getLocalizedMessage());\n }\n\n }\n return list;\n }",
"public static List<Image> toList(String json) {\n List<Image> images = new ArrayList<>();\n ObjectMapper mapper = new ObjectMapper();\n SimpleModule module = new SimpleModule();\n module.addDeserializer(Image.class, new ImageDeserializer());\n mapper.registerModule(module);\n try {\n images = mapper.readValue(json, mapper.getTypeFactory().constructCollectionType(ArrayList.class, Image.class));\n } catch (IOException e) {\n Log.d(TAG, \"toList: \" + e.getMessage());\n }\n return images;\n }",
"private void deserialise(JSONObject json) {\n Map map = json;\n\n id = Field.getString(map.get(\"id\"));\n author = Field.getResource(User.class, map.get(\"author\"), restclient);\n created = Field.getDateTime(map.get(\"created\"));\n items = Field.getResourceArray(ChangeLogItem.class, map.get(\n Field.CHANGE_LOG_ITEMS), restclient);\n }",
"public static ArrayList<Landmark> readJson(Context context) {\n String json = null;\n // convert json to String\n try {\n InputStream is = context.getAssets().open(\"database.json\");\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n\n Log.d(\"test\", json);\n\n // convert json String to List of Landmarks\n Landmark[] landmarkArray = new Gson().fromJson(json, Landmark[].class);\n\n Log.d(\"test\", \"LM List: \" + landmarkArray[0].getLongitude());\n\n ArrayList<Landmark> landmarkList = new ArrayList<Landmark>(Arrays.asList(landmarkArray));\n //List<Landmark> landmarkList = Arrays.asList(landmarkArray);\n\n return landmarkList;\n }",
"private List<CustomTrack> fillListWithJson(JSONObject json) throws JSONException {\n List<CustomTrack> customTrackList = new ArrayList<>();\n JSONArray ja = json.getJSONObject(\"tracks\").getJSONArray(\"items\");\n for (int i = 0; i < ja.length(); i++) {\n customTrackList.add(getCustomTrack(ja.getJSONObject(i)));\n }\n return customTrackList;\n }",
"Map<String, Object> parseToMap(String json);",
"List<Gist> deserializeGistsFromJson(String json);",
"public static <T> List<Map<String, Object>> convertirListaAListaDeMapas(List<T> lista) {\n\n\t\treturn lista.parallelStream().map(e -> convertirClaseAMapa(e)).collect(Collectors.toList());\n\n\t}",
"public static Map[] toMaps(String json) {\n try {\n return mapper.readValue(json, Map[].class);\n } catch (Exception e) {\n throw new JSONParseException(\"Failed to parse JSON string into a Java Maps\",e);\n }\n }",
"private Map<String, Object> parseMap(JSONObject obj) throws JSONException {\n Map<String, Object> values = new HashMap<>();\n Iterator<String> keys = obj.keys();\n while (keys.hasNext()) {\n String key = keys.next();\n values.put(key, parseObject(obj.get(key)));\n }\n return values;\n }",
"private List<OneDayCoordinateDTO> generateCoordList(String json) {\n\t\tGson gson = new Gson();\n\t\tOneDayCoordinateDTO[] chartArray = gson.fromJson(json, OneDayCoordinateDTO[].class);\n\t\tList<OneDayCoordinateDTO> chartList = Arrays.asList(chartArray);\n\t\treturn chartList;\n\t}",
"ArrayList<Tour> parsearResultado(String JSONstr) throws JSONException {\n ArrayList<Tour> tours = new ArrayList<>();\n JSONArray jsonTours = new JSONArray(JSONstr);\n if (jsonTours.length()!=0) {\n for (int i = 0; i < jsonTours.length(); i++) {\n JSONObject jsonResultado = jsonTours.getJSONObject(i);\n int jsonId = jsonResultado.getInt(\"Id\");\n String jsonNombre = jsonResultado.getString(\"Nombre\");\n String jsonUbicacion = jsonResultado.getString(\"Ubicacion\");\n String jsonFoto = jsonResultado.getString(\"FotoURL\");\n String jsonLikes = jsonResultado.getString(\"Likes\");\n String jsonDescripcion = jsonResultado.getString(\"Descripcion\");\n\n JSONObject jsonResultadoUsuario = jsonResultado.getJSONObject(\"Usuario\");\n int idUsuario = jsonResultadoUsuario.getInt(\"Id\");\n String nomUsuario = jsonResultadoUsuario.getString(\"Nombre\");\n String fotoUsuario = jsonResultadoUsuario.getString(\"FotoURL\");\n\n Usuario usu = new Usuario(nomUsuario, fotoUsuario, idUsuario, \"\", null, null);\n\n gustosparc = new ArrayList<>();\n JSONArray jsongustos = jsonResultado.getJSONArray(\"Gustos\");\n for (int j = 0; j < jsongustos.length(); j++) {\n JSONObject jsonresultadoGustos = jsongustos.getJSONObject(j);\n int jsonIdGusto = jsonresultadoGustos.getInt(\"Id\");\n String jsonnombregustos = jsonresultadoGustos.getString(\"Nombre\");\n Gusto gus = new Gusto(jsonIdGusto, jsonnombregustos);\n gustosparc.add(gus);\n }\n\n Tour t = new Tour(jsonNombre, jsonDescripcion, jsonFoto, jsonUbicacion, jsonId, jsonLikes, usu, null, gustosparc);\n tours.add(t);\n }\n }\n return tours;\n }",
"public final static Map<String, Object> convertirDesdeJsonAObjeto(String json) {\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\tTypeReference<Map<String, Object>> typeRef = new TypeReference<Map<String, Object>>() {\n\t\t};\n\t\ttry {\n\t\t\treturn mapper.readValue(json, typeRef);\n\t\t} catch (IOException e) {\n\t\t\treturn Maps.newLinkedHashMap();\n\t\t}\n\t}",
"private static Map jsonToMap(String json) throws IOException {\n ObjectMapper mapper = new ObjectMapper();\n\n // convert JSON string to Java Map\n Map<String, Object> map = new ObjectMapper().readValue(json, Map.class);\n //System.out.println(\"About: \"+map.get(\"Abstract\"));\n return map;\n\n // print map keys and values\n /*\n for (Map.Entry<String, Object> entry : map.entrySet()) {\n System.out.println(entry.getKey() + \"=\" + entry.getValue());\n }\n */\n }",
"List<GeometryDO> list(Map<String,Object> map);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test each CRUD operation on a single object while network connectivity exists | public void testBasicSingleOperationsWithNetwork() throws Exception {
DummyObjectMockServer.getInstance().setNetworkAvailable(true);
final DummyObject d = new DummyObject("meow", 0, null);
assertNull("new object should not have a local id", d.getId());
assertNull("new object should not have a server id", d.getServerId());
assertFalse("new object should not be synced", d.hasServerId());
assertTrue("new object should be new", d.isNew());
//CREATE
final int serverCreateCount = DummyObjectMockServer.getInstance().createCount;
final DummyObject saveResult = (new Synchronizer<DummyObject>(){
public void run(){
d.save(new Source.OperationCallback<DummyObject>() {
@Override
public void onResult(final @Nullable DummyObject r) {
setResult(r);
}
});
}
}).blockUntilFinished();
assertNotNull("saved object should be returned in callback", saveResult);
assertEquals("saved object should be the same instance", d, saveResult);
assertNotNull("saved object should have a local id", saveResult.getId());
assertNotNull("item should be in database", DummyObjectSource.getInstance().getDao().queryForId(d.getId()));
new Synchronizer<Void>() {
@Override
public void run() {
BackgroundThread.postBackground(new Runnable() {
@Override
public void run() {
while (!DummyObjectSource.getInstance().wasCreateCompleted()) { /*block*/ }
DummyObjectSource.getInstance().clearCreateCompleted();
setResult(null);
}
});
}
}.blockUntilFinished();
assertEquals("server should have seen create", serverCreateCount + 1, DummyObjectMockServer.getInstance().createCount);
assertTrue("saved object should be synced", saveResult.hasServerId());
assertNotNull("saved object should have a server id", saveResult.getServerId());
//READ
DummyObject readResult = new Synchronizer<DummyObject>() {
@Override
public void run() {
DummyObjectSource.getInstance().find(d.getId(), new Source.OperationCallback<DummyObject>() {
@Override
public void onResult(@Nullable DummyObject result) {
setResult(result);
}
});
}
}.blockUntilFinished();
assertEquals("object by id should be the same instance", d, readResult);
//UPDATE
d.setAge(10);
final int serverUpdatedCount = DummyObjectMockServer.getInstance().updatedCount;
final DummyObject updateResult = new Synchronizer<DummyObject>() {
@Override
public void run() {
d.save(new Source.OperationCallback<DummyObject>() {
@Override
public void onResult(@Nullable DummyObject result) {
setResult(result);
}
});
}
}.blockUntilFinished();
assertNotNull("updated object should be returned in callback", updateResult);
assertEquals("updated object should be the same instance", d, updateResult);
assertEquals("updated object should have the same local id", d.getId(), updateResult.getId());
assertEquals("updated object should have the same server id", d.getServerId(), updateResult.getServerId());
assertEquals("updated object should have the new values", 10, updateResult.getAge());
new Synchronizer<Void>() {
@Override
public void run() {
BackgroundThread.postBackground(new Runnable() {
@Override
public void run() {
while (!DummyObjectSource.getInstance().wasUpdateCompleted()) { /*block*/ }
DummyObjectSource.getInstance().clearUpdateCompleted();
setResult(null);
}
});
}
}.blockUntilFinished();
assertEquals("server should have seen update", serverUpdatedCount+1, DummyObjectMockServer.getInstance().updatedCount);
//DELETE
final int serverDeletedCount = DummyObjectMockServer.getInstance().deletedCount;
DummyObject deleteResult = new Synchronizer<DummyObject>() {
@Override
public void run() {
d.delete(new Source.OperationCallback<DummyObject>() {
@Override
public void onResult(@Nullable DummyObject result) {
setResult(result);
}
});
}
}.blockUntilFinished();
assertEquals("deleted item should be the same item", d, deleteResult);
assertNull("item should no longer be in database", DummyObjectSource.getInstance().getDao().queryForId(d.getId()));
new Synchronizer<Void>() {
@Override
public void run() {
BackgroundThread.postBackground(new Runnable() {
@Override
public void run() {
while (!DummyObjectSource.getInstance().wasDeleteCompleted()){ /*block*/ }
DummyObjectSource.getInstance().clearDeleteCompleted();
setResult(null);
}
});
}
}.blockUntilFinished();
assertEquals("server should have seen delete", serverDeletedCount + 1, DummyObjectMockServer.getInstance().deletedCount);
} | [
"public void testBasicSingleOperationsWithoutNetwork() throws Exception {\n DummyObjectMockServer.getInstance().setNetworkAvailable(false);\n\n final DummyObject d = new DummyObject(\"meow\", 0, null);\n\n assertNull(\"new object should not have a local id\", d.getId());\n assertNull(\"new object should not have a server id\", d.getServerId());\n assertFalse(\"new object should not be synced\", d.hasServerId());\n assertTrue(\"new object should be new\", d.isNew());\n\n WeakMapNetworkResourceCache cache = (WeakMapNetworkResourceCache)DummyObjectSource.getInstance().getResourceCache();\n\n Dao<UnsyncedResource, Integer> unsyncedResourceDao = GenericDatabase.getInstance().getDao(UnsyncedResource.class);\n Dao<DeletedResource, Integer> deletedResourceDao = GenericDatabase.getInstance().getDao(DeletedResource.class);\n\n assertEquals(\"object cache should be empty\", 0, cache.size());\n assertEquals(\"unsynced resources should be empty\", 0, unsyncedResourceDao.countOf());\n assertEquals(\"deleted resources should be empty\", 0, deletedResourceDao.countOf());\n\n //CREATE\n DummyObject result = (new Synchronizer<DummyObject>(){\n public void run(){\n d.save(new Source.OperationCallback<DummyObject>() {\n @Override\n public void onResult(@Nullable DummyObject r) {\n setResult(r);\n }\n });\n }\n }).blockUntilFinished();\n\n new Synchronizer<Void>() {\n @Override\n public void run() {\n BackgroundThread.postBackground(new Runnable() {\n @Override\n public void run() {\n while (!DummyObjectSource.getInstance().wasCreateCompleted()) { /*block*/ }\n DummyObjectSource.getInstance().clearCreateCompleted();\n setResult(null);\n }\n });\n }\n }.blockUntilFinished();\n\n assertEquals(\"object cache should be 1\", 1, cache.size());\n\n assertNotNull(\"saved object should be returned in callback\", result);\n assertNotNull(\"saved object should have a local id\", result.getId());\n assertNull(\"saved object should NOT have a server id\", result.getServerId());\n assertFalse(\"saved object should NOT be synced\", result.hasServerId());\n assertEquals(\"saved object should be the same instance\", d, result);\n assertNotNull(\"item should be in database\", DummyObjectSource.getInstance().getDao().queryForId(d.getId()));\n assertEquals(\"item should be in unsynced table\", 1, unsyncedResourceDao.countOf());\n UnsyncedResource unsyncedResource = unsyncedResourceDao.queryForAll().get(0);\n assertEquals(\"the unsynced resource should have the same id\", String.valueOf(d.getId()), unsyncedResource.getLocalId());\n assertEquals(\"the usynced class name should be correct\", \"audio.rabid.dev.roe.testobjects.DummyObject\", unsyncedResource.getClassName());\n assertTrue(\"the unsynced resource should be marked that a create is required\", unsyncedResource.needsCreate());\n\n //READ\n result = new Synchronizer<DummyObject>() {\n @Override\n public void run() {\n DummyObjectSource.getInstance().find(d.getId(), new Source.OperationCallback<DummyObject>() {\n @Override\n public void onResult(@Nullable DummyObject result) {\n setResult(result);\n }\n });\n }\n }.blockUntilFinished();\n\n assertEquals(\"object by id should be the same instance\", d, result);\n assertEquals(\"object cache should be 1\", 1, cache.size());\n\n //UPDATE\n d.setAge(10);\n\n result = new Synchronizer<DummyObject>() {\n @Override\n public void run() {\n d.save(new Source.OperationCallback<DummyObject>() {\n @Override\n public void onResult(@Nullable DummyObject result) {\n setResult(result);\n }\n });\n }\n }.blockUntilFinished();\n\n new Synchronizer<Void>() {\n @Override\n public void run() {\n BackgroundThread.postBackground(new Runnable() {\n @Override\n public void run() {\n while (!DummyObjectSource.getInstance().wasUpdateCompleted()) { /*block*/ }\n DummyObjectSource.getInstance().wasUpdateCompleted();\n setResult(null);\n }\n });\n }\n }.blockUntilFinished();\n\n assertNotNull(\"updated object should be returned in callback\", result);\n assertNull(\"saved object should NOT have a server id\", result.getServerId());\n assertFalse(\"saved object should NOT be synced\", result.hasServerId());\n assertEquals(\"updated object should have the same local id\", d.getId(), result.getId());\n assertEquals(\"updated object should have the new values\", 10, result.getAge());\n assertEquals(\"updated object should be the same instance\", d, result);\n assertEquals(\"object cache should be 1\", 1, cache.size());\n assertEquals(\"item should be in unsynced table\", 1, unsyncedResourceDao.countOf());\n unsyncedResource = unsyncedResourceDao.queryForAll().get(0);\n assertEquals(\"the unsynced resource should have the same id\", DummyObjectSource.getInstance().convertLocalIdToString(d.getId()), unsyncedResource.getLocalId());\n assertEquals(\"the usynced class name should be correct\", \"audio.rabid.dev.roe.testobjects.DummyObject\", unsyncedResource.getClassName());\n assertTrue(\"the unsynced resource should STILL be marked that a create is required\", unsyncedResource.needsCreate());\n\n //SYNC NO NET\n long prevUpdateTime = d.getUpdatedAt().getTime();\n List<DummyObject> synced = new Synchronizer<List<DummyObject>>() {\n @Override\n public void run() {\n DummyObjectSource.getInstance().sync(new Source.OperationCallback<List<DummyObject>>() {\n @Override\n public void onResult(@Nullable List<DummyObject> result) {\n setResult(result);\n }\n });\n }\n }.blockUntilFinished();\n\n assertEquals(\"synced list should be empty\", 0, synced.size());\n assertFalse(\"the item should not be marked as synced\", d.hasServerId());\n assertEquals(\"the new update time should be the same as the old one\", prevUpdateTime, d.getUpdatedAt().getTime());\n assertEquals(\"object cache should be 1\", 1, cache.size());\n assertEquals(\"item should still be in unsynced table\", 1, unsyncedResourceDao.countOf());\n\n //SYNC NET\n DummyObjectMockServer.getInstance().setNetworkAvailable(true); //enable network\n\n prevUpdateTime = d.getUpdatedAt().getTime();\n synced = new Synchronizer<List<DummyObject>>() {\n @Override\n public void run() {\n DummyObjectSource.getInstance().sync(new Source.OperationCallback<List<DummyObject>>() {\n @Override\n public void onResult(@Nullable List<DummyObject> result) {\n setResult(result);\n }\n });\n }\n }.blockUntilFinished();\n\n assertTrue(\"the item should be marked as synced\", d.hasServerId());\n assertNotNull(\"the item should have a server id\", d.getServerId());\n assertEquals(\"synced list should have one item\", 1, synced.size());\n assertEquals(\"synced list object should be the same\", d, synced.get(0));\n assertEquals(\"object cache should be 1\", 1, cache.size());\n assertEquals(\"there should be no more items in the unsynced table\", 0, unsyncedResourceDao.queryForAll().size());\n assertTrue(\"the new update time should be larger than the old one\", d.getUpdatedAt().getTime() > prevUpdateTime);\n }",
"@Test\n public void testAlreadyExist() throws Exception {\n System.out.println(\"alreadyExist\");\n\n try {\n Operation o = facade.list(\"description\", \"TESTE\", \"=\").get(0);\n\n Operation c = new Operation();\n c.setId( o.getId() );\n\n try {\n boolean result = facade.alreadyExist(c);\n assertEquals(true, result);\n } catch ( OperationPersistenceException ex ) {\n fail( ex.getDetailMessage() );\n }\n } catch (IndexOutOfBoundsException ex) {\n fail(\"Erro ao recuperar objeto.\");\n }\n }",
"@Test\n public void testAlreadyExist() throws Exception {\n System.out.println(\"alreadyExist\");\n\n try {\n OperationType o = facade.list(\"description\", \"TESTANDO\", \"=\").get(0);\n\n OperationType c = new OperationType();\n c.setId( o.getId() );\n\n try {\n boolean result = facade.alreadyExist(c);\n assertEquals(true, result);\n } catch ( OperationTypePersistenceException ex ) {\n fail( ex.getDetailMessage() );\n }\n } catch (IndexOutOfBoundsException ex) {\n fail(\"Erro ao recuperar objeto.\");\n }\n }",
"@Test public void testRetrieveGivesNewInstances() {\r\n \r\n \tfor(int count=0; count < 10; count++) {\r\n \t\tTransaction wt = store.getAuthStore().begin();\t// start write transaction\r\n \t\tSampleObject newObject = new SampleObject(count);\r\n \t\tRef<SampleObject> rval = wt.create(newObject);\t// add object to DB\r\n \t\twt.commit();\t// Commit the transaction, it will rollback otherwise\r\n \t\t\r\n \t\tTransaction t = store.begin(); // start readonly transaction\r\n \t\tSampleObject so = t.retrieve(rval); // get the object using the ref the WT gave us\r\n \t\tassertTrue(so.getTest() == count);\t // make sure field value is same\r\n \t\tassertTrue(t.getRef(so).equals(rval));\r\n \r\n \t\tSampleObject so2 = t.retrieve(rval); // get the object using the ref the WT gave us\r\n \t\tassertTrue(so2.getTest() == count);\t // make sure field value is same\r\n \t\tassertTrue(so != so2);\t // Different instance please!\r\n \t\tassertTrue(!so.equals(so2));\r\n \t\tassertTrue(t.getVersion(so) == t.getVersion(so2));\t// but refs are the same\r\n \t\tt.dispose();\r\n \t}\r\n \t//deleteStore();\r\n }",
"@Test\n\tpublic void test() {\n\t\t/* Preparing input object for insertion*/\n\t\tSituation objOuterSituation = new Situation();\n\t\tSituation objInnerSituation = new Situation();\n\t\tList<Situation> objListSituation = new ArrayList<Situation>();\n\t\t\n\t\tobjOuterSituation.setUserID(2L);\n\t\tobjOuterSituation.setSituationCategoryID(2);\n\t\tobjOuterSituation.setSituationDescription(\"5hoursSitting\");\n\t\tobjOuterSituation.setSituationDate(\"2016 12 12 01:30:01\");\n\t\n\t\t/* Testing of insertion function*/\n\t\t DataAccessInterface objDAInterface = new SituationAdapter();\n AbstractDataBridge objADBridge = new DatabaseStorage(objDAInterface);\n List<String> lstResponse = objADBridge.SaveSituation(objOuterSituation);\n if(lstResponse.size() == 2)\n {\n \t /* Testing of fetching function*/\n \t objInnerSituation.setUserID(2L);\n \t objInnerSituation.setRequestType(\"ByUserOnly\");\n \t DataAccessInterface objDAInterfaceRetrieval = new SituationAdapter();\n AbstractDataBridge objADBridgeRetrieval = new DatabaseStorage(objDAInterfaceRetrieval);\n \t objListSituation = objADBridgeRetrieval.RetriveSituation(objInnerSituation);\n \t objInnerSituation = objListSituation.get(0);\n }\n \n assertEquals(objOuterSituation.getSituationDescription(), objInnerSituation.getSituationDescription());\n \n /* Testing of Update function*/\n objInnerSituation.setSituationDescription(\"5hoursSittingUpdated\");\n DataAccessInterface objDAInterfaceUpdate = new SituationAdapter();\n AbstractDataBridge objADBridgeUpdate = new DatabaseStorage(objDAInterfaceUpdate);\n lstResponse = objADBridgeUpdate.UpdateSituation(objInnerSituation);\n if(lstResponse.size() == 2)\n {\n \t /* Testing of fetching function*/\n \t objInnerSituation.setUserID(2L);\n \t DataAccessInterface objDAInterfaceRetrieval = new SituationAdapter();\n AbstractDataBridge objADBridgeRetrieval = new DatabaseStorage(objDAInterfaceRetrieval);\n \t objListSituation = objADBridgeRetrieval.RetriveSituation(objInnerSituation);\n \t objInnerSituation = objListSituation.get(0);\n }\n \n assertEquals(objInnerSituation.getSituationDescription(), \"5hoursSittingUpdated\");\n\t}",
"@Test\n public void test_UpdateObject_When_Object_Id_Not_Exist() throws Exception {\n // Send Update Object Request - object id not exist\n //////////////////////////////////////////////////////////////////////\n String notExistObjectId = \"5a206dc2cc2a9b26e483d664\";\n TestRequestObject requestObject = new TestRequestObject();\n requestObject.setObjectId(notExistObjectId);\n requestObject.addProperty(\"job\", \"new developer value\");\n requestObject.addProperty(\"new field\", \"new value\");\n requestObject.addProperty(\"actor_user\", user.getEmail());\n\n TestDenaRelation testDenaRelation = TestDenaRelation.TestDenaRelationDTOBuilder.aTestDenaRelationDTO()\n .withRelationName(\"test_relation\")\n .withRelationType(\"ONE-TO-ONE\")\n .withTargetName(CommonConfig.TABLE_NAME)\n .withIds(objectId2)\n .build();\n\n requestObject.getRelatedObjects().add(testDenaRelation);\n TestErrorResponse actualReturnObject = performUpdateObject(createJSONFromObject(requestObject), 400, TestErrorResponse.class);\n\n ////////////////////////////////////////////////////////////////////////////\n // Assert Update Object Request - object id not exist\n ////////////////////////////////////////////////////////////////////////////\n TestErrorResponse expectedReturnObject = new TestErrorResponse();\n expectedReturnObject.status = 400;\n expectedReturnObject.errorCode = \"2003\";\n expectedReturnObject.messages = Collections.singletonList(\"Object_id not found\");\n\n JSONAssert.assertEquals(createJSONFromObject(expectedReturnObject), createJSONFromObject(actualReturnObject), true);\n }",
"@Test\r\n\tpublic void testSaveAndRetrieve() throws PMSException {\r\n\t\troot = service.getPortals();\r\n\t\tfinal int n1 = root.getChildren().size();\r\n\t\tString id1 = create();\r\n\t\tcreate();\r\n\t\troot = service.getPortals();\r\n\t\tassertTrue(root.getChildren().size() == n1 + 2);\r\n\t\tfinal String url1 = service.getOfflineURL(id1);\r\n\t\tassertTrue(url1.indexOf(id1) >= 0);\r\n\t}",
"@Test\n @Transactional\n void createHumanInfoWithExistingId() throws Exception {\n humanInfo.setId(1L);\n\n int databaseSizeBeforeCreate = humanInfoRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restHumanInfoMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(humanInfo)))\n .andExpect(status().isBadRequest());\n\n // Validate the HumanInfo in the database\n List<HumanInfo> humanInfoList = humanInfoRepository.findAll();\n assertThat(humanInfoList).hasSize(databaseSizeBeforeCreate);\n }",
"@Test\n @Transactional\n void createInternacoesWithExistingId() throws Exception {\n internacoes.setId(1L);\n\n int databaseSizeBeforeCreate = internacoesRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restInternacoesMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(internacoes)))\n .andExpect(status().isBadRequest());\n\n // Validate the Internacoes in the database\n List<Internacoes> internacoesList = internacoesRepository.findAll();\n assertThat(internacoesList).hasSize(databaseSizeBeforeCreate);\n }",
"@Test\n public void testModify() throws Exception {\n System.out.println(\"modify\");\n\n try {\n Operation o = facade.list(\"description\", \"Teste\", \"=\").get(0);\n\n o.setDescription(\"TESTE\");\n\n try {\n facade.modify(o);\n } catch ( OperationPersistenceException ex ) {\n fail( ex.getDetailMessage() );\n } catch ( ValidatorException ex ) {\n fail(\"Erro ao validar objeto.\");\n }\n } catch (IndexOutOfBoundsException ex) {\n fail(\"Erro ao recuperar objeto.\");\n }\n }",
"@Test\n @Transactional\n void createCompraWithExistingId() throws Exception {\n compra.setId(1L);\n CompraDTO compraDTO = compraMapper.toDto(compra);\n\n int databaseSizeBeforeCreate = compraRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restCompraMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(compraDTO)))\n .andExpect(status().isBadRequest());\n\n // Validate the Compra in the database\n List<Compra> compraList = compraRepository.findAll();\n assertThat(compraList).hasSize(databaseSizeBeforeCreate);\n }",
"@Test\r\n public void testFindById() {\r\n assertTrue(neuronDAO.toString().contains(\"gigaspaces\"));\r\n assertTrue(service.getNeuronDAO().toString().contains(\"gigaspaces\"));\r\n Neuron n=new Neuron();\r\n n.setPayload(\"foo\");\r\n n.setVisibility(Visibility.VISIBLE);\r\n neuronDAO.write(n);\r\n assertNotNull(n.getId());\r\n String id=n.getId();\r\n Neuron neuron=service.getNeuronById(id);\r\n assertNotNull(neuron);\r\n assertEquals(neuron.getId(), id);\r\n assertEquals(neuron, n);\r\n }",
"@Test\n @Transactional\n void createObtientWithExistingId() throws Exception {\n obtient.setId(1L);\n\n int databaseSizeBeforeCreate = obtientRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restObtientMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(obtient)))\n .andExpect(status().isBadRequest());\n\n // Validate the Obtient in the database\n List<Obtient> obtientList = obtientRepository.findAll();\n assertThat(obtientList).hasSize(databaseSizeBeforeCreate);\n }",
"@Test\n\tpublic void testGetOperations() throws Exception{\n\t\tAccount account = new Account(\"user1\", \"last1\", new BigDecimal(0));\n\t\tiHandleAccount.saveMoney(account, new BigDecimal(200));\n\t\tiHandleAccount.saveMoney(account, new BigDecimal(600));\n\t\tiHandleAccount.saveMoney(account, new BigDecimal(800));\n\t\tiHandleAccount.retrieveMoney(account, new BigDecimal(300));\n\t\tAssert.assertEquals(account.getListOperations().size(), 4);\n\t\tAssert.assertEquals(account.getBalance(), new BigDecimal(1300));\n\t}",
"@Test\n public void create1Test1() throws SQLException {\n manager = new TableServizioManager(mockDb);\n manager.create1(false,false,false,false,false,false,false);\n Servizio servizio = manager.retriveById(5);\n assertNotNull(servizio,\"Should return true if create Servizio\");\n }",
"@Test\r\n public void testFind() throws Exception {\r\n MonitoriaEntity entity = data.get(0);\r\n MonitoriaEntity nuevaEntity = persistence.find(entity.getId());\r\n Assert.assertNotNull(nuevaEntity);\r\n Assert.assertEquals(entity.getId(), nuevaEntity.getId());\r\n Assert.assertEquals(entity.getIdMonitor(), nuevaEntity.getIdMonitor());\r\n Assert.assertEquals(entity.getTipo(), nuevaEntity.getTipo());\r\n \r\n }",
"@Test\n @Transactional\n void createTerritorioWithExistingId() throws Exception {\n territorio.setId(1L);\n\n int databaseSizeBeforeCreate = territorioRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restTerritorioMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(territorio)))\n .andExpect(status().isBadRequest());\n\n // Validate the Territorio in the database\n List<Territorio> territorioList = territorioRepository.findAll();\n assertThat(territorioList).hasSize(databaseSizeBeforeCreate);\n }",
"public void testBatchCreate_NotInAtomNotUseOwnConnectionErrorOccurAccuracy() throws Exception {\n TimeEntry[] myTimeEntrys = new TimeEntry[10];\n\n for (int i = 0; i < 10; i++) {\n myTimeEntrys[i] = new TimeEntry();\n myTimeEntrys[i].setDescription(DESCRIPTION);\n myTimeEntrys[i].setDate(CREATION_DATE);\n myTimeEntrys[i].setTaskTypeId(type.getPrimaryId());\n myTimeEntrys[i].setTimeStatusId(status.getPrimaryId());\n myTimeEntrys[i].addRejectReason(reasons[i]);\n }\n\n myTimeEntrys[9].setDescription(null);\n\n ResultData resultData = new ResultData();\n timeEntryDAO.setConnection(conn);\n timeEntryDAO.batchCreate(myTimeEntrys, CREATION_USER, false, resultData);\n\n // check the added result\n List returnTimeEntrys = timeEntryDAO.getList(null);\n assertEquals(\"not correctly record returned from the TimeEntries table\", 9, returnTimeEntrys.size());\n\n for (int i = 0; i < 9; i++) {\n AccuracyTestHelper.assertEquals(\"not correctly record returned from the TimeEntries table\",\n (TimeEntry) returnTimeEntrys.get(i), myTimeEntrys[i]);\n }\n\n // check the baseDAO's connection field\n assertEquals(\"The baseDAO's connection field should be set back.\", conn, timeEntryDAO.getConnection());\n assertFalse(\"The connection should not be closed.\", conn.isClosed());\n\n // check the data in resultData\n assertNull(\"The batchResults field should not be set in creating module.\", resultData.getBatchResults());\n\n BatchOperationException[] exceptionList = resultData.getExceptionList();\n assertNotNull(\"The exceptionList field should be set in creating module.\", exceptionList);\n assertEquals(\"The exceptionList field should be set in creating module.\", myTimeEntrys.length,\n exceptionList.length);\n\n for (int i = 0; i < (exceptionList.length - 1); i++) {\n assertNull(\"No exceptions should be occur.\", exceptionList[i]);\n }\n\n assertNotNull(\"one should be occur.\", exceptionList[9]);\n\n Object[] operations = resultData.getOperations();\n assertNotNull(\"The operations field should be set in creating module.\", operations);\n assertEquals(\"The operations field should be set in creating module.\", operations.length, myTimeEntrys.length);\n\n for (int i = 0; i < operations.length; i++) {\n assertEquals(\"The operations field should be set in creating module.\", myTimeEntrys[i], operations[i]);\n }\n }",
"@Test\n public void saveSingleEntity() {\n repository.save(eddard);\n assertThat(operations\n .execute((RedisConnection connection) -> connection.exists((\"persons:\" + eddard.getId()).getBytes(CHARSET))))\n .isTrue();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function deals with an issue when the version name contains a space or even an apostrophe It presumes the following format of the line: package: name='xxxxx' versionCode='xxxxx' versionName='xxxxx' compileSdkVersion='xxx' compileSdkVersionCodename='xxx' | private void parseInfoLine(final String line,
final AtomicReference<String> appPkg,
final AtomicReference<String> appVersion,
final AtomicReference<Integer> appVersionCode) {
String l = line;
final String namePrefix = "package: name='";
final String versionCodePrefix = "' versionCode='";
final String versionNamePrefix = "' versionName='";
final String sdkVersionPrefix = "' compileSdkVersion='";
final String platformBuildPrefix = "' platformBuildVersionName='";
int pos;
pos = l.indexOf(namePrefix);
if (pos == -1) {
return;
}
l = l.substring(pos + namePrefix.length());
pos = l.indexOf(versionCodePrefix);
if (pos == -1) {
return;
}
appPkg.set(l.substring(0, pos));
l = l.substring(pos + versionCodePrefix.length());
pos = l.indexOf(versionNamePrefix);
if (pos == -1) {
return;
}
// Here we get the version code
String versionCode = l.substring(0, pos);
try {
appVersionCode.set(Integer.parseInt(versionCode));
} catch (NumberFormatException e) {
}
l = l.substring(pos + versionNamePrefix.length());
// Different versions of aapt may give different output
pos = l.indexOf(platformBuildPrefix);
if (pos == -1) {
pos = l.indexOf(sdkVersionPrefix);
}
if (pos == -1) {
return;
}
appVersion.set(l.substring(0, pos));
} | [
"private String parseVersion(String version) {\n\n String[] subString = version\n .replaceAll(\"\\\\s+\",\"\") // Removes whitespace\n .replaceAll(\"\\\\p{L}+\",\"\") // Removes alpha characters a-zA-Z\n .split(\"\\\\.\"); // Removes alpha characters\n\n if(subString.length == 0){\n return \"\";\n }else if (subString.length == 1){\n return subString[0] + \".0\";\n }else {\n return subString[0] + \".\" + subString[1];\n }\n }",
"public LibraryIdentifier(String name) throws IllegalArgumentException {\n\t\tint index = name.indexOf(\";version=\\\"\");\n\t\tif (index == -1) {\n\t\t\tthrow new IllegalArgumentException(\"String does not include version info\");\n\t\t}\n\n\t\tif (name.charAt(name.length() - 1) != '\"') {\n\t\t\tthrow new IllegalArgumentException(\"Version info not in qoutes!\");\n\t\t}\n\n\t\tthis.name = name.substring(0, index);\n\t\tString versionInfo = name.substring(index + 10, name.length() - 1);\n\n\t\tthis.version = new LibraryVersion(versionInfo);\n\t}",
"private String extractVersionName() {\n final String versionName = SwingUtil.extract(versionNameJTextField, Boolean.TRUE);\n if (null == versionName || versionName.equals(defaultVersionName)) {\n return null;\n } else {\n return versionName;\n }\n }",
"String checkAppVersion();",
"private static String loadVersionString()\n {\n return \"1.0b9\";\n\n /*Package pkg = Package.getPackage(\"de.hunsicker.jalopy\");\n\n\n if (pkg == null)\n {\n throw new RuntimeException(\n \"could not find package de.hunsicker.jalopy\");\n }\n\n String version = pkg.getImplementationVersion();\n\n if (version == null)\n {\n throw new RuntimeException(\n \"no implementation version string found in package manifest\");\n }\n\n return version;*/\n }",
"private void scanSDKForVersionInfo(){\r\n\t\tFile epocRoot = new File(getEPOCROOT());\r\n\t\tFile bldInfoFile = new File(epocRoot, BUILD_INFO_TXT_FILE);\r\n\t\tif (!bldInfoFile.exists())\r\n\t\t\treturn;\r\n\t\t\r\n\t\tif (getOSVersion().getMajor() == 0)\r\n\t\t\tsetOSVersion(new Version(\"9.5.0\")); // Set a default version that will work with all EKA2\r\n\t\t\r\n\t\ttry {\r\n\t\t\tchar[] cbuf = new char[(int) bldInfoFile.length()];\r\n\t\t\tReader reader = new FileReader(bldInfoFile);\r\n\t\t\treader.read(cbuf);\r\n\t\t\treader.close();\r\n\t\t\tString[] lines = new String(cbuf).split(\"\\r|\\r\\n|\\n\");\r\n\t\t\tfor (int i = 0; i < lines.length; i++) {\r\n\t\t\t\t// skip comments and blank lines\r\n\t\t\t\tString line = removeComments(lines[i]);\r\n\t\t\t\tif (line.matches(\"\\\\s*#.*\") || line.trim().length() == 0) \r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t\r\n\t\t\t\tline = line.trim();\r\n\t\t\t\tif (line.startsWith(BUILD_INFO_KEYWORD)){\r\n\t\t\t\t\tString[] versionTokens = line.split(\" \");\r\n\t\t\t\t\tif (versionTokens.length == 3){\r\n\r\n\t\t\t\t\t\tif (versionTokens[2].toUpperCase().contains(\"TB92SF\")){\r\n\t\t\t\t\t\t\tsetOSVersion(new Version(\"9.5.0\"));\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t} else if (versionTokens[2].toUpperCase().contains(\"TB101SF\")){\r\n\t\t\t\t\t\t\tsetOSVersion(new Version(\"9.6.0\"));\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t} else if (versionTokens[2].toUpperCase().contains(\"TB102SF\")){\r\n\t\t\t\t\t\t\tsetOSVersion(new Version(\"9.6.0\"));\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if (versionTokens[2].lastIndexOf(\"v\") > 0){\r\n\t\t\t\t\t\t\tint index = versionTokens[2].lastIndexOf(\"v\");\r\n\t\t\t\t\t\t\tString osVersionString = versionTokens[2].substring(index+1, versionTokens[2].length());\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Set the version, split on alphanumeric to get rid of any junk at the end\r\n\t\t\t\t\t\t\tString[] tempStr = osVersionString.split(\"[a-zA-Z_]\");\r\n\t\t\t\t\t\t\tif (tempStr.length != 0){\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tsetOSVersion(Version.parseVersion(tempStr[0]));\r\n\t\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\t\t// ignore, default version already set\r\n\t\t\t\t\t\t\t\t\t// just catch exception so we move along to the next SDK\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"private String appendVersion(String name, String version) {\n\t\treturn name + \"(\" + version + \")\";\n\t}",
"public String buildVersionTag() {\n String bv; // build version: full, multi-line\n try {\n bv = buildVersion();\n } catch(HoneycombTestException e) {\n bv = \"[Unknown]\";\n }\n // expected format of fullVersion: sample output\n\n // ***** RELEASE [QA_drop0-3] *****\n // initrd.gz built Fri Aug 13 11:33:24 PDT 2004 on pratap\n // kernel version 2.6.5-charter #1 Fri Aug 13 09:41:50 PDT 2004\n \n String bt; // build tag: short, enclosed in [ ]\n try {\n bt = bv.substring(bv.indexOf('[')+1, bv.indexOf(']'));\n } catch (IndexOutOfBoundsException e) {\n Log.ERROR(\"Unexpected format of build version. \" +\n \"Failed to parse: \" + bv);\n bt = \"Unknown\"; \n }\n return bt;\n }",
"private void checkVersion(String buildversion) {\n StringTokenizer st = new StringTokenizer(buildversion, \".\");\n for (int i = 0; i < 4; i++) {\n try {\n int val = Integer.parseInt(st.nextToken());\n if (val < 0) {\n throw new IllegalArgumentException();\n }\n }\n catch (Exception e) {\n throw new BuildException(buildversion +\n \" is not a valid version number!\");\n }\n }\n }",
"static void assertVersionCompatible(final String expectedVersion, final String actualVersion) {\n final String shortActualVersion = actualVersion.replaceAll(VERSION_BUILD_PART_REGEX, \"\");\n final String shortExpectedVersion = expectedVersion.replaceAll(VERSION_BUILD_PART_REGEX, \"\");\n if (shortExpectedVersion.compareTo(shortActualVersion) != 0) {\n throw new JsiiException(\"Incompatible jsii-runtime version. Expecting \"\n + shortExpectedVersion\n + \", actual was \" + shortActualVersion);\n }\n }",
"java.lang.String getVerName();",
"private String extractVersion(String componentVersionId) {\n int indexOfOpen = componentVersionId.lastIndexOf('(');\n return componentVersionId.substring(indexOfOpen + 1, componentVersionId.length() - 1);\n }",
"java.lang.String getVerNameInternal();",
"private @NonNull String validateBuildMetaData(@Nullable String buildMetaData) {\n if (buildMetaData == null || buildMetaData.isEmpty())\n return \"\";\n\n // Pattern used to validate build meta data\n Pattern p = Pattern.compile(\"^(?!.*\\\\-{2}.*)(?!.*\\\\.{2}.*)([a-zA-Z0-9\\\\.\\\\-]+)$\");\n\n // Pattern must match\n if (!p.matcher(buildMetaData).matches()) {\n throw new IllegalArgumentException(\"Invalid build meta data: \" + buildMetaData);\n }\n\n return buildMetaData;\n }",
"java.lang.String getAppVersion();",
"private int validatePackageField() {\n // Validate package field\n String packageFieldContents = getPackageName();\n if (packageFieldContents.length() == 0) {\n return setStatus(\"Package name must be specified.\", MSG_ERROR);\n }\n \n // Check it's a valid package string\n int result = MSG_NONE;\n IStatus status = JavaConventions.validatePackageName(packageFieldContents, \"1.5\", \"1.5\"); //$NON-NLS-1$ $NON-NLS-2$\n if (!status.isOK()) {\n result = setStatus(status.getMessage(),\n status.getSeverity() == IStatus.ERROR ? MSG_ERROR : MSG_WARNING);\n }\n \n // The Android Activity Manager does not accept packages names with only one\n // identifier. Check the package name has at least one dot in them (the previous rule\n // validated that if such a dot exist, it's not the first nor last characters of the\n // string.)\n if (result != MSG_ERROR && packageFieldContents.indexOf('.') == -1) {\n return setStatus(\"Package name must have at least two identifiers.\", MSG_ERROR);\n }\n \n return result;\n }",
"private void checkVersion() {\n }",
"public static String getAppVersion() {\r\n\t String projectClasses[]=new String[] {\r\n\t\t\t City.CVS_REVISION,\r\n\t\t\t CityTests.CVS_REVISION,\r\n\t\t\t Report.CVS_REVISION,\r\n\t\t\t TSP.CVS_REVISION,\r\n\t\t\t TSPChromosome.CVS_REVISION,\r\n\t\t\t TSPChromosomeTests.CVS_REVISION,\r\n\t\t\t TSPConfiguration.CVS_REVISION,\r\n\t\t\t TSPEngine.CVS_REVISION,\r\n\t\t\t TSPMenu.CVS_REVISION,\r\n\t\t\t TSPMenuTests.CVS_REVISION,\r\n\t\t\t JGapGreedyCrossoverEngine.CVS_REVISION,\r\n\t\t\t JGapGreedyCrossoverEngineTests.CVS_REVISION,\r\n\t\t\t SimpleUnisexMutatorHibrid2OptEngine.CVS_REVISION,\r\n\t\t\t SimpleUnisexMutatorEngineTests.CVS_REVISION,\r\n\t\t\t GreedyCrossoverEngine.CVS_REVISION,\r\n\t\t\t GreedyCrossoverEngineTests.CVS_REVISION,\r\n\t\t\t GreedyCrossoverHibrid2OptEngine.CVS_REVISION,\r\n\t\t\t SimpleUnisexMutatorHibrid2OptEngine.CVS_REVISION,\r\n\t\t\t TSPGui.CVS_REVISION,\r\n\t };\r\n\t \r\n\t //take care that version 1.30 is not the same like 1.3\r\n\t double major=0;\r\n\t double minor=0;\r\n\t Pattern revision=Pattern.compile(\"(\\\\d+)\\\\.*(\\\\d+)\");\r\n\t for(String v:projectClasses) {\r\n\t\t Matcher matcher=revision.matcher(v);\r\n\t\t matcher.find();\r\n\t\t major+=Double.parseDouble(matcher.group(1));\r\n\t\t minor+=Double.parseDouble(matcher.group(2));\r\n\t }\r\n\t major=major/projectClasses.length;\r\n\t minor=minor/projectClasses.length;\r\n\t return ((int)major)+\".\"+((int)(minor*100));\r\n }",
"private String parseOptionName(String line) {\n\n String optionName = null;\n\n try {\n if (\"\".equals(optionName = line.trim()))\n throw new AutoException(EnumAutomobileErrors.MISSING_OPTION_NAME);\n } catch (AutoException ex) {\n Object object = ex.fix();\n if (object != null)\n optionName = (String) object;\n }\n\n return optionName;\n\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fetch records that have inventory_id IN (values) | public List<com.mydvdstore.model.tables.pojos.Rental> fetchByInventoryId(Integer... values) {
return fetch(Rental.RENTAL.INVENTORY_ID, values);
} | [
"Condition in(QueryParameter parameter, Object... values);",
"public Criteria andMetaIdIn(List<Long> values) {\n addCriterion(\"meta_id in\", values, \"metaId\");\n return (Criteria) this;\n }",
"List<Long> getUidsByKey(InventoryKey inventoryKey);",
"List<Employee> findByActiveAndIdIn(boolean Active, Iterable<String> ids);",
"public Criteria andTermIdIn(List<Long> values) {\n addCriterion(\"term_id in\", values, \"termId\");\n return (Criteria) this;\n }",
"public void addWhereIn(String attributeName, Collection values, String operator) {\r\n\t\tif (!values.isEmpty()) {\r\n\t\t\tString valueListString = StringUtils.join(values, ',');\r\n\t\t\taddWhere(attributeName + \" in (\"+valueListString+\")\", operator);\r\n\t\t}\r\n\t}",
"public Query getInventoryItemDocuments(String inventoryId){\r\n // TODO: Apply different cases to allow users to filter inventory\r\n // Example by type??\r\n return mInventoryCollectionReference.document(inventoryId).collection(COLLECTION_ITEMS);\r\n }",
"List<Product> getByCategoryIn(List<Integer> categories);",
"public List<ShopEntry> getInventoryAsListFiltered() {\n List<ShopEntry> inv = new ArrayList<>();\n for (ShopEntry entry : shopGoodsStockMap.values()) {\n if (entry.getStock() >= 1) {\n inv.add(entry);\n }\n }\n return inv;\n }",
"long queryInventory(String itemid);",
"public List<Produto> findByIdIn(Integer... ids);",
"List<InventoryVector> getInventory(long... streams);",
"public WhereBuilder in(String key, List<Object> values) {\n this.builder.append(key).append(\" IN (\");\n for (int i = 0, n = values.size(); i < n; i++) {\n this.builder.append(wrapStringIfNeeded(values.get(i)));\n if (i != n - 1) {\n this.builder.append(\", \");\n }\n }\n this.builder.append(\")\");\n return this;\n }",
"AuthorizationQuery userIdIn(String... userIds);",
"HistoryQuery custom2In(String... custom2);",
"boolean isInInventory(IEquipableItem item);",
"HistoryQuery custom4In(String... custom4);",
"public void setInventory_in_id(Integer inventory_in_id) {\n this.inventory_in_id = inventory_in_id;\n }",
"public Inventory getInventoryById(Long inventoryId);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handle an exception which occurred while retrieving or processing the work items. (1) Unlock any locked work items retrieved after the getwork(). (2) If a lock exception occurred, exit. The caller will suspend the getwork() item. (3) If a fatal exception occurred, exit. The caller will stop the automated process. (4) If a result has not been created, add a comment containing the exception message, and set the work item status to the host errored status. If a result is already present, the exception has already been intercepted and the work item has been updated with an appriopriate status and comment. (5) Update the work item. If this fails, throw a fatal exception to cause the caller to stop the automated process. | protected void handleProcessingException(Exception e) throws NbaBaseException {
unLockItems();
if (e instanceof NbaBaseException) {
NbaBaseException eb = (NbaBaseException) e;
if (eb.isFatal() || eb instanceof NbaLockedException) {
throw eb;
}
}
if (result == null) {
setWork(getOrigWorkItem());
addComment(e.getMessage());
changeStatus(getHostErrorStatus());
setResult(new NbaAutomatedProcessResult(NbaAutomatedProcessResult.FAILED, getHostErrorStatus(), getHostErrorStatus()));
}
try {
doUpdateWorkItem();
} catch (NbaBaseException e1) {
e1.forceFatalExceptionType();
throw e1;
}
} | [
"protected void handleUpdateException(Exception e) throws NbaBaseException {\n setWork(getOrigWorkItem());\n addComment(\"An error occurred while committing workflow changes \" + e.getMessage());\n changeStatus(getAwdErrorStatus());\n try {\n doUpdateWorkItem();\n } catch (NbaBaseException e1) {\n e1.forceFatalExceptionType();\n throw e1;\n }\n setResult(new NbaAutomatedProcessResult(NbaAutomatedProcessResult.FAILED, getAwdErrorStatus(), getAwdErrorStatus()));\n }",
"protected static void handleDropboxException(DropboxException e)\n throws ManifoldCFException, ServiceInterruption {\n // Right now I don't know enough, so throw Service Interruptions\n long currentTime = System.currentTimeMillis();\n throw new ServiceInterruption(\"Dropbox exception: \"+e.getMessage(), e, currentTime + 300000L,\n currentTime + 3 * 60 * 60000L,-1,false);\n }",
"private void handleExceptionAndMarkForRetry(PaymentResult pr, IOException e)\n throws PSPCommunicationException {\n PSPCommunicationException pce = new PSPCommunicationException(\n \"Debit request could not be sent to the payment service provider successfully\",\n Reason.DEBIT_INVOCATION_FAILED, e);\n logger.logWarn(Log4jLogger.SYSTEM_LOG, pce,\n LogMessageIdentifier.WARN_CHARGING_PROCESS_FAILED);\n pr.setProcessingException(pce);\n pr.setProcessingStatus(PaymentProcessingStatus.RETRY);\n throw pce;\n }",
"protected void handleException(Exception err)\n\t{\n\t\tif (killed)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\terr.printStackTrace();\n\t\tif (silentRetryCount > 0)\n\t\t{\n\t\t\tsilentRetryCount--;\n\t\t\tretry();\n\t\t\treturn;\n\t\t}\n\t\tif (responseCodeListeners != null)\n\t\t{\n\t\t\tfinal MPNetworkEvent n = new MPNetworkEvent(this, 600, err.getMessage());\n\t\t\tresponseCodeListeners.fireActionEvent(n);\n\t\t}\n\t\t// if (Display.isInitialized() && Dialog.show(\"Exception\",\n\t\t// err.toString() + \": \" + err.getMessage(), \"Retry\", \"Cancel\"))\n\t\t// {\n\t\t// retry();\n\t\t// }\n\t}",
"public void updateFailingBuild(CTFArtifact issue,\n AbstractBuild<?, ?> build) throws IOException, InterruptedException {\n if (this.cna == null) {\n this.log(\"Cannot call updateFailingBuild, not logged in!\");\n return;\n }\n CTFFile buildLog = null;\n if (this.getAttachLog()) {\n buildLog = this.uploadBuildLog(build);\n if (buildLog != null) {\n this.log(\"Successfully uploaded build log.\");\n } else {\n this.log(\"Failed to upload build log.\");\n }\n }\n String update = \"Updated\";\n if (!issue.getStatus().equals(\"Open\")) {\n issue.setStatus(\"Open\");\n update = \"Updated and reopened\";\n }\n String comment = \"The build is continuing to fail. Latest \" +\n \"build status: \" + build.getResult() + \". For more info, see \" + \n this.getBuildUrl(build);\n String title = this.getInterpreted(build, this.getTitle());\n try {\n issue.update(comment, build.getLogFile().getName(), \"text/plain\", buildLog);\n this.log(update + \" tracker artifact '\" + title + \"' in tracker '\" \n + this.getTracker() + \"' in project '\" + this.getProject()\n + \"' on behalf of '\" + this.getUsername() + \"' at \" \n + issue.getURL() +\n \" with failed status.\");\n } catch (RemoteException re) {\n this.log(\"updateFailingBuild\", re);\n } catch (IOException ioe) {\n this.log(\"updateFailingBuild failed due to IOException:\" + \n ioe.getMessage());\n }\n }",
"protected void updateTempWorkItems() throws NbaBaseException {\t//SPR2992 changed method signature\n\t\tgetLogger().logDebug(\"Starting updateTempWorkItems\"); \n\t\t// break association\n\t\tfor (int i = 0; i < getTempWorkItems().size(); i++) {\t//SPR2992\n\t\t\tNbaDst temp = (NbaDst) getTempWorkItems().get(i);\t//SPR2992\n\t\t\tcopyCreateStation(temp);//ALS5191\n\t\t\tListIterator sources = temp.getNbaSources().listIterator();\n\t\t\tif (sources.hasNext()) {\n\t\t\t\tNbaSource source = (NbaSource) sources.next();\n\t\t\t\tsource.setBreakRelation();\n\t\t\t}\n\t\t\tsetWiStatus(new NbaProcessStatusProvider(getUser(), temp)); //SPR1715 SPR2992\n\t\t\ttemp.setStatus(getWiStatus().getPassStatus());\t//SPR2992\n\t\t\t//NBA213 deleted code\n\t\t\tupdateWork(getUser(), temp);\t//SPR3009, NBA213\n\t\t\tif (temp.isSuspended()) {\n\t\t\t\tNbaSuspendVO suspendVO = new NbaSuspendVO();\n\t\t\t\tsuspendVO.setTransactionID(temp.getID());\n\t\t\t\tunsuspendWork(getUser(), suspendVO);\t//SPR3009, NBA213\n\t\t\t}\n\t\t\tif (!temp.getID().equals(getWork().getID())) { // APSL5055-NBA331.1\n\t\t\t\tunlockWork(getUser(), temp);\t//SPR3009, NBA213\t\t\t\t\n\t\t\t} // APSL5055-NBA331.1\n\t\t\t//NBA213 deleted code\n\t\t}\n\t}",
"public void handleNetworkException(WorkerChore chore, CallNetworkException e);",
"public static void firefoxExceptionHandler() {\r\n\t\ttry {\r\n\t\t\tString[] strFirefoxExceptionHandlerCommand = LPLCoreConstents.getInstance().strFirefoxExceptionHandlerCommand.split(\",\");\r\n\t\t\t//Create JAVA Runtime class to execute the windows command to execute the AutoIT exe file to handle firefox webdriver exception\r\n\t\t\tRuntime runtime = Runtime.getRuntime();\r\n\t\t\ttry {\r\n\t\t\t\tProcess process = runtime.exec(strFirefoxExceptionHandlerCommand);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tint value = process.waitFor();\r\n\t\t\t\t\tif(value!=0)\r\n\t\t\t\t\t\tLPLCoreReporter.WriteReport(\"Handle firefox exception\", \"Handling of firefox exception should be successful\",\"Firefox exception handled unsuccessful\", LPLCoreConstents.FAILED, \"\");\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t//Since we use EXE call, we are using static wait here\r\n\t\t\tLPLCoreSync.staticWait(LPLCoreConstents.getInstance().BaseInMiliSec);\r\n\t\t\tLPLCoreReporter.WriteReport(\"Handle firefox exception\", \"Handling of firefox exception should be successful\",\"Firefox exception handled successful\", LPLCoreConstents.PASSED, \"\");\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tLPLCoreReporter.WriteReport(\"Handle firefox exception\", \"Handling of firefox exception should be successful\",\"Firefox exception handling failed. Error: \" + e.getMessage(), LPLCoreConstents.FAILED, \"\");\r\n\t\t}\r\n\t}",
"private void handleException(MessagingException me, Mail mail, String offendersName, String nextState) throws MessagingException {\n System.err.println(\"exception! \" + me);\n mail.setState(nextState);\n StringWriter sout = new StringWriter();\n PrintWriter out = new PrintWriter(sout, true);\n StringBuffer exceptionBuffer =\n new StringBuffer(128)\n .append(\"Exception calling \")\n .append(offendersName)\n .append(\": \")\n .append(me.getMessage());\n out.println(exceptionBuffer.toString());\n Exception e = me;\n while (e != null) {\n e.printStackTrace(out);\n if (e instanceof MessagingException) {\n e = ((MessagingException)e).getNextException();\n } else {\n e = null;\n }\n }\n String errorString = sout.toString();\n mail.setErrorMessage(errorString);\n getLogger().error(errorString);\n throw me;\n }",
"@Override\n public void onFailure(Throwable throwable) {\n LOG.warn(\"Job: {} failed\", jobEntry, throwable);\n if (jobEntry.getMainWorker() == null) {\n LOG.error(\"Job: {} failed with Double-Fault. Bailing Out.\", jobEntry);\n clearJob(jobEntry);\n return;\n }\n\n int retryCount = jobEntry.decrementRetryCountAndGet();\n counters.jobsRetriesForFailure().incrementAndGet();\n if (retryCount > 0) {\n long waitTime = RETRY_WAIT_BASE_TIME_MILLIS / retryCount;\n scheduleTask(() -> {\n MainTask worker = new MainTask(jobEntry);\n executeTask(worker);\n }, waitTime, TimeUnit.MILLISECONDS);\n return;\n }\n counters.jobsFailed().incrementAndGet();\n if (jobEntry.getRollbackWorker() != null) {\n jobEntry.setMainWorker(null);\n RollbackTask rollbackTask = new RollbackTask(jobEntry);\n executeTask(rollbackTask);\n return;\n }\n\n clearJob(jobEntry);\n }",
"public void testUpdateEntryPersistenceError() throws Exception {\n Connection conn = factory.createConnection();\n\n conn.close();\n manager.getEntryPersistence().setConnection(conn);\n\n entry = new ExpenseEntry();\n entry.setDescription(\"Description\");\n entry.setCreationUser(\"Create\");\n entry.setModificationUser(\"Modify\");\n entry.setAmount(new BigDecimal(100.12));\n entry.setBillable(true);\n entry.setDate(TestHelper.createDate(2005, 2, 5));\n entry.setExpenseType(type);\n entry.setStatus(status);\n\n try {\n manager.updateEntry(entry);\n fail(\"The persistence error occurs, should throw PersistenceException.\");\n } catch (PersistenceException e) {\n // good\n }\n }",
"public NbaAutomatedProcessResult executeProcess(NbaUserVO user, NbaDst work) throws NbaBaseException {\n\t\tif (!initialize(user, work)) {\n\t\t\treturn getResult();\n\t\t}\n\t\tif (getLogger().isDebugEnabled()) { \n\t\t\tgetLogger().logDebug(\"RequirementOrdered for contract \" + getWork().getNbaLob().getPolicyNumber());\n\t\t}\n\n\t\t//retrieve the sources for this work item\n\t\t//NBA213 deleted code\n\t\tNbaAwdRetrieveOptionsVO retrieveOptionsValueObject = new NbaAwdRetrieveOptionsVO();\n\t\tretrieveOptionsValueObject.setWorkItem(getWork().getID(), false);\n\t\tretrieveOptionsValueObject.requestSources();\n\t\t// SPR3009 code deleted\n\t\tsetWork(retrieveWorkItem(getUser(), retrieveOptionsValueObject));\t//SPR3009, NBA213\n\t\t//NBA213 deleted code\n\t\tisAdditionalInfo = checkIfAdditionalInfo(getWork());//ALS5494 Checks if the WI is additional Info WI\n\t\t// call awd to lookup matching items\t\n\t\tNbaSearchVO searchVO = null;\n\t\tsearchVO = lookupWork();\n\t\tcopyCreateStation(getWork());//AXAL3.7.20 ALS5191\n\t\treinitializeFields();//AXAL3.7.20\n\t\t// any work items found?\n\t\t// begin SPR2806\n\t\tif(isAdditionalInfo) {//ALS5494\n\t\t\tprocessAdditionalInfo(searchVO);\n\t\t}else {\n\t\t\tif (isLookupDataFound()) { // if there are no matching work items found\t\t//SPR2992\n\t\t\t\tif (searchVO.getSearchResults() != null && searchVO.getSearchResults().isEmpty()) {\n\t\t\t\t\tprocessUnmatchedWorkitem();\n\t\t\t\t}else {\n\t\t\t\t //begin SPR3009\n\t\t\t\t\ttry {\n\t // retrieve and lock matching work items\n\t processMatchingWorkItems(searchVO.getSearchResults());\n\t } catch (Exception e) {\n\t handleProcessingException(e);\n\t }\n\t try {\n\t updateCaseWorkItems();\n\t updatePermanentWorkItems();\n\t updateTempWorkItems();\n\t } catch (NbaBaseException e) {\n\t handleUpdateException(e);\n\t }\n\t if (result == null) {\n\t setResult(new NbaAutomatedProcessResult(NbaAutomatedProcessResult.SUCCESSFUL, getPassStatus(), getPassStatus()));\n\t }\n\t //end SPR3009 \n\t\t\t\t}\n\t\t\t\tif (result == null) {\n\t\t\t\t\tsetResult(new NbaAutomatedProcessResult(NbaAutomatedProcessResult.SUCCESSFUL, \"SUSPENDED\", \"SUSPENDED\"));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t setWork(getOrigWorkItem()); //SPR3009\n\t\t\t\tchangeStatus(getFailStatus());\n\t\t\t\taddComment(\"Minimum data for AWD lookup not present\");\n\t\t\t\tdoUpdateWorkItem();\n\t\t\t\tsetResult(new NbaAutomatedProcessResult(NbaAutomatedProcessResult.FAILED, getFailStatus(), getFailStatus()));\n\t\t\t}\n\t\t\t//end SPR2806\n\t\t}\n\t\treturn result;\n\t}",
"public void handleException();",
"private void fail()\n {\n long length = getFile().length();\n try {\n adjustReservation(length);\n } catch (InterruptedException e) {\n // Carry on\n }\n \n /* Files from tape or from another pool are deleted in case of\n * errors.\n */\n if (_initialState == EntryState.FROM_POOL ||\n _initialState == EntryState.FROM_STORE) {\n _targetState = EntryState.REMOVED;\n }\n \n /* Register cache location unless replica is to be\n * removed.\n */\n if (_targetState != EntryState.REMOVED) {\n try {\n registerCacheLocation();\n } catch (CacheException e) {\n if (e.getRc() == CacheException.FILE_NOT_FOUND) {\n _targetState = EntryState.REMOVED;\n }\n }\n }\n \n if (_targetState == EntryState.REMOVED) {\n /* A locked entry cannot be removed, thus we need to\n * unlock it before setting the state.\n */\n _entry.lock(false);\n _repository.setState(_entry, EntryState.REMOVED);\n } else {\n _log.warn(\"Marking pool entry as BROKEN\");\n _repository.setState(_entry, EntryState.BROKEN);\n _entry.lock(false);\n }\n }",
"public interface Work {\n \n public static final int UNDETERMINED_AMOUNT = -1;\n \n /**\n * Calling this method causes the work to be performed, similar to run() in Runnable.\n * The implementation of this method must regularly call mayContinue()\n * on its ContinuationArbiter, and terminate ASAP if it returns false.\n *\n * The Work may receive an InterruptedException if it is aborted during execution.\n * is free to throw an InterruptedException if it is interrupted\n * (wich will be ignored), or it may catch the exception and exit nicely.\n */\n public void execute() throws InterruptedException;\n \n /**\n * The WorkManager will call this method to designate a ContinuationArbiter \n * to the Work before it executes the Work. The Work must then use that \n * arbiter regularly during execution to ask if it may continue \n * and to signal progress.\n * The Work must make sure that calls to the arbiter occur only in the execution Thread.\n *\n * @post The Work only calls mayContinue on the designated ContinuationArbiter.\n */\n public void setContinuationArbiter(ContinuationArbiter arbiter);\n \n /**\n * Returns a description of the work (to be shown in the GUI).\n * WorkManager will only call this method on the same thread as execute, \n * so it is not required to make this method threadsafe with regard to execute.\n */\n public String getDescription();\n \n /**\n * Returns the total amount of Work to be done.\n * Note that the WorkManager expects an amount of work has been done\n * on each call of mayContinue().\n * Must return a positive integer value or UNDETERMINED_AMOUNT.\n * WorkManager will only call this method on the same thread as execute, \n * so it is not required to make this method threadsafe with regard to execute.\n */\n public int getTotalAmount();\n \n /**\n * Returns the amount of Work that has been done already.\n * Must return a positive integer value or UNDETERMINED_AMOUNT.\n * WorkManager will only call this method on the same thread as execute, \n * so it is not required to make this method threadsafe with regard to execute.\n */\n public int getAmountDone();\n \n /**\n * Returns whether this work can cope with interrupts when an abort is requested.\n * If false, the Work will not receive interrupts from the WorkManager, and \n * the only effect of an abort will be that mayContinue returns false.\n */\n public boolean isInterruptible();\n \n /**\n * Returns whether this work can be aborted by the user.\n * This is only reflected in the GUI. Programs can always (try to) abort a Work, \n * regardless of the value of the abortable property.\n * Aborting a Work only has effect when the work calls mayContinue()\n * (which will return false) or while it is waiting (it will be interrupted).\n */\n public boolean isAbortable();\n \n /**\n * Returns whether this work can be paused by the user.\n * This is only reflected in the GUI. Programs can always (try to) pause a Work, \n * regardless of the value of the pausable property.\n * Aborting a Work only has effect when the work calls mayContinue(),\n * which will not return until the Work is unpaused.\n */\n public boolean isPausable();\n}",
"boolean handleException(String sortcode, String accountNumber, long checkSum);",
"@Override // ohos.workscheduler.IWorkScheduler\r\n /* Code decompiled incorrectly, please refer to instructions dump. */\r\n public void onWorkStop(ohos.workscheduler.WorkInfo r6) throws ohos.rpc.RemoteException {\r\n /*\r\n r5 = this;\r\n ohos.rpc.MessageParcel r0 = ohos.rpc.MessageParcel.obtain()\r\n ohos.rpc.MessageParcel r1 = ohos.rpc.MessageParcel.obtain()\r\n ohos.rpc.MessageOption r2 = new ohos.rpc.MessageOption\r\n r3 = 0\r\n r2.<init>(r3)\r\n java.lang.String r4 = \"ohos.workscheduler.IWorkScheduler\"\r\n boolean r4 = r0.writeInterfaceToken(r4)\r\n if (r4 != 0) goto L_0x001d\r\n r0.reclaim()\r\n r1.reclaim()\r\n return\r\n L_0x001d:\r\n r0.writeSequenceable(r6) // Catch:{ RemoteException | ParcelException -> 0x0031 }\r\n ohos.rpc.IRemoteObject r5 = r5.remote // Catch:{ RemoteException | ParcelException -> 0x0031 }\r\n r6 = 2\r\n boolean r5 = r5.sendRequest(r6, r0, r1, r2) // Catch:{ RemoteException | ParcelException -> 0x0031 }\r\n if (r5 == 0) goto L_0x003a\r\n int r5 = r1.readInt() // Catch:{ RemoteException | ParcelException -> 0x0031 }\r\n r3 = r5\r\n goto L_0x003a\r\n L_0x002f:\r\n r5 = move-exception\r\n goto L_0x0049\r\n L_0x0031:\r\n ohos.hiviewdfx.HiLogLabel r5 = ohos.workscheduler.WorkSchedulerProxy.LOG_LABEL // Catch:{ all -> 0x002f }\r\n java.lang.String r6 = \"onWorkStop Exception\"\r\n java.lang.Object[] r2 = new java.lang.Object[r3] // Catch:{ all -> 0x002f }\r\n ohos.hiviewdfx.HiLog.error(r5, r6, r2) // Catch:{ all -> 0x002f }\r\n L_0x003a:\r\n r0.reclaim()\r\n r1.reclaim()\r\n if (r3 != 0) goto L_0x0043\r\n return\r\n L_0x0043:\r\n ohos.rpc.RemoteException r5 = new ohos.rpc.RemoteException\r\n r5.<init>()\r\n throw r5\r\n L_0x0049:\r\n r0.reclaim()\r\n r1.reclaim()\r\n throw r5\r\n */\r\n throw new UnsupportedOperationException(\"Method not decompiled: ohos.workscheduler.WorkSchedulerProxy.onWorkStop(ohos.workscheduler.WorkInfo):void\");\r\n }",
"public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {\n }",
"protected void handleException(Throwable e) throws Throwable {\n\t\tlogException(e);\n\t\t/*\n\t\t * To avoid creating multiple screenshots for the same exception (which might\n\t\t * get handled multiple times as it pops us the call stack) we check to see if\n\t\t * the exception has already been captured.\n\t\t */\n\n\t\t//!pq: re-enabled to address:\n\t\tif (_iae == null &&_ite == null) {\n\t\t\t/*\n\t\t\t * WidgetSearch and Wait Exceptions are handled in UIContext, so all\n\t\t\t * we have to handle here are others.\n\t\t\t * \n\t\t\t * NOTE: if a user throws one of these exceptions themselves, the screenshots won't happen as they expect...\n\t\t\t */\n\t\t\tif (!(e instanceof WidgetSearchException) && !(e instanceof WaitTimedOutException)) {\n\t\t\t\tcreateScreenCapture(e.getMessage());\n\t\t\t}\n\t\t}\n\t\tthrow e;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a user's Presence Get a user's presence for the specified source that is not specifically listed. Used to support custom presence sources. This endpoint does not support registered presence sources. | public UserPresence getUserPresence(String userId, String sourceId) throws IOException, ApiException {
return getUserPresence(createGetUserPresenceRequest(userId, sourceId));
} | [
"public UserPresence source(String source) {\n this.source = source;\n return this;\n }",
"public Source getPresenceSource(GetPresenceSourceRequest request) throws IOException, ApiException {\n try {\n ApiResponse<Source> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<Source>() {});\n return response.getBody();\n }\n catch (ApiException | IOException exception) {\n if (pcapiClient.getShouldThrowErrors()) throw exception;\n return null;\n }\n }",
"public ApiResponse<UserPresence> getUserPresenceWithHttpInfo(String userId, String sourceId) throws IOException {\n return getUserPresence(createGetUserPresenceRequest(userId, sourceId).withHttpInfo());\n }",
"public ApiResponse<UserPrimarySource> getPresenceUserPrimarysource(ApiRequest<Void> request) throws IOException {\n try {\n return pcapiClient.invoke(request, new TypeReference<UserPrimarySource>() {});\n }\n catch (ApiException exception) {\n @SuppressWarnings(\"unchecked\")\n ApiResponse<UserPrimarySource> response = (ApiResponse<UserPrimarySource>)(ApiResponse<?>)exception;\n return response;\n }\n catch (Throwable exception) {\n if (pcapiClient.getShouldThrowErrors()) {\n if (exception instanceof IOException) {\n throw (IOException)exception;\n }\n throw new RuntimeException(exception);\n }\n @SuppressWarnings(\"unchecked\")\n ApiResponse<UserPrimarySource> response = (ApiResponse<UserPrimarySource>)(ApiResponse<?>)(new ApiException(exception));\n return response;\n }\n }",
"public ApiResponse<Source> getPresenceSource(ApiRequest<Void> request) throws IOException {\n try {\n return pcapiClient.invoke(request, new TypeReference<Source>() {});\n }\n catch (ApiException exception) {\n @SuppressWarnings(\"unchecked\")\n ApiResponse<Source> response = (ApiResponse<Source>)(ApiResponse<?>)exception;\n return response;\n }\n catch (Throwable exception) {\n if (pcapiClient.getShouldThrowErrors()) {\n if (exception instanceof IOException) {\n throw (IOException)exception;\n }\n throw new RuntimeException(exception);\n }\n @SuppressWarnings(\"unchecked\")\n ApiResponse<Source> response = (ApiResponse<Source>)(ApiResponse<?>)(new ApiException(exception));\n return response;\n }\n }",
"public SourceEntityListing getPresenceSources(GetPresenceSourcesRequest request) throws IOException, ApiException {\n try {\n ApiResponse<SourceEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<SourceEntityListing>() {});\n return response.getBody();\n }\n catch (ApiException | IOException exception) {\n if (pcapiClient.getShouldThrowErrors()) throw exception;\n return null;\n }\n }",
"public ApiResponse<UserPrimarySource> putPresenceUserPrimarysource(ApiRequest<UserPrimarySource> request) throws IOException {\n try {\n return pcapiClient.invoke(request, new TypeReference<UserPrimarySource>() {});\n }\n catch (ApiException exception) {\n @SuppressWarnings(\"unchecked\")\n ApiResponse<UserPrimarySource> response = (ApiResponse<UserPrimarySource>)(ApiResponse<?>)exception;\n return response;\n }\n catch (Throwable exception) {\n if (pcapiClient.getShouldThrowErrors()) {\n if (exception instanceof IOException) {\n throw (IOException)exception;\n }\n throw new RuntimeException(exception);\n }\n @SuppressWarnings(\"unchecked\")\n ApiResponse<UserPrimarySource> response = (ApiResponse<UserPrimarySource>)(ApiResponse<?>)(new ApiException(exception));\n return response;\n }\n }",
"public Source getPresenceSource(String sourceId) throws IOException, ApiException {\n return getPresenceSource(createGetPresenceSourceRequest(sourceId));\n }",
"public ApiResponse<List<UcUserPresence>> getUsersPresenceBulkWithHttpInfo(String sourceId, List<String> id) throws IOException {\n return getUsersPresenceBulk(createGetUsersPresenceBulkRequest(sourceId, id).withHttpInfo());\n }",
"public ApiResponse<UserPresence> patchUserPresenceWithHttpInfo(String userId, String sourceId, UserPresence body) throws IOException {\n return patchUserPresence(createPatchUserPresenceRequest(userId, sourceId, body).withHttpInfo());\n }",
"public List<UcUserPresence> getUsersPresenceBulk(String sourceId, List<String> id) throws IOException, ApiException {\n return getUsersPresenceBulk(createGetUsersPresenceBulkRequest(sourceId, id));\n }",
"public UserPrimarySource getPresenceUserPrimarysource(GetPresenceUserPrimarysourceRequest request) throws IOException, ApiException {\n try {\n ApiResponse<UserPrimarySource> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<UserPrimarySource>() {});\n return response.getBody();\n }\n catch (ApiException | IOException exception) {\n if (pcapiClient.getShouldThrowErrors()) throw exception;\n return null;\n }\n }",
"PresenceStatus getPresenceStatus();",
"public Source putPresenceSource(PutPresenceSourceRequest request) throws IOException, ApiException {\n try {\n ApiResponse<Source> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<Source>() {});\n return response.getBody();\n }\n catch (ApiException | IOException exception) {\n if (pcapiClient.getShouldThrowErrors()) throw exception;\n return null;\n }\n }",
"@Test\n public void getDevicePresenceTest() throws ApiException {\n String deviceId = this.getProperty(\"device1.id\");\n PresenceEnvelope response = api.getDevicePresence(deviceId);\n\n assertEquals(\"Sdids must match\", deviceId, response.getSdid());\n \n assertNotNull(\"lastSeenOn\", response.getData().getLastSeenOn());\n assertNotNull(\"connected\", response.getData().getConnected());\n }",
"public PresenceStatus getStatus() {\n return null;\n }",
"public void deletePresenceSource(DeletePresenceSourceRequest request) throws IOException, ApiException {\n try {\n ApiResponse<Void> response = pcapiClient.invoke(request.withHttpInfo(), null);\n \n }\n catch (ApiException | IOException exception) {\n if (pcapiClient.getShouldThrowErrors()) throw exception;\n \n }\n }",
"public ApiResponse<Source> putPresenceSource(ApiRequest<Source> request) throws IOException {\n try {\n return pcapiClient.invoke(request, new TypeReference<Source>() {});\n }\n catch (ApiException exception) {\n @SuppressWarnings(\"unchecked\")\n ApiResponse<Source> response = (ApiResponse<Source>)(ApiResponse<?>)exception;\n return response;\n }\n catch (Throwable exception) {\n if (pcapiClient.getShouldThrowErrors()) {\n if (exception instanceof IOException) {\n throw (IOException)exception;\n }\n throw new RuntimeException(exception);\n }\n @SuppressWarnings(\"unchecked\")\n ApiResponse<Source> response = (ApiResponse<Source>)(ApiResponse<?>)(new ApiException(exception));\n return response;\n }\n }",
"public PresenceModel getPresenceModel();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set MTBF = mean time between failure a compute node in s | void setMTBF(int time); | [
"@Override\r\n public void initialRun(){\r\n tProcess = parser.nextSimProcessTime();\r\n System.out.println();\r\n boolean goRun=true;\r\n int maxT = minT+timeN;\r\n double time = 0;\r\n double time2 = 0;\r\n long nanot;\r\n while(goRun){\r\n nanot = System.nanoTime(); \r\n mc.doOneStep();\r\n nanot = System.nanoTime()-nanot;\r\n if(currentTime > minT){\r\n time += (double)(nanot/1000);\r\n time2 += Math.pow(time, 2);\r\n }\r\n\r\n if(currentTime > maxT){\r\n goRun = false;\r\n }\r\n\r\n if((currentTime % 1) == 0 && currentTime !=0){\r\n System.out.println(\"t:\"+currentTime+\" M:\"+mc.getM());\r\n }\r\n\r\n currentTime++;\r\n }\r\n avgTime = time/timeN;\r\n sigmaTime = Math.pow((((time2/timeN) - Math.pow(avgTime,2))/timeN),0.5);\r\n }",
"public void setMtm(double value) {\r\n this.mtm = value;\r\n }",
"public static void updateWorkTime(Machine m,double minTT) {\r\n\t\tdouble quantity = m.queue.get(m.queue.size()-1).quantity;\r\n\t\tm.workTime = Math.round((minTT + m.workTime + (quantity * 0.1)) * 100.0) / 100.0;\r\n\t}",
"private float getAverageWaitingTime() {\t\t\r\n\t\tfloat vtr = 0;\t\t\r\n\t\tfor(Customer c: attendedCustomers) {\r\n\t\t\tvtr += c.getWaitTime();\r\n\t\t}\t\t\r\n\t\tvtr = vtr/attendedCustomers.size();\t\t\r\n\t\treturn vtr;\r\n\t}",
"abstract Sample computeTimeError(SyncData gmSync, double upstrmPdelay, SyncData revSync, double dwnstrmPdelay);",
"double getTstall();",
"public double getAverageLoadPenaltyMs();",
"public void setBaseMtm(double value) {\r\n this.baseMtm = value;\r\n }",
"private long calculateBSTimeout(int hostCount) {\n final int PARALLEL_BS_COUNT = 20; // bootstrap.py bootstraps 20 hosts in parallel\n final long HOST_BS_TIMEOUT = 300000L; // 5 minutes timeout for a host (average). Same as in bootstrap.py\n\n return Math.max(HOST_BS_TIMEOUT, HOST_BS_TIMEOUT * hostCount / PARALLEL_BS_COUNT);\n }",
"private int tbm(TileIterator tile) {\r\n double mu = tile.mean()[0];\r\n double std = tile.stdev()[0];\r\n\r\n return (int) (mu * (1 + k * (std/r - 1)));\r\n }",
"public double getAverageTaskTime();",
"public abstract void setTotalRunTime();",
"public double getAWT(){\n int waitingTime=0;\n for(int i=0;i<completedList.size();i++){\n Process process = completedList.get(i);\n waitingTime+=process.getStartingTime()-process.getArrivalTime();\n }\n double averageWaitingTime = waitingTime*1.0/completedList.size();\n return averageWaitingTime;\n }",
"public static double measureRT(Task appRunning, Node nodeSelected)\r\n\t{\n\t\tdouble responseTime = 0; \r\n\t\tdouble transferTime = 0;\r\n\t\tdouble executionTime = 0;\r\n\t\tdouble communicationDelay = nodeSelected.latency;\t\t\r\n\t\ttransferTime = (1/nodeSelected.bandwidth) * appRunning.dataSize * 1000; //1000: s in ms\r\n\t\texecutionTime = (1/ (nodeSelected.cpu )) * appRunning.operations * 1000; //1000: s in ms\r\n\t\tresponseTime = (2*transferTime) + executionTime + (2*communicationDelay); \r\n\t\t\r\n\t\treturn responseTime;\t\t\r\n\t}",
"private void cellularAutomataTimestep() {\n // TODO\n }",
"@Test\n public void testThrottlingByMaxRitPercent() throws Exception {\n TEST_UTIL.getConfiguration().setInt(HConstants.HBASE_BALANCER_MAX_BALANCING, 500);\n TEST_UTIL.getConfiguration().setDouble(HConstants.HBASE_MASTER_BALANCER_MAX_RIT_PERCENT, 0.05);\n TEST_UTIL.startMiniCluster(2);\n\n TableName tableName = createTable(\"testThrottlingByMaxRitPercent\");\n final HMaster master = TEST_UTIL.getHBaseCluster().getMaster();\n\n unbalance(master, tableName);\n AtomicInteger maxCount = new AtomicInteger(0);\n AtomicBoolean stop = new AtomicBoolean(false);\n Thread checker = startBalancerChecker(master, maxCount, stop);\n master.balance();\n stop.set(true);\n checker.interrupt();\n checker.join();\n // The max number of regions in transition is 100 * 0.05 = 5\n assertTrue(\"max regions in transition: \" + maxCount.get(), maxCount.get() == 5);\n\n TEST_UTIL.deleteTable(tableName);\n }",
"private double updateEstimates(long sleep) {\r\n \t\t// Prune datasets\r\n \t\twhile (startupTimeHistory.size() > poolConfig.averageCount) {\r\n \t\t\tstartupTimeHistory.remove(0);\r\n \t\t}\r\n \t\twhile (requestTimeHistory.size() > poolConfig.averageCount) {\r\n \t\t\trequestTimeHistory.remove(0);\r\n \t\t}\r\n \r\n \t\t// Do estimates\r\n \t\tlong totalTime = 0;\r\n \t\tfor (long t : startupTimeHistory) {\r\n \t\t\ttotalTime += t;\r\n \t\t}\r\n \t\tstartupTimeEstimate = totalTime / startupTimeHistory.size();\r\n \r\n \t\t// Math.max(..., 1) to avoid divide by zeros.\r\n \t\tdemandEstimate = requestTimeHistory.size()\r\n \t\t\t\t/ Math.max(System.currentTimeMillis() - requestTimeHistory.get(0), 1.0);\r\n \r\n \t\t// Guestimate demand for N\r\n \t\tdouble estimate = demandEstimate * poolConfig.safetyMultiplier * sleep;\r\n \t\treturn Math.min(Math.max(estimate, poolConfig.poolMin), poolConfig.poolMax);\r\n \t}",
"public abstract double getAverageRequestTime();",
"void setMTTR(int time);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
"Blind" the client and generate a client request to be signed by the server. | public ClientRequest generateClientRequest() throws CryptoException {
PSSSigner signer = new PSSSigner(new RSABlindingEngine(),
new SHA1Digest(), 20);
signer.init(true, blindingParams);
signer.update(clientID, 0, clientID.length);
byte[] sig = signer.generateSignature();
return new ClientRequestImpl(sig);
} | [
"private Request generateRequest() throws CertificateEncodingException, NoSuchAlgorithmException, InvalidKeyException, SignatureException{\n this.authKey = CryptoManager.generateAES256RandomSecretKey();\n Request req = new Request(issuer,this.req.getIssuer(),myCertificate,authKey);\n this.myNonce =req.getTimestamp().toEpochMilli();\n req.sign(myKey);\n return req;\n }",
"private void signRequest(HttpRequestBase request){\n\t}",
"org.spin.grpc.util.ClientRequest getClientRequest();",
"public void testSignedGetRequest() throws Exception {\n setupGetRequestMock(URL_ONE);\n expect(securityTokenDecoder.createToken(\"fake-token\")).andReturn(DUMMY_TOKEN);\n expect(request.getParameter(ProxyHandler.SECURITY_TOKEN_PARAM))\n .andReturn(\"fake-token\").atLeastOnce();\n expect(request.getParameter(Preload.AUTHZ_ATTR))\n .andReturn(Auth.SIGNED.toString()).atLeastOnce();\n HttpResponse resp = new HttpResponse(200, DATA_ONE.getBytes(), null);\n expect(contentFetcherFactory.getSigningFetcher(eq(DUMMY_TOKEN)))\n .andReturn(fetcher);\n expect(fetcher.fetch(isA(HttpRequest.class))).andReturn(resp);\n replay();\n proxyHandler.fetchJson(request, response);\n verify();\n writer.close();\n }",
"public static Request createSharedSecretRequest() {\n throw new UnsupportedOperationException(\"Shared Secret Support is not currently implemented\");\n }",
"void sign(QCloudHttpRequest request, QCloudCredentials credentials) throws QCloudClientException;",
"byte[] generateAndSetClientId() throws RiakException;",
"public byte[] getClientSignature() {\n return clientSignature;\n }",
"private AuthorizationHeaderBuilder prepare(HttpRequest request) throws IOException {\n AuthorizationHeaderBuilder builder = AuthorizationHeaderBuilder.factory();\n\n builder.authzParam(\"from\", clientId);\n builder.secretKey(secretKeyBytes);\n\n String uri = request.getRequestLine().getUri();\n URL url = new URL(uri);\n String scheme = url.getProtocol();\n String port = \"\";\n if (url.getPort() > -1) {\n port = \":\" + String.valueOf(url.getPort());\n }\n builder.httpMethod(request.getRequestLine().getMethod());\n builder.uri(String.format(\"%s://%s%s%s\", scheme, url.getHost(), port, url.getPath()));\n builder.digestAlg(digestAlg);\n\n builder.nonce();\n\n Header dateHeader = request.getFirstHeader(\"Date\");\n if (dateHeader != null) {\n String requestDate = dateHeader.getValue();\n if (requestDate == null) {\n builder.timestamp();\n } else {\n // try parsing in http date format\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"EEE, dd MMM yyyy HH:mm:ss z\", Locale.US);\n try {\n builder.timestamp(dateFormat.parse(requestDate));\n } catch (ParseException e) {\n log.error(\"Cannot parse date from http header: {}\", requestDate, e);\n log.debug(\"Using current date for timestamp\");\n builder.timestamp();\n }\n }\n }\n\n // add client request headers\n Header[] headers = request.getAllHeaders();\n String[] httpHeaderNames = new String[]{\"Content-Type\", \"Content-Length\"};\n for (String httpHeaderName : httpHeaderNames) {\n for (Header header : headers) {\n if (header.getName().equalsIgnoreCase(httpHeaderName)) {\n builder.headerParam(httpHeaderName, header.getValue());\n }\n }\n }\n\n // add query parameters\n String queryString = url.getQuery();\n if (queryString != null) {\n Map<String, List<String>> queryParameterMap = Query.parse(queryString);\n for (String queryParameterName : queryParameterMap.keySet()) {\n List<String> values = queryParameterMap.get(queryParameterName);\n if (values != null) {\n for (String value : values) {\n builder.queryParam(queryParameterName, value);\n }\n }\n }\n }\n\n return builder;\n\n }",
"@O2Client\n @POST\n @Path(\"/client\")\n public Response clientAuthorizedPOST(@Context final SecurityContext c) {\n return Response.ok().build();\n }",
"private ClientAuthorizeRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public FullXmlSignatureStarter(RestPkiClient client){\r\n super(client);\r\n }",
"@GET(\"clients/{id}\")\n Call<PayantClientInfo> getClient(@Header(\"Content-Type\") String contentType, @Header(\"Authorization\") String authorization, @Path(\"id\") int clientID);",
"private String generateApiKey(Request req, Response res) {\n String toHash = Constants.SALT + new Date() + System.currentTimeMillis();\n return DigestUtils.sha256Hex(toHash);\n }",
"@O2Client\n @GET\n @Path(\"/client\")\n public Response clientAuthorizedGET(@Context final SecurityContext c) {\n return Response.ok().build();\n }",
"@Override\n\tprotected void createAuthorizationRequest() {\n\t\teventLog.startBlock(\"Swapping to Client2, Jwks2, tls2\");\n\t\tswitchToSecondClient();\n\t\tsuper.createAuthorizationRequest();\n\t}",
"private RestRequest createRestRequest(final Client jerseyClient) {\n String uri = getServiceEndpointAddress();\n WebResource webResource = buildWebResource(jerseyClient, uri);\n return new RestRequest(webResource);\n }",
"public static void createRequest(Certificate c, PrivateKey key,\n OutputStream out)\n throws AdaptrisSecurityException {\n try {\n\n CertificationRequest req = createCertRequest(c, key);\n out.write(req.getEncoded());\n }\n catch (Exception e) {\n throw new CertException(e);\n }\n }",
"String mintSignedAccessToken(String httpMethod,\n long timestamp,\n URL requestUrl,\n String accessToken,\n String nonce,\n String clientClaims\n ) throws ClientException;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the user ID of this pathology data. | @Override
public void setUserId(long userId) {
_pathologyData.setUserId(userId);
} | [
"public void setIdUser(String idUser) {\n this.idUser = idUser;\n }",
"public void setIdUser(String idUser) {\n\t\tthis.idUser = idUser;\n\t}",
"public void setIdUser(int idUser) {\n this.idUser = idUser;\n }",
"public void setIdUser(Integer idUser) {\r\n\t\tthis.idUser = idUser;\r\n\t}",
"public void setIdUser(int value) {\n this.idUser = value;\n }",
"public void setIdUser(int id) {\n\t\tthis._idUser = id;\n\t}",
"public void setId_user(int id_user) {\n this.id_user = id_user;\n }",
"public void setUserid(java.lang.String value) {\n this.userid = value;\n }",
"@Override\n public void setUserid(String userid) {\n\t\tproperties.setValue(USERID_KEY, userid);\n\t}",
"@Override\n public void setUserId(long userId) {\n _usersCatastropheOrgs.setUserId(userId);\n }",
"@Override\n\tpublic void setUserId(long userId) {\n\t\t_scienceAppManager.setUserId(userId);\n\t}",
"public void setUserId(String value) {\r\n setAttributeInternal(USERID, value);\r\n }",
"public void setUserid(Long userid) {\r\n this.userid = userid;\r\n }",
"public void setUserOid(long value) {\r\n this.userOid = value;\r\n }",
"public void setUserid(java.lang.String userid) {\n this.userid = userid;\n }",
"@Override\n\tpublic void setUserUuid(java.lang.String userUuid) {\n\t\t_pathologyData.setUserUuid(userUuid);\n\t}",
"public void setUserid(long userid)\n {\n this.userid = userid;\n }",
"@Override\n\tpublic void setUser_id(java.lang.String user_id) {\n\t\t_cholaContest.setUser_id(user_id);\n\t}",
"@Override\n\tpublic void setUserId(long userId) {\n\t\t_workFlowConfig.setUserId(userId);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes a database from the list of databases known to the database manager. | void removeDatabase(final IDatabase database); | [
"private void dropDatabase() {\n Databases.forgetDatabase(getDatabaseName());\n }",
"void dropDatabase(String dbname);",
"void deleteDatabase(String databaseName);",
"void dropDatabase(String dbname, boolean deleteConnections);",
"public void dropDatabase() {\n\t\tif (!validateDBNameNotNull()) {\n\t\t\treturn;\n\t\t}\n\n\t\tLOGGER.info(\"Droping database \" + fDBName);\n\t\tString sql = fQueryObjectType.sqlQueryType() + \" \" + fDBName + \";\";\n\t\tfJdbcDbConn.executeQueryObject(sql);\n\t\tLOGGER.info(\"Database \" + fDBName + \"is deleted.\");\n\t}",
"private static void removeDB()\n {\n if(getStatus().equals(\"no database\"))\n return;\n\n dropTable(\"myRooms\");\n dropTable(\"myReservations\");\n }",
"public void dropDataBase(String databaseName);",
"public Boolean dropDB(String name);",
"public void deleteDB() {\n File dbFile = new File(dbPath + dbName);\n if (dbFile.exists()) {\n dbFile.delete();\n }\n }",
"public void unsetDb()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(DB$2, 0);\r\n }\r\n }",
"public static void deleteDatabase() {\n\n deleteDatabaseHelper(Paths.get(DATA_DIR));\n\n }",
"protected static void deleteDB() {\n k8sclient.apps().statefulSets().inNamespace(namespace).withName(\"postgresql-db\").delete();\n Awaitility.await()\n .ignoreExceptions()\n .untilAsserted(() -> {\n Log.infof(\"Waiting for postgres to be deleted\");\n assertThat(k8sclient\n .apps()\n .statefulSets()\n .inNamespace(namespace)\n .withName(\"postgresql-db\")\n .get()).isNull();\n });\n }",
"public void removeDatabaseBundle(final String databaseDescriptorName) {\n\t\t\n\t\tDatabaseDescriptor databaseDescriptor = getDatabaseDescriptorBasedOnName(databaseDescriptorName);\n\t\tthis.databaseFactory.removeDatabaseBundle(databaseDescriptor);\n\t}",
"public void delete(String databaseName) {\n deleteWithServiceResponseAsync(databaseName).toBlocking().single().getBody();\n }",
"private void deleteServers() {\n System.out.println(\"deleteServers() \");\n JDBCInterface localDB = getBasicConnectionToDBMS();\n for (FakeServerAsDatabase server : dbmanager.getServers().values()) {\n localDB.query(server.getDropDatabaseStatement());\n }\n localDB.closeConnection();\n }",
"void deleteDatabaseContents();",
"public void dropDatabase(String dbName) {\n for (Map.Entry<String, MongoClient> entry : shardMongoClients.entrySet()) {\n logger.debug(name + \" dropping \" + dbName + \" on \" + entry.getKey());\n entry.getValue().getDatabase(dbName).drop();\n }\n }",
"public void deleteDB() {\n \n sql = \"Delete from Order where OrderID = \" + getOrderID();\n db.deleteDB(sql);\n \n }",
"public void stopDatabase(String database) {\r\n\t\tsynchronized (clients) {\r\n\t\t\tfor (WebCrawler client : clients) {\r\n\t\t\t\tif (client.getCurrentDatabase().equals(database)) {\r\n\t\t\t\t\tclient.stop();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a copy of a TribitByte | public static TribitByte value(TribitByte bite){
Objects.requireNonNull(bite);
return new TribitByte(Arrays.copyOf(bite.value, bite.value.length));
} | [
"BytesValue copy();",
"public static TribitByte value(Tribit... bits){\n if(bits.length != LENGTH){\n throw new IllegalArgumentException(\"bits must be size of \" + LENGTH);\n }\n Arrays.stream(bits).forEach(Objects::requireNonNull);\n return new TribitByte(Arrays.copyOf(bits, bits.length));\n }",
"public static TribitByte value(int realByte){\n Tribit[] bits = new Tribit[LENGTH];\n int current = realByte;\n for(int idx = 0; idx < LENGTH; idx++){\n int bit = current & 0b1;\n bits[idx] = (bit == 0 ? Tribit.ZERO : Tribit.ONE);\n current = current >>> 1;\n }\n return new TribitByte(bits);\n }",
"public TribitByte or(TribitByte other){\n Objects.requireNonNull(other);\n Tribit[] or = Stream.iterate(0, i -> i + 1)\n .limit(LENGTH)\n .map(i -> Tribit.or(value[i], other.value[i]))\n .toArray(Tribit[]::new);\n return new TribitByte(or);\n }",
"public ByteArray copy()\n\t{\n\t\treturn copy(bytes.length);\n\t}",
"public Tribit[] getBits(){\n return Arrays.copyOf(this.value, this.value.length);\n }",
"Buffer copy();",
"EObject getBYTE();",
"public Byte get(int index) {\r\n return ByteUtils.toObject(getByte(index));\r\n }",
"@Override\n public BytesValue copy() {\n return new ArrayWrappingBytesValue(arrayCopy());\n }",
"public TribitByte and(TribitByte other){\n Objects.requireNonNull(other);\n Tribit[] and = Stream.iterate(0, i -> i + 1)\n .limit(LENGTH)\n .map(i -> Tribit.and(value[i], other.value[i]))\n .toArray(Tribit[]::new);\n return new TribitByte(and);\n }",
"byte getByte(long position);",
"private static byte[] get(ByteIterable bytes, boolean copy) {\n final int len = bytes.getLength();\n final byte[] data = bytes.getBytesUnsafe();\n if (data.length == len && !copy)\n return data;\n final byte[] result = new byte[len];\n System.arraycopy(data, 0, result, 0, len);\n return result;\n }",
"public byte[] copy() {\n byte target[] = new byte[IdBitLength / 8];\n blit(target);\n return target;\n }",
"@Override\n public Bytes32 copy() {\n return new ArrayWrappingBytes32(arrayCopy());\n }",
"byte getByteNext();",
"public byte get();",
"byte decodeByte();",
"public ByteArray copy(int length)\n\t{\n\t\t// holds the byte array to return\n\t\tbyte[] byteReturn = new byte[length];\n\t\t\n\t\t// fill the array with byte 0\n\t\tArrays.fill(byteReturn, (byte) 0);\n\t\t\n\t\t// determine the smaller number\n\t\tint smallerLength = (bytes.length < length ? bytes.length : length);\n\t\t\n\t\t// loop until the smaller length\n\t\tfor (int i = 0; i < smallerLength; i++)\n\t\t{\n\t\t\tbyteReturn[i] = bytes[i];\n\t\t}\n\t\t\n\t\treturn new ByteArray(byteReturn);\n\t}"
] | {
"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.