query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Gets array of all "employee" elements
@Deprecated public andrewNamespace.xsdconfig.EmployeeDocument.Employee[] getEmployeeArray() { synchronized (monitor()) { check_orphaned(); java.util.List<andrewNamespace.xsdconfig.EmployeeDocument.Employee> targetList = new java.util.ArrayList<andrewNamespace.xsdconfig.EmployeeDocument.Employee>(); get_store().find_all_element_users(EMPLOYEE$0, targetList); andrewNamespace.xsdconfig.EmployeeDocument.Employee[] result = new andrewNamespace.xsdconfig.EmployeeDocument.Employee[targetList.size()]; targetList.toArray(result); return result; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Employee[] getAll() {\n\t\tEmployee[] empArray = new Employee[list.size()];\n\t\tfor (int i = 0; i < list.size(); i++) \n\t\t\tempArray[i] = list.get(i);\n\t\t\t\n\t\treturn empArray;\n\t}", "public Employee[] getAllEmployees() {\n List<Employee> emps = new ArrayList<>();\n // Iterate through the memory array and find Employee objects\n for (Employee e : employeeArray) {\n if (e != null) {\n emps.add(e);\n }\n }\n return emps.toArray(new Employee[0]);\n }", "@Override\r\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn employees;\r\n\t}", "public Employee[] getEmployeesList() {\n\t\treturn employees;\n\t}", "List<Employee> allEmpInfo();", "@Override\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn null;\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}", "@Override\r\n\tpublic List<Employee> getAllEmployees() {\n\t\treturn null;\r\n\t}", "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}", "public List<Employee> getAllEmployees(){\n\t\tList<Employee> employees = employeeDao.findAll();\n\t\tif(employees != null)\n\t\t\treturn employees;\n\t\treturn null;\n\t}", "public List<EmployeeTO> getAllEmployees() {\n\t\t\r\n\t\treturn EmployeeService.getInstance().getAllEmployees();\r\n\t}", "public List<Employee> getAllEmployee(){\n List<Employee> employee = new ArrayList<Employee>();\n employeeRepository.findAll().forEach(employee::add);\n return employee;\n }", "@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Emp> findAll() {\n\t\treturn eb.findAll();\n\t}", "public List<Employee> getListOfAllEmployees() {\n\t\tlista = employeeDao.findAll();\r\n\r\n\t\treturn lista;\r\n\t}", "public List<Employee> getEmployeesOnly() {\n\t\treturn edao.listEmployeOnly();\n\t}", "@Override\n\tpublic List<Employee> getEmpleados() {\n\t\treturn repositorioEmployee.findAll();\n\t}", "public List<Employee> getAll() {\n\t\treturn edao.listEmploye();\n\t}", "@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\t\n\t\tlog.debug(\"EmplyeeService.getAllEmployee() return list of employees\");\n\t\treturn repositary.findAll();\n\t}", "@Override\n\tpublic List<Employee> getAllEmployee() {\n\t\tList<Employee> employee = new ArrayList<>();\n\t\tlogger.info(\"Getting all employee\");\n\t\ttry {\n\t\t\temployee = employeeDao.getAllEmployee();\n\t\t\tlogger.info(\"Getting all employee = {}\",employee.toString());\n\t\t} catch (Exception exception) {\n\t\t\tlogger.error(exception.getMessage());\n\t\t}\n\t\treturn employee;\n\t}", "public String getEmployees(){\n return employees;\n }", "public List<Employee> getEmployees();", "@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\ttry {\n\t\t\tList<Employee> empList = new ArrayList<Employee>();\n\t\t\tList<Map<String, Object>> rows = template.queryForList(\"select * from employee\");\n\t\t\tfor(Map<?, ?> rowNum : rows) {\n\t\t\t\tEmployee emp = new Employee();\n\t\t\t\temp.setEmployeeId((Integer)rowNum.get(\"empid\"));\n\t\t\t\temp.setFirstName((String)rowNum.get(\"fname\"));\n\t\t\t\temp.setLastName((String)rowNum.get(\"lname\"));\n\t\t\t\temp.setEmail((String)rowNum.get(\"email\"));\n\t\t\t\temp.setDesignation((String)rowNum.get(\"desig\"));\n\t\t\t\temp.setLocation((String)rowNum.get(\"location\"));\n\t\t\t\temp.setSalary((Integer)rowNum.get(\"salary\"));\n\t\t\t\tempList.add(emp);\n\t\t\t}\n\t\t\treturn empList;\n\t\t} catch (DataAccessException excep) {\n\t\t\treturn null;\n\t\t}\n\t}", "public List<Employee> getAllEmployeeDetail() {\n\t\treturn dao.getAllEmployeeDetail();\n\t}", "@Override\r\n\tpublic List<Employe> getEmployes() {\n\t\treturn dao.getEmployes();\r\n\t}", "@Override\r\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn employeeDao.getAllEmployee();\r\n\t}", "@Override\r\n\tpublic List<Emp> getAll() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic List<Employee> selectAllEmployee() {\n\t\treturn null;\r\n\t}", "public List<Employe> findAllEmployees() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic List<Employee> findAllEMployees() {\n\t\tList<Employee> employees = new ArrayList<Employee>();\r\n\t\tString findData = \"select * from employee\";\r\n\r\n\t\ttry {\r\n\t\t\tStatement s = dataSource.getConnection().createStatement();\r\n\r\n\t\t\tResultSet set = s.executeQuery(findData);\r\n\r\n\t\t\twhile (set.next()) {\r\n\t\t\t\tString name = set.getString(1);\r\n\t\t\t\tint id = set.getInt(\"empId\");\r\n\t\t\t\tint sal = set.getInt(\"salary\");\r\n\t\t\t\tString tech = set.getString(\"technology\");\r\n\t\t\t\tEmployee employee = new Employee(id, sal, name, tech);\r\n\t\t\t\temployees.add(employee);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn employees;\r\n\r\n\t}", "public List<Employee> list() {\n\t\t\treturn employees;\n\t\t}", "@Override\n\tpublic List<Employee> findAllEmployee() {\n\t\treturn null;\n\t}", "public List<String> getAll() {\n\treturn employeeService.getAll();\n }", "@Override\n public List<Employee> getAllEmployees() {\n return null;\n }", "public andrewNamespace.xsdconfig.EmployeeDocument.Employee getEmployeeArray(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n andrewNamespace.xsdconfig.EmployeeDocument.Employee target = null;\r\n target = (andrewNamespace.xsdconfig.EmployeeDocument.Employee)get_store().find_element_user(EMPLOYEE$0, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n return target;\r\n }\r\n }", "public Vector<Employees> getEmployees() {\n\t\t\tVector<Employees> v = new Vector<Employees>();\n\t\t\ttry {\n\t\t\t\tStatement stmt = conn.createStatement();\n\t\t\t\tResultSet rs = stmt\n\t\t\t\t\t\t.executeQuery(\"select * from employees_details order by employees_pf\");\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tint file_num = rs.getInt(1);\n\t\t\t\t\tString name = rs.getString(2);\n\t\t\t\t\tint drive = rs.getInt(3);\n\t\t\t\t\tEmployees employee = new Employees(file_num, name, drive);\n//\t\t\t\t\tCars cars = new Truck(reg, model, drive);\n\t\t\t\t\tv.add(employee);\n\t\t\t\t}\n\t\t\t}\n\t\tcatch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn v;\n\t}", "@Override\n\tpublic List<Employee> findAllEmployees() {\n\t\treturn employeeRepository.findAllEmployess();\n\t}", "@Override\r\n\tpublic List<Employee> findAll() {\n\t\treturn null;\r\n\t}", "public java.util.List<andrewNamespace.xsdconfig.EmployeeDocument.Employee> getEmployeeList()\r\n {\r\n final class EmployeeList extends java.util.AbstractList<andrewNamespace.xsdconfig.EmployeeDocument.Employee>\r\n {\r\n @Override\r\n public andrewNamespace.xsdconfig.EmployeeDocument.Employee get(int i)\r\n { return ColleaguesImpl.this.getEmployeeArray(i); }\r\n \r\n @Override\r\n public andrewNamespace.xsdconfig.EmployeeDocument.Employee set(int i, andrewNamespace.xsdconfig.EmployeeDocument.Employee o)\r\n {\r\n andrewNamespace.xsdconfig.EmployeeDocument.Employee old = ColleaguesImpl.this.getEmployeeArray(i);\r\n ColleaguesImpl.this.setEmployeeArray(i, o);\r\n return old;\r\n }\r\n \r\n @Override\r\n public void add(int i, andrewNamespace.xsdconfig.EmployeeDocument.Employee o)\r\n { ColleaguesImpl.this.insertNewEmployee(i).set(o); }\r\n \r\n @Override\r\n public andrewNamespace.xsdconfig.EmployeeDocument.Employee remove(int i)\r\n {\r\n andrewNamespace.xsdconfig.EmployeeDocument.Employee old = ColleaguesImpl.this.getEmployeeArray(i);\r\n ColleaguesImpl.this.removeEmployee(i);\r\n return old;\r\n }\r\n \r\n @Override\r\n public int size()\r\n { return ColleaguesImpl.this.sizeOfEmployeeArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new EmployeeList();\r\n }\r\n }", "public String[][] getResearchEmployeeData() {\r\n\t\tint p = 0;\r\n\t\tString [][] employees = new String[companyDirectory.size()][4];\r\n\t\tfor(int i = 0; i < companyDirectory.size(); i++) {\r\n\t\t\tif(companyDirectory.get(i) instanceof ResearchCompany) {\r\n\t\t\t for(int j = 0; j < companyDirectory.get(i).getLocations().size();j++) {\r\n\t\t\t\t for(int k = 0; k < companyDirectory.get(i).getLocations().get(j).getEmployees().size(); k++ ) {\r\n\t\t\t\t\t employees[p][0] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getFirstName();\r\n\t\t\t\t\t employees[p][1] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getLastName();\r\n\t\t\t\t\t employees[p][2] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getId();\r\n\t\t\t\t\t employees[p][3] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getEmail();\r\n\t\t\t\t\t p++;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn employees;\r\n\t}", "@Override\n\tpublic List<Map<String, String>> employeeList() throws Exception {\n\t\treturn null;\n\t}", "@GetMapping(value=\"/searchEmpData\")\n\tpublic List<Employee> getAllEmployees()\n\t{\n\t\treturn this.integrationClient.getAllEmployees();\n\t}", "public List<Employee> getAllEmployees() {\n return employeeRepository.findAll();\n }", "@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\treturn employeeDao.getAllEmployees();\n\t}", "public List<Emp> getAllEmps() {\n\t\treturn null;\n\t}", "public Map<String, Person> getEmployees() {\n return employees;\n }", "public ArrayList<Employee> getEmployeeList()\r\n\t{\r\n\t\treturn new ArrayList<Employee>(empList);\r\n\t}", "@Override\n\tpublic List<EmployeeBean> getAllEmployees() {\n\t\tLOGGER.info(\"starts getAllEmployees method\");\n\t\tLOGGER.info(\"Ends getAllEmployees method\");\n\t\t\n\t\treturn adminEmployeeDao.getAllEmployees();\n\t}", "public String[][] getVendorEmployeeData() {\r\n\t\tint p = 0;\r\n\t\tString [][] employees = new String[companyDirectory.size()][4];\r\n\t\tfor(int i = 0; i < companyDirectory.size(); i++) {\r\n\t\t\tif(companyDirectory.get(i) instanceof VendorCompany) {\r\n\t\t\t for(int j = 0; j < companyDirectory.get(i).getLocations().size();j++) {\r\n\t\t\t\t for(int k = 0; k < companyDirectory.get(i).getLocations().get(j).getEmployees().size(); k++ ) {\r\n\t\t\t\t\t employees[p][0] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getFirstName();\r\n\t\t\t\t\t employees[p][1] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getLastName();\r\n\t\t\t\t\t employees[p][2] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getId();\r\n\t\t\t\t\t employees[p][3] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getEmail();\r\n\t\t\t\t\t p++;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn employees;\r\n\t}", "public static List<Employee> getListEmployee() throws ParserConfigurationException {\n List<Employee> listEmployees = new ArrayList<>();\n String filePath = \"src/task2/employee.xml\";\n File file = new File(filePath);\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder;\n\n try {\n docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.parse(file);\n doc.getDocumentElement().normalize();\n NodeList nodeList = doc.getElementsByTagName(\"employee\");\n for (int i = 0; i < nodeList.getLength(); i++) {\n listEmployees.add(getEmployee(nodeList.item(i)));\n }\n return listEmployees;\n } catch (ParserConfigurationException | SAXException | IOException e) {\n System.out.println(\"Error: \" + e.getMessage());\n }\n return null;\n }", "public static Map<Integer,Employee1> getEmployeeList(){\r\n\t return employees;\r\n\t \r\n }", "@Override\n @Transactional\n public List<Employee> getlistEmployee() {\n \tList<Employee> employees = entityManager.createQuery(\"SELECT e FROM Employee e\", Employee.class).getResultList();\n \tfor(Employee p : employees)\n \t\tLOGGER.info(\"employee list::\" + p);\n \treturn employees;\n }", "E[] getAll();", "public static ArrayList<Employee> getAllEmployee() throws SQLException {\n\t\tConnection connection = DatabaseConnection.getConnection();\n\t\tArrayList<Employee> employee = new ArrayList<>();\n\t\tString query = \"SELECT * FROM EMPLOYEE\";\n\t\tPreparedStatement pStatement = connection.prepareStatement(query);\n\t\tResultSet resultSet = pStatement.executeQuery();\n\t\twhile (resultSet.next()) {\n\t\t\temployee.add(new Employee(resultSet.getString(\"empId\"), resultSet\n\t\t\t\t\t.getString(\"ename\")));\n\t\t}\n\t\treturn employee;\n\t}", "@Override\r\n\tpublic List<Employee> getAllEmployeeList() throws Exception {\n\t\t\r\n\t\treturn (List<Employee>) employeeRepository.findAll();\r\n\t}", "@Transactional\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn accountDao.getAllEmployee();\n\t}", "public HashMap<Integer, Employee> viewAllEmployee() {\r\n\t\treturn employee1;\r\n\t}", "@DataProvider(name = \"employee\")\n public Object[][] getEmployee() {\n return new Object[][] {{generateEmployee()}};\n }", "@Transactional(readOnly = true)\r\n\t@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Employee> getAllEmployees() {\r\n\t\treturn em.createQuery(\"select e from Employee e order by e.office_idoffice\").getResultList();\r\n\t}", "@Override\n\tpublic List<Employee> getEmpList() throws EmpException {\n\t\treturn dao.getEmpList();\n\t}", "public RowIterator getEmployeesVA() {\n return (RowIterator)getAttributeInternal(EMPLOYEESVA);\n }", "public List<Employee> findAll() {\n return employeeRepository.findAll();\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Employee> getAllEmployees() {\r\n\t\tfinal Session session = sessionFactory.getCurrentSession();\t\t\r\n\t\tfinal Query query = session.createQuery(\"from Employee e order by id desc\");\r\n\t\t//Query q = session.createQuery(\"select NAME from Customer\");\r\n\t\t//final List<Employee> employeeList = query.list(); \r\n\t\treturn (List<Employee>) query.list();\r\n\t}", "public List<Employees> getEmployeesList()\n {\n return employeesRepo.findAll();\n }", "public List<Employee> selectAllEmployee() {\n\n\t\t// using try-with-resources to avoid closing resources (boiler plate code)\n\t\tList<Employee> emp = new ArrayList<>();\n\t\t// Step 1: Establishing a Connection\n\t\ttry (Connection connection = dbconnection.getConnection();\n\n\t\t\t\t// Step 2:Create a statement using connection object\n\t\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(SELECT_ALL_employe);) {\n\t\t\tSystem.out.println(preparedStatement);\n\t\t\t// Step 3: Execute the query or update query\n\t\t\tResultSet rs = preparedStatement.executeQuery();\n\n\t\t\t// Step 4: Process the ResultSet object.\n\t\t\twhile (rs.next()) {\n\t\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\tString employeename = rs.getString(\"employeename\");\n\t\t\t\tString address = rs.getString(\"address\");\n\t\t\t\tint mobile = rs.getInt(\"mobile\");\n\t\t\t\tString position = rs.getString(\"position\");\n\t\t\t\tint Salary = rs.getInt(\"Salary\");\n\t\t\t\tString joineddate = rs.getString(\"joineddate\");\n\t\t\t\tString filename =rs.getString(\"filename\");\n\t\t\t\tString path = rs.getString(\"path\");\n\t\t\t\temp.add(new Employee(id, employeename, address, mobile, position, Salary, joineddate,filename,path));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tdbconnection.printSQLException(e);\n\t\t}\n\t\treturn emp;\n\t}", "@Override\n\tpublic List<Employee> queryEmp() {\n\t\treturn null;\n\t}", "public static Employee[] getAllEmployeesDetails(Connection conn) {\n\t\tEmployee [] empArray = new Employee[11];\n//\t\tWe are now creating a second option method and showing all the employees details in it\n\t\ttry {\n\t\t\t// Create the SQL query string which uses the \"getEmployeeCount\" stored procedure in the employee \n\t\t\tString sql = \"CALL getAllEmployeesDetails()\";\n\t\t\t// Create a new SQL statement \n\t\t\tStatement st = conn.createStatement();\n\t\t\t// Create a new results set which store the value returned by the when the SQL statement is executed \n\t\t\tResultSet rs = st.executeQuery(sql); \n\t\t\t// While there are still elements in the results set\n\t\t\tint i=0;\n//\t\t\twe are running a while loop and storing all the sql results in the main constructor\n\t\t\twhile (rs.next()) {\n\t\t\t\tempArray[i++] = new Employee(rs.getInt(\"emp_no\"), rs.getDate(\"birth_date\"), rs.getString(\"first_name\"),rs.getString(\"last_name\"), rs.getString(\"gender\"), rs.getDate(\"hire_date\"));\n\t\t\t}\n\t\t\t// close the results set\n\t\t\trs.close(); \n\t\t\t// close the statement\n\t\t\tst.close(); \n\t\t}\n\t\tcatch (SQLException e) {\n\t\t\tSystem.out.println(\"Error in getAllEmployeesDetails\");\n\t\t\te.printStackTrace();\n\t\t}\n//\t\treturn the array\n\t\treturn empArray;\n\t}", "@Override\n\tpublic List<Employee> getEmpInfo() {\n\t\treturn null;\n\t}", "@Override\n\tpublic ArrayList<Object[]> tousEmplo() {\n\t\tfor (Employe emplo : treeMap.values()) {\n\t\t\tObject[] aux = { emplo.getId(), emplo.getNom(), emplo.getPrenom(),\n\t\t\t\t\templo.getDate_N(), emplo.getSexe(), emplo.getRue(),\n\t\t\t\t\templo.getNumero(), emplo.getVille(), emplo.getPay(),\n\t\t\t\t\templo.getTelef(), emplo.getClass().getName().substring(13) };\n\t\t\tarray.add(aux);\n\t\t}\n\t\treturn array;\n\t}", "@Override\n\tpublic com.ssaga.human.service.List<EmployeeDto> empList() {\n\t\treturn null;\n\t}", "@Override\n\tpublic void getAllEmployee() {\n\t\t\n\t}", "@Override\n\tpublic List<EmployeeBean> getEmployeeList() throws Exception {\n\t\treturn employeeDao.getEmployeeList();\n\t}", "@Override\n\tpublic List<Employee> getAll() {\n\t\tList<Employee> list =null;\n\t\tEmployeeDAO employeeDAO = DAOFactory.getEmployeeDAO();\n\t\ttry {\n\t\t\tlist=employeeDAO.getAll();\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}", "@Override\r\n\tpublic List<Employee> getdetails() {\n\t\treturn empdao.findAll();\r\n\t}", "@Override\r\n\tpublic List<EmployeeBean> getAllData() {\n\r\n\t\tEntityManager manager = entityManagerFactory.createEntityManager();\r\n\r\n\t\tString query = \"from EmployeeBean\";\r\n\r\n\t\tjavax.persistence.Query query2 = manager.createQuery(query);\r\n\r\n\t\tList<EmployeeBean> list = query2.getResultList();\r\n\t\tif (list != null) {\r\n\t\t\treturn list;\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public com.example.nettyserver.protobuf.Employee.EmployeeInfo getEmployeelist() {\n return employeelist_ == null ? com.example.nettyserver.protobuf.Employee.EmployeeInfo.getDefaultInstance() : employeelist_;\n }", "@SuppressWarnings({ \"unchecked\", \"static-access\" })\n\t@Override\n\t/**\n\t * Leo todos los empleados.\n\t */\n\tpublic List<Employees> readAll() {\n\t\tList<Employees> ls = null;\n\n\t\tls = ((SQLQuery) sm.obtenerSesionNueva().createQuery(\n\t\t\t\tInstruccionesSQL.CONSULTAR_TODOS)).addEntity(Employees.class)\n\t\t\t\t.list();// no creo que funcione, revisar\n\n\t\treturn ls;\n\t}", "@Override\n\tpublic List<Employee> viewAllEmployees() {\n\t\t CriteriaBuilder cb = em.getCriteriaBuilder();\n\t\t CriteriaQuery<Employee> cq = cb.createQuery(Employee.class);\n\t\t Root<Employee> rootEntry = cq.from(Employee.class);\n\t\t CriteriaQuery<Employee> all = cq.select(rootEntry);\n\t \n\t\t TypedQuery<Employee> allQuery = em.createQuery(all);\n\t\t return allQuery.getResultList();\n\t}", "@SuppressWarnings( \"unchecked\" )\n public List<Employment> getEmployments() {\n return (List<Employment>) CollectionUtils.select(\n getQueryService().findAllEmploymentsWithKnownActors(),\n new Predicate() {\n public boolean evaluate( Object obj ) {\n return !isFilteredOut( (Employment) obj ) && isInNameRange( (Employment) obj );\n }\n }\n );\n\n }", "public List<EmployeeDetails> getEmployeeDetails();", "public String getAllEmployees() {\n\t\t\n\t\tString allEmployees = \"\\n\";\n\t\t\n\t\tfor(AbsStaffMember staffMember : repository.getAllMembers())\n\t\t{\n\t\t\tallEmployees += \"\\t- \" + staffMember.getName() + \"\\n\";\n\t\t}\n\t\t\n\t\treturn allEmployees;\n\t}", "public Ebook[] getAll() {\n return ebooks;\n }", "public List<Employee> getEmployees() {\n\n\t\tList<Employee> employees = new ArrayList<Employee>();\n\t\t\n\t\t/*Sample data begins\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tEmployee employee = new Employee();\n\t\t\temployee.setEmail(\"shiyong@cs.sunysb.edu\");\n\t\t\temployee.setFirstName(\"Shiyong\");\n\t\t\temployee.setLastName(\"Lu\");\n\t\t\temployee.setAddress(\"123 Success Street\");\n\t\t\temployee.setCity(\"Stony Brook\");\n\t\t\temployee.setStartDate(\"2006-10-17\");\n\t\t\temployee.setState(\"NY\");\n\t\t\temployee.setZipCode(11790);\n\t\t\temployee.setTelephone(\"5166328959\");\n\t\t\temployee.setEmployeeID(\"631-413-5555\");\n\t\t\temployee.setHourlyRate(100);\n\t\t\temployees.add(employee);\n\t\t}\n\t\tSample data ends*/\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://mysql3.cs.stonybrook.edu:3306/mwcoulter?useSSL=false\",\"mwcoulter\",\"111030721\");\n\t\t\tStatement st = con.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT P.*, E.StartDate, E.HourlyRate, E.Email, E.ID, L.* \"\n\t\t\t\t\t+ \"FROM Employee E, Person P, Location L\"\n\t\t\t\t\t+ \" WHERE P.SSN = E.SSN AND L.ZipCode = P.ZipCode\");\n\t\t\twhile(rs.next()) {\n\t\t\t\tEmployee employee = new Employee();\n\t\t\t\temployee.setEmail(rs.getString(\"Email\"));\n\t\t\t\temployee.setFirstName(rs.getString(\"FirstName\"));\n\t\t\t\temployee.setLastName(rs.getString(\"LastName\"));\n\t\t\t\temployee.setAddress(rs.getString(\"Address\"));\n\t\t\t\temployee.setCity(rs.getString(\"City\"));\n\t\t\t\temployee.setStartDate(String.valueOf(rs.getDate(\"StartDate\")));\n\t\t\t\temployee.setState(rs.getString(\"State\"));\n\t\t\t\temployee.setZipCode(rs.getInt(\"ZipCode\"));\n\t\t\t\temployee.setTelephone(String.valueOf(rs.getLong(\"Telephone\")));\n\t\t\t\temployee.setEmployeeID(String.valueOf(rs.getInt(\"SSN\")));\n\t\t\t\temployee.setHourlyRate(rs.getInt(\"HourlyRate\"));\n\t\t\t\temployees.add(employee);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t\treturn employees;\n\t}", "@Override\n\tpublic List<Empdetails> getemplist() {\n\t\treturn empDAO.getemplist();\n\t}", "public List<EmployeeEntity> retrieveAllEmployeeData(StorageContext context) throws PragmaticBookSelfException {\n\t\tList<EmployeeEntity> listOfEmployeeData = null;\n\n\t\tSession hibernateSession = context.getHibernateSession();\n\n\t\tString queryString = \"FROM EmployeeEntity\"; // select * from employee;//\n\t\ttry {\n\t\t\tQuery query = hibernateSession.createQuery(queryString);\n\t\t\tlistOfEmployeeData = query.list();\n\t\t} catch (HibernateException he) {\n\t\t\tthrow new PragmaticBookSelfException(he);\n\t\t}\n\t\treturn listOfEmployeeData;\n\t}", "public String getEmployees() {\n\t\tString s = \"\";\n\t\tfor (Employee e : employees) {\n\t\t\ts = s + e.getName() + \", \";\n\t\t}\n\t\ts = s.substring(0, s.length() - 2);\n\t\treturn s;\n\t}", "@GetMapping(\"/findAllEmployees\")\n\tpublic List<Employee> getAll() {\n\t\treturn testService.getAll();\n\t}", "@RequestMapping(\"/employee\")\n\tpublic List<Employee> getAllEmplyee() {\n\t\treturn service.getAllEmplyee();\n\t}", "@Cacheable(cacheNames = \"allEmployeesCache\")\n\tpublic List<Employee> getAllEmployees() throws Exception {\n\t\tIterable<Employee> iterable = employeeRepository.findAll();\n\t List<Employee> result = new ArrayList<>();\n\t iterable.forEach(result::add);\n\t\treturn result;\n\t}", "@GetMapping(value=\"/employes\")\n\tpublic List<Employee> getEmployeeDetails(){\n\t\t\n\t\tList<Employee> employeeList = employeeService.fetchEmployeeDetails();\n\t\treturn employeeList;\t\t\t\t\t\t\n\t}", "public static List<Employee> getAllEmployees(){\n\t\t// Get the Datastore Service\n\t\tlog.severe(\"datastoremanager-\" + 366);\n\t\tDatastoreService datastore = DatastoreServiceFactory.getDatastoreService();\n\t\tlog.severe(\"datastoremanager-\" + 368);\n\t\tQuery q = buildAQuery(null);\n\t\tlog.severe(\"datastoremanager-\" + 370);\n\t\t// Use PreparedQuery interface to retrieve results\n\t\tPreparedQuery pq = datastore.prepare(q);\n\t\tlog.severe(\"datastoremanager-\" + 373);\n\t\t//List for returning\n\t\tList<Employee> returnedList = new ArrayList<>();\n\t\tlog.severe(\"datastoremanager-\" + 376);\n\t\t//Loops through all results and add them to the returning list \n\t\tfor (Entity result : pq.asIterable()) {\n\t\t\tlog.severe(\"datastoremanager-\" + 379);\n\t\t\t//Vars to use\n\t\t\tString actualFirstName = null;\n\t\t\tString actualLastName = null;\n\t\t\tBoolean attendedHrTraining = null;\n\t\t\tDate hireDate = null;\n\t\t\tBlob blob = null;\n\t\t\tbyte[] photo = null;\n\t\t\t\n\t\t\t//Get results via the properties\n\t\t\ttry {\n\t\t\t\tactualFirstName = (String) result.getProperty(\"firstName\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tactualLastName = (String) result.getProperty(\"lastName\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tattendedHrTraining = (Boolean) result.getProperty(\"attendedHrTraining\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\thireDate = (Date) result.getProperty(\"hireDate\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tblob = (Blob) result.getProperty(\"picture\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tphoto = blob.getBytes();\n\t\t\t} catch (Exception e){}\n\t\t\tlog.severe(\"datastoremanager-\" + 387);\n\t\t\t\n\t\t\t//Build an employee (If conditionals for nulls)\n\t\t\tEmployee emp = new Employee();\n\t\t \temp.setFirstName((actualFirstName != null) ? actualFirstName : null);\n\t\t \temp.setLastName((actualLastName != null) ? actualLastName : null);\n\t\t \temp.setAttendedHrTraining((attendedHrTraining != null) ? attendedHrTraining : null);\n\t\t \temp.setHireDate((hireDate != null) ? hireDate : null);\n\t\t \temp.setPicture((photo != null) ? photo : null);\n\t\t \tlog.severe(\"datastoremanager-\" + 395);\n\t\t \treturnedList.add(emp);\n\t\t}\n\t\tlog.severe(\"datastoremanager-\" + 398);\n\t\treturn returnedList;\n\t}", "@Override\n\tpublic ArrayList<Employee> getEmpList() throws HrExceptions {\n\t\tSystem.out.println(\"In getEmpList() of Dao\");\n\t\treturn null;\n\t}", "public static void getEmployeeInformation(Employee [] employee) {\n\t\tif (Employee.getEmployeeQuantity() == 0) {\n\t\t\tJOptionPane.showMessageDialog(null, \"There is no employee!\");\n\t\t} else {\n\t\t\tfor (int i = 0; i < Employee.getEmployeeQuantity(); i++) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"-------List of Employees-------\\n\"\n\t\t\t\t\t\t+ (i+1) + \": \"+ employee[i+1].getName() + \"\\n\");\n\t\t\t}\t\t\t\n\t\t}\n\t}", "@RequestMapping(value = \"/v2/employees\", method = RequestMethod.GET)\r\n\tpublic List<Employee> employeev2() {\r\n JPAQuery<?> query = new JPAQuery<Void>(em);\r\n QEmployee qemployee = QEmployee.employee;\r\n List<Employee> employees = (List<Employee>) query.from(qemployee).fetch();\r\n // Employee oneEmp = employees.get(0);\r\n\t\treturn employees;\r\n }", "public Map<Integer, Employee> getEmployeemap(){\r\n\t\treturn employee;\r\n\t}", "public List<Integer> getAllEmpno() {\n\t\treturn null;\n\t}", "@RequestMapping(method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n public final List<EmployeeDTO> findAllEmployees() {\n LOGGER.info(\"getting all employees\");\n return employeeFacade.findAllEmployees();\n }", "@Override\n\tpublic List<Employee> findAll() {\n\t\t\t\tSession currentSession = entityManager.unwrap(Session.class);\n\t\t\t\t// create a query\n\t\t\t\tQuery<Employee> theQuery = currentSession.createQuery(\"from Employee\", Employee.class);\n\t\t\t\t\n\t\t\t\t// execute a query and get the result list\n\t\t\t\tList<Employee> employeeList = theQuery.getResultList();\n\t\t\t\t\n\t\t\t\t// return the result list\n\t\t\t\treturn employeeList;\n\t}", "@Override\n\tpublic List<Employee> queryAll() {\n\t\treturn dao.queryAll();\n\t}" ]
[ "0.797306", "0.77084255", "0.76169413", "0.7521464", "0.72456294", "0.72257227", "0.7223872", "0.7203635", "0.7178331", "0.716657", "0.71444744", "0.7136684", "0.7102381", "0.7102381", "0.7087872", "0.70692647", "0.70634115", "0.70603156", "0.70494074", "0.70074725", "0.70002174", "0.6998577", "0.69806755", "0.69707114", "0.6967204", "0.695583", "0.69474673", "0.69403523", "0.69244576", "0.6923938", "0.6912766", "0.6912388", "0.68636435", "0.6856299", "0.6854246", "0.68422383", "0.6830289", "0.6817884", "0.68091726", "0.68016464", "0.6798579", "0.6784491", "0.67566234", "0.6754345", "0.67493826", "0.6735956", "0.67343897", "0.673151", "0.67053366", "0.66898406", "0.6674956", "0.66310555", "0.6612209", "0.6610412", "0.6609039", "0.6604862", "0.65901756", "0.65869486", "0.6586044", "0.65727025", "0.6568305", "0.6562389", "0.655933", "0.6550019", "0.6544931", "0.6543406", "0.6533169", "0.6529082", "0.65216124", "0.65215284", "0.65176725", "0.65004927", "0.649638", "0.64955187", "0.6492977", "0.6485735", "0.6458368", "0.64438677", "0.6438548", "0.64329326", "0.64252937", "0.64226496", "0.6422264", "0.6412728", "0.64123994", "0.6400704", "0.6389809", "0.63872135", "0.6374172", "0.63730246", "0.63684255", "0.6356115", "0.63425744", "0.6337951", "0.6331243", "0.6326011", "0.632025", "0.63059753", "0.6290233", "0.62845004" ]
0.72921944
4
Gets ith "employee" element
public andrewNamespace.xsdconfig.EmployeeDocument.Employee getEmployeeArray(int i) { synchronized (monitor()) { check_orphaned(); andrewNamespace.xsdconfig.EmployeeDocument.Employee target = null; target = (andrewNamespace.xsdconfig.EmployeeDocument.Employee)get_store().find_element_user(EMPLOYEE$0, i); if (target == null) { throw new IndexOutOfBoundsException(); } return target; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic Employee getEmployee(int id) {\n\t\treturn employees.stream().filter(emp -> emp.getEmpId()==(id)).findFirst().get();\r\n\t}", "public Employee getByID(int empId) {\n\t\tEmployee e = employees.get(empId);\n\t\tSystem.out.println(e);\n\t\treturn e;\n\t}", "@Override\r\n\tpublic Emp get(int eno) {\n\t\treturn null;\r\n\t}", "public Employee getHRhead();", "public int getEmployeeNumber() {\r\n return employeeNumber;\r\n }", "@java.lang.Override\n public grpc.messages.Messages.Employee getEmployee() {\n return employee_ == null ? grpc.messages.Messages.Employee.getDefaultInstance() : employee_;\n }", "@java.lang.Override\n public grpc.messages.Messages.Employee getEmployee() {\n return employee_ == null ? grpc.messages.Messages.Employee.getDefaultInstance() : employee_;\n }", "public int getEmployeeId() {\n return employeeId_;\n }", "java.lang.String getEmployeeName();", "public HourlyEmployee getEmployee() {\n\t\treturn employee;\n\t}", "public int getEmployeeId() {\n return employeeId_;\n }", "@Override\r\n\tpublic Employee getOne(Long arg0) {\n\t\treturn null;\r\n\t}", "public int getEmployeeId();", "public int getEmployeeId() {\r\n\t\r\n\t\treturn employeeId;\r\n\t}", "public Employeedetails getEmployeeDetailByName(String employeeId);", "int getEmployeeId();", "public Employee getEmployee() {\n return employee;\n }", "public int getEmployeeID() {\r\n return employeeID;\r\n }", "public int getEmployeeId() {\r\n\t\treturn employeeId;\r\n\t}", "private Employee findEmployee(String employeeName)\n {\n int index = -1;\n //nameJRadioButtonMenuItem.doClick();\n for(int i = 0; i < employees.size(); i++)\n {\n if(employeeName.equals(employees.get(i).getName()))\n index = i;\n }\n if(index >= 0)\n return employees.get(index);\n else\n return null;\n }", "public static void getEmployeeInformation(Employee [] employee) {\n\t\tif (Employee.getEmployeeQuantity() == 0) {\n\t\t\tJOptionPane.showMessageDialog(null, \"There is no employee!\");\n\t\t} else {\n\t\t\tfor (int i = 0; i < Employee.getEmployeeQuantity(); i++) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"-------List of Employees-------\\n\"\n\t\t\t\t\t\t+ (i+1) + \": \"+ employee[i+1].getName() + \"\\n\");\n\t\t\t}\t\t\t\n\t\t}\n\t}", "public long getEmployeeId();", "public jkt.hms.masters.business.MasEmployee getEmployee () {\n\t\treturn employee;\n\t}", "public String getEmployeeId() {\n return employeeId;\n }", "public String getEmployeeId() {\n return employeeId;\n }", "public long getEmployeeId() {\n return employeeId;\n }", "public int getEmployeeId() {\n\t\treturn employeeId;\n\t}", "public String getEmployeeName() {\n return employeeName;\n }", "public String getEmployees(){\n return employees;\n }", "public String getEmployee()\r\n/* 38: */ {\r\n/* 39:43 */ return this.employee;\r\n/* 40: */ }", "public Employee getStudentOnId(int id);", "public String getEmployeeName() {\r\n\t\r\n\t\treturn employeeName;\r\n\t}", "public grpc.messages.Messages.Employee getEmployee() {\n if (employeeBuilder_ == null) {\n return employee_ == null ? grpc.messages.Messages.Employee.getDefaultInstance() : employee_;\n } else {\n return employeeBuilder_.getMessage();\n }\n }", "public grpc.messages.Messages.Employee getEmployee() {\n if (employeeBuilder_ == null) {\n return employee_ == null ? grpc.messages.Messages.Employee.getDefaultInstance() : employee_;\n } else {\n return employeeBuilder_.getMessage();\n }\n }", "public SummitEntityImpl getEmpEO() {\r\n return (SummitEntityImpl)getEntity(1);\r\n }", "public static Employee getEmployee(Node node) {\n Employee employee = new Employee();\n if (node.getNodeType() == Node.ELEMENT_NODE) {\n Element e = (Element) node;\n employee.setId(e.getElementsByTagName(\"id\").item(0).getChildNodes().item(0).getTextContent());\n employee.setName(e.getElementsByTagName(\"name\").item(0).getChildNodes().item(0).getTextContent());\n employee.setSex(Integer.parseInt(e.getElementsByTagName(\"sex\").item(0).getChildNodes().item(0).getNodeValue()));\n employee.setDateOfBirth(e.getElementsByTagName(\"dateOfBirth\").item(0).getChildNodes().item(0).getTextContent());\n employee.setAddress(e.getElementsByTagName(\"address\").item(0).getChildNodes().item(0).getTextContent());\n employee.setIdDepartment(e.getElementsByTagName(\"idDepartment\").item(0).getChildNodes().item(0).getTextContent());\n employee.setSalary(Double.parseDouble(e.getElementsByTagName(\"salary\").item(0).getChildNodes().item(0).getNodeValue()));\n }\n return employee;\n }", "@Override\n\tpublic long getEmployeeId() {\n\t\treturn _userSync.getEmployeeId();\n\t}", "public Map<Integer, Employee> getEmployeemap(){\r\n\t\treturn employee;\r\n\t}", "public Employee get(int id) {\n\n\t\t\tfor (Employee c : employees) {\n\t\t\t\tif (c.getId()==(id)) {\n\t\t\t\t\treturn c;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "public static Entity getSpecificEmployee(Employee emp){\n\t\tif(emp == null){\n\t\t\treturn null;\n\t\t} \n\t\tDatastoreService datastore = DatastoreServiceFactory.getDatastoreService();\n\t\tLong id = emp.getId();\n\t\tKey key = KeyFactory.createKey(\"Employee\", id);\n\t\ttry {\n\t\t\tEntity ent = datastore.get(key);\n\t\t\treturn ent;\n\t\t} catch (EntityNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public String getEmployeeName() {\r\n\t\treturn employeeName;\r\n\t}", "@Override\n\tpublic Object ReadEmployee(int n) {\n\t\tEmployees em = new Employees();\n\t\t// Le asignamos una sesion y una sentencia que en este caso es leer\n\t\t// empleado dada su ID(cuando busque el empleado debe de darnos un unico\n\t\t// resultado).\n\t\tem = (Employees) sm.obtenerSesionNueva()\n\t\t\t\t.createSQLQuery(InstruccionesSQL.COSULTAR_EMPLEADO_X_ID)\n\t\t\t\t.addEntity(Employees.class).uniqueResult();\n\n\t\treturn em;\n\t}", "public int getEmployeeID() { return employeeID; }", "Employee getOldestEmployee() {\n\t}", "@Override\n public Employee getEmployee(int employeeId) {\n return null;\n }", "@Override\n\n\tpublic StudentBean dispalyemployee(Integer id) {\n\t\tStudentBean employee = null;\n\t\tfor(StudentBean e:stu)\n\t\t{ \n\t\t\tif(e.getStuId()==id)\n\t\t\t{ \n\t\t\t\temployee=e;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn employee ;\n\t}", "public String getEmployeeNum() {\n return employeeNum;\n }", "public Employee getPurchaseEmployee() {\n Discount[] txnDiscounts = compositePOSTransaction.getDiscountsArray();\n if (txnDiscounts != null && txnDiscounts.length > 0) {\n for (int i = 0; i < txnDiscounts.length; i++) {\n if (txnDiscounts[i] instanceof CMSEmployeeDiscount) {\n return ((CMSEmployeeDiscount)txnDiscounts[i]).getEmployee();\n }\n }\n }\n return null;\n }", "@Override\n\tpublic long getEmpId() {\n\t\treturn _employee.getEmpId();\n\t}", "@RequestMapping(value = \"/listEmployees\", method = RequestMethod.GET)\r\n\tpublic Employee employees() {\r\n System.out.println(\"---BEGIN\");\r\n List<Employee> allEmployees = employeeData.findAll();\r\n \r\n System.out.println(\"size of emp == \"+allEmployees.size());\r\n System.out.println(\"---END\");\r\n Employee oneEmployee = allEmployees.get(0);\r\n\t\treturn oneEmployee;\r\n }", "private int findEmp(String name) {\n int i;\n for (i = 0; i <= counter; i++) {\n \tif(employees[i].name.equals(name))\n \t\treturn i;\n }\n return -1;\n\t}", "public long getEmployeeId() {\n\t\treturn employeeId;\n\t}", "public String getEmployeeName();", "public RowIterator getEmployeesVA() {\n return (RowIterator)getAttributeInternal(EMPLOYEESVA);\n }", "public HashMap<Integer, Employee> viewAllEmployee() {\r\n\t\treturn employee1;\r\n\t}", "public Employee getEmployeeById(int id) {\r\n\t\treturn employee1.get(id);\r\n\t}", "public int getEmpId() {\n\t\treturn empId; \n\t}", "public Long getEmployeeId() {\r\n\t\treturn employeeId;\r\n\t}", "@Override\n\tpublic List<Employee> getEmpInfo() {\n\t\treturn null;\n\t}", "private static void parseEmployeeObject(JSONObject employee) {\n JSONObject employeeObject = (JSONObject) employee.get(\"employee\");\n\n //Get employee first name\n String firstName = (String) employeeObject.get(\"firstName\");\n System.out.println(firstName);\n\n //Get employee last name\n String lastName = (String) employeeObject.get(\"lastName\");\n System.out.println(lastName);\n\n //Get employee website name\n String website = (String) employeeObject.get(\"website\");\n System.out.println(website);\n }", "public Employee getEmployeebyId(int id) {\r\n\t\tEmployee e = SQLUtilityEmployees.getEmpByID(id);\r\n\t\treturn e;\r\n\t\t\r\n\t}", "List<Employee> allEmpInfo();", "public int getEmpId() {\n return id;\n }", "@Override\r\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn employees;\r\n\t}", "public int getEmpID() {\n return empID;\n }", "public Employee getEmployeeById(Long custId)throws EmployeeException;", "EmployeeDetail getById(long identifier) throws DBException;", "public Map<String, Person> getEmployees() {\n return employees;\n }", "public int getEmpId() {\n\t\treturn empId;\n\t}", "public int getEmpId() {\n\t\treturn empId;\n\t}", "public Employee getEmployeeById(String id) {\r\n for(int i = 0; i < companyDirectory.size(); i++) {\r\n\t for(int j = 0; j < companyDirectory.get(i).getLocations().size(); j++) {\r\n\t\t for(int k = 0; k < companyDirectory.get(i).getLocations().get(j).getEmployees().size(); k++) {\t\t\r\n\t\t if(companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getId().equals(id)) \r\n\t\t \treturn companyDirectory.get(i).getLocations().get(j).getEmployees().get(k);\r\n\t\t }\r\n\t\t}\r\n\t }\r\n return null;\r\n\t}", "public void getByIdemployee(int id){\n\t\tEmployeeDTO employee = getJerseyClient().resource(getBaseUrl() + \"/employee/\"+id).get(EmployeeDTO.class);\n\t\tSystem.out.println(\"Nombre: \"+employee.getName());\n\t\tSystem.out.println(\"Apellido: \"+employee.getSurname());\n\t\tSystem.out.println(\"Direccion: \"+employee.getAddress());\n\t\tSystem.out.println(\"RUC: \"+employee.getRUC());\n\t\tSystem.out.println(\"Telefono: \"+employee.getCellphone());\n\t}", "public com.example.nettyserver.protobuf.Employee.EmployeeInfo getEmployeelist() {\n return employeelist_ == null ? com.example.nettyserver.protobuf.Employee.EmployeeInfo.getDefaultInstance() : employeelist_;\n }", "public static List<Employee> getListEmployee() throws ParserConfigurationException {\n List<Employee> listEmployees = new ArrayList<>();\n String filePath = \"src/task2/employee.xml\";\n File file = new File(filePath);\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder;\n\n try {\n docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.parse(file);\n doc.getDocumentElement().normalize();\n NodeList nodeList = doc.getElementsByTagName(\"employee\");\n for (int i = 0; i < nodeList.getLength(); i++) {\n listEmployees.add(getEmployee(nodeList.item(i)));\n }\n return listEmployees;\n } catch (ParserConfigurationException | SAXException | IOException e) {\n System.out.println(\"Error: \" + e.getMessage());\n }\n return null;\n }", "@XmlElement\n public String getEmployeId() {\n return employeId;\n }", "public void getEmployee() {\r\n //what needs to be returned?\r\n }", "@Override\n\tpublic Employee getEmployeeByID(int empid) throws RemoteException {\n\t\treturn DAManager.getEmployeeByID(empid);\n\t}", "public ViewObjectImpl getEmployees() {\n return (ViewObjectImpl)findViewObject(\"Employees\");\n }", "public String getEmpID() {\r\n return empID;\r\n }", "public Employee getEmp(Integer id) {\n\t\tEmployee selectByPrimaryKey = employeeMapper.selectByPrimaryKey(id);\n\t\treturn selectByPrimaryKey;\n\t}", "public static Map<Integer,Employee1> getEmployeeList(){\r\n\t return employees;\r\n\t \r\n }", "public Number getEmployeePersonId() {\n return (Number)getAttributeInternal(EMPLOYEEPERSONID);\n }", "public int getEmpId() {\n\t\treturn 0;\n\t}", "public Employee findById(int id) throws InvalidOperationException {\n try {\n return employeeArray[id];\n } catch (ArrayIndexOutOfBoundsException e) {\n throw new InvalidOperationException(\"Error finding employee \", e);\n }\n }", "public com.example.nettyserver.protobuf.Employee.EmployeeInfo getEmployeelist() {\n if (employeelistBuilder_ == null) {\n return employeelist_ == null ? com.example.nettyserver.protobuf.Employee.EmployeeInfo.getDefaultInstance() : employeelist_;\n } else {\n return employeelistBuilder_.getMessage();\n }\n }", "@Override\r\n\tpublic List<Employe> getEmployes() {\n\t\treturn dao.getEmployes();\r\n\t}", "@Override\n\tpublic Employee getById(Integer employeeId) {\n\t\treturn employeeDao.getById(employeeId);\n\t}", "public Employee getEmployeeById(String id) {\n\t\t\t\n\t\t\tfor(Employee employee : employees) {\n\t\t\t\t\n\t\t\t\tif(id.equals(employee.getEmployeeId()) && employee != null){\n\t\t\t\t\treturn employee;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn null;\n\t\t\t\n\t\t}", "@Override\n\tpublic Employee getEmployeeById(int empId) {\n\t\treturn null;\n\t}", "@Override\n public int getEmployeeRef() throws RemoteException {\n return employeeRef;\n }", "public String getEmployeeNumber() {\n return (String)getAttributeInternal(EMPLOYEENUMBER);\n }", "@Override\n\tpublic Empdetails getemp(int empid) {\n\t\treturn empDAO.getemp(empid);\n\t}", "public EmployeeInfo searchFromTable(int employeeNum){\r\n \r\n int targetBucket = calcBucket(employeeNum);\r\n \r\n\t\tfor(int i = 0 ; i < buckets[targetBucket].size(); i++) {\r\n\t\t\tif (buckets[targetBucket].get(i).getEmpNum() == employeeNum) {\r\n EmployeeInfo locatedEmployee = buckets[targetBucket].get(i);\r\n return locatedEmployee;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n \r\n }", "@Override\n\tpublic Employee getEmployeeById(int id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Employee getEmployeeById(int id) {\n\t\treturn null;\n\t}", "public List<Employee> getEmployees() {\n\n\t\tList<Employee> employees = new ArrayList<Employee>();\n\t\t\n\t\t/*Sample data begins\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tEmployee employee = new Employee();\n\t\t\temployee.setEmail(\"shiyong@cs.sunysb.edu\");\n\t\t\temployee.setFirstName(\"Shiyong\");\n\t\t\temployee.setLastName(\"Lu\");\n\t\t\temployee.setAddress(\"123 Success Street\");\n\t\t\temployee.setCity(\"Stony Brook\");\n\t\t\temployee.setStartDate(\"2006-10-17\");\n\t\t\temployee.setState(\"NY\");\n\t\t\temployee.setZipCode(11790);\n\t\t\temployee.setTelephone(\"5166328959\");\n\t\t\temployee.setEmployeeID(\"631-413-5555\");\n\t\t\temployee.setHourlyRate(100);\n\t\t\temployees.add(employee);\n\t\t}\n\t\tSample data ends*/\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://mysql3.cs.stonybrook.edu:3306/mwcoulter?useSSL=false\",\"mwcoulter\",\"111030721\");\n\t\t\tStatement st = con.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT P.*, E.StartDate, E.HourlyRate, E.Email, E.ID, L.* \"\n\t\t\t\t\t+ \"FROM Employee E, Person P, Location L\"\n\t\t\t\t\t+ \" WHERE P.SSN = E.SSN AND L.ZipCode = P.ZipCode\");\n\t\t\twhile(rs.next()) {\n\t\t\t\tEmployee employee = new Employee();\n\t\t\t\temployee.setEmail(rs.getString(\"Email\"));\n\t\t\t\temployee.setFirstName(rs.getString(\"FirstName\"));\n\t\t\t\temployee.setLastName(rs.getString(\"LastName\"));\n\t\t\t\temployee.setAddress(rs.getString(\"Address\"));\n\t\t\t\temployee.setCity(rs.getString(\"City\"));\n\t\t\t\temployee.setStartDate(String.valueOf(rs.getDate(\"StartDate\")));\n\t\t\t\temployee.setState(rs.getString(\"State\"));\n\t\t\t\temployee.setZipCode(rs.getInt(\"ZipCode\"));\n\t\t\t\temployee.setTelephone(String.valueOf(rs.getLong(\"Telephone\")));\n\t\t\t\temployee.setEmployeeID(String.valueOf(rs.getInt(\"SSN\")));\n\t\t\t\temployee.setHourlyRate(rs.getInt(\"HourlyRate\"));\n\t\t\t\temployees.add(employee);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t\treturn employees;\n\t}", "public BigDecimal getEmployerId() {\n return getEmployerIdProperty().getValue();\n }", "public Employee SearchEmployee(int idEmployee)\n\t{\n\t\tfor(int i = 0; i < departments.size() ; i++)\n\t\t{\n\t\t\tfor(Employee emp : departments.get(i).getEmployeeList())\n\t\t\t{\n\t\t\t\tif(emp.getIdEmployee()==idEmployee) return emp;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Employee myInfo(String username) {\r\n\t\tEmployee e = SQLUtilityEmployees.getEmployeeByUsername(username);\r\n\t\tSystem.out.println(e);\r\n\t\treturn e;\r\n\t}", "public LinkedListOfEmployees getEmployees(String g) {\n\t}" ]
[ "0.64553106", "0.63974255", "0.63755625", "0.63153553", "0.6235003", "0.62303245", "0.62303245", "0.6215132", "0.62090504", "0.61979324", "0.6191433", "0.6158809", "0.6149323", "0.613571", "0.6132704", "0.6130451", "0.61304116", "0.61170596", "0.6112159", "0.61067766", "0.6090178", "0.60747933", "0.6073082", "0.60513705", "0.60513705", "0.6047368", "0.6043599", "0.6019775", "0.60195327", "0.6018337", "0.60110414", "0.59933394", "0.59919536", "0.59919536", "0.599061", "0.5989799", "0.59783196", "0.5977193", "0.5971083", "0.5970204", "0.5954126", "0.5950896", "0.5936369", "0.5936118", "0.5915782", "0.5911788", "0.5893197", "0.5880193", "0.5870584", "0.58648247", "0.5861337", "0.5852051", "0.5845835", "0.58440346", "0.5829935", "0.582679", "0.5811573", "0.5806858", "0.5797511", "0.57919276", "0.57916814", "0.57902193", "0.57854235", "0.5779721", "0.57778215", "0.5767594", "0.576759", "0.5762693", "0.57497907", "0.57497907", "0.5748653", "0.57472813", "0.57416046", "0.5736426", "0.5708511", "0.5693535", "0.56831175", "0.567732", "0.5671435", "0.5669127", "0.5665", "0.5664908", "0.5658594", "0.5651679", "0.5650667", "0.56481695", "0.5646243", "0.5643044", "0.56377995", "0.56187147", "0.5615466", "0.5610359", "0.5608559", "0.5606044", "0.5606044", "0.5601156", "0.55957985", "0.5595669", "0.5591384", "0.55846065" ]
0.67344385
0
Returns number of "employee" element
public int sizeOfEmployeeArray() { synchronized (monitor()) { check_orphaned(); return get_store().count_elements(EMPLOYEE$0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic int getNumberOfEmployees() {\n\t\treturn template.queryForObject(\"select count(*) from employee\", Integer.class);\n\t}", "public int size()\n\t{\n\t\treturn numOfEmployees;\n\t}", "@Override\r\n\tpublic int fetchEmployeCount() {\n\t\treturn edao.getEmployeCount();\r\n\t}", "public long employeesCount(String companyShortName);", "Long getNumberOfElement();", "public int countEmployees(String g) {\n\t}", "@Override\r\n\tpublic List<Employee> countByName() {\n\t\treturn null;\r\n\t}", "private int findEmp(String name) {\n int i;\n for (i = 0; i <= counter; i++) {\n \tif(employees[i].name.equals(name))\n \t\treturn i;\n }\n return -1;\n\t}", "public abstract long countByEmployee(Employee employee);", "int getPersonInfoCount();", "public final String getNum_emp() {\n return getString(getNum_empAttribute(getMtDatabase()));\n }", "public int getEmployeeNumber() {\r\n return employeeNumber;\r\n }", "public Long getElementCount();", "@Override\r\n\tpublic long countByExample(EmpExample example) {\n\t\treturn 0;\r\n\t}", "@Override\n public int getResourceCount() {\n for (Employee employee: employeesList){\n this.resourceCount += employee.getResourceCount();\n }\n return this.resourceCount+1;\n }", "@Query(\"select count(u) from User u where u.role = 'EMPLOYEE'\")\n Long getTotalEmployeesCount();", "public static int inputEmployeeCount() throws IOException{\n int employeeCount; //Theinteger for the number of employees\n \n //Prompt user it input data\n System.out.println(\"Please enter the number of employees you wish to calculate commission for:\");\n \n //Get numberof employees\n employeeCount = Integer.parseInt(input.readLine());\n System.out.println(\"\");\n \n //Return number of employees\n return employeeCount;\n }", "int getEducationsCount();", "public static int getNoOfHospitals(){\n return noOfHospitals;\n }", "public int getNumberOfElements();", "public static int getEmployeeCount(Connection conn) {\n\t\tint num = -1;\n\t\ttry {\n\t\t\t// Create the SQL query string which uses the \"getEmployeeCount\" stored procedure in the employee \n\t\t\tString sql = \"CALL getEmployeeCount()\";\n\t\t\t// Create a new SQL statement \n\t\t\tStatement st = conn.createStatement();\n\t\t\t// Create a new results set which store the value returned by the when the SQL statement is executed \n\t\t\tResultSet rs = st.executeQuery(sql);\n\t\t\t// While there are still elements in the results set\n\t\t\twhile (rs.next()) \n\t\t\t\t// assign the next int in the results set to num\n\t\t\t\tnum = rs.getInt(1); \n\t\t\t// close the results set\n\t\t\trs.close(); \n\t\t\t// close the statement\n//\t\t\tThis process will be used similarly in the other methods also, with modifications\n\t\t\tst.close(); \n\t\t}\n//\t\tWe call the SQL exception if there are any errors with calling the SQL procedures but not in the java file itself.\n\t\tcatch (SQLException e) {\n\t\t\tSystem.out.println(\"Error in getEmployeeCount\");\n\t\t\te.printStackTrace();\n\t\t}\n//\t\tWe are returning the result\n\t\treturn num;\t\t\n\t}", "@Override\r\n\tpublic <S extends Employee> long count(Example<S> arg0) {\n\t\treturn 0;\r\n\t}", "public int totalCompanies(){\n\treturn companyEmpWageArray.size();\n }", "public String getEmployeeNum() {\n return employeeNum;\n }", "public void setEmployees(int _employees){\n employees = _employees;\n }", "public int queryAllRows(Emp emp) throws Exception {\n\t\tint result = 0;\n\t\tSession session = null;\n\t\ttry {\n\t\t\tsession = sf.openSession();\n\t\t\tString sql = \"select count(*) from emp\";\n\t\t\tif (emp != null) {\n\t\t\t\tif (!(\"\").equals(emp.getEname())) {\n\t\t\t\t\tsql = sql + \" where ename like '%\" + emp.getEname() + \"%'\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tSQLQuery query = session.createSQLQuery(sql);\n\t\t\tList list = query.list();\n//\t\t\tBigInteger count = (BigInteger) list.get(0);\n//\t\t\trows = count.intValue();\n\t\t\tresult=(Integer) list.get(0);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (session != null)\n\t\t\t\tsession.close();\n\t\t}\n\t\treturn result;\n\t}", "public long getPersonesCount()throws personNotFoundExeption{\n EntityManager em = emf.createEntityManager();\n try{\n long personesCount = (long)em.createQuery(\"SELECT COUNT(p) FROM Person p\").getSingleResult();\n return personesCount;\n }finally{ \n em.close();\n }\n }", "int findAllCount() ;", "public int getEmployeeId() {\r\n\t\r\n\t\treturn employeeId;\r\n\t}", "int getAoisCount();", "public abstract Integer getNumberOfElements();", "public int getElementCount(final String elementLocator);", "public int numeroOcupado() {\n int i = 0;\n for (Map.Entry e : lista.entrySet()) {\n Equipamento eq = (Equipamento) e.getValue();\n if (eq.getEstado().equals(\"Ocupado\"))\n i++;\n }\n return i;\n }", "public int getEmpId() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int countByEmployeeId(int EmployeeId) throws SystemException {\n\t\tFinderPath finderPath = FINDER_PATH_COUNT_BY_EMPLOYEEID;\n\n\t\tObject[] finderArgs = new Object[] { EmployeeId };\n\n\t\tLong count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs,\n\t\t\t\tthis);\n\n\t\tif (count == null) {\n\t\t\tStringBundler query = new StringBundler(2);\n\n\t\t\tquery.append(_SQL_COUNT_LMSLEAVEINFORMATION_WHERE);\n\n\t\t\tquery.append(_FINDER_COLUMN_EMPLOYEEID_EMPLOYEEID_2);\n\n\t\t\tString sql = query.toString();\n\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(sql);\n\n\t\t\t\tQueryPos qPos = QueryPos.getInstance(q);\n\n\t\t\t\tqPos.add(EmployeeId);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tFinderCacheUtil.putResult(finderPath, finderArgs, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tFinderCacheUtil.removeResult(finderPath, finderArgs);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "private int getRecordsCount(final HtmlPage resultPage) {\n if (resultPage == null) {\n return 0;\n }\n \n DomElement countElement = resultPage.getElementById(\"K66\");\n if (countElement == null) {\n return 0;\n }\n \n return Integer.parseInt(countElement.getTextContent().replaceAll(\"[^0-9]\", \"\"), 10);\n }", "int getStudentResponseCount();", "public void SetCheckoutRegistrationemployeecount(String empno){\r\n\t\tString Employeenum = getValue(empno);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Registration Tile should be selected as \"+Employeenum);\r\n\t\ttry{\r\n\r\n\t\t\tsendKeys(locator_split(\"txtRegistrationEmployees\"),Employeenum);\r\n\t\t\tSystem.out.println(\"Registration Tile is selected as \"+Employeenum);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Registration Tile is Entered as \"+Employeenum);\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Registration Tile is not Entered\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtRegistrationEmployees\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "public int getNumberOfEntries();", "int getEmployeeId();", "public int capacity()\n\t{\n\t\treturn employeeData.length;\n\t}", "int getCustomersCount();", "public int totalLivrosEmprestados(String clienteNome){\n int quantidadeLivro = 0;\n for (Emprestimo e : listaEmprestimo) {\n if(e.getClienteNome().equals(clienteNome)){\n quantidadeLivro++;\n }\n }\n return quantidadeLivro;\n }", "public int selectErpEmpListCount(Map<String, Object> commandMap) throws Exception {\n\t\treturn defaultDAO.selectCount(\"Support.selectErpEmpListCount\", commandMap);\n\t}", "public int getEmployeeId() {\r\n\t\treturn employeeId;\r\n\t}", "int getExperiencesCount();", "public int size(){\n\t\tListMapEntry temp = first;\n\t\tint c=0;\n\t\twhile(temp!=null){\n\t\t\tc++;\n\t\t\ttemp = temp.getNext();\n\t\t}\n\t\treturn c;\n\t}", "public String getEmployeeNumber() {\n return (String)getAttributeInternal(EMPLOYEENUMBER);\n }", "int getDetailsCount();", "int getDetailsCount();", "int getStudentCount();", "@Override\r\n\tpublic int buscarIndice(String nomeEmpresa) {\n\t\treturn 0;\r\n\t}", "public int getNumPeople(){\r\n int num = 0;\r\n return num;\r\n }", "public int getEmployeeId() {\n return employeeId_;\n }", "@Override\n public int getItemCount() {\n return employeeList.size();\n }", "public int getNumberOfEntries() ;", "public int getEmployeeId() {\n return employeeId_;\n }", "public int getEquipmentCount() {\r\n\t\tint ret = 0;\r\n\t\tPerson p = model.getData();\r\n\t\tif ( p!=null ) {\r\n\t\t\tret = p.getEquipmentCount();\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "int getEntryCount();", "public int sizeOf();", "public int getEmployeeId() {\n\t\treturn employeeId;\n\t}", "public int getSize(){\n\t\t\n\t\tint counter = 0;\t\t\t\t\t\t\t\t\t\t\t/* ====> Size counter */\n\t\t\n\t\tUser marker = new User();\t\t\t\t\t\t\t\t\t/* ====> Create a marker */\n\t\tmarker = this.getHead();\t\t\t\t\t\t\t\t\t/* ====> Set the marker at the beginning of the list */\n\t\t\n\t\twhile(marker.getNext()!= null){\t\t\t\t\t\t\t\t/* ====> Move marker to next element until it reaches the end. */ \n\t\t\tmarker = marker.getNext();\n\t\t\tcounter++;\t\t\t\t\t\t\t\t\t\t\t\t/* ====> Increment counter everytime the loop goes through */\n\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\treturn counter;\t\t\t\t\t\t\t\t\t\t\t\t/* ====> Return number of Users in UserList */\n\t\t\n\t}", "long countNameIdNameByIdPerson(int idPerson);", "public static void getEmployeeInformation(Employee [] employee) {\n\t\tif (Employee.getEmployeeQuantity() == 0) {\n\t\t\tJOptionPane.showMessageDialog(null, \"There is no employee!\");\n\t\t} else {\n\t\t\tfor (int i = 0; i < Employee.getEmployeeQuantity(); i++) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"-------List of Employees-------\\n\"\n\t\t\t\t\t\t+ (i+1) + \": \"+ employee[i+1].getName() + \"\\n\");\n\t\t\t}\t\t\t\n\t\t}\n\t}", "public static int countByEmployeeId(long employeeID)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getPersistence().countByEmployeeId(employeeID);\n\t}", "@Override\n\tpublic int incheoncount() throws Exception {\n\t\treturn dao.incheoncount();\n\t}", "public int getElementCount(String subExpression) {\n int result = 0;\n String expression = contextNode + \"/\" + subExpression;\n try {\n NodeList nl = (NodeList)xp.evaluate(expression, source, XPathConstants.NODESET);\n result = nl.getLength();\n } catch(Exception e) {\n Util.log(\"XML error: can't read node \" + expression + \".\");\n Util.logException(e);\n }\n if ((result == 1) && isTemplate(subExpression)) result = 0;\n return result;\n }", "int getRecordCount();", "public int getNumber() {\r\n\t\treturn page.getNumberOfElements();\r\n\t}", "public static void main(String[] args) throws Exception {\n\n System.out.println(Employee.employeeCount);\n\n }", "Exp getElemSizeExp();", "org.apache.xmlbeans.XmlInt xgetNumberOfResults();", "public int getNumPersons() {\r\n\t\treturn this.persons.size();\r\n\t}", "public static int numberOfElement()\n\t{\n\t\treturn REF_INT_STRING.size();\n\t}", "@Test\n public final void testListCount(@Mocked final EmployDAO dao) {\n final ArrayList<Employ> elist = new ArrayList<Employ>();\n elist.add(new Employ(1, \"Sougata\", \"Java\", \"Programmer\", 844223));\n elist.add(new Employ(3, \"Ram\", \"Angular\", \"Expert\",58553));\n new Expectations() {\n {\n dao.show(); result = elist;\n }\n };\n new MockUp<EmployFactory>() {\n @Mock\n EmployDAO dao() {\n return dao;\n }\n };\n Employ[] es = EmployFactory.showEmploy();\n assertEquals(2, es.length);\n }", "public int employeeId(String employeeName) {\n\n int idOfEmployee = 0;\n\n try {\n Connection conn = ConnectToSqlDB.connectToSqlDatabase();\n String query = \"SELECT * FROM employees;\";\n\n ConnectToSqlDB.statement = conn.createStatement();\n\n ConnectToSqlDB.resultSet = ConnectToSqlDB.statement.executeQuery(query);\n\n while (ConnectToSqlDB.resultSet.next()) {\n int idField = ConnectToSqlDB.resultSet.getInt(\"employee_id\");\n String nameField = ConnectToSqlDB.resultSet.getString(\"employee_name\");\n String salaryField = ConnectToSqlDB.resultSet.getString(\"employee_salary\");\n String departmentField = ConnectToSqlDB.resultSet.getString(\"department\");\n\n if (nameField.equals(employeeName)) {\n idOfEmployee = idField;\n }\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n System.out.print(\"The ID assigned to this employee is: \");\n return idOfEmployee;\n }", "public IntegerDt getNumberOfInstancesElement() { \n\t\tif (myNumberOfInstances == null) {\n\t\t\tmyNumberOfInstances = new IntegerDt();\n\t\t}\n\t\treturn myNumberOfInstances;\n\t}", "public IntegerDt getNumberOfInstancesElement() { \n\t\tif (myNumberOfInstances == null) {\n\t\t\tmyNumberOfInstances = new IntegerDt();\n\t\t}\n\t\treturn myNumberOfInstances;\n\t}", "public int getEmployeeID() {\r\n return employeeID;\r\n }", "static public int numberOfPersons() {\n return personMap.size();\n }", "public int qureyNumOfInspectors() {\r\n\t\tif (DBConnection.conn == null) {\r\n\t\t\tDBConnection.openConn();\r\n\t\t}\r\n\t\tint sum = 0;\r\n\t\ttry {\r\n\t\t\tString sql = \"select count(*) from InspectionPersonnel\";\r\n\t\t\tps = DBConnection.conn.prepareStatement(sql);\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tsum = rs.getInt(1);\r\n\t\t\t}\r\n\t\t\tDBConnection.closeResultSet(rs);\r\n\t\t\tDBConnection.closeStatement(ps);\r\n\t\t\tDBConnection.closeConn();\r\n\t\t\treturn sum;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "int getNumOfSellOrders();", "public java.math.BigInteger getCount()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(COUNT$8);\n if (target == null)\n {\n return null;\n }\n return target.getBigIntegerValue();\n }\n }", "public IntegerDt getNumberOfSeriesElement() { \n\t\tif (myNumberOfSeries == null) {\n\t\t\tmyNumberOfSeries = new IntegerDt();\n\t\t}\n\t\treturn myNumberOfSeries;\n\t}", "int getRealtorNumCnt(RealtorDTO realtorDTO);", "public int countPerson() {\n\t\treturn count(GraphQueries.COUNT_PERSON);\n\t}", "public int getSubElementCount() { throw new RuntimeException(\"Stub!\"); }", "@Override\n\tpublic int countPkContrat(TypeContratEmployeeId e) {\n\t\treturn rep.countByPkContrat(e);\n\t}", "@Override\n\tpublic int countAll() throws SystemException {\n\t\tLong count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_EMPLOYEECOMPLAINT);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tFinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tFinderCacheUtil.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "int countByExample(OrgMemberRecordExample example);", "public int getNotYetCount() {\r\n return root.getNotYetCount();\r\n }", "public int getStudentListSize() throws GenericBusinessException {\n sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();\n try {\n String queryString = \"select count(*) from \" + Student.class.getName();\n Query query = hibernateTemplate.createQuery(queryString);\n List list = hibernateTemplate.list(query);\n Integer countResult = (Integer) list.get(0);\n return countResult.intValue();\n } finally {\n log.debug(\"finished getStudentListSize()\");\n }\n }", "public int getNrOfElements() {\n return this.nrOfElements;\n }", "int countByExample(organize_infoBeanExample example);", "public int count() {\n\t Query count = getEntityManager().createQuery(\"select count(u) from \" + getEntityClass().getSimpleName() + \" u\");\n\t return Integer.parseInt(count.getSingleResult().toString());\n\t }", "@Override\n\tpublic int jejucount() throws Exception {\n\t\treturn dao.jejucount();\n\t}", "int getTotalElements();", "public int size(){\n\t\tListUtilities start = this.returnToStart();\n\t\tint count = 1;\n\t\twhile(start.nextNum != null){\n\t\t\tcount++;\n\t\t\tstart = start.nextNum;\n\t\t}\n\t\treturn count;\n\t}", "public int getEmployeeId();", "public static long countEntries(IOService fileIO) {\n if (fileIO.equals(IOService.FILE_IO)) {\n return new EmployeePayrollFileIOService().countEntries();\n }\n return 0;\n }" ]
[ "0.74438983", "0.72844076", "0.6920216", "0.6713133", "0.67017406", "0.6604837", "0.64902204", "0.6393127", "0.6325643", "0.62896454", "0.62507236", "0.6170674", "0.61406225", "0.6136526", "0.60355276", "0.6034507", "0.59798294", "0.59580874", "0.59382683", "0.59355897", "0.5916749", "0.5904957", "0.5885303", "0.5854112", "0.58435524", "0.5788044", "0.57815146", "0.5762031", "0.57614344", "0.57586014", "0.5754616", "0.57025373", "0.57010144", "0.5700744", "0.56843466", "0.5672774", "0.5658251", "0.56577545", "0.56543744", "0.5647969", "0.56473076", "0.5641015", "0.56372494", "0.5630279", "0.5630021", "0.56239086", "0.5622676", "0.56086797", "0.5599161", "0.5599161", "0.5589187", "0.55867845", "0.55821455", "0.55810887", "0.5570183", "0.55665094", "0.55665016", "0.5558223", "0.5556488", "0.5555122", "0.5552954", "0.5535076", "0.553383", "0.5516591", "0.55147415", "0.55099356", "0.5498353", "0.54961187", "0.5486176", "0.5483962", "0.54717463", "0.5466768", "0.54615545", "0.5458597", "0.54574496", "0.54545283", "0.5453555", "0.5453555", "0.545282", "0.54311335", "0.5422017", "0.54113597", "0.54102707", "0.5408729", "0.54066867", "0.5403727", "0.5398205", "0.5398025", "0.53972626", "0.5396579", "0.5394717", "0.5391272", "0.5391122", "0.5390763", "0.53733075", "0.5360749", "0.5360128", "0.53564405", "0.5352435", "0.53515196" ]
0.70745546
2
Sets array of all "employee" element WARNING: This method is not atomicaly synchronized.
public void setEmployeeArray(andrewNamespace.xsdconfig.EmployeeDocument.Employee[] employeeArray) { check_orphaned(); arraySetterHelper(employeeArray, EMPLOYEE$0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setEmployees(Employee[] employees) {\n\t\tthis.employees = employees;\n\t}", "public void setEmployees(ArrayList<Employee> employees) { \r\n this.employees = employees;\r\n }", "public void setEmployeeArray(int i, andrewNamespace.xsdconfig.EmployeeDocument.Employee employee)\r\n {\r\n generatedSetterHelperImpl(employee, EMPLOYEE$0, i, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_ARRAYITEM);\r\n }", "public static void fillEmployees() {\n\t\tString name1;\n\t\tString name2;\n\t\tString name3;\n\t\tString name4;\n\t\tfor(int i=0;i<auxEmployees.length;i++) { //Va llenando de una en una las filas del array auxiliar de empleados (cada fila es una empresa) con nommbres aleatorios del array employees\n\t\t\tname1=\"\";\n\t\t\tname2=\"\";\n\t\t\tname3=\"\";\n\t\t\tname4=\"\";\n\t\t\twhile (name1.equals(name2) || name1.equals(name3) || name1.equals(name4) || name2.equals(name3) || name2.equals(name4) || name3.equals(name4)) { //Si los nombres son iguales vuelve a asignar nombres\n\t\t\t\tname1=employees[selector.nextInt(employees.length)];\n\t\t\t\tname2=employees[selector.nextInt(employees.length)];\n\t\t\t\tname3=employees[selector.nextInt(employees.length)];\n\t\t\t\tname4=employees[selector.nextInt(employees.length)];\n\t\t\t}\n\t\t\tauxEmployees[i][0]=name1;\n\t\t\tauxEmployees[i][1]=name2;\n\t\t\tauxEmployees[i][2]=name3;\n\t\t\tauxEmployees[i][3]=name4;\n\t\t}\n\t}", "public EmployeeSet()\n\t{\n\t\tnumOfEmployees = 0;\n\t\temployeeData = new Employee[10];\n\t}", "public void setEmployee(int index, Person emp) {\n if (index >= 0 && index < employees.length) {\n employees[index] = emp;\n }\n }", "public void setEmployees(int _employees){\n employees = _employees;\n }", "@Override\n public void setEmployees() throws EmployeeCreationException {\n\n }", "public Employee[] getEmployeesList() {\n\t\treturn employees;\n\t}", "public Manager(Employee[] employees) {\n\t\tsuper();\n\t\tthis.employees = employees;\n\t}", "public void updateEmployees(List<Employe> employees) {\n\t\t\n\t}", "public andrewNamespace.xsdconfig.EmployeeDocument.Employee getEmployeeArray(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n andrewNamespace.xsdconfig.EmployeeDocument.Employee target = null;\r\n target = (andrewNamespace.xsdconfig.EmployeeDocument.Employee)get_store().find_element_user(EMPLOYEE$0, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n return target;\r\n }\r\n }", "@Override\n\tpublic void getAllEmployee() {\n\t\t\n\t}", "@Deprecated\r\n public andrewNamespace.xsdconfig.EmployeeDocument.Employee[] getEmployeeArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List<andrewNamespace.xsdconfig.EmployeeDocument.Employee> targetList = new java.util.ArrayList<andrewNamespace.xsdconfig.EmployeeDocument.Employee>();\r\n get_store().find_all_element_users(EMPLOYEE$0, targetList);\r\n andrewNamespace.xsdconfig.EmployeeDocument.Employee[] result = new andrewNamespace.xsdconfig.EmployeeDocument.Employee[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }", "@Override\n\tpublic void updateEmployee(List<Employee> employees) {\n\t\t\n\t}", "public Employee[] getAllEmployees() {\n List<Employee> emps = new ArrayList<>();\n // Iterate through the memory array and find Employee objects\n for (Employee e : employeeArray) {\n if (e != null) {\n emps.add(e);\n }\n }\n return emps.toArray(new Employee[0]);\n }", "@Override\n\tpublic void updateEmployee() {\n\n\t}", "public void renewEmployeesList(){\n employees = new ArrayList<>();\n }", "@Override\r\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn employees;\r\n\t}", "@Override\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn null;\n\t}", "public Employee[] getAll() {\n\t\tEmployee[] empArray = new Employee[list.size()];\n\t\tfor (int i = 0; i < list.size(); i++) \n\t\t\tempArray[i] = list.get(i);\n\t\t\t\n\t\treturn empArray;\n\t}", "public void setEmployee (jkt.hms.masters.business.MasEmployee employee) {\n\t\tthis.employee = employee;\n\t}", "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}", "public void add(Employee emp) throws InvalidOperationException {\n if (employeeArray[emp.getId()] != null) {\n throw new InvalidOperationException(\"Error adding employee , employee id already exists \" + emp.getId());\n }\n try {\n employeeArray[emp.getId()] = emp;\n } catch (ArrayIndexOutOfBoundsException e) {\n throw new InvalidOperationException(\"Error adding employee , id must be less than \" + employeeArray.length);\n }\n }", "void set(int i, E e) {\r\n arr[i] = e;\r\n }", "public void bulkAdd(){\n employees.add(new Employee(23.0, 15000.0, \"Shayan\"));\n employees.add(new Employee(22.0, 60000.0, \"Rishabh\"));\n employees.add(new Employee(23.0, 45000.0, \"Ammar\"));\n employees.add(new Employee(25.0, 30000.0, \"Fahad\"));\n employees.add(new Employee(21.0, 50000.0, \"Ankur\"));\n }", "public List<Employe> findAllEmployees() {\n\t\treturn null;\n\t}", "@Override\n\tpublic void ModifyEmployee() {\n\t\t\n\t}", "public Builder setEmployeelist(com.example.nettyserver.protobuf.Employee.EmployeeInfo value) {\n if (employeelistBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n employeelist_ = value;\n onChanged();\n } else {\n employeelistBuilder_.setMessage(value);\n }\n\n return this;\n }", "@Override\n\tpublic List<Employee> findAllEmployee() {\n\t\treturn null;\n\t}", "public EmployeeMain() {\n employeeSalary_2015 = new ArrayList<Employee>();\n employeeSalary_2014 = new ArrayList<Employee>();\n }", "private Employee fillSubordinates(Employee manager, List<Employee> allEmployees, Set<Employee> seenEmployees) {\n\n // this employee is already covered\n seenEmployees.add(manager);\n\n Employee processedEmployee;\n\n //get all employees who have this manager\n List<Employee> subordinateList = allEmployees.stream()\n .filter(employee -> manager.getEmployeeId().equals(employee.getManagerId()))\n .collect(Collectors.toList());\n\n if (subordinateList.size() > 0 ) { // has subordinates\n // Must use final or effectively final in lambda expression\n Set<Employee> seenEmployeesToSend = seenEmployees;\n // recursive call to fill the subordinates of the current employee if any\n List<Employee> processedSubordinates = subordinateList.stream()\n .map(employee -> fillSubordinates(employee , allEmployees, seenEmployeesToSend))\n // Sort employees (under this manager) by Id\n .sorted()\n .collect(Collectors.toList());\n processedEmployee = new Manager(manager, processedSubordinates);\n } else { // if no subordinates exist, return the same object unchanged\n processedEmployee = manager;\n }\n\n return processedEmployee;\n }", "public static void main(String[] args) {\n\t\tSalariedEmployee salariedemployee = new SalariedEmployee(\"John\",\"Smith\",\"111-11-1111\",new Date(9,25,1993),800.0);\n\t\tHourlyEmployee hourlyemployee = new HourlyEmployee(\"Karen\",\"Price\",\"222-22-2222\",new Date(10,25,1993),900.0,40);\n\t\t\n\t\tCommissionEmployee commissionemployee = new CommissionEmployee(\"jahn\",\"L\",\"333-33-333\",new Date(11,25,1993),1000.0,.06);\n\t\t\n\t\tBasePlusCommissionEmployee basepluscommissionemployee = new BasePlusCommissionEmployee(\"bob\",\"L\",\"444-44-444\",new Date(12,25,1993),1800.0,.04,300);\n\t\t\n\t\tPieceWorker pieceworker = new PieceWorker(\"julee\",\"hong\", \"555-55-555\",new Date(12,25,1993) , 1200, 10);\n\t\tSystem.out.println(\"Employees processes individually\");\n\t\t//System.out.printf(\"%n%s%n%s: $%,.2f%n%n\", SalariedEmployee,\"earned\",SalariedEmployee.earnings());\n\n\t\t//creating employee array\n\t\t\n\t\tEmployee[] employees = new Employee[5];\n\t\t\n\t\t//intializing array with employees \n\t\temployees[0] = salariedemployee;\n\t\temployees[1] = hourlyemployee;\n\t employees[2] = commissionemployee;\n\t\temployees[3] = basepluscommissionemployee;\n\t\temployees[4]= pieceworker;\n\t\t\n\t\tSystem.out.println(\"employees processed polymorphically\");\n\t\tCalendar cal = Calendar.getInstance();\n\t\tSystem.out.println(new SimpleDateFormat(\"MM\").format(cal.getTime()));\n\t\tint currentMonth = Integer.parseInt(new SimpleDateFormat(\"MM\").format(cal.getTime()));\n\t\t\n\t\t//processing each element into the array\n\t\tfor(Employee currentemployee:employees){\n\t\t\t\n\t\t\t/*if(currentemployee.getBirthDate().getMonth()==currentMonth)\n\t\tSystem.out.println(\"current earnings\"+(currentemployee.earnings()+100));\n\t\t\telse\n\t\t\t\tSystem.out.println(\"current earnings\"+currentemployee.earnings());\n\t\t\t\t*/\n\t\t\tSystem.out.println(currentemployee.toString());\n\t\t}\n\t}", "@Override\r\n\tpublic Result update(Employees employees) {\n\t\treturn null;\r\n\t}", "public Company(int size) {\n employees = new Person[size];\n }", "@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic List<Employee> getAllEmployees() {\n\t\treturn null;\r\n\t}", "public void updateEmployee(Employe employee) {\n\t\t\n\t}", "public Object getUpdatedEmployees() {\n\t\treturn null;\n\t}", "public Builder setEmployeelist(\n com.example.nettyserver.protobuf.Employee.EmployeeInfo.Builder builderForValue) {\n if (employeelistBuilder_ == null) {\n employeelist_ = builderForValue.build();\n onChanged();\n } else {\n employeelistBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }", "protected void setArray(Expression expr)\n {\n setExpression(expr);\n }", "@Override\r\n\tpublic void updateEmployee(Employee t) {\n\t\t\r\n\t}", "@Override\n\tpublic void updateEmployee(Employee e) {\n\t\t\n\t}", "public String[][] getResearchEmployeeData() {\r\n\t\tint p = 0;\r\n\t\tString [][] employees = new String[companyDirectory.size()][4];\r\n\t\tfor(int i = 0; i < companyDirectory.size(); i++) {\r\n\t\t\tif(companyDirectory.get(i) instanceof ResearchCompany) {\r\n\t\t\t for(int j = 0; j < companyDirectory.get(i).getLocations().size();j++) {\r\n\t\t\t\t for(int k = 0; k < companyDirectory.get(i).getLocations().get(j).getEmployees().size(); k++ ) {\r\n\t\t\t\t\t employees[p][0] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getFirstName();\r\n\t\t\t\t\t employees[p][1] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getLastName();\r\n\t\t\t\t\t employees[p][2] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getId();\r\n\t\t\t\t\t employees[p][3] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getEmail();\r\n\t\t\t\t\t p++;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn employees;\r\n\t}", "public void setEmployee(String employee)\r\n/* 43: */ {\r\n/* 44:47 */ this.employee = employee;\r\n/* 45: */ }", "static void set() {\n\t\tArrayList<Integer> arr1=new ArrayList<>();\n\t\tfor(int i=0;i<10;i++) arr1.add(i);\n\t\tfor(int x:arr1) System.out.print(x+\" \");\n\t\tSystem.out.println();\n\t\tarr1.set(3, 100);\n\t\tfor(int x:arr1) System.out.print(x+\" \");\n\t}", "public Manager() {\n\t\tsuper();\n\t\temployees = new Employee[10];\n\t}", "@Test\n\tpublic void testingMultipleEmployees() {\n\t\t\n\t\tthis.gettingUserAndPass();\n\t\t\n\t\tthis.sendingKeys();\n\t\t\n\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t\t\n\t\tdriver.findElement(By.id(\"sn_staff\")).click();\n\t\tdriver.findElement(By.id(\"act_primary\")).click();\n\t\t\n\t\tint beforeAdd = driver.findElements(By.tagName(\"a\")).size();\n\t\t\n\t\tdriver.findElement(By.id(\"_asf1\")).sendKeys(\"FirstName\");\n\t\tdriver.findElement(By.id(\"_asl1\")).sendKeys(\"LastName\");\n\t\tdriver.findElement(By.id(\"_ase1\")).sendKeys(\"jelena@myaddress.com\");\n\t\t\n\t\tdriver.findElement(By.id(\"_asf2\")).sendKeys(\"FirstName\");\n\t\tdriver.findElement(By.id(\"_asl2\")).sendKeys(\"LastName\");\n\t\tdriver.findElement(By.id(\"_ase2\")).sendKeys(\"dusan@myaddress.com\");\n\t\t\n\t\tdriver.findElement(By.id(\"_as_save_multiple\")).click();\n\t\t\n\t\tint afterAdd = driver.findElements(By.tagName(\"a\")).size();\n\t\t\n\t\tint newAdded = beforeAdd - afterAdd;\n\t\t\n\t\tassertEquals(2, newAdded);\n\t\t\n\t}", "@DataProvider(name = \"employee\")\n public Object[][] getEmployee() {\n return new Object[][] {{generateEmployee()}};\n }", "@Override\r\n\tpublic List<Employee> findAllEMployees() {\n\t\tList<Employee> employees = new ArrayList<Employee>();\r\n\t\tString findData = \"select * from employee\";\r\n\r\n\t\ttry {\r\n\t\t\tStatement s = dataSource.getConnection().createStatement();\r\n\r\n\t\t\tResultSet set = s.executeQuery(findData);\r\n\r\n\t\t\twhile (set.next()) {\r\n\t\t\t\tString name = set.getString(1);\r\n\t\t\t\tint id = set.getInt(\"empId\");\r\n\t\t\t\tint sal = set.getInt(\"salary\");\r\n\t\t\t\tString tech = set.getString(\"technology\");\r\n\t\t\t\tEmployee employee = new Employee(id, sal, name, tech);\r\n\t\t\t\temployees.add(employee);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn employees;\r\n\r\n\t}", "public int[] getEMPLOYEEID() {\r\n return EMPLOYEEID;\r\n }", "public List<Employee> getAllEmployee(){\n List<Employee> employee = new ArrayList<Employee>();\n employeeRepository.findAll().forEach(employee::add);\n return employee;\n }", "public int sizeOfEmployeeArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(EMPLOYEE$0);\r\n }\r\n }", "private void setEmployeeID() {\n try {\n employeeID = userModel.getEmployeeID(Main.getCurrentUser());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public Builder setEmployee(grpc.messages.Messages.Employee value) {\n if (employeeBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n employee_ = value;\n onChanged();\n } else {\n employeeBuilder_.setMessage(value);\n }\n\n return this;\n }", "public Builder setEmployee(grpc.messages.Messages.Employee value) {\n if (employeeBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n employee_ = value;\n onChanged();\n } else {\n employeeBuilder_.setMessage(value);\n }\n\n return this;\n }", "@Override\r\n\tpublic List<Employee> selectAllEmployee() {\n\t\treturn null;\r\n\t}", "public String[][] getVendorEmployeeData() {\r\n\t\tint p = 0;\r\n\t\tString [][] employees = new String[companyDirectory.size()][4];\r\n\t\tfor(int i = 0; i < companyDirectory.size(); i++) {\r\n\t\t\tif(companyDirectory.get(i) instanceof VendorCompany) {\r\n\t\t\t for(int j = 0; j < companyDirectory.get(i).getLocations().size();j++) {\r\n\t\t\t\t for(int k = 0; k < companyDirectory.get(i).getLocations().get(j).getEmployees().size(); k++ ) {\r\n\t\t\t\t\t employees[p][0] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getFirstName();\r\n\t\t\t\t\t employees[p][1] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getLastName();\r\n\t\t\t\t\t employees[p][2] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getId();\r\n\t\t\t\t\t employees[p][3] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getEmail();\r\n\t\t\t\t\t p++;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn employees;\r\n\t}", "static void arrayToSet()\n\t{\n\t\tList<String> oList = null;\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\tString arr[] = {\"A\",\"B\",\"C\",\"D\",\"E\",\"A\"};\n\t\t\t\n\t\t\toList = Arrays.asList(arr);\n\t\t\tSystem.out.println(\"List: \"+oList);\n\t\t\t\n\t\t\toSet = new TreeSet<>(oList);\n\t\t\t\n\t\t\tSystem.out.println(\"Set: \"+oSet);\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toSet = null;\n\t\t}\n\t}", "@Override\n\tpublic List<Employee> findAllEmployees() {\n\t\treturn employeeRepository.findAllEmployess();\n\t}", "public void setEmpleado(Empleado empleado)\r\n/* 188: */ {\r\n/* 189:347 */ this.empleado = empleado;\r\n/* 190: */ }", "@Override\n public List<Employee> getAllEmployees() {\n return null;\n }", "public void setEmployeeID(int employeeID) { this.employeeID = employeeID; }", "public List<Employee> getAllEmployees(){\n\t\tList<Employee> employees = employeeDao.findAll();\n\t\tif(employees != null)\n\t\t\treturn employees;\n\t\treturn null;\n\t}", "public com.example.nettyserver.protobuf.Employee.EmployeeInfo getEmployeelist() {\n return employeelist_ == null ? com.example.nettyserver.protobuf.Employee.EmployeeInfo.getDefaultInstance() : employeelist_;\n }", "public void setEmployeeid(long employeeid)\n {\n this.employeeid = employeeid;\n }", "public getEmployee_args(getEmployee_args other) {\n __isset_bitfield = other.__isset_bitfield;\n this.userId = other.userId;\n this.companyId = other.companyId;\n }", "@Override\r\n\tpublic Result add(Employees employees) {\n\t\treturn null;\r\n\t}", "public void addEmployee(int noOfEmployee) {\r\n\t\tint id = 0;\r\n\t\tString name = null;\r\n\t\tString address = null;\r\n\t\t\r\n\t\tfor (int index = 0; index < noOfEmployee; index++) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Enter employee id :\");\r\n\t\t\tid = input.nextInt();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Enter employee name : \");\r\n\t\t\tinput.nextLine();\r\n\t\t\tname = input.nextLine();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Enter employee address :\");\r\n\t\t\taddress = input.nextLine();\r\n\t\t\t\r\n\t\t\tif (empId.contains(id)) {\r\n\t\t\t\tSystem.out.println(\"Emp ID : \"+ id +\" employee ID already exists !!!!!\");\r\n\t\t\t} else {\r\n\t\t\t\tempId.add(id);\r\n\t\t\t\temp.add(addEmployee(id, name, address));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void add(double[] employeeSalaries) {\n\t\tallSalaries.add(employeeSalaries);\n\t}", "public void updateemployee(Employeee em) {\n\t\temployeerepo.save(em);\n\t}", "public static void main (String[] args){\n Empleado[] listaEmpleados = new Empleado[10];\n \n //Asignamos objetos a cada posición\n listaEmpleados[0] = new Empleado(\"Manuel\", \"30965835V\");\n listaEmpleados[1] = new Empleado(\"Miguel\", \"30965835V\");\n listaEmpleados[2] = new Empleado(\"Pedro\", \"30965835V\");\n listaEmpleados[3] = new Empleado(\"Samuel\", \"30965835V\");\n listaEmpleados[4] = new Empleado(\"Vanesa\", \"30965835V\");\n listaEmpleados[5] = new Empleado(\"Alberto\", \"30965835V\");\n listaEmpleados[6] = new Empleado(\"Roberto\", \"30965835V\");\n listaEmpleados[7] = new Empleado(\"Carlos\", \"30965835V\");\n listaEmpleados[8] = new Empleado(\"Ernesto\", \"30965835V\");\n listaEmpleados[9] = new Empleado(\"Javier\", \"30965835V\");\n\n /*Empleado[] empleados = {\n empleado1, empleado2, empleado3, null,null,null, null,\n null,null,null\n }*/\n \n //Imprimimos el array sin ordenar\n imprimeArrayPersona(listaEmpleados);\n \n //Creamos el objeto de la empresa\n Empresa empresa0 = new Empresa(\"Indra\", listaEmpleados);\n \n //Usamos la clase array para ordenar el array de mayor a menos\n Arrays.sort(listaEmpleados);\n\n //Imprimimos de nuevo el array\n imprimeArrayPersona(listaEmpleados);\n \n //Imprimimos la empresa\n System.out.println(empresa0);\n \n //Guardamos en un string la lista de nombres de un objeto empresa\n String listado = Empresa.listaEmpleado(empresa0.empleado).toString();\n \n System.out.println(listado);//Imprimimos el listado como un string\n \n //Imprimimos el array de los nombres de los empleados de la empresa\n System.out.println(Arrays.toString(Empresa.listaEmpleadoArray(listado)));\n \n //Método que imprime los empleados de una empresa separados por comas\n Empresa.listaEmpleado(listado);\n \n /*Empresa[] listaEmpresa = new Empresa[4];\n \n listaEmpresa[0] = new Empresa(\"Intel\", listaEmpleados);\n listaEmpresa[1] = new Empresa(\"AMD\", listaEmpleados);\n listaEmpresa[2] = new Empresa(\"Asus\", listaEmpleados);\n listaEmpresa[3] = new Empresa(\"Shaphire\", listaEmpleados);\n System.out.println(Arrays.toString(listaEmpresa));\n Arrays.sort(listaEmpresa);\n System.out.println(Arrays.toString(listaEmpresa));*/\n \n \n }", "public static void getEmployeeInformation(Employee [] employee) {\n\t\tif (Employee.getEmployeeQuantity() == 0) {\n\t\t\tJOptionPane.showMessageDialog(null, \"There is no employee!\");\n\t\t} else {\n\t\t\tfor (int i = 0; i < Employee.getEmployeeQuantity(); i++) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"-------List of Employees-------\\n\"\n\t\t\t\t\t\t+ (i+1) + \": \"+ employee[i+1].getName() + \"\\n\");\n\t\t\t}\t\t\t\n\t\t}\n\t}", "@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\t\n\t\tlog.debug(\"EmplyeeService.getAllEmployee() return list of employees\");\n\t\treturn repositary.findAll();\n\t}", "public void sortEmployeeArray()\n\t {\n\t\t\tEmployee employeeTmp = new Employee();\n\t for(int i = 0; i < numOfEmployees - 1; i++)\n\t {\n\t for(int j = 0; j < numOfEmployees - 1; j++)\n\t {\n\t if (employeeData[j].getEmployeeNumber() > employeeData[j+1].getEmployeeNumber())\n\t {\n\t \temployeeTmp = employeeData[j+1];\n\t \temployeeData[j+1] = employeeData[j];\n\t \temployeeData[j] = employeeTmp;\n\t }\n\t }\n\t }\n\n\t }", "public void setEmployeeId(long employeeId) {\n this.employeeId = employeeId;\n }", "public ArrayList<Employee> getEmployeeList()\r\n\t{\r\n\t\treturn new ArrayList<Employee>(empList);\r\n\t}", "@Override\n public void setDepartmentEmployee(Employee employee, int departmentId) {\n\n }", "public void update(Employee e) {\n\t\t\r\n\t}", "@Test\r\n public void testSetUserHobbies()\r\n {\r\n System.out.println(\"setUserHobbies\");\r\n String[] userHobbies = {\"Football\", \"Rugby\"};\r\n String occupation = \"Doctor\";\r\n String[] hobbies = {\"Reading\", \"Cooking\"};\r\n int id = 5;\r\n LifeStyleBean instance = new LifeStyleBean(occupation, hobbies, id);\r\n instance.setUserHobbies(userHobbies);\r\n Assert.assertArrayEquals(userHobbies, instance.getUserHobbies());\r\n }", "public Manager(Employee[] employees, String name, String jobTitle, int level, String dept) {\n\t\tsuper(name, jobTitle, level, dept);\n\t\tthis.employees = employees;\n\t}", "public static void main(String[] args) {\n EmpClass[] obj = new EmpClass[4];\n int i;\n for(i=0;i<=obj.length;i++) {\n\n obj[i]=new EmpClass(1,\"AG\");\n\n obj[i].getData();\n obj[i].putData();\n }\n /* for (i=0;i<=3;i++) {\n obj.getData();\n obj.putData();\n }*/\n // obj.putData();\n }", "public void setEmployee(Employee employee) {\r\n this.employee = employee;\r\n\r\n idLabel.setText(Integer.toString(employee.getId()));\r\n firstNameField.setText(employee.getFirstName());\r\n lastNameField.setText(employee.getLastName());\r\n industryField.setText(employee.getIndustry());\r\n workTypeField.setText(employee.getWorkType());\r\n addressField.setText(employee.getAddress());\r\n }", "@Override\r\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn employeeDao.getAllEmployee();\r\n\t}", "public static void main(String[] args) {\n System.out.println(\"How many employees would you like to type numbers for?\");\n Scanner emp_id_in = new Scanner(System.in);\n int emp_in = emp_id_in.nextInt();\n Employee EmployeeArr[] = new Employee[emp_in]; // should be size of the scanned input\n for (int i = 0; i < EmployeeArr.length; i++) {\n // Employee number\n System.out.println(\"Please enter the employees ID number(Enter a number from 0 to 999999)\");\n Scanner emp_id_scanner = new Scanner(System.in);\n int emp_id = emp_id_scanner.nextInt();\n // First\n System.out.println(\"Please enter the employees first name:\");\n Scanner first_name_scanner = new Scanner(System.in);\n String first_name = first_name_scanner.nextLine();\n // Last\n System.out.println(\"Please enter the employees last name:\");\n Scanner last_name_scanner = new Scanner(System.in);\n String last_name = last_name_scanner.nextLine();\n // Push entries into Name class\n Name name_obj = new Name();\n name_obj.get_employee_name(emp_id, first_name, last_name);\n //Street\n System.out.println(\"Please enter the employee's street name: \");\n Scanner street_name_scanner = new Scanner(System.in);\n String street_name = street_name_scanner.nextLine();\n // City\n System.out.println(\"Please enter the employee's city: \");\n Scanner city_name_scanner = new Scanner(System.in);\n String city_name = city_name_scanner.nextLine();\n // State\n System.out.println(\"Please enter the employee's state: \");\n Scanner state_name_scanner = new Scanner(System.in);\n String state_name = state_name_scanner.nextLine();\n System.out.println(\">>>>>>>>>>\" + state_name.split(\"\").length);\n // Zip\n System.out.println(\"Please enter the employee's zip code\");\n Scanner zip_code_scanner = new Scanner(System.in);\n int zip_code = zip_code_scanner.nextInt();\n // Push entries into Address class\n Address address_obj = new Address();\n address_obj.get_address_data(street_name, city_name, state_name, zip_code);\n // hire month\n System.out.println(\"Please enter the month the employee was hired(Eg. 1,2,3,... etc): \");\n Scanner month_scanner = new Scanner(System.in);\n int month = month_scanner.nextInt();\n // hire day\n System.out.println(\"Please enter the day the employee was hired(Eg. 1,2,3,... etc): \");\n Scanner day_scanner = new Scanner(System.in);\n int day = day_scanner.nextInt();\n // hire year\n System.out.println(\"Please enter the year the employee was hired: \");\n Scanner year_scanner = new Scanner(System.in);\n int year = year_scanner.nextInt();\n // Push data into Date class\n Date date_obj = new Date();\n date_obj.get_date_data(month, day, year);\n // Push data into employee class\n EmployeeArr[i] = new Employee();\n EmployeeArr[i].get_employee_information(name_obj.employee_number, name_obj.employee_first, name_obj.employee_last, address_obj.street, address_obj.zip_code,\n address_obj.city, address_obj.state, date_obj.hire_month, date_obj.hire_day, date_obj.hire_year);\n\n }\n // Show the data\n for (int j = 0; j < EmployeeArr.length; j++) {\n EmployeeArr[j].show_dat();\n }\n }", "public List<Emp> getAllEmps() {\n\t\treturn null;\n\t}", "public static HashSet<Employee> addEmployeeDetails(int size) {\n\t\tint count = 1;\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner scan = new Scanner(System.in);\n\t\tEmployee emp = null;\n\t\tHashSet<Employee> hashLists = new HashSet<>();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\temp = new Employee();\n\n\t\t\tSystem.out.println(\"Enter the \" + count + \" Employee Details\");\n\t\t\tSystem.out.println(\"Enter the Employee id\");\n\t\t\temp.setEmpId(scan.nextInt());\n\t\t\tSystem.out.println(\"Enter the Employee name\");\n\t\t\temp.setEmpName(scan.next());\n\t\t\tSystem.out.println(\"Enter the Employee age\");\n\t\t\temp.setEmpAge(scan.nextInt());\n\t\t\tSystem.out.println(\"Enter the Employee salary\");\n\t\t\temp.setEmpSalary(scan.nextInt());\n\t\t\thashLists.add(emp);\n\t\t\tcount++;\n\t\t}\n\t\treturn hashLists;\n\n\t}", "@Override\r\n\tpublic List<Employee> findAll() {\n\t\treturn null;\r\n\t}", "public Builder setEmployee(\n grpc.messages.Messages.Employee.Builder builderForValue) {\n if (employeeBuilder_ == null) {\n employee_ = builderForValue.build();\n onChanged();\n } else {\n employeeBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }", "public Builder setEmployee(\n grpc.messages.Messages.Employee.Builder builderForValue) {\n if (employeeBuilder_ == null) {\n employee_ = builderForValue.build();\n onChanged();\n } else {\n employeeBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }", "public void createEmployee(Employee newEmployee) {\n\t\tif(false == this.employee.contains(newEmployee)) {\n\t\t\tthis.employee.add(newEmployee);\n\t\t}\n\t}", "public HashMap<Integer, Employee> viewAllEmployee() {\r\n\t\treturn employee1;\r\n\t}", "@Override\n\tpublic List<Employee> getAllEmployee() {\n\t\tList<Employee> employee = new ArrayList<>();\n\t\tlogger.info(\"Getting all employee\");\n\t\ttry {\n\t\t\temployee = employeeDao.getAllEmployee();\n\t\t\tlogger.info(\"Getting all employee = {}\",employee.toString());\n\t\t} catch (Exception exception) {\n\t\t\tlogger.error(exception.getMessage());\n\t\t}\n\t\treturn employee;\n\t}", "public void setEmployeeId(long employeeId);", "public List<Employee> getEmployees() {\n\n\t\tList<Employee> employees = new ArrayList<Employee>();\n\t\t\n\t\t/*Sample data begins\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tEmployee employee = new Employee();\n\t\t\temployee.setEmail(\"shiyong@cs.sunysb.edu\");\n\t\t\temployee.setFirstName(\"Shiyong\");\n\t\t\temployee.setLastName(\"Lu\");\n\t\t\temployee.setAddress(\"123 Success Street\");\n\t\t\temployee.setCity(\"Stony Brook\");\n\t\t\temployee.setStartDate(\"2006-10-17\");\n\t\t\temployee.setState(\"NY\");\n\t\t\temployee.setZipCode(11790);\n\t\t\temployee.setTelephone(\"5166328959\");\n\t\t\temployee.setEmployeeID(\"631-413-5555\");\n\t\t\temployee.setHourlyRate(100);\n\t\t\temployees.add(employee);\n\t\t}\n\t\tSample data ends*/\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://mysql3.cs.stonybrook.edu:3306/mwcoulter?useSSL=false\",\"mwcoulter\",\"111030721\");\n\t\t\tStatement st = con.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT P.*, E.StartDate, E.HourlyRate, E.Email, E.ID, L.* \"\n\t\t\t\t\t+ \"FROM Employee E, Person P, Location L\"\n\t\t\t\t\t+ \" WHERE P.SSN = E.SSN AND L.ZipCode = P.ZipCode\");\n\t\t\twhile(rs.next()) {\n\t\t\t\tEmployee employee = new Employee();\n\t\t\t\temployee.setEmail(rs.getString(\"Email\"));\n\t\t\t\temployee.setFirstName(rs.getString(\"FirstName\"));\n\t\t\t\temployee.setLastName(rs.getString(\"LastName\"));\n\t\t\t\temployee.setAddress(rs.getString(\"Address\"));\n\t\t\t\temployee.setCity(rs.getString(\"City\"));\n\t\t\t\temployee.setStartDate(String.valueOf(rs.getDate(\"StartDate\")));\n\t\t\t\temployee.setState(rs.getString(\"State\"));\n\t\t\t\temployee.setZipCode(rs.getInt(\"ZipCode\"));\n\t\t\t\temployee.setTelephone(String.valueOf(rs.getLong(\"Telephone\")));\n\t\t\t\temployee.setEmployeeID(String.valueOf(rs.getInt(\"SSN\")));\n\t\t\t\temployee.setHourlyRate(rs.getInt(\"HourlyRate\"));\n\t\t\t\temployees.add(employee);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t\treturn employees;\n\t}", "@Override\r\n\tpublic void addEmployee(Employee employee) {\n\t\temployees.add(employee);\r\n\t\t\r\n\t}", "public Builder mergeEmployeelist(com.example.nettyserver.protobuf.Employee.EmployeeInfo value) {\n if (employeelistBuilder_ == null) {\n if (employeelist_ != null) {\n employeelist_ =\n com.example.nettyserver.protobuf.Employee.EmployeeInfo.newBuilder(employeelist_).mergeFrom(value).buildPartial();\n } else {\n employeelist_ = value;\n }\n onChanged();\n } else {\n employeelistBuilder_.mergeFrom(value);\n }\n\n return this;\n }", "public String getEmployees(){\n return employees;\n }", "public List<Employee> selectAllEmployee() {\n\n\t\t// using try-with-resources to avoid closing resources (boiler plate code)\n\t\tList<Employee> emp = new ArrayList<>();\n\t\t// Step 1: Establishing a Connection\n\t\ttry (Connection connection = dbconnection.getConnection();\n\n\t\t\t\t// Step 2:Create a statement using connection object\n\t\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(SELECT_ALL_employe);) {\n\t\t\tSystem.out.println(preparedStatement);\n\t\t\t// Step 3: Execute the query or update query\n\t\t\tResultSet rs = preparedStatement.executeQuery();\n\n\t\t\t// Step 4: Process the ResultSet object.\n\t\t\twhile (rs.next()) {\n\t\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\tString employeename = rs.getString(\"employeename\");\n\t\t\t\tString address = rs.getString(\"address\");\n\t\t\t\tint mobile = rs.getInt(\"mobile\");\n\t\t\t\tString position = rs.getString(\"position\");\n\t\t\t\tint Salary = rs.getInt(\"Salary\");\n\t\t\t\tString joineddate = rs.getString(\"joineddate\");\n\t\t\t\tString filename =rs.getString(\"filename\");\n\t\t\t\tString path = rs.getString(\"path\");\n\t\t\t\temp.add(new Employee(id, employeename, address, mobile, position, Salary, joineddate,filename,path));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tdbconnection.printSQLException(e);\n\t\t}\n\t\treturn emp;\n\t}" ]
[ "0.7688923", "0.73315775", "0.7197267", "0.6941518", "0.6839037", "0.6690547", "0.6500542", "0.6458096", "0.62098426", "0.6199977", "0.61716187", "0.6157339", "0.61553305", "0.6145577", "0.6092734", "0.6029025", "0.59801364", "0.5919927", "0.58940715", "0.58867574", "0.5876514", "0.58676064", "0.58607316", "0.575008", "0.57491213", "0.57415366", "0.57365215", "0.5732478", "0.569818", "0.5688582", "0.5647774", "0.5622771", "0.5614792", "0.56119436", "0.560275", "0.5595737", "0.5595737", "0.5581763", "0.5576199", "0.55718493", "0.55632603", "0.5561021", "0.5548335", "0.5519962", "0.5513152", "0.5507645", "0.54939437", "0.5479811", "0.54767936", "0.54741603", "0.5473376", "0.5461846", "0.5449863", "0.54429066", "0.5428969", "0.5421468", "0.5421468", "0.5411278", "0.54104996", "0.54013044", "0.5397194", "0.5386322", "0.53816706", "0.5380228", "0.53569466", "0.5355445", "0.53551835", "0.535433", "0.5348056", "0.53472006", "0.5343705", "0.53432196", "0.533997", "0.5335286", "0.53329", "0.53325284", "0.53290874", "0.5320872", "0.5318297", "0.531673", "0.5315222", "0.53148", "0.5310207", "0.53042424", "0.5296821", "0.5289236", "0.52876234", "0.5278878", "0.52739364", "0.52735615", "0.52735615", "0.5273497", "0.526281", "0.52590996", "0.52534884", "0.52518684", "0.5246197", "0.52429354", "0.52421206", "0.523972" ]
0.7386092
1
Sets ith "employee" element
public void setEmployeeArray(int i, andrewNamespace.xsdconfig.EmployeeDocument.Employee employee) { generatedSetterHelperImpl(employee, EMPLOYEE$0, i, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_ARRAYITEM); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setEmployee(int index, Person emp) {\n if (index >= 0 && index < employees.length) {\n employees[index] = emp;\n }\n }", "public void setEmployee(String employee)\r\n/* 43: */ {\r\n/* 44:47 */ this.employee = employee;\r\n/* 45: */ }", "public void updateEmployee(Employe employee) {\n\t\t\n\t}", "public void setEmployees(ArrayList<Employee> employees) { \r\n this.employees = employees;\r\n }", "public void setEmployeeID(int employeeID) { this.employeeID = employeeID; }", "public void setEmployee (jkt.hms.masters.business.MasEmployee employee) {\n\t\tthis.employee = employee;\n\t}", "@Override\r\n\tpublic void updateEmployee(Employee t) {\n\t\t\r\n\t}", "@Override\n\tpublic void updateEmployee() {\n\n\t}", "public void setEmployees(int _employees){\n employees = _employees;\n }", "@Override\n\tpublic void updateEmployee(Employee e) {\n\t\t\n\t}", "public void setEmployee(Employee employee) {\r\n this.employee = employee;\r\n\r\n idLabel.setText(Integer.toString(employee.getId()));\r\n firstNameField.setText(employee.getFirstName());\r\n lastNameField.setText(employee.getLastName());\r\n industryField.setText(employee.getIndustry());\r\n workTypeField.setText(employee.getWorkType());\r\n addressField.setText(employee.getAddress());\r\n }", "@Override\n\tpublic void ModifyEmployee() {\n\t\t\n\t}", "public void update(Employee e) {\n\t\t\r\n\t}", "@Override\n public void setEmployees() throws EmployeeCreationException {\n\n }", "public void updateEmp(Emp emp) {\n\t\t\n\t}", "public void setEmployeeId(long employeeId);", "public void setEmpleado(Empleado empleado)\r\n/* 188: */ {\r\n/* 189:347 */ this.empleado = empleado;\r\n/* 190: */ }", "@Override\n\tpublic void updateEmployee(List<Employee> employees) {\n\t\t\n\t}", "public void setEmployees(Employee[] employees) {\n\t\tthis.employees = employees;\n\t}", "public void updateEmployees(List<Employe> employees) {\n\t\t\n\t}", "private void setEmployeeID() {\n try {\n employeeID = userModel.getEmployeeID(Main.getCurrentUser());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "Employee setFirstname(String firstname);", "public void ModifyEmployee(int idEmployee , String firstName , String lastName, String name_department)\n\t{\n\t\tfor(int i = 0; i < departments.size() ; i++)\n\t\t{\n\t\t\tfor(Employee emp : departments.get(i).getEmployeeList())\n\t\t\t{\n\t\t\t\tif(emp.getIdEmployee()==idEmployee) \n\t\t\t\t{\n\t\t\t\t\temp.setName(firstName);\n\t\t\t\t\temp.setSurname(lastName);\n\t\t\t\t\temp.setDepartment(SearchDepartment(name_department));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void updateemployee(Employeee em) {\n\t\temployeerepo.save(em);\n\t}", "@Override\n public void setDepartmentEmployee(Employee employee, int departmentId) {\n\n }", "@Override\r\n\tpublic void updateEmployee(int id, Employee employee) {\n\t\tfor(int i=0;i<employees.size();i++)\r\n\t\t{\r\n\t\t\tEmployee emp= employees.get(i);\r\n\t\t\tif(emp.getEmpId()==(id));\r\n\t\t\temployees.set(i, employee);\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public void setEmployeeid(long employeeid)\n {\n this.employeeid = employeeid;\n }", "@Override\n\tpublic void update(Employee employee) {\n\t}", "public Builder setEmployee(grpc.messages.Messages.Employee value) {\n if (employeeBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n employee_ = value;\n onChanged();\n } else {\n employeeBuilder_.setMessage(value);\n }\n\n return this;\n }", "public Builder setEmployee(grpc.messages.Messages.Employee value) {\n if (employeeBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n employee_ = value;\n onChanged();\n } else {\n employeeBuilder_.setMessage(value);\n }\n\n return this;\n }", "public void addEmployee(Employee emp) {\n\t\t\r\n\t}", "public EmployeeSet()\n\t{\n\t\tnumOfEmployees = 0;\n\t\temployeeData = new Employee[10];\n\t}", "@Override\n\tpublic void setEmpId(long empId) {\n\t\t_employee.setEmpId(empId);\n\t}", "@Override\n\tpublic int updateOrgEmployee(Org_employee orgEmloyee) {\n\t\treturn 0;\n\t}", "public void setEmployeeId(long employeeId) {\n this.employeeId = employeeId;\n }", "public Builder setEmployee(\n grpc.messages.Messages.Employee.Builder builderForValue) {\n if (employeeBuilder_ == null) {\n employee_ = builderForValue.build();\n onChanged();\n } else {\n employeeBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }", "public Builder setEmployee(\n grpc.messages.Messages.Employee.Builder builderForValue) {\n if (employeeBuilder_ == null) {\n employee_ = builderForValue.build();\n onChanged();\n } else {\n employeeBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }", "public void setEmployeeArray(andrewNamespace.xsdconfig.EmployeeDocument.Employee[] employeeArray)\r\n {\r\n check_orphaned();\r\n arraySetterHelper(employeeArray, EMPLOYEE$0);\r\n }", "public andrewNamespace.xsdconfig.EmployeeDocument.Employee insertNewEmployee(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n andrewNamespace.xsdconfig.EmployeeDocument.Employee target = null;\r\n target = (andrewNamespace.xsdconfig.EmployeeDocument.Employee)get_store().insert_element_user(EMPLOYEE$0, i);\r\n return target;\r\n }\r\n }", "public static void main(String[] args) {\nEmployee emp = new Employee(1,\"Pankaj\",\"CEO\");\nEmployee emp1 = new Employee(2,\"AAAA\",\"CTO\");\n\t\tArrayList<Employee> employees = new ArrayList<Employee>();\n\t\t\n\t\temployees.add(emp1);\n\t\temployees.add(emp);\n\t\temployees.add(new Employee(3,\"sdfd\",\"hr\"));\n\t\t\n\t\tfor(Employee e : employees)\n\t\t{\n\t\t\t//System.out.println(e.id+\" \"+e.name);\n\t\t\tif(e.getId()>2)\n\t\t\t\te.setDept(\"Manager\");\n\t\t\t\n\t\t\tSystem.out.println(e.getDept()+\" \"+e.getId()+\" \"+e.getName());\n\t\t\t\n\t\t}\n\t\t\n\t}", "@RequestMapping(value = \"/set\")\r\n\tpublic String setEmployer(@RequestParam(value = \"id\") int id,Map<String, Object> model) {\r\n\t\t\r\n\t\thelperID = id;\r\n\t\tList<Employer> emp = allEmployers.stream().filter(it -> it.getId() == id).collect(Collectors.toList());\r\n\t\t\r\n\t\tmodel.put(\"selectedEmployer\", emp.get(0));\r\n\t\treturn \"set\";\r\n\t}", "@Override\r\n\tpublic void addEmployee(Employee employee) {\n\t\temployees.add(employee);\r\n\t\t\r\n\t}", "public Builder setEmployeelist(com.example.nettyserver.protobuf.Employee.EmployeeInfo value) {\n if (employeelistBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n employeelist_ = value;\n onChanged();\n } else {\n employeelistBuilder_.setMessage(value);\n }\n\n return this;\n }", "public E set(int index, E element);", "@Override\r\n\tpublic Employee change(Employee employee) {\n\t\treturn empdao.save(employee);\r\n\t}", "@Override\r\n\tpublic Result update(Employees employees) {\n\t\treturn null;\r\n\t}", "public void createEmployee(Employee newEmployee) {\n\t\tif(false == this.employee.contains(newEmployee)) {\n\t\t\tthis.employee.add(newEmployee);\n\t\t}\n\t}", "Employee setLastname(String lastname);", "void set(int index, Object element);", "@Override\n\tpublic void updateEmployee(Employee employee) {\n\t\tEmployee updateEmployee = em.find(Employee.class, employee.getId());\n\t\t\n\t\tem.getTransaction().begin();\n\t\tem.merge(employee);\n\t\tem.getTransaction().commit();\n\t\tSystem.out.println(\"Data Updated successfully\");\n\t\tlogger.log(Level.INFO, \"Data Updated successfully\");\n\n\t}", "public Builder setEmployeeId(int value) {\n \n employeeId_ = value;\n onChanged();\n return this;\n }", "@Override\n\tpublic void updateEmployee(int empid, int empNewSalary) {\n\t\t\n\t}", "public void addEmployee(Map<String, String> employee) {\r\n\t\tEmployee employees = new Employee(Integer.parseInt(employee.get(\"id\")), employee.get(\"name\"));\r\n\t\temployee1.put(Integer.parseInt(employee.get(\"id\")), employees);\r\n\t}", "@Override\n\tpublic Employee update(Employee emp) {\n\t\treturn null;\n\t}", "public void setEmployeePersonId(Number value) {\n setAttributeInternal(EMPLOYEEPERSONID, value);\n }", "public void saveEmployee(Employe employee) {\n\t\t\n\t}", "public void setEmployeeNumber(String value) {\n setAttributeInternal(EMPLOYEENUMBER, value);\n }", "public void setEmployeeId(int employeeId) {\r\n\t\r\n\t\tthis.employeeId = employeeId;\r\n\t}", "@Override\r\n\tpublic int updateEmployee(Connection con, Employee employee) {\n\t\treturn 0;\r\n\t}", "private void saveEmployee(Employee employee) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(ReportContract.EmployeeEntry.COLUMN_KEY, employee.getKey());\n contentValues.put(ReportContract.EmployeeEntry.COLUMN_VALUE, employee.getValue());\n\n getContext().getContentResolver().insert(\n ReportContract.EmployeeEntry.CONTENT_URI,\n contentValues\n );\n\n }", "public @Override E set(int index, E element) {\n \tNode n = getNode(index);\n \tE result = n.data;\n \tn.data = element;\n \treturn result;\n }", "public void setEmployeeId(String employeeId) {\n this.employeeId = employeeId;\n }", "public void add(Employee emp) throws InvalidOperationException {\n if (employeeArray[emp.getId()] != null) {\n throw new InvalidOperationException(\"Error adding employee , employee id already exists \" + emp.getId());\n }\n try {\n employeeArray[emp.getId()] = emp;\n } catch (ArrayIndexOutOfBoundsException e) {\n throw new InvalidOperationException(\"Error adding employee , id must be less than \" + employeeArray.length);\n }\n }", "@Override\r\n\tpublic void updateEmployee(long employeeId, Employee updateEmployee) {\n\t\t\r\n\t}", "void set(int i, E e) {\r\n arr[i] = e;\r\n }", "@Override\n\tpublic void setEmployeeId(long employeeId) {\n\t\t_userSync.setEmployeeId(employeeId);\n\t}", "@Override\n\tpublic E set(int index, E element) {\n\t\tNode<E> node = node(index);\n\t\tE old = node.elementE;\n\t\tnode.elementE = element;\n\t\treturn old;\n\t}", "public void setElement(Object e) {\n element = e;\n }", "public Builder setEmployeeName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n employeeName_ = value;\n onChanged();\n return this;\n }", "public void setEmpNumber(String empNumber)\r\n\t{\r\n\t\tthis.empNumber = empNumber;\r\n\t}", "public void setEmpName(String empName)\r\n\t{\r\n\t\tthis.empName = empName;\r\n\t}", "@Override\n\tpublic void setUserId(long userId) {\n\t\t_employee.setUserId(userId);\n\t}", "public void setHC_EmployeeJob_ID (int HC_EmployeeJob_ID);", "public void setEmpID(String _empID) {\r\n this.empID = _empID;\r\n }", "@Override\n public void setEmployeeDepartment(int employeeId, int departmentId) {\n\n }", "public void sauverEmploye(Employe employe) {\n\n\t}", "public void setElement(E element)\n\t{\n\t\tthis.data = element;\n\t}", "@Override\n\tpublic void getAllEmployee() {\n\t\t\n\t}", "@Override\n\tpublic Employee updateEmployee(Employee emp) {\n\t\tlog.debug(\"EmplyeeService.updateEmployee(Employee emp) update Employee object whos id is\" + emp.getId());\n\t\treturn repositary.save(emp);\n\t}", "public Employee updateEmployeeDetails(Employee employee) {\n\t\t long requestObjectEmployeeId = employee.getEmployeeId();\n\t\t Employee existedEmployee = employeeDao.findEmployeeByEmployeeId(requestObjectEmployeeId);\n\t\t if(employee != null) {\n\t\t\t return employeeDao.save(employee);\n\t\t }\n\t\t\treturn null;\t\n\t}", "@Override\n\tpublic void setEmpno(Integer empno) {\n\t\tsuper.setEmpno(empno);\n\t}", "@SuppressWarnings(\"rawtypes\")\n\tpublic static void itreator(HashSet<Employee> employeDetails) {\n\t\tIterator itr = employeDetails.iterator();\n\t\twhile (itr.hasNext()) {\n\t\t\tEmployee emps = (Employee) itr.next();\n\t\t\tSystem.out.println(emps.getEmpId() + emps.getEmpName() + emps.getEmpAge() + emps.getEmpSalary());\n\t\t}\n\n\t}", "public abstract E set(int index, E e);", "public andrewNamespace.xsdconfig.EmployeeDocument.Employee getEmployeeArray(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n andrewNamespace.xsdconfig.EmployeeDocument.Employee target = null;\r\n target = (andrewNamespace.xsdconfig.EmployeeDocument.Employee)get_store().find_element_user(EMPLOYEE$0, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n return target;\r\n }\r\n }", "public void setEmpId(int parseInt) {\n\t\t\n\n\n\t\t\n\t}", "public static Employee getEmployee(Node node) {\n Employee employee = new Employee();\n if (node.getNodeType() == Node.ELEMENT_NODE) {\n Element e = (Element) node;\n employee.setId(e.getElementsByTagName(\"id\").item(0).getChildNodes().item(0).getTextContent());\n employee.setName(e.getElementsByTagName(\"name\").item(0).getChildNodes().item(0).getTextContent());\n employee.setSex(Integer.parseInt(e.getElementsByTagName(\"sex\").item(0).getChildNodes().item(0).getNodeValue()));\n employee.setDateOfBirth(e.getElementsByTagName(\"dateOfBirth\").item(0).getChildNodes().item(0).getTextContent());\n employee.setAddress(e.getElementsByTagName(\"address\").item(0).getChildNodes().item(0).getTextContent());\n employee.setIdDepartment(e.getElementsByTagName(\"idDepartment\").item(0).getChildNodes().item(0).getTextContent());\n employee.setSalary(Double.parseDouble(e.getElementsByTagName(\"salary\").item(0).getChildNodes().item(0).getNodeValue()));\n }\n return employee;\n }", "public static void fillEmployees() {\n\t\tString name1;\n\t\tString name2;\n\t\tString name3;\n\t\tString name4;\n\t\tfor(int i=0;i<auxEmployees.length;i++) { //Va llenando de una en una las filas del array auxiliar de empleados (cada fila es una empresa) con nommbres aleatorios del array employees\n\t\t\tname1=\"\";\n\t\t\tname2=\"\";\n\t\t\tname3=\"\";\n\t\t\tname4=\"\";\n\t\t\twhile (name1.equals(name2) || name1.equals(name3) || name1.equals(name4) || name2.equals(name3) || name2.equals(name4) || name3.equals(name4)) { //Si los nombres son iguales vuelve a asignar nombres\n\t\t\t\tname1=employees[selector.nextInt(employees.length)];\n\t\t\t\tname2=employees[selector.nextInt(employees.length)];\n\t\t\t\tname3=employees[selector.nextInt(employees.length)];\n\t\t\t\tname4=employees[selector.nextInt(employees.length)];\n\t\t\t}\n\t\t\tauxEmployees[i][0]=name1;\n\t\t\tauxEmployees[i][1]=name2;\n\t\t\tauxEmployees[i][2]=name3;\n\t\t\tauxEmployees[i][3]=name4;\n\t\t}\n\t}", "public void addEmployee(String userId, Person person, int cubeX, int cubeY, String phoneNumber) {\n employees.put(userId,person);\n person.setUserId(userId);\n Cube cube = new Cube(person,true);\n cubes.add(cube);\n person.setCube(cube);\n cubeGrid[cubeX][cubeY] = cube;\n phoneNumbers.add(phoneNumber);\n }", "@Override\n\tpublic Integer updateEmp(Integer id, String name) {\n\t\treturn null;\n\t}", "public void setEmployeeName(String employeeName) {\r\n\t\r\n\t\tthis.employeeName = employeeName;\r\n\t}", "public Builder setEmployeelist(\n com.example.nettyserver.protobuf.Employee.EmployeeInfo.Builder builderForValue) {\n if (employeelistBuilder_ == null) {\n employeelist_ = builderForValue.build();\n onChanged();\n } else {\n employeelistBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }", "@Override\r\n\tpublic void saveEmployee(Employee employee) {\n\t\t\r\n\t}", "@Override\n\tpublic void ajouterEmploye(Employe em) {\n\t\ttreeMap.put(em.getId(), em);\n//\t\tSystem.out.println(em);\n//\t\tSystem.out.println(\"Guardado\");\n\t\tSystem.out.println(\"****RAAAA \"+treeMap.size()+\" :: \"+treeMap.values());\n\t}", "public void addEmployee(int noOfEmployee) {\r\n\t\tint id = 0;\r\n\t\tString name = null;\r\n\t\tString address = null;\r\n\t\t\r\n\t\tfor (int index = 0; index < noOfEmployee; index++) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Enter employee id :\");\r\n\t\t\tid = input.nextInt();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Enter employee name : \");\r\n\t\t\tinput.nextLine();\r\n\t\t\tname = input.nextLine();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Enter employee address :\");\r\n\t\t\taddress = input.nextLine();\r\n\t\t\t\r\n\t\t\tif (empId.contains(id)) {\r\n\t\t\t\tSystem.out.println(\"Emp ID : \"+ id +\" employee ID already exists !!!!!\");\r\n\t\t\t} else {\r\n\t\t\t\tempId.add(id);\r\n\t\t\t\temp.add(addEmployee(id, name, address));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void addEmployee(EmployeeInfo theEmployee) {\n int targetBucket = calcBucket(theEmployee.getEmployeeNum());\n buckets[targetBucket].add(theEmployee);\n numInTable++;\n }", "@Override\n public Employee updateEmployeeName(int employeeId, String name) {\n return null;\n }", "@Override\n\tpublic void update(Employee employee) {\n\t\temployeeDao.update(employee);\n\t}", "@Test\n public void setTutor() {\n Employee em = employeeService.findById(5);\n System.out.println(\"=======\" + em.getName());\n Student student1 = studentService.findById(22);\n System.out.println(\"*********\" + student1.getName());\n student1.setTutor(em);\n studentService.update(student1);\n studentService.saveOrUpdate(student1);\n }", "public Sale(Store store, Employee employee) {\n super(store);\n this.price = 0;\n\n if(store.getEmployees().contains(employee))\n this.employee = employee;\n else\n this.employee = null;\n }", "public void setEmpresa(Empresa empresa)\r\n/* 89: */ {\r\n/* 90:141 */ this.empresa = empresa;\r\n/* 91: */ }" ]
[ "0.72923654", "0.6704463", "0.6555144", "0.65250504", "0.64911395", "0.64538926", "0.6440635", "0.64189535", "0.6325779", "0.6261578", "0.6246266", "0.623107", "0.61958086", "0.61855775", "0.61518544", "0.6136916", "0.6122823", "0.6109733", "0.6106713", "0.6073163", "0.604435", "0.6039033", "0.60138863", "0.6001833", "0.6000128", "0.59791946", "0.5940273", "0.59197605", "0.5876111", "0.5876111", "0.5831112", "0.5826644", "0.57611275", "0.57570976", "0.57495147", "0.574328", "0.574328", "0.57405484", "0.5738298", "0.5730006", "0.57210165", "0.5719221", "0.5715791", "0.5713919", "0.57100743", "0.56938624", "0.5684305", "0.56759936", "0.56642514", "0.5646807", "0.5642425", "0.5641964", "0.56376517", "0.5620721", "0.5611256", "0.5600912", "0.5594625", "0.55713826", "0.55551845", "0.55547863", "0.5552379", "0.55451226", "0.55419654", "0.5528017", "0.5518303", "0.5515124", "0.5511248", "0.5502469", "0.5500939", "0.55008996", "0.5497289", "0.5481776", "0.5470649", "0.5467545", "0.5466685", "0.5461112", "0.5459273", "0.5458222", "0.54547155", "0.54501", "0.5446777", "0.5444933", "0.54282606", "0.54252803", "0.5425156", "0.5423062", "0.5412526", "0.54112786", "0.5406371", "0.53914255", "0.53900886", "0.53793806", "0.5371645", "0.5370162", "0.53621405", "0.5356948", "0.5351838", "0.53473014", "0.5343295", "0.534147" ]
0.60076505
23
Inserts and returns a new empty value (as xml) as the ith "employee" element
public andrewNamespace.xsdconfig.EmployeeDocument.Employee insertNewEmployee(int i) { synchronized (monitor()) { check_orphaned(); andrewNamespace.xsdconfig.EmployeeDocument.Employee target = null; target = (andrewNamespace.xsdconfig.EmployeeDocument.Employee)get_store().insert_element_user(EMPLOYEE$0, i); return target; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Integer insertEmp(Employee e) {\n\t\treturn null;\n\t}", "public static void addEmployeeToXMLFile(Employee ee) {\n try {\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n\n Element rootElement;\n File xmlFile = new File(\"src/task2/employee.xml\");\n\n if (xmlFile.isFile()) {\n doc = docBuilder.parse(new FileInputStream(xmlFile));\n doc.getDocumentElement().normalize();\n rootElement = doc.getDocumentElement();\n } else {\n rootElement = doc.createElement(\"department\");\n doc.appendChild(rootElement);\n }\n\n Element employee = doc.createElement(\"employee\");\n rootElement.appendChild(employee);\n\n Element id = doc.createElement(\"id\");\n id.appendChild(doc.createTextNode(ee.getId()));\n employee.appendChild(id);\n\n Element name = doc.createElement(\"name\");\n name.appendChild(doc.createTextNode(ee.getName()));\n employee.appendChild(name);\n\n Element sex = doc.createElement(\"sex\");\n sex.appendChild(doc.createTextNode(Integer.toString(ee.sex)));\n employee.appendChild(sex);\n\n Element dateOfBirth = doc.createElement(\"dateOfBirth\");\n dateOfBirth.appendChild(doc.createTextNode(ee.dateOfBirth));\n employee.appendChild(dateOfBirth);\n\n Element salary = doc.createElement(\"salary\");\n salary.appendChild(doc.createTextNode(Double.toString(ee.salary)));\n employee.appendChild(salary);\n\n Element address = doc.createElement(\"address\");\n address.appendChild(doc.createTextNode(ee.address));\n employee.appendChild(address);\n\n Element idDepartment = doc.createElement(\"idDepartment\");\n idDepartment.appendChild(doc.createTextNode(ee.idDepartment));\n employee.appendChild(idDepartment);\n\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n StreamResult result = new StreamResult(xmlFile);\n transformer.transform(source, result);\n System.out.println(\"File saved\");\n\n } catch (ParserConfigurationException | SAXException | IOException | DOMException | TransformerException e) {\n System.out.println(\"Error: \" + e.getMessage());\n }\n }", "public andrewNamespace.xsdconfig.EmployeeDocument.Employee addNewEmployee()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n andrewNamespace.xsdconfig.EmployeeDocument.Employee target = null;\r\n target = (andrewNamespace.xsdconfig.EmployeeDocument.Employee)get_store().add_element_user(EMPLOYEE$0);\r\n return target;\r\n }\r\n }", "@Override\n public Employee addNewEmployee(Employee employee) {\n return null;\n }", "public void insertAtEnd(Employee e) {\n\t}", "@Override\r\n\tpublic int insertEmployee(Employee employee) {\n\t\treturn employeedao.insertEmployee(employee);\r\n\t}", "private void saveEmployee(Employee employee) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(ReportContract.EmployeeEntry.COLUMN_KEY, employee.getKey());\n contentValues.put(ReportContract.EmployeeEntry.COLUMN_VALUE, employee.getValue());\n\n getContext().getContentResolver().insert(\n ReportContract.EmployeeEntry.CONTENT_URI,\n contentValues\n );\n\n }", "@Override\r\n\tpublic int insertEmployee(Connection con, Employee employee) {\n\t\treturn 0;\r\n\t}", "public int pushEmployee(boolean override) {\n\t\t// Can't push invalid data\n\t\tif (!this.validateEmployeePackage())\n\t\t\treturn this.validateEmployeePackageResult();\n\t\t// Manual if's are easier\n\t\tif (this.employeeExists()) {\n\t\t\tif (override) {\n\t\t\t\tint e = super.update(\"UPDATE \" + C.TABLE_EMPLOYEE + \" SET \"\n\t\t\t\t\t\t+ C.COLUMN_FIRST_NAME + \"='\" + this.getFirstName() + \"'\"\n\t\t\t\t\t\t+ C.COLUMN_LAST_NAME + \"='\" + this.getLastName() + \"' WHERE \"\n\t\t\t\t\t\t+ C.COLUMN_ID + \"=\" + this.getID());\n\t\t\t\treturn e > 0 ? EmployeeConnection.SUCCESS :\n\t\t\t\t\t\te < 0 ? EmployeeConnection.SQL_ERROR :\n\t\t\t\t\t\t\t\tEmployeeConnection.DRIVER_ERROR;\n\t\t\t} else\n\t\t\t\treturn EmployeeConnection.DUPLICATE_EMPLOYEE;\n\t\t} else {\n\t\t\tint e = super.update(\"INSERT INTO \" + C.TABLE_EMPLOYEE + \" (\" + C.COLUMN_ID\n\t\t\t\t\t+ \", \" + C.COLUMN_FIRST_NAME + \", \" + C.COLUMN_LAST_NAME\n\t\t\t\t\t+ \") VALUES (\" + this.getID() + \", '\" + this.getFirstName()\n\t\t\t\t\t+ \"', '\" + this.getLastName() + \"'\");\n\t\t\treturn e > 0 ? EmployeeConnection.SUCCESS :\n\t\t\t\t\te < 0 ? EmployeeConnection.SQL_ERROR :\n\t\t\t\t\t\t\tEmployeeConnection.DRIVER_ERROR;\n\t\t}\n\t}", "public org.apache.xmlbeans.XmlObject addNewValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlObject target = null;\n target = (org.apache.xmlbeans.XmlObject)get_store().add_element_user(VALUE$2);\n return target;\n }\n }", "public static Employee getEmployee(Node node) {\n Employee employee = new Employee();\n if (node.getNodeType() == Node.ELEMENT_NODE) {\n Element e = (Element) node;\n employee.setId(e.getElementsByTagName(\"id\").item(0).getChildNodes().item(0).getTextContent());\n employee.setName(e.getElementsByTagName(\"name\").item(0).getChildNodes().item(0).getTextContent());\n employee.setSex(Integer.parseInt(e.getElementsByTagName(\"sex\").item(0).getChildNodes().item(0).getNodeValue()));\n employee.setDateOfBirth(e.getElementsByTagName(\"dateOfBirth\").item(0).getChildNodes().item(0).getTextContent());\n employee.setAddress(e.getElementsByTagName(\"address\").item(0).getChildNodes().item(0).getTextContent());\n employee.setIdDepartment(e.getElementsByTagName(\"idDepartment\").item(0).getChildNodes().item(0).getTextContent());\n employee.setSalary(Double.parseDouble(e.getElementsByTagName(\"salary\").item(0).getChildNodes().item(0).getNodeValue()));\n }\n return employee;\n }", "public void insertEmp(Emp emp) {\n\t\t\n\t}", "XomNode appendElement(Element element) throws XmlBuilderException;", "@Override\r\n\tpublic int addEmployee1(Employee employee) throws SQLException {\n\t\tint added = 0;\r\n\t\tString insertData = \"insert into employee values(?,?,?,?)\";\r\n\r\n\t\t\tPreparedStatement ps = dataSource.getConnection().prepareStatement(insertData);\r\n\t\t\tps.setString(1, employee.getName());\r\n\t\t\tps.setInt(2, employee.getEmpId());\r\n\t\t\tps.setString(3, employee.getTechnoogy());\r\n\t\t\tps.setInt(4, employee.getSalary());\r\n\r\n\t\t\tadded = ps.executeUpdate();\r\n\t\treturn added;\r\n\t}", "@POST\n @Consumes( { \"application/xml\", \"text/xml\", \"application/json\" })\n public Response createEmployee(Employee employee) {\n final int staffNo = this.employeeMgr.createEmployee(employee);\n final URI location = createdLocation(staffNo);\n return Response.created(location).build();\n }", "@Override\r\n\tpublic int insertSelective(Emp record) {\n\t\treturn 0;\r\n\t}", "private Node getCompanyElements(Document doc, Element element, String name, String value) {\r\n Element node = doc.createElement(name);\r\n node.appendChild(doc.createTextNode(value));\r\n return node;\r\n }", "E createDefaultElement();", "@Override\r\n\tpublic Result add(Employees employees) {\n\t\treturn null;\r\n\t}", "public void insertAtFront(Employee e) {\r\n\t//TODO\r\n\t\r\n}", "@Override\n\tpublic Employee registerEmployee(Employee employee) {\n\t\tEmployee updatedEmployee = null;\n\t\ttry {\n\t\t\tlogger.info(\"saving employee = {}\", employee);\n\t\t\tupdatedEmployee = employeeDao.registerEmployee(employee);\n\t\t} catch (Exception exception) {\n\t\t\tlogger.error(exception.getMessage());\n\t\t}\n\t\treturn updatedEmployee;\n\t}", "public String insertSelective(Emp record) {\n BEGIN();\n INSERT_INTO(\"emp\");\n \n if (record.getId() != null) {\n VALUES(\"id\", \"#{id,jdbcType=INTEGER}\");\n }\n \n if (record.getName() != null) {\n VALUES(\"name\", \"#{name,jdbcType=VARCHAR}\");\n }\n \n if (record.getSex() != null) {\n VALUES(\"sex\", \"#{sex,jdbcType=CHAR}\");\n }\n \n if (record.getJob() != null) {\n VALUES(\"job\", \"#{job,jdbcType=VARCHAR}\");\n }\n \n if (record.getSalary() != null) {\n VALUES(\"salary\", \"#{salary,jdbcType=DECIMAL}\");\n }\n \n if (record.getHiredate() != null) {\n VALUES(\"hiredate\", \"#{hiredate,jdbcType=DATE}\");\n }\n \n if (record.getDeptno() != null) {\n VALUES(\"deptno\", \"#{deptno,jdbcType=INTEGER}\");\n }\n \n return SQL();\n }", "@Override\r\n\tpublic int addEmployee(Employee employee) {\n\t\tint added = 0;\r\n\t\tString insertData = \"insert into employee values(?,?,?,?)\";\r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = dataSource.getConnection().prepareStatement(insertData);\r\n\t\t\tps.setString(1, employee.getName());\r\n\t\t\tps.setInt(2, employee.getEmpId());\r\n\t\t\tps.setString(3, employee.getTechnoogy());\r\n\t\t\tps.setInt(4, employee.getSalary());\r\n\r\n\t\t\tadded = ps.executeUpdate();\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn added;\r\n\t}", "int insertSelective(Employee record);", "private static Employees toSting() {\n\t\treturn null;\n\t}", "@Override\n\tpublic void endElement(String uri, String localName, String qName)\n\t\t\tthrows SAXException {\n\t\tif (\"firstName\".equals(qName)) {\n\t\t\temp.setFirstName(content);\n\t\t} else if (\"lastName\".equals(qName)) {\n\t\t\temp.setLastName(content);\n\t\t} else if (\"location\".equals(qName)) {\n\t\t\temp.setLocation(content);\n\t\t} else if (\"employee\".equals(qName)) {\n\t\t\t// Add the employee to list once end tag is found\n\t\t\tempList.add(emp);\n\t\t}\n\n\t}", "public void createEmployee(Employee newEmployee) {\n\t\tif(false == this.employee.contains(newEmployee)) {\n\t\t\tthis.employee.add(newEmployee);\n\t\t}\n\t}", "public Element toXMLElement() {\n return null;\n }", "@Override\r\n\tpublic Employee add(Employee entity) {\n\t\treturn entity;\r\n\t}", "int insert(Employee record);", "@Override\r\n\tpublic Employee addEmployeeData(Employee emp) {\n\t\treturn employeeDAO.addEmployee(emp);\r\n\t}", "@Override\n\tpublic int addNewEmployee(String firstName, String lastName, String email, String designation, String location,\n\t\t\tint salary) {\n\t\treturn template.update(\n\t\t\t\t\"insert into employee(fname, lname, email, desig, location, salary) values(?, ?, ?, ?, ?, ?)\",\n\t\t\t\tfirstName, lastName, email, designation, location, salary);\n\t}", "public int insertData(Employee employee) {\n\t\ttry {\n\t\t\tString query = \"insert into employeedbaddress values(?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n\t\t\tPreparedStatement ps = connection.prepareStatement(query);\n\t\t\tps.setInt(1, employee.getEno());\n\t\t\tps.setString(2, employee.getEname());\n\t\t\tps.setString(3, employee.getEdesignation());\n\t\t\tps.setString(4, employee.getEgender());\n\t\t\tps.setDouble(5, employee.getEsalary());\n\t\t\tps.setString(6, employee.getEusername());\n\t\t\tps.setString(7, employee.getEpassword());\n\t\t\tps.setString(8, employee.getStreet());\n\t\t\tps.setString(9, employee.getCity());\n\t\t\tps.setString(10, employee.getState());\n\t\t\tps.setInt(11, employee.getPincode());\n\t\t\tps.setString(12, employee.getContact());\n\t\t\tps.setString(13, employee.getEmail());\n\t\t\tresult = ps.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}", "protected XMLElement createAnotherElement() {\n return new XMLElement(this.conversionTable,\n this.skipLeadingWhitespace,\n false,\n this.ignoreCase);\n }", "private Element createXmlElementForNameValuePair(Value name, Value value, Document xmlDocument, Constraint constraint) {\n\t\tif (excludedNames.contains(name.toString()))\n\t\t\treturn null;\n\t\t\n\t\tif (constraint != null)\n\t\t\tname = MultiValue.simplify(name, constraint);\n\t\telse {\n\t\t\tname = MultiValue.simplify(name);\n\t\t}\n\t\tif (name == Undefined.UNDEFINED)\n\t\t\treturn null;\n\n\t\t\t\n\t\tif (constraint != null)\n\t\t\tvalue = MultiValue.simplify(value, constraint);\n\t\telse {\n\t\t\tvalue = MultiValue.simplify(value);\n\t\t}\n\t\tif (value == Undefined.UNDEFINED || value instanceof NullValue)\n\t\t\treturn null;\n\t\t\n\t\tElement element = xmlDocument.createElement(XML_NAME_VALUE);\n\t\telement.setAttribute(XML_DESC, name.toString());\n\t\telement.setAttribute(XML_INFO1, value instanceof ObjectExtValue ? \"Object\" : value.toString());\n\t\t\n\t\tElement childElement = createXmlElementForValue(value, xmlDocument, constraint);\n\t\tif (childElement != null)\n\t\t\telement.appendChild(childElement);\n\t\t\n\t\treturn (element.hasChildNodes() ? element : null);\n\t}", "public int insertEmployeeData(EmployeeEntity employee, StorageContext context) throws PragmaticBookSelfException {\n\t\tInteger result = 0;\n\t\tSession hibernateSession = context.getHibernateSession();\n\t\ttry {\n\t\t\tresult = (Integer) hibernateSession.save(employee);\n\t\t\thibernateSession.flush();\n\t\t} catch (HibernateException e) {\n\t\t\tthrow new PragmaticBookSelfException(e);\n\t\t}\n\n\t\treturn (int) result;\n\t}", "private Element createXmlElementForConcat(Concat concat, Document xmlDocument, Constraint constraint) {\n\t\tElement element = xmlDocument.createElement(XML_CONCAT);\n\t\t//element.setAttribute(XML_INFO1, concat.getValue1().toString());\n\t\t//element.setAttribute(XML_INFO2, concat.getValue2().toString());\n\n\t\tfor (Value childValue : concat) {\n\t\t\tElement child = createXmlElementForValue(childValue, xmlDocument, constraint);\n\t\t\tif (child != null)\n\t\t\t\telement.appendChild(child);\n\t\t}\n\t\t\n\t\treturn (element.hasChildNodes() ? element : null);\n\t}", "public EmployeeBoarding addEmployee(RetailscmUserContext userContext, String employeeBoardingId, String companyId, String title, String departmentId, String familyName, String givenName, String email, String city, String address, String cellPhone, String occupationId, String responsibleForId, String currentSalaryGradeId, String salaryAccount , String [] tokensExpr) throws Exception;", "public void addElement() {\n\t\tXmlNode newNode = new XmlNode(rootNode, this);// make a new default-type field\n\t\taddElement(newNode);\n\t}", "private static Element createNode(Document doc, Element element, String tagName, String value) {\n\t\tif (value == null || \"\".equals(value)) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tif (EMPTY_STRING.equals(value)) {\n\t\t\t\tvalue = \"\";\n\t\t\t}\n\t\t\tElement node = doc.createElement(tagName);\n\t\t\telement.appendChild(node);\n\t\t\tnode.appendChild(doc.createTextNode(value));\n\t\t\treturn node;\n\t\t}\n\t}", "public ExtElement insertFirst(String element, BaseModel value) {\r\n\t\treturn insertFirst(element, value.getJsObj());\r\n\t}", "public static void main(String[] args) throws ParserConfigurationException, SAXException, IOException {\n\t\tDocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\r\n\t\t//Create object of DocumentBuilder using DocumentBuilderFactory - to get the Document object for XML\r\n\t\tDocumentBuilder builder = documentBuilderFactory.newDocumentBuilder();\r\n\t\t\r\n\t\t//Create object of Document by parsing the input XML - to be able to obtain the NodeList for traversal.\r\n\t\tDocument document = builder.parse(\"D://employees.xml\");\r\n\t\t//ClassLoader.getSystemResourceAsStream(\"employees.xml\")\r\n\t\t\r\n\t\t//Create object of NodeList from the Document object - to be able to identify individual nodes (items)\r\n\t\tNodeList nodeList = document.getChildNodes();\r\n\t\t\r\n\t\tList<Employee> empList = new ArrayList<Employee>();\r\n\r\n\t\t//Looping over nodeList\r\n\t\tfor(int i=0;i<nodeList.getLength();i++)\r\n\t\t{\r\n\t\t\t//Picking up a node/item from the list\r\n\t\t\tNode node = nodeList.item(i);\r\n\t\t\t\r\n\t\t\tif(node instanceof Element)\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t//emp.id = node.getAttributes().getNamedItem(\"id\").getNodeValue();\r\n\t\t\t\t\r\n\t\t\t\tNodeList internalNodeList = node.getChildNodes();\r\n\t\t\t\t\r\n\t\t\t\tfor(int j=0; j < internalNodeList.getLength(); j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tEmployee emp = new Employee();\r\n\t\t\t\t\t\r\n\t\t\t\t\tNode iNode = internalNodeList.item(j);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(iNode instanceof Element)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString iNodeText = iNode.getLastChild().getTextContent().trim();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tswitch(iNodeText)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tcase \"firstName\":\r\n\t\t\t\t\t\t\temp.firstName = iNodeText;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"lastName\":\r\n\t\t\t\t\t\t\temp.lastName = iNodeText;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"location\":\r\n\t\t\t\t\t\t\temp.location = iNodeText;\r\n\t\t\t\t\t\t\tbreak;\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\tempList.add(emp);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(Employee emp : empList)\r\n\t\t{\r\n\t\t\tSystem.out.println(emp);\r\n\t\t}\r\n\t}", "@Override\n public String insert(Emp record) {\n int result = mapper.insert(record);\n StringBuffer sb = new StringBuffer(\"\");\n if(result<=0) {\n sb.append(\"添加失败\");\n }else {\n sb.append(\"添加成功\");\n }\n return sb.toString();\n }", "@Test\n public void testXPathExp()\n throws XPathExpressionException, TransformerException, IOException, SAXException, ParserConfigurationException\n {\n TransformerFactory tFactory = TransformerFactory.newInstance();\n Transformer transformer = tFactory.newTransformer();\n\n String expression = \"/employees/employee[@salary > (sum(/employees/employee/@salary) div count(/employees/employee/@salary))]\";\n XPathExpression expr = xpath.compile(expression);\n Object result = expr.evaluate(document, XPathConstants.NODESET);\n NodeList nodes = (NodeList) result;\n Document resultXML = DOMUtil.getDocument(EMPTY_EMPLOYEES_STREAM);\n Element employees = resultXML.createElement(\"employees\");\n\n for (int i = 0; i < nodes.getLength(); ++i) {\n List<String> resultList = new ArrayList<>();\n NamedNodeMap attrs = nodes.item(i).getAttributes();\n\n for (int j = 0; j < attrs.getLength(); ++j) {\n Attr attr = (Attr) attrs.item(j);\n resultList.add(attr.toString());\n }\n NodeList elements = nodes.item(i).getChildNodes();\n\n for (int j = 0; j < elements.getLength(); ++j) {\n if (elements.item(j).getChildNodes().item(0) != null) {\n resultList.add(\n elements.item(j).getChildNodes().item(0).getNodeValue()\n );\n }\n }\n assertEquals(String.join(\", \", resultList), expectedXML);\n Node copyNode = nodes.item(i).cloneNode(true);\n resultXML.adoptNode(copyNode);\n employees.appendChild(copyNode);\n }\n }", "int insertSelective(Emp record);", "int insert(Emp record);", "public int insertNewElement() {\r\n\t\treturn insertElements(Arrays.asList(getNewObject()));\r\n\t}", "public void addEmployee(Employee emp) {\n\t\t\r\n\t}", "@Override\n\tpublic Employee update(Employee emp) {\n\t\treturn null;\n\t}", "public ExtElement insertFirst(ExtElement element, BaseModel value) {\r\n\t\treturn insertFirst(element, value.getJsObj());\r\n\t}", "@Override\n\tpublic Result add(Employer employer) {\n\t\treturn null;\n\t}", "public static Element newRootElement()\n {\n Element element = null;\n \n try\n {\n javax.xml.parsers.DocumentBuilderFactory factory =\n javax.xml.parsers.DocumentBuilderFactory.newInstance();\n \n javax.xml.parsers.DocumentBuilder builder =\n factory.newDocumentBuilder();\n \n Document document = builder.newDocument();\n Element holder = document.createElement(\"root\");\n document.appendChild(holder);\n element = document.getDocumentElement();\n }\n catch(Exception ex) { ex.printStackTrace(); }\n \n return element;\n }", "public void enterEmpsInInsertMode(){\n EmployeesViewImpl emps=(EmployeesViewImpl)this.getEmployeesView1();\n \n emps.executeEmptyRowSet(); // executeEmpty RowSet in order not to fetch Data.\n \n Row newRow=emps.createRow();\n \n emps.insertRow(newRow);\n \n emps.setCurrentRow(newRow);\n \n }", "@Transactional\n public Employee insert(Employee employee) {\n logger.debug(\"Testing create employee :\");\n return employeeDao.insert(employee);\n }", "org.apache.xmlbeans.XmlObject insertNewContactMeans(int i);", "int insertSelective(ProEmployee record);", "@Override\n\tpublic void createEmployee(Employee e) {\n\t\t\n\t}", "@Override\n\tpublic void addEmployee(Employee employee) {\n\t\tem.getTransaction().begin();\n\t\tem.persist(employee);\n\t\tem.getTransaction().commit();\n\t\tSystem.out.println(\"Data Added successfully\");\n\t\tlogger.log(Level.INFO, \"Data Added successfully\");\n\n\t}", "@XmlElement\n public String getEmployeId() {\n return employeId;\n }", "public Employeedetails addEmployee(Employeedetails employeeDetail,\n\t\t\tConnection connection) {\n\t\ttry {\n\t\t\tint flag = 0;\n\t\t\tString employeeId = employeeDetail.getEmployeeId();\n\t\t\tString employeeName = employeeDetail.getEmployeeName();\n\t\t\tStatement statement = connection.createStatement();\n\t\t\tResultSet rs = statement\n\t\t\t\t\t.executeQuery(\"select employeeid from employeeregister\");\n\t\t\twhile (rs.next()) {\n\t\t\t\tif (employeeId.equalsIgnoreCase(rs.getString(1))) {\n\t\t\t\t\tflag = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (flag == 0) {\n\t\t\t\tString squery = \"insert into employeeregister values('\"\n\t\t\t\t\t\t+ employeeId + \"', '\" + employeeName + \"');\";\n\t\t\t\tint a = statement.executeUpdate(squery);\n\t\t\t\treturn employeeDetail;\n\t\t\t} else {\n\t\t\t\treturn employeeDetail;\n\t\t\t}\n\n\t\t} catch (SQLException sqle) {\n\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\treturn employeeDetail;\n\t}", "protected Object atInsert(Object value) {\n return null;\n }", "public Builder setEmployee(grpc.messages.Messages.Employee value) {\n if (employeeBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n employee_ = value;\n onChanged();\n } else {\n employeeBuilder_.setMessage(value);\n }\n\n return this;\n }", "public Builder setEmployee(grpc.messages.Messages.Employee value) {\n if (employeeBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n employee_ = value;\n onChanged();\n } else {\n employeeBuilder_.setMessage(value);\n }\n\n return this;\n }", "private static Node getReceiverElements(Document doc, Element element, String name, String value) {\r\n\t\tElement node = doc.createElement(name);\r\n\t\tnode.appendChild(doc.createTextNode(value));\r\n\t\treturn node;\r\n\t}", "public void insert(EmployeeEntity entity){\n EmployeeDB.getInstance().insertOrUpdate(entity);\n }", "public void addEmployee(Employee employee) throws SQLException {\n\t\tConnection connection = DatabaseConnection.getConnection();\n\t\tString query = \"INSERT INTO EMPLOYEE VALUES(?,?)\";\n\t\tPreparedStatement pStatement = connection.prepareStatement(query);\n\t\tpStatement.setString(1, employee.getEmpId());\n\t\tpStatement.setString(2, employee.getEname());\n\t\tpStatement.executeUpdate();\n\n\t}", "private void createDOMTree(){\n\t\tElement rootEle = dom.createElement(\"Personnel\");\n\t\tdom.appendChild(rootEle);\n\n\t\t//No enhanced for\n\t\tIterator it = user.iterator();\n\t\twhile(it.hasNext()) {\n\t\t\tUserInformation b = (UserInformation)it.next();\n\t\t\t//For each Book object create element and attach it to root\n\t\t\tElement bookEle = createUserElement(b);\n\t\t\trootEle.appendChild(bookEle);\n\t\t}\n\t}", "public String addEmployee(EmployeeDetails employeeDetails) throws NullPointerException;", "org.landxml.schema.landXML11.NoPassingZoneDocument.NoPassingZone insertNewNoPassingZone(int i);", "private Element createXmlElementForObject(ObjectExtValue object, Document xmlDocument, Constraint constraint) {\n\t\tElement element = xmlDocument.createElement(XML_OBJECT);\n\t\t\n\t\tArrayList<NameValuePair> pairs = new ArrayList<NameValuePair>();\n\t\tfor (Iterator<Map.Entry<Value,Value>> iter = ((EntrySet) object.entrySet()).iterator(); iter.hasNext(); ) {\n\t\t\tMap.Entry<Value, Value> pair = iter.next();\n\t\t\tpairs.add(new NameValuePair(pair.getKey(), pair.getValue()));\n\t\t}\n\t\t\t\n\t\tCollections.sort(pairs, SortNameValuePairByName.inst);\n\t\t\n\t\tfor (NameValuePair pair : pairs) {\n\t\t\tElement childElement = createXmlElementForNameValuePair(pair.getName(), pair.getValue(), xmlDocument, constraint);\n\t\t\tif (childElement != null)\n\t\t\t\telement.appendChild(childElement);\n\t\t}\n\n\t\treturn (element.hasChildNodes() ? element : null);\n\t}", "public String addEmployee() {\n\t\t\t//logger.info(\"addEmployee method called\");\n\t\t\t//userGroupBO.save(userGroup);;\n\t\t\treturn SUCCESS;\n\t\t}", "org.apache.xmlbeans.XmlObject addNewContactMeans();", "@Override\r\n\tpublic <S extends Employee> S save(S arg0) {\n\t\treturn null;\r\n\t}", "public void add(Employee emp) throws InvalidOperationException {\n if (employeeArray[emp.getId()] != null) {\n throw new InvalidOperationException(\"Error adding employee , employee id already exists \" + emp.getId());\n }\n try {\n employeeArray[emp.getId()] = emp;\n } catch (ArrayIndexOutOfBoundsException e) {\n throw new InvalidOperationException(\"Error adding employee , id must be less than \" + employeeArray.length);\n }\n }", "public static void addEmployee(Employee employee) {\n try {\n if (employeeRepository.insert(dataSource, employee) == 1) {\n LOGGER.warn(\"The employee \" + employee.getFirstName() + \" \" + employee.getLastName() + \" \" + employee.getBirthday() + \" is already in the list\");\n System.out.println(\"\\n\" + resourceBundle.getString(\"emp\") + employee.getFirstName() + \" \" + employee.getLastName() + \" \" + employee.getBirthday() + \" \" + resourceBundle.getString(\"in-list\") + \"\\n\");\n } else {\n LOGGER.info(\"The employee \" + employee.getFirstName() + \" \"\n + employee.getLastName() + \" \" + employee.getBirthday() + \" was successfully added to the list of employees\");\n System.out.println(\"\\n\" + resourceBundle.getString(\"emp\") + \" \" + employee.getFirstName() + \" \"\n + employee.getLastName() + \" \" + employee.getBirthday() + \" \" + resourceBundle.getString(\"success.add\") + \"\\n\");\n }\n } catch (SQLException e) {\n LOGGER.error(e.getMessage());\n }\n }", "private static void _valueToStorageDocument(\n\t\tValue value,\n\t\tElement element,\n\t\tDocument doc\n\t) {\n\t\t// Supports only string, int and double\n\t\tif ( value.isString() ) {\n\t\t\telement.appendChild( doc.createTextNode( value.strValue() ) );\n\t\t\telement.setAttribute( JOLIE_TYPE_ATTRIBUTE, \"string\" );\n\t\t} else if ( value.isInt() ) {\n\t\t\telement.appendChild( doc.createTextNode( new Integer( value.intValue() ).toString() ) );\n\t\t\telement.setAttribute( JOLIE_TYPE_ATTRIBUTE, \"int\" );\n\t\t} else if ( value.isDouble() ) {\n\t\t\telement.appendChild( doc.createTextNode( new Double( value.doubleValue() ).toString() ) );\n\t\t\telement.setAttribute( JOLIE_TYPE_ATTRIBUTE, \"double\" );\n\t\t} else {\n\t\t\telement.setAttribute( JOLIE_TYPE_ATTRIBUTE, \"void\" );\n\t\t}\n\n\t\t// adding other attributes\n\t\tMap<String, ValueVector> attrs = getAttributesOrNull( value );\n\t\tif ( attrs != null ) {\n\t\t\tfor( Entry<String, ValueVector> attrEntry : attrs.entrySet() ) {\n\t\t\t\telement.setAttribute(\n\t\t\t\t\tattrEntry.getKey(),\n\t\t\t\t\tattrEntry.getValue().first().strValue() );\n\t\t\t}\n\t\t}\n\n\t\t// adding subelements\n\t\tElement currentElement;\n\t\tfor( Entry<String, ValueVector> entry : value.children().entrySet() ) {\n\t\t\tif ( !entry.getKey().startsWith( \"@\" ) ) {\n\t\t\t\tfor( Value val : entry.getValue() ) {\n\t\t\t\t\tcurrentElement = doc.createElement( entry.getKey() );\n\t\t\t\t\telement.appendChild( currentElement );\n\t\t\t\t\t_valueToStorageDocument( val, currentElement, doc );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void insert(Employee e) throws ClassNotFoundException, SQLException;", "public String addEmployee(Employee employee) {\n\n\t\t/*\n\t\t * All the values of the add employee form are encapsulated in the employee object.\n\t\t * These can be accessed by getter methods (see Employee class in model package).\n\t\t * e.g. firstName can be accessed by employee.getFirstName() method.\n\t\t * The sample code returns \"success\" by default.\n\t\t * You need to handle the database insertion of the employee details and return \"success\" or \"failure\" based on result of the database insertion.\n\t\t */\n\t\ttry {\n\t\t\tString SSN = employee.getEmployeeID();\n\t\t\tSSN = SSN.replace(\"-\",\"\");\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://mysql3.cs.stonybrook.edu:3306/mwcoulter?useSSL=false\",\"mwcoulter\",\"111030721\");\n\t\t\tPreparedStatement st = con.prepareStatement(\n\t\t\t\t\t\"INSERT IGNORE INTO mwcoulter.Location (ZipCode, City, State) VALUES (?,?,?);\");\n\t\t\tst.setInt(1,Integer.valueOf(employee.getZipCode()));\n\t\t\tst.setString(2, employee.getCity());\n\t\t\tst.setString(3, employee.getState());\n\t\t\tst.executeUpdate();\n\t\t\t\n\t\t\tst = con.prepareStatement(\n\t\t\t\t\t\"INSERT INTO mwcoulter.Person (SSN, LastName, FirstName, Address, ZipCode, Telephone) \" +\n\t\t\t\t\t\"VALUES (?,?,?,?,?,?);\");\n\t\t\tst.setInt(1,Integer.valueOf(SSN));\n\t\t\tst.setString(2, employee.getLastName());\n\t\t\tst.setString(3, employee.getFirstName());\n\t\t\tst.setString(4, employee.getAddress());\n\t\t\tst.setInt(5, employee.getZipCode());\n\t\t\tst.setLong(6, Long.valueOf(employee.getTelephone()));\n\t\t\tst.executeUpdate();\n\t\t\t\n\t\t\tst = con.prepareStatement(\n\t\t\t\t\t\"INSERT INTO mwcoulter.LivesAt (ZipCode, SSN) \" +\n\t\t\t\t\t\"VALUES (?,?);\");\n\t\t\tst.setInt(1,Integer.valueOf(employee.getZipCode()));\n\t\t\tst.setInt(2, Integer.valueOf(SSN));\n\t\t\tst.executeUpdate();\n\t\t\t\n\t\t\tst = con.prepareStatement(\"INSERT INTO mwcoulter.Employee (ID, SSN, StartDate, HourlyRate, Email) \" +\n\t\t\t\"VALUES (?,?,?,?,?);\");\n\t\t\tst.setInt(1,Integer.valueOf(SSN));\n\t\t\tst.setInt(2,Integer.valueOf(SSN));\n\t\t\tst.setDate(3,Date.valueOf(employee.getStartDate()));\n\t\t\tst.setInt(4, (int)employee.getHourlyRate());\n\t\t\tst.setString(5, employee.getEmail());\n\t\t\tst.executeUpdate();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t\treturn \"failure\";\n\t\t}\n\t\treturn \"success\";\n\t\t}", "@Override\n public void parseToXML(Document doc, Element parent)\n {\n String value = this.valueProperty().getValue();\n if (this.isRequired())\n parent.setAttribute(this.getName(), value);\n else if (! value.trim().isEmpty())\n parent.setAttribute(this.getName(), value);\n\n }", "public void addEmployee(int noOfEmployee) {\r\n\t\tint id = 0;\r\n\t\tString name = null;\r\n\t\tString address = null;\r\n\t\t\r\n\t\tfor (int index = 0; index < noOfEmployee; index++) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Enter employee id :\");\r\n\t\t\tid = input.nextInt();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Enter employee name : \");\r\n\t\t\tinput.nextLine();\r\n\t\t\tname = input.nextLine();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Enter employee address :\");\r\n\t\t\taddress = input.nextLine();\r\n\t\t\t\r\n\t\t\tif (empId.contains(id)) {\r\n\t\t\t\tSystem.out.println(\"Emp ID : \"+ id +\" employee ID already exists !!!!!\");\r\n\t\t\t} else {\r\n\t\t\t\tempId.add(id);\r\n\t\t\t\temp.add(addEmployee(id, name, address));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic String AddEmployeeDetails(EmployeeEntity employee) throws CustomException {\n\t\tString strMessage=\"\";\r\n\t\trepository.save(employee);\r\n\t\tstrMessage=\"Employee data has been saved\";\r\n\t\treturn strMessage;\r\n\t}", "Element toXML();", "@Override\n\tpublic Employee createEmployee(Employee employee) {\n\t\tSession sess = sessionFactory.openSession();\n\t\tTransaction tx = sess.beginTransaction();\n\t\tsess.save(employee);\n\t\ttx.commit();\n\t\tsess.close();\n\n\t\treturn employee;\n\t}", "@Override\n\t// Triggered when the start of tag is found.\n\tpublic void startElement(String uri, String localName, String qName,\n\t\t\tAttributes attributes) throws SAXException {\n\t\tif (\"employee\".equals(qName)) {\n\t\t\temp = new Employee();\n\t\t\temp.setId(attributes.getValue(\"id\"));\n\t\t}\n\n\t}", "public static void createXmlNote() throws JAXBException {\n Staff staff = new Staff();\n\n //Creating xml root node;\n //Create JAXB context and instantiate marshaller;\n JAXBContext jaxbContext = JAXBContext.newInstance(Staff.class);\n // Marshaller : Java Object to XML content\n Marshaller jaxbMarshaller = jaxbContext.createMarshaller();\n jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);\n jaxbMarshaller.marshal(staff, new File(\"test.xml\"));\n }", "public Employee convert() {\n\n Application app = Application.getInstance();\n Employee employee = new Employee();\n employee.setLWantCom(null);\n employee.setResume(getRes());\n employee.setNotifiStack(getNotifiStack());\n\n /*\n I update his friends because if i don't\n they will have the old user as a friend\n whilst i need them to befriend the new employee\n */\n for (int i = 0; i < getFriends().size();) {\n employee.add(getFriends().get(i));\n getFriends().get(i).remove(this);\n }\n app.remove(this);\n\n return employee;\n\n }", "public String\ttoXML()\t{\n\t\treturn toXML(0);\n\t}", "public void push(Employee employee){\n if(isFull()){\n Employee[] newArray = new Employee[2 * employeeStack.length];\n // System.arraycopy(srcArray, srcPos, destisnationArray, destPos, length);\n System.arraycopy(employeeStack, 0, newArray, 0, employeeStack.length);\n employeeStack = newArray;\n }\n employeeStack[top++] = employee;\n }", "public amdocs.iam.pd.webservices.productattrrel.productdetailsoutput.Value insertNewValue(int i)\n {\n synchronized (monitor())\n {\n check_orphaned();\n amdocs.iam.pd.webservices.productattrrel.productdetailsoutput.Value target = null;\n target = (amdocs.iam.pd.webservices.productattrrel.productdetailsoutput.Value)get_store().insert_element_user(VALUE$0, i);\n return target;\n }\n }", "@Override\n\tpublic ResponseEntity<Employee> save(Employee t) {\n\t\treturn null;\n\t}", "public String toInsert() {\r\n return \"(null,'\"+ ref + \"','\" + name + \"','\" + tel + \"','\" + address + \"')\";\r\n }", "int insert(ProEmployee record);", "public long insertEmployer(String employer){\n \tContentValues values = new ContentValues();\n \tvalues.put(Employers.COLUMN_NAME_TITLE, employer);\n\n \t// Insert the new row, returning the primary key value of the new row\n \tlong row = db.insert(\n \t Employers.TABLE_NAME,\n \t null,\n \t values);\n \treturn row;\n\t}", "public void addEmployee(Map<String, String> employee) {\r\n\t\tEmployee employees = new Employee(Integer.parseInt(employee.get(\"id\")), employee.get(\"name\"));\r\n\t\temployee1.put(Integer.parseInt(employee.get(\"id\")), employees);\r\n\t}", "@Override\r\n\tpublic Result update(Employees employees) {\n\t\treturn null;\r\n\t}", "public Builder clearEmployeeId() {\n \n employeeId_ = 0;\n onChanged();\n return this;\n }", "org.landxml.schema.landXML11.CrashDataDocument.CrashData insertNewCrashData(int i);", "@Override\r\n\t\tpublic SQLXML createSQLXML() throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "public boolean createEmployeeInfo(Employee employee) {\n\t\treturn dao.createEmployeeInfo(employee);\n\t}", "@POST\r\n\t@Path(\"/publishxml\")\r\n\t@Consumes(MediaType.APPLICATION_XML)\r\n\t@Produces(MediaType.APPLICATION_JSON)\r\n\tpublic Response consumeXML( Employee employee ) {\r\n\r\n\t\temployeeValidation(employee);\r\n\t\treturn Response.status(200).entity(employee).build();\r\n\t}" ]
[ "0.6148298", "0.6129005", "0.58594203", "0.5565942", "0.55526394", "0.5532319", "0.552138", "0.5500482", "0.5315254", "0.53135633", "0.5292069", "0.525945", "0.520723", "0.5132477", "0.5070467", "0.50690395", "0.5058346", "0.5047188", "0.5046001", "0.5043063", "0.5001683", "0.49753982", "0.4974546", "0.49495846", "0.4939973", "0.49353704", "0.49334702", "0.49326876", "0.49326026", "0.49292123", "0.49200565", "0.4888223", "0.48868173", "0.48866346", "0.48855704", "0.48665333", "0.48645383", "0.48591715", "0.48351938", "0.482488", "0.48179558", "0.48162472", "0.48140574", "0.48067996", "0.48044994", "0.48007557", "0.4787991", "0.47815162", "0.47742665", "0.47725517", "0.47706345", "0.476888", "0.4750178", "0.47216025", "0.47198159", "0.471813", "0.47176084", "0.47175682", "0.47168803", "0.47129077", "0.46970353", "0.46819392", "0.46819392", "0.4676066", "0.46727002", "0.46698007", "0.46585703", "0.46458966", "0.46431163", "0.4638425", "0.4637224", "0.46330157", "0.4629501", "0.4627902", "0.46250767", "0.4612791", "0.46108302", "0.46081352", "0.460813", "0.46040824", "0.45984077", "0.4590872", "0.45832473", "0.4579928", "0.4575386", "0.45747524", "0.4568982", "0.45666805", "0.45637986", "0.4559996", "0.4559372", "0.45566234", "0.45511", "0.4550024", "0.4547853", "0.45474052", "0.45468336", "0.45422843", "0.45396525", "0.45396003" ]
0.62327623
0
Appends and returns a new empty value (as xml) as the last "employee" element
public andrewNamespace.xsdconfig.EmployeeDocument.Employee addNewEmployee() { synchronized (monitor()) { check_orphaned(); andrewNamespace.xsdconfig.EmployeeDocument.Employee target = null; target = (andrewNamespace.xsdconfig.EmployeeDocument.Employee)get_store().add_element_user(EMPLOYEE$0); return target; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insertAtEnd(Employee e) {\n\t}", "public static void addEmployeeToXMLFile(Employee ee) {\n try {\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n\n Element rootElement;\n File xmlFile = new File(\"src/task2/employee.xml\");\n\n if (xmlFile.isFile()) {\n doc = docBuilder.parse(new FileInputStream(xmlFile));\n doc.getDocumentElement().normalize();\n rootElement = doc.getDocumentElement();\n } else {\n rootElement = doc.createElement(\"department\");\n doc.appendChild(rootElement);\n }\n\n Element employee = doc.createElement(\"employee\");\n rootElement.appendChild(employee);\n\n Element id = doc.createElement(\"id\");\n id.appendChild(doc.createTextNode(ee.getId()));\n employee.appendChild(id);\n\n Element name = doc.createElement(\"name\");\n name.appendChild(doc.createTextNode(ee.getName()));\n employee.appendChild(name);\n\n Element sex = doc.createElement(\"sex\");\n sex.appendChild(doc.createTextNode(Integer.toString(ee.sex)));\n employee.appendChild(sex);\n\n Element dateOfBirth = doc.createElement(\"dateOfBirth\");\n dateOfBirth.appendChild(doc.createTextNode(ee.dateOfBirth));\n employee.appendChild(dateOfBirth);\n\n Element salary = doc.createElement(\"salary\");\n salary.appendChild(doc.createTextNode(Double.toString(ee.salary)));\n employee.appendChild(salary);\n\n Element address = doc.createElement(\"address\");\n address.appendChild(doc.createTextNode(ee.address));\n employee.appendChild(address);\n\n Element idDepartment = doc.createElement(\"idDepartment\");\n idDepartment.appendChild(doc.createTextNode(ee.idDepartment));\n employee.appendChild(idDepartment);\n\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n StreamResult result = new StreamResult(xmlFile);\n transformer.transform(source, result);\n System.out.println(\"File saved\");\n\n } catch (ParserConfigurationException | SAXException | IOException | DOMException | TransformerException e) {\n System.out.println(\"Error: \" + e.getMessage());\n }\n }", "@Override\n public Employee addNewEmployee(Employee employee) {\n return null;\n }", "public org.apache.xmlbeans.XmlObject addNewValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlObject target = null;\n target = (org.apache.xmlbeans.XmlObject)get_store().add_element_user(VALUE$2);\n return target;\n }\n }", "@Override\n\tpublic void endElement(String uri, String localName, String qName)\n\t\t\tthrows SAXException {\n\t\tif (\"firstName\".equals(qName)) {\n\t\t\temp.setFirstName(content);\n\t\t} else if (\"lastName\".equals(qName)) {\n\t\t\temp.setLastName(content);\n\t\t} else if (\"location\".equals(qName)) {\n\t\t\temp.setLocation(content);\n\t\t} else if (\"employee\".equals(qName)) {\n\t\t\t// Add the employee to list once end tag is found\n\t\t\tempList.add(emp);\n\t\t}\n\n\t}", "public andrewNamespace.xsdconfig.EmployeeDocument.Employee insertNewEmployee(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n andrewNamespace.xsdconfig.EmployeeDocument.Employee target = null;\r\n target = (andrewNamespace.xsdconfig.EmployeeDocument.Employee)get_store().insert_element_user(EMPLOYEE$0, i);\r\n return target;\r\n }\r\n }", "Employee getOldestEmployee() {\n\t}", "public Builder clearEmployeeName() {\n \n employeeName_ = getDefaultInstance().getEmployeeName();\n onChanged();\n return this;\n }", "@Override\n\tpublic Integer insertEmp(Employee e) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic Result add(Employees employees) {\n\t\treturn null;\r\n\t}", "public Builder clearEmployeeId() {\n \n employeeId_ = 0;\n onChanged();\n return this;\n }", "public Builder clearEmployee() {\n if (employeeBuilder_ == null) {\n employee_ = null;\n onChanged();\n } else {\n employee_ = null;\n employeeBuilder_ = null;\n }\n\n return this;\n }", "public Builder clearEmployee() {\n if (employeeBuilder_ == null) {\n employee_ = null;\n onChanged();\n } else {\n employee_ = null;\n employeeBuilder_ = null;\n }\n\n return this;\n }", "@Override\n\tpublic Result add(Employer employer) {\n\t\treturn null;\n\t}", "public Builder mergeEmployee(grpc.messages.Messages.Employee value) {\n if (employeeBuilder_ == null) {\n if (employee_ != null) {\n employee_ =\n grpc.messages.Messages.Employee.newBuilder(employee_).mergeFrom(value).buildPartial();\n } else {\n employee_ = value;\n }\n onChanged();\n } else {\n employeeBuilder_.mergeFrom(value);\n }\n\n return this;\n }", "public Builder mergeEmployee(grpc.messages.Messages.Employee value) {\n if (employeeBuilder_ == null) {\n if (employee_ != null) {\n employee_ =\n grpc.messages.Messages.Employee.newBuilder(employee_).mergeFrom(value).buildPartial();\n } else {\n employee_ = value;\n }\n onChanged();\n } else {\n employeeBuilder_.mergeFrom(value);\n }\n\n return this;\n }", "XomNode appendElement(Element element) throws XmlBuilderException;", "public Builder setEmployee(grpc.messages.Messages.Employee value) {\n if (employeeBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n employee_ = value;\n onChanged();\n } else {\n employeeBuilder_.setMessage(value);\n }\n\n return this;\n }", "public Builder setEmployee(grpc.messages.Messages.Employee value) {\n if (employeeBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n employee_ = value;\n onChanged();\n } else {\n employeeBuilder_.setMessage(value);\n }\n\n return this;\n }", "public XMLDocument endElement() {\r\n return this.endElement(null);\r\n }", "public String\ttoXML()\t{\n\t\treturn toXML(0);\n\t}", "public Element toXMLElement() {\n return null;\n }", "public void append(JspElement e) {\r\n\tif (_first == null) {\r\n\t\t_first = e;\r\n\t\t_last = e;\r\n\t}\t\r\n\telse {\r\n\t\t_last.setNext(e);\r\n\t\t_last = e;\r\n\t}\r\n\te.setNext(null);\r\n}", "@XmlElement\n public String getEmployeId() {\n return employeId;\n }", "@Override\n public void writeEndElement() throws XMLStreamException {\n closeStartTag();\n if(_depth == 0){\n return;\n }\n if(_ncContextState[_depth]){\n nsContext.popContext();\n }\n try {\n _stream .write(_END_TAG);\n //writeStringToUtf8 (qname,_stream);\n ElementName en =elementNames[--_depth];\n _stream.write(en.getUtf8Data().getBytes(), 0,en.getUtf8Data().getLength());\n en.getUtf8Data().reset();\n _stream .write('>');\n } catch (IOException ex) {\n throw new RuntimeException(ex);\n }\n }", "public String toXML()\n\t{\n\t\treturn toXML(0);\n\t}", "public String toXML()\n\t{\n\t\treturn toXML(0);\n\t}", "private static Employees toSting() {\n\t\treturn null;\n\t}", "private XMLDocument endElement(String name, boolean addIndent) {\r\n String endName = startedElements.removeLast();\r\n\r\n if (name != null) {\r\n if (!endName.equals(name)) {\r\n throw new IllegalArgumentException(\"Close the element \" + endName + \" instead of \" + name);\r\n }\r\n\r\n } else {\r\n name = endName;\r\n }\r\n\r\n indent--;\r\n\r\n if (addIndent) {\r\n this.addIndent();\r\n }\r\n\r\n xml.append(\"</\").append(name).append(\">\");\r\n xml.append(\"\\n\");\r\n\r\n return this;\r\n }", "public RTWElementRef lastAsElement();", "public grpc.messages.Messages.Employee.Builder getEmployeeBuilder() {\n \n onChanged();\n return getEmployeeFieldBuilder().getBuilder();\n }", "public grpc.messages.Messages.Employee.Builder getEmployeeBuilder() {\n \n onChanged();\n return getEmployeeFieldBuilder().getBuilder();\n }", "public JspElement getLast() {\r\n\treturn _last;\r\n}", "@Override\n\tString toString(Employee obj) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic E getLast() {\n\t\treturn null;\r\n\t}", "private void saveEmployee(Employee employee) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(ReportContract.EmployeeEntry.COLUMN_KEY, employee.getKey());\n contentValues.put(ReportContract.EmployeeEntry.COLUMN_VALUE, employee.getValue());\n\n getContext().getContentResolver().insert(\n ReportContract.EmployeeEntry.CONTENT_URI,\n contentValues\n );\n\n }", "public Builder mergeEmployeelist(com.example.nettyserver.protobuf.Employee.EmployeeInfo value) {\n if (employeelistBuilder_ == null) {\n if (employeelist_ != null) {\n employeelist_ =\n com.example.nettyserver.protobuf.Employee.EmployeeInfo.newBuilder(employeelist_).mergeFrom(value).buildPartial();\n } else {\n employeelist_ = value;\n }\n onChanged();\n } else {\n employeelistBuilder_.mergeFrom(value);\n }\n\n return this;\n }", "@Override\r\n\tpublic Employee add(Employee entity) {\n\t\treturn entity;\r\n\t}", "public grpc.messages.Messages.Employee getEmployee() {\n if (employeeBuilder_ == null) {\n return employee_ == null ? grpc.messages.Messages.Employee.getDefaultInstance() : employee_;\n } else {\n return employeeBuilder_.getMessage();\n }\n }", "public grpc.messages.Messages.Employee getEmployee() {\n if (employeeBuilder_ == null) {\n return employee_ == null ? grpc.messages.Messages.Employee.getDefaultInstance() : employee_;\n } else {\n return employeeBuilder_.getMessage();\n }\n }", "public String toXML() {\n return null;\n }", "public String toXML() {\n return null;\n }", "public Builder setEmployee(\n grpc.messages.Messages.Employee.Builder builderForValue) {\n if (employeeBuilder_ == null) {\n employee_ = builderForValue.build();\n onChanged();\n } else {\n employeeBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }", "public Builder setEmployee(\n grpc.messages.Messages.Employee.Builder builderForValue) {\n if (employeeBuilder_ == null) {\n employee_ = builderForValue.build();\n onChanged();\n } else {\n employeeBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }", "@Override\r\n\t\tpublic Node getLastChild()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "public Builder setEmployeelist(com.example.nettyserver.protobuf.Employee.EmployeeInfo value) {\n if (employeelistBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n employeelist_ = value;\n onChanged();\n } else {\n employeelistBuilder_.setMessage(value);\n }\n\n return this;\n }", "public void createEmployee(Employee newEmployee) {\n\t\tif(false == this.employee.contains(newEmployee)) {\n\t\t\tthis.employee.add(newEmployee);\n\t\t}\n\t}", "public static Element newRootElement()\n {\n Element element = null;\n \n try\n {\n javax.xml.parsers.DocumentBuilderFactory factory =\n javax.xml.parsers.DocumentBuilderFactory.newInstance();\n \n javax.xml.parsers.DocumentBuilder builder =\n factory.newDocumentBuilder();\n \n Document document = builder.newDocument();\n Element holder = document.createElement(\"root\");\n document.appendChild(holder);\n element = document.getDocumentElement();\n }\n catch(Exception ex) { ex.printStackTrace(); }\n \n return element;\n }", "public String addEmployee() {\n\t\t\t//logger.info(\"addEmployee method called\");\n\t\t\t//userGroupBO.save(userGroup);;\n\t\t\treturn SUCCESS;\n\t\t}", "public amdocs.iam.pd.webservices.productattrrel.productdetailsoutput.Value addNewValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n amdocs.iam.pd.webservices.productattrrel.productdetailsoutput.Value target = null;\n target = (amdocs.iam.pd.webservices.productattrrel.productdetailsoutput.Value)get_store().add_element_user(VALUE$0);\n return target;\n }\n }", "public Employee convert() {\n\n Application app = Application.getInstance();\n Employee employee = new Employee();\n employee.setLWantCom(null);\n employee.setResume(getRes());\n employee.setNotifiStack(getNotifiStack());\n\n /*\n I update his friends because if i don't\n they will have the old user as a friend\n whilst i need them to befriend the new employee\n */\n for (int i = 0; i < getFriends().size();) {\n employee.add(getFriends().get(i));\n getFriends().get(i).remove(this);\n }\n app.remove(this);\n\n return employee;\n\n }", "private Element generateEmptyOutboundElem(XmlProcessor hqmfXmlProcessor) {\n\t\tElement outboundRelElem = hqmfXmlProcessor.getOriginalDoc().createElement(OUTBOUND_RELATIONSHIP);\n\t\toutboundRelElem.setAttribute(TYPE_CODE, \"COMP\");\n\t\treturn outboundRelElem;\n\t}", "public static String getXMLElementTagName() {\n return \"lastSale\";\n }", "public void addElement() {\n\t\tXmlNode newNode = new XmlNode(rootNode, this);// make a new default-type field\n\t\taddElement(newNode);\n\t}", "public int pushEmployee(boolean override) {\n\t\t// Can't push invalid data\n\t\tif (!this.validateEmployeePackage())\n\t\t\treturn this.validateEmployeePackageResult();\n\t\t// Manual if's are easier\n\t\tif (this.employeeExists()) {\n\t\t\tif (override) {\n\t\t\t\tint e = super.update(\"UPDATE \" + C.TABLE_EMPLOYEE + \" SET \"\n\t\t\t\t\t\t+ C.COLUMN_FIRST_NAME + \"='\" + this.getFirstName() + \"'\"\n\t\t\t\t\t\t+ C.COLUMN_LAST_NAME + \"='\" + this.getLastName() + \"' WHERE \"\n\t\t\t\t\t\t+ C.COLUMN_ID + \"=\" + this.getID());\n\t\t\t\treturn e > 0 ? EmployeeConnection.SUCCESS :\n\t\t\t\t\t\te < 0 ? EmployeeConnection.SQL_ERROR :\n\t\t\t\t\t\t\t\tEmployeeConnection.DRIVER_ERROR;\n\t\t\t} else\n\t\t\t\treturn EmployeeConnection.DUPLICATE_EMPLOYEE;\n\t\t} else {\n\t\t\tint e = super.update(\"INSERT INTO \" + C.TABLE_EMPLOYEE + \" (\" + C.COLUMN_ID\n\t\t\t\t\t+ \", \" + C.COLUMN_FIRST_NAME + \", \" + C.COLUMN_LAST_NAME\n\t\t\t\t\t+ \") VALUES (\" + this.getID() + \", '\" + this.getFirstName()\n\t\t\t\t\t+ \"', '\" + this.getLastName() + \"'\");\n\t\t\treturn e > 0 ? EmployeeConnection.SUCCESS :\n\t\t\t\t\te < 0 ? EmployeeConnection.SQL_ERROR :\n\t\t\t\t\t\t\tEmployeeConnection.DRIVER_ERROR;\n\t\t}\n\t}", "public Object getUpdatedEmployees() {\n\t\treturn null;\n\t}", "E createDefaultElement();", "private Element createXmlElementForConcat(Concat concat, Document xmlDocument, Constraint constraint) {\n\t\tElement element = xmlDocument.createElement(XML_CONCAT);\n\t\t//element.setAttribute(XML_INFO1, concat.getValue1().toString());\n\t\t//element.setAttribute(XML_INFO2, concat.getValue2().toString());\n\n\t\tfor (Value childValue : concat) {\n\t\t\tElement child = createXmlElementForValue(childValue, xmlDocument, constraint);\n\t\t\tif (child != null)\n\t\t\t\telement.appendChild(child);\n\t\t}\n\t\t\n\t\treturn (element.hasChildNodes() ? element : null);\n\t}", "@java.lang.Override\n public grpc.messages.Messages.Employee getEmployee() {\n return employee_ == null ? grpc.messages.Messages.Employee.getDefaultInstance() : employee_;\n }", "@java.lang.Override\n public grpc.messages.Messages.Employee getEmployee() {\n return employee_ == null ? grpc.messages.Messages.Employee.getDefaultInstance() : employee_;\n }", "private Node append(E element) {\n \treturn new Node(sentinel.pred, element);\n }", "public Employe findLastHired() {\n\t\treturn null;\n\t}", "public Builder clearEmployeelist() {\n if (employeelistBuilder_ == null) {\n employeelist_ = null;\n onChanged();\n } else {\n employeelist_ = null;\n employeelistBuilder_ = null;\n }\n\n return this;\n }", "private static void writeToFileEmployees() throws IOException {\n FileWriter write = new FileWriter(path2, append);\n PrintWriter print_line = new PrintWriter(write);\n for (int i = 0; i < RegisteredEmployees.listOfEmployees.size(); i++) {\n ArrayList<Integer> list = RegisteredEmployees.getEmployeeList();\n Integer ID = list.get(i);\n textLine = String.valueOf(ID);\n print_line.printf(\"%s\" + \"%n\", textLine);\n }\n print_line.close();\n }", "@Override\n\tpublic Position insertLast(Object element) {\n\t\treturn null;\n\t}", "public grpc.messages.Messages.EmployeeOrBuilder getEmployeeOrBuilder() {\n if (employeeBuilder_ != null) {\n return employeeBuilder_.getMessageOrBuilder();\n } else {\n return employee_ == null ?\n grpc.messages.Messages.Employee.getDefaultInstance() : employee_;\n }\n }", "public grpc.messages.Messages.EmployeeOrBuilder getEmployeeOrBuilder() {\n if (employeeBuilder_ != null) {\n return employeeBuilder_.getMessageOrBuilder();\n } else {\n return employee_ == null ?\n grpc.messages.Messages.Employee.getDefaultInstance() : employee_;\n }\n }", "protected XMLElement createAnotherElement() {\n return new XMLElement(this.conversionTable,\n this.skipLeadingWhitespace,\n false,\n this.ignoreCase);\n }", "@Override\n\t\tpublic void endElement(String uri, String localName, String qName)\n\t\t\t\tthrows SAXException {\n\t\t\tNode lastElement = nodeStack.lastElement();\n\t\t\tlastElement.setValue(buffer.toString());\n\t\t\tLog.d(\"xml\", \"\\\\ \" + uri + \" \" + localName + \" | found data: \" + lastElement.getValue());\n\t\t\tnodeStack.pop();\n\t\t\t\n\t\t\t\n\t\t}", "public String toString() {\r\n\t\treturn \"Name : \"+name+\"\\nEmp# : \"+employeeNum;\r\n\t}", "private void saveEmployee()\n {\n Employee tempEmployee = new Employee();\n String line = \"\";\n try\n {\n PrintWriter out = new PrintWriter(fileName);\n for(int i = 0; i < employees.size(); i++)\n {\n tempEmployee = (Employee) employees.get(i);\n line = tempEmployee.getName() + \",\" + tempEmployee.getHours() + \",\" +\n tempEmployee.getRate();\n out.println(line);\n }\n out.close(); \n }\n catch(IOException ex)\n {\n ex.printStackTrace();\n }\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn \"Employee [id=\" + id + \", name=\" + name + \", salary=\" + salary + \", designation=\" + designation\r\n\t\t\t\t+ \", department=\" + department + \", address=\" + address + \"]\";\r\n\t}", "@Override\r\n\tpublic String AddEmployeeDetails(EmployeeEntity employee) throws CustomException {\n\t\tString strMessage=\"\";\r\n\t\trepository.save(employee);\r\n\t\tstrMessage=\"Employee data has been saved\";\r\n\t\treturn strMessage;\r\n\t}", "public void addEmployee(){\n\t\tSystem.out.println(\"Of what company is the employee?\");\n\t\tSystem.out.println(theHolding.companies());\n\t\tint selected = reader.nextInt();\n\t\treader.nextLine();\n\t\tif(selected > theHolding.getSubordinates().size()-1){\n\t\t\tSystem.out.println(\"Please select a correct option\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Name:\");\n\t\t\tString name = reader.nextLine();\n\t\t\tSystem.out.println(\"Position:\");\n\t\t\tString position = reader.nextLine();\n\t\t\tSystem.out.println(\"Mail:\");\n\t\t\tString mail = reader.nextLine();\n\t\t\tEmployee toAdd = new Employee(name, position, mail);\n\t\t\tSystem.out.println(theHolding.addEmployee(selected, toAdd));\n\t\t}\n\t}", "@Override\npublic String toString()\n{\n Employee emp = new Employee();\n \n StringBuilder sb = new StringBuilder();\n sb.append(\"Employee{\");\n sb.append(\"Name=\");\n sb.append(emp.getName());\n sb.append(\",Salary complement=\");\n sb.append(emp.getSalary_complement());\n sb.append(\"}\");\n\n return sb.toString();\n}", "public void addEmployee(Employee emp) {\n\t\t\r\n\t}", "public eu.aladdin_project.xsd.OperationResult addNewOut()\n {\n synchronized (monitor())\n {\n check_orphaned();\n eu.aladdin_project.xsd.OperationResult target = null;\n target = (eu.aladdin_project.xsd.OperationResult)get_store().add_element_user(OUT$0);\n return target;\n }\n }", "public Builder setEmployeelist(\n com.example.nettyserver.protobuf.Employee.EmployeeInfo.Builder builderForValue) {\n if (employeelistBuilder_ == null) {\n employeelist_ = builderForValue.build();\n onChanged();\n } else {\n employeelistBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }", "@Override\n\tpublic String toString() {\n\t\treturn super.toString() + \"\\nEmployees: \" + getEmployees();\n\t}", "private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, registry.ClientRegistryStub.AddUser param, boolean optimizeContent, javax.xml.namespace.QName methodQName)\r\n throws org.apache.axis2.AxisFault{\r\n\r\n \r\n try{\r\n\r\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\r\n emptyEnvelope.getBody().addChild(param.getOMElement(registry.ClientRegistryStub.AddUser.MY_QNAME,factory));\r\n return emptyEnvelope;\r\n } catch(org.apache.axis2.databinding.ADBException e){\r\n throw org.apache.axis2.AxisFault.makeFault(e);\r\n }\r\n \r\n\r\n }", "@Override\n\tpublic CharSequence toXML() {\n\t\treturn null;\n\t}", "public void renewEmployeesList(){\n employees = new ArrayList<>();\n }", "public void WriteEndElement() throws IOException {\r\n\tCerrarElemento();\r\n\tif(!pila.isEmpty()) bw.write(\"</\" + (String)pila.pop() + \">\");\r\n }", "public Object lastElement();", "@Override\r\n\tpublic Employee addEmployeeData(Employee emp) {\n\t\treturn employeeDAO.addEmployee(emp);\r\n\t}", "@POST\n @Consumes( { \"application/xml\", \"text/xml\", \"application/json\" })\n public Response createEmployee(Employee employee) {\n final int staffNo = this.employeeMgr.createEmployee(employee);\n final URI location = createdLocation(staffNo);\n return Response.created(location).build();\n }", "@Override\r\n\tpublic void addEmployee(Employee employee) {\n\t\temployees.add(employee);\r\n\t\t\r\n\t}", "@Override\r\n public String toString() {\r\n return \"Employee{\" + super.toString() + \", \" + \"employeeNumber=\" + employeeNumber + \", salary=\" + salary + '}';\r\n }", "public String toString() {\n\t\treturn \"Employee [firstname=\" + firstname + \", hours=\" + hours\n\t\t\t\t+ \", lastname=\" + lastname + \", payrate=\" + payrate\n\t\t\t\t+ \", totalpay=\" + totalpay + \"]\";\n\t}", "public static Employee getEmployee(Node node) {\n Employee employee = new Employee();\n if (node.getNodeType() == Node.ELEMENT_NODE) {\n Element e = (Element) node;\n employee.setId(e.getElementsByTagName(\"id\").item(0).getChildNodes().item(0).getTextContent());\n employee.setName(e.getElementsByTagName(\"name\").item(0).getChildNodes().item(0).getTextContent());\n employee.setSex(Integer.parseInt(e.getElementsByTagName(\"sex\").item(0).getChildNodes().item(0).getNodeValue()));\n employee.setDateOfBirth(e.getElementsByTagName(\"dateOfBirth\").item(0).getChildNodes().item(0).getTextContent());\n employee.setAddress(e.getElementsByTagName(\"address\").item(0).getChildNodes().item(0).getTextContent());\n employee.setIdDepartment(e.getElementsByTagName(\"idDepartment\").item(0).getChildNodes().item(0).getTextContent());\n employee.setSalary(Double.parseDouble(e.getElementsByTagName(\"salary\").item(0).getChildNodes().item(0).getNodeValue()));\n }\n return employee;\n }", "@POST\r\n\t@Path(\"/publishmultixml\")\r\n\t@Consumes(MediaType.APPLICATION_XML)\r\n\t@Produces(MediaType.APPLICATION_JSON)\r\n\tpublic Response consumeXML( Employees employees ) {\r\n\t\tWriteSpreadsheet writeSpreadsheet = new WriteSpreadsheet();\r\n\t\twriteSpreadsheet.writeSpreadsheetInitialize();\r\n\t\tWriteText writeText = new WriteText();\r\n\t\twriteText.writeTextInitialize();\r\n\t\tscrubPayloadAndThenWriteToCSVTXT(employees,writeSpreadsheet,writeText);\r\n\r\n\treturn Response.status(200).entity(employees).build();\r\n\t}", "public E removeLast(){\r\n return null;\r\n }", "@Override\r\n\tpublic int addEmployee1(Employee employee) throws SQLException {\n\t\tint added = 0;\r\n\t\tString insertData = \"insert into employee values(?,?,?,?)\";\r\n\r\n\t\t\tPreparedStatement ps = dataSource.getConnection().prepareStatement(insertData);\r\n\t\t\tps.setString(1, employee.getName());\r\n\t\t\tps.setInt(2, employee.getEmpId());\r\n\t\t\tps.setString(3, employee.getTechnoogy());\r\n\t\t\tps.setInt(4, employee.getSalary());\r\n\r\n\t\t\tadded = ps.executeUpdate();\r\n\t\treturn added;\r\n\t}", "public static String generateEmpID() {\n\tempID++;\n\treturn String.valueOf(empID);\n }", "public com.example.nettyserver.protobuf.Employee.EmployeeInfo.Builder getEmployeelistBuilder() {\n \n onChanged();\n return getEmployeelistFieldBuilder().getBuilder();\n }", "public getEmployee_result(getEmployee_result other) {\n if (other.isSetSuccess()) {\n this.success = new com.moseeker.thrift.gen.employee.struct.EmployeeResponse(other.success);\n }\n }", "public String getXML(boolean allRecords) throws LRException\n\t{\n\t\tStringBuffer sb=new StringBuffer();\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tif (allRecords)\n\t\t{\n\t\t\tString tableName=myData.spec.getTableName();\n\t\t\tsb.append(\"<\"+tableName+\">\\n\");\n\t\t\tgetRecords((LVValue)null);\n\t\t\twhile (hasMoreRecords())\n\t\t\t{\n\t\t\t\tgetNextRecord();\n\t\t\t\tsb.append(myData.record.getXML());\n\t\t\t}\n\t\t\tsb.append(\"</\"+tableName+\">\\n\");\n\t\t\treturn sb.toString();\n\t\t}\n\t\treturn myData.record.getXML();\n\t}", "@Override\r\n\t\tpublic Node appendChild(Node newChild) throws DOMException\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "public void push(Employee employee){\n if(isFull()){\n Employee[] newArray = new Employee[2 * employeeStack.length];\n // System.arraycopy(srcArray, srcPos, destisnationArray, destPos, length);\n System.arraycopy(employeeStack, 0, newArray, 0, employeeStack.length);\n employeeStack = newArray;\n }\n employeeStack[top++] = employee;\n }", "public E removeLast() {\n\t\t// Bitte fertig ausprogrammieren:\n\t\treturn null;\n\t}" ]
[ "0.5816473", "0.58052444", "0.56462157", "0.5474642", "0.54531807", "0.53227407", "0.52815783", "0.5275215", "0.526538", "0.52521384", "0.5176757", "0.51695067", "0.51695067", "0.5166119", "0.5150034", "0.5150034", "0.51282895", "0.5079337", "0.5079337", "0.5038252", "0.5027597", "0.50248444", "0.502349", "0.4972768", "0.49680138", "0.49605367", "0.49605367", "0.4932569", "0.49315685", "0.49218598", "0.4896618", "0.4896618", "0.48804224", "0.48802963", "0.48618418", "0.4861378", "0.48457393", "0.48442933", "0.48436588", "0.48436588", "0.4832049", "0.4810201", "0.48000985", "0.48000985", "0.47876364", "0.4776885", "0.47675657", "0.4763788", "0.47614947", "0.4744408", "0.47270873", "0.47258303", "0.47242996", "0.47223532", "0.47120944", "0.4707127", "0.47060737", "0.4698124", "0.46884328", "0.46884328", "0.46863067", "0.46840975", "0.46773067", "0.46645516", "0.46638164", "0.4654368", "0.4654368", "0.46353287", "0.46128505", "0.46125057", "0.4606166", "0.4604394", "0.46036288", "0.4596297", "0.45845214", "0.45839453", "0.45780948", "0.45763484", "0.45711258", "0.4571006", "0.45661268", "0.45636272", "0.4562929", "0.4560636", "0.45559004", "0.4545451", "0.45437428", "0.45403793", "0.45403183", "0.45338252", "0.45320314", "0.45313242", "0.45292178", "0.45254192", "0.45217746", "0.4519819", "0.45040536", "0.45031074", "0.4502569", "0.4502156" ]
0.61195755
0
Removes the ith "employee" element
public void removeEmployee(int i) { synchronized (monitor()) { check_orphaned(); get_store().remove_element(EMPLOYEE$0, i); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteEmployee(Employee formerEmployee) {\n\t\tthis.employee.remove(formerEmployee);\n\t}", "public void deleteEmployee(int id) {\r\n\t\temployee1.remove(id);\r\n\t}", "@Override\n\tpublic Integer removeEmp(Integer id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic void deleteEmployee(Employee employee) {\n\t\tEmployee deleteEmployee = em.find(Employee.class, employee.getId());\n\t\ttry {\n\t\t\tem.getTransaction().begin();\n\t\t\tem.remove(deleteEmployee);\n\t\t\tem.getTransaction().commit();\n\t\t\tSystem.out.println(\"Employee Data Removed successfully\");\n\t\t\tlogger.log(Level.INFO, \"Employee Data Removed successfully\");\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Not found\");\n\t\t}\n\n\t}", "@Override\r\n\tpublic void deleteEmployee(Employee t) {\n\t\t\r\n\t}", "public EmployeeInfo removeEmployee(int employeeNum) {\r\n\r\n\t\t// Remove the employee from the hash table and return the reference to that employee.\r\n\t\t// If the employee is not in the hash table, return null.\r\n\t\t\r\n\t\tint targetBucket = calcBucket(employeeNum);\r\n \r\n\t\tfor(int i = 0 ; i < buckets[targetBucket].size(); i++) {\r\n\t\t\tif (buckets[targetBucket].get(i).getEmpNum() == employeeNum) {\r\n EmployeeInfo locatedEmployee = buckets[targetBucket].get(i);\r\n buckets[targetBucket].remove(i);\r\n numInHashTable--;\r\n return locatedEmployee;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t\t\t\r\n\t}", "@Override\r\n\tpublic Map deleteEmployee(long employeeId) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic void deleteEmployee(Employee employee) {\n\t\t\n\t}", "@Override\n\tpublic void deleteEmployee() {\n\n\t}", "@Override\n\tpublic Employee delete(Employee emp) {\n\t\treturn null;\n\t}", "@Override\n\tpublic void deleteEmployee(Employee e) {\n\t\t\n\t}", "@Override\n\tpublic void remove(EmpType entity) {\n\t\t\n\t}", "@Override\r\n\tpublic void deleteEmployee(int id) {\n\t\temployees.removeIf(emp -> emp.getEmpId()==(id));\r\n\t}", "@Override\r\n\tpublic void deleteEmployeeByEmployeeId(long emplloyeeId) {\n\t\t\r\n\t}", "@Override\n\tpublic void deleteEmployeeById(int id) {\n\t\t\n\t}", "@Override\n\tpublic void deleteEmployeeById(int empId) {\n\t\t\n\t}", "@Override\r\n\tpublic void delete(Employee arg0) {\n\t\t\r\n\t}", "public final void removeNum_emp() {\n removeValue(getNum_empAttribute(getMtDatabase()));\n }", "public void deleteEmp(int empno) {\n\t\t\n\t}", "@Test\n public void removeEmployee() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n\n //Create dummy employee to delete\n employeeDAO.createEmployee(new Employee(\"dummy\", \"dummy\", \"dummy\", \"dummy\", \"dummy\", 3));\n\n //removing dummy data to avoid clutter in database\n assertTrue(employeeResource.removeEmployee(\"dummy\"));\n userDAO.removeUser(\"dummy\");\n\n //test clean up\n assertNull(userResource.getUser(\"dummy\"));\n }", "public void DeleteEmployee(int idEmployee)\n\t{\n\t\tfor(int i = 0; i < departments.size() ; i++)\n\t\t\tfor(Employee emp : departments.get(i).getEmployeeList())\n\t\t\t{\n\t\t\t\tif(emp.getIdEmployee()==idEmployee) \n\t\t\t\t{\n\t\t\t\t\tdepartments.get(i).delEmployee(emp);break;\n\t\t\t\t}\n\t\t\t}\n\t}", "public E removeFirst();", "@Override\r\n\tpublic void delete(Iterable<? extends Employee> arg0) {\n\t\t\r\n\t}", "@Override\n public void deleteEmployee(int employeeId) {\n\n }", "public static void deleteEmployee(Employee employee) {\n try {\n if (employeeRepository.delete(dataSource, employee) == 0) {\n LOGGER.info(\"The employee \" + employee.getFirstName() + \" \" + employee.getLastName() +\n \" \" + employee.getBirthday() + \" was successfully deleted from the list of employees\");\n System.out.println(\"\\n\" + resourceBundle.getString(\"emp\") + \" \" + employee.getFirstName() + \" \" + employee.getLastName() +\n \" \" + employee.getBirthday() + \" \" + resourceBundle.getString(\"success.delete\") + \"\\n\");\n } else {\n LOGGER.warn(\"The employee \" + employee.getFirstName() + \" \" + employee.getLastName() + \" \" + employee.getBirthday() + \" was not found in the list of employees\");\n System.out.println(\"\\n\" + resourceBundle.getString(\"emp\") + \" \" + employee.getFirstName() + \" \" + employee.getLastName() + \" \" + employee.getBirthday() + \" \" + resourceBundle.getString(\"not.in.list\") + \"\\n\");\n }\n } catch (SQLException e) {\n LOGGER.error(e.getMessage());\n }\n }", "@Override\r\n\tpublic int deleteEmployee(Connection con, Employee employee) {\n\t\treturn 0;\r\n\t}", "public E remove () throws NoSuchElementException;", "@GET\n @Path(\"/removeEmployeeById/{empId}\")\n @Produces(MediaType.APPLICATION_JSON)\n public String removeEmployeeById(@PathParam(\"empId\") String empId){\n String output = \"\";\n try {\n output = EmployeeFacade.getInstance().removeEmployeeById(empId);\n } catch (IOException e) {\n output = \"Error\";\n }\n return output;\n }", "Object removeFirst();", "public void deleteEmp(Integer id) {\n\t\temployeeMapper.deleteByPrimaryKey(id);\n\t}", "@Override\n\tpublic void deleteEmployee(Employee emp) {\n\t\tlog.debug(\"EmplyeeService.deleteEmployee(Employee emp) delete Employee object whos id is\" + emp.getId());\n\n\t\trepositary.delete(emp);\n\n\t}", "public E removeLast();", "public Person remove(int i) {\r\n\t\treturn q.removeIndex(i);\r\n\t}", "private void removePerson(){\r\n\t\t// can't remove a value if there's nothing there\r\n\t\tif (dataTable.getSelectedRow()== -1)\r\n\t\t\treturn;\r\n\t\tpeople.remove(dataTable.getSelectedRow());\r\n\t\tpersonTableModel.fireTableRowsDeleted(dataTable.getSelectedRow(),dataTable.getSelectedRow());\r\n\t}", "private void deleteEmployee() {\n // Only perform the delete if this is an existing pet.\n if (mCurrentPetUri != null) {\n // Call the ContentResolver to delete the pet at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentPetUri\n // content URI already identifies the pet that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentPetUri, null, null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.editor_delete_pet_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_pet_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n\n // Close the activity\n finish();\n }", "public boolean deleteEmployee(int empID) {\n\t\tIterator<Employee> iter=list.iterator();\n\t\tboolean removed=false;\n\t\twhile(iter.hasNext()) {\n\t\t\tEmployee em=iter.next();\n\t\t\tif(em.getEmpId()==empID) {\n\t\t\t\titer.remove();\n\t\t\t\tremoved=true;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn removed;\n\t}", "@DELETE\n\t@Path(\"{empID}\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response remove(@PathParam(\"empID\") int id) {\n\t\tEmployeeFacade employeeFacade = new EmployeeFacade();\n\t\tboolean result = employeeFacade.removeById(id);\n\t\tif (result) {\n\t\t\treturn Response.status(200).build();\n\t\t}\n\t\treturn Response.status(409).build();\n\t}", "public void remove() {\n\n\t\t\tsuprimirNodo(anterior);\n\n\t\t}", "@Override\r\n\tpublic E removeFirst() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic void removeBymodifiedBy(long modifiedBy) throws SystemException {\n\t\tfor (EmployeeComplaint employeeComplaint : findBymodifiedBy(\n\t\t\t\tmodifiedBy, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {\n\t\t\tremove(employeeComplaint);\n\t\t}\n\t}", "@Override\r\n\tpublic void deleteInBatch(Iterable<Employee> arg0) {\n\t\t\r\n\t}", "public void delete(int id) throws InvalidOperationException {\n if (employeeArray[id] == null) {\n throw new InvalidOperationException(\"Error deleting employee, no such employee \" + id);\n }\n try {\n employeeArray[id] = null;\n } catch (ArrayIndexOutOfBoundsException e) {\n throw new InvalidOperationException(\"Error deleting employee, id must be less than \" + employeeArray.length);\n }\n }", "public E removeFirst(){\r\n return null;\r\n }", "public void remove(Ejemplar ej);", "@Override\n public void elimina(int id_alumno) {\n\n try {\n Alumno a = admin.alumnosTotales.get(id_alumno);\n int area = a.area;\n char grupo = a.grupo;\n\n admin.fisicoMatematicas.remove(a);\n admin.biologicasYsalud.remove(a);\n admin.cienciasSociales.remove(a);\n admin.humanidadesYartes.remove(a);\n admin.fotoLabPrensa.remove(a);\n admin.viajesyhoteleria.remove(a);\n admin.nutriologo.remove(a);\n admin.labQuimico.remove(a);\n\n Iterador<Profesor> ite = new Iterador<>(admin.profesores);\n\n while (ite.hasNext()) {\n Profesor profeActual = ite.next();\n if (profeActual.area == area & profeActual.grupo == grupo) {\n profeActual.eliminaAlumnoLista(a);\n }\n }\n \n admin.alumnosTotales.remove(id_alumno);\n \n } catch (NullPointerException e) {\n System.out.println(\"No existe el Alumno\");\n }\n \n \n\n }", "public void delete(Employee employee){\n employeeRepository.delete(employee);\n }", "public void removeByCompanyId(long companyId);", "@Override\n\tpublic void deleteEPAData(int empId) {\n\t}", "public void removePerson(Person p){\n Iterator<Person> itr = personList.iterator();\n while(itr.hasNext()){\n Person x = itr.next();\n if(x.equals(p)){itr.remove();}\n }\n }", "@Test\n public void removeEmployeeCatch() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n\n //Create dummy employee to delete\n employeeDAO.createEmployee(new Employee(\"dummy\", \"dummy\", \"dummy\", \"dummy\", \"dummy\", 3));\n\n assertFalse(employeeResource.removeEmployee(\"notdummy\"));\n\n //removing dummy data to avoid clutter in database\n employeeResource.removeEmployee(\"dummy\");\n userDAO.removeUser(\"dummy\");\n\n //test clean up\n assertNull(userResource.getUser(\"dummy\"));\n }", "public E remove();", "public E remove();", "public void removePerson(Person p);", "E remove(E element) {\n\t\t\tshort index = (short)((element.hashCode() >> 24) & 0x000000FF);\n\t\t\tE obj = nodes[index].remove(this, element.hashCode(), (byte) 1);\n\t\t\tif (obj != null) {\n\t\t\t\tsize--;\n\t\t\t}\n\t\t\treturn obj;\n\t\t}", "@Override\n\tpublic void delete(Employee employee) {\n\t\temployeeDao.delete(employee);\n\t}", "@Override\n public T remove() throws NoSuchElementException {\n if (size() == 0) {\n // throws NoSuchElementException if the heap is empty\n throw new NoSuchElementException();\n }\n\n // Store the root of heap before it is removed\n T root = heap[0];\n // Replace root with last element in the heap\n heap[0] = heap[size() - 1];\n // Decrease number of elements by 1, removes the old root from heap\n nelems--;\n // Trickle down the new root to the appropriate level in the heap\n trickleDown(0);\n\n // Return the old root\n return root;\n }", "E remove(Id id);", "public void remove() {\n int size = itinerary.size();\n if (size != 1) {\n \n // Removes last Flight in this Itinerary.\n Flight removedFlight = this.itinerary.remove(size - 1);\n \n // Gets the new last Flight in this Itinerary.\n Flight flight = this.itinerary.get(size - 2);\n \n // Updates all the relevant fields in this Itinerary.\n this.price -= removedFlight.getCost();\n this.arrivalDateTime = flight.getArrivalDateTime();\n this.destination = flight.getDestination();\n this.travelTime = arrivalDateTime.timeDiff(departDateTime);\n this.places.remove(size);\n }\n }", "E remove(int i ) throws IndexOutOfBoundsException;", "public void deleteEmployee(Long employeeId) throws ApiDemoBusinessException;", "public void delete(Employeee em) {\n\t\temployeerepo.delete(em);\n\t}", "@Override\r\n\tpublic void removeToElement(Student student) {\n\t}", "public String deleteEmployee(EmployeeDetails employeeDetails);", "public @Override E remove(int i) {\n \treturn removeNode(getNode(i));\n }", "public void deleteOne(Long id) {\n\t\ttry{\n\t\t\t//tx.begin();\n\t\t\tWeekAssignmentPerEmployee weekAssignmentPerEmployee = (WeekAssignmentPerEmployee)em.find(WeekAssignmentPerEmployee.class, id);\n\t\t\tif (weekAssignmentPerEmployee == null) {\n\t\t\t\tthrow new DaoException(2);\n\t\t\t}\n\t\t\tem.remove(weekAssignmentPerEmployee);\n\t\t\t\t\n\t //tx.commit();\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tthrow new BusinessException(new ExceptionMessage(\"Failed in WeekAssignmentPerEmployeDao : deleteOne ...\"));\n\t \n\t\t}finally{\n\t\t\tem.close();\n\t\t}\n\n\t\t\n\t}", "@Test(timeout=1000)\n\tpublic void testRemove() {\n\t\tStudent[] array = new Student[7];\n\t\tarray[5] = s2; // This is the correct hash position of this student\n\t\thashmap.setArray(array);\n\t\thashmap.remove(s2);\n\t\t// Check if the element has been removed\n\t\tboolean success = true;\n\t\tarray = hashmap.getArray();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tStudent s = array[i];\n\t\t\tif (s2.equals(s)){\n\t\t\t\tsuccess = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tassertTrue(\"remove() failed. Element was not removed from hashtable\", success);\n\t}", "@Override\n\tpublic int deleteEmployeeByID(int empid) throws RemoteException {\n\t\treturn DAManager.deleteEmployeeByID(empid);\n\t}", "Object remove();", "public void deletePerson() {\n\t\t\n\n\t\tString code = selectedPerson.getCode();\n\t\tString nameKey = selectedPerson.getName()+code;\n\t\tString lastnameKey = selectedPerson.getLastName()+code;\n\t\tString fullNameKey = nameKey+lastnameKey+code;\n\t\ttreeName.removeE(nameKey);\n\t\ttreeLastname.removeE(lastnameKey);\n\t\ttreeFullName.removeE(fullNameKey);\n\t\ttreeCode.removeE(code);\n\n\t\t\n\t}", "@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (EmployeeComplaint employeeComplaint : findAll()) {\n\t\t\tremove(employeeComplaint);\n\t\t}\n\t}", "@Override\r\n\tpublic void deleteEmployee(int id) {\n\t\ttry {\r\n\t DirectlyDatabase.update(PropertyManager.getProperty(\"db_employee_delete\"), id +\"\"); \r\n\t\t} catch (SQLException ex) {\r\n System.out.println(ex.toString());\r\n }\t\r\n\t}", "private void removeExemplar(Exemplar ex){\n\n /* remove from the general list */\n if(m_Exemplars == ex){\n m_Exemplars = ex.next;\n if(m_Exemplars != null)\n\tm_Exemplars.previous = null;\n\t\n } else {\n ex.previous.next = ex.next;\n if(ex.next != null){\n\tex.next.previous = ex.previous;\n }\n }\n ex.next = ex.previous = null;\n\n /* remove from the class list */\n if(m_ExemplarsByClass[(int) ex.classValue()] == ex){\n m_ExemplarsByClass[(int) ex.classValue()] = ex.nextWithClass;\n if(m_ExemplarsByClass[(int) ex.classValue()] != null)\n\tm_ExemplarsByClass[(int) ex.classValue()].previousWithClass = null;\n\t\n } else {\n ex.previousWithClass.nextWithClass = ex.nextWithClass;\n if(ex.nextWithClass != null){\n\tex.nextWithClass.previousWithClass = ex.previousWithClass;\n }\n }\n ex.nextWithClass = ex.previousWithClass = null;\n }", "public void removeFirst() \r\n\t{\r\n\t\tint position = 1;\r\n\t\tif ( this.isEmpty() || position > numItems || position < 1 )\r\n\t\t{\r\n\t\t\tSystem.out.print(\"This delete can not be performed \"+ \"an element at position \" + position + \" does not exist \" );\r\n\t\t}\r\n\t\tfor (int i=position-1; i< numItems-1; i++)\r\n\t\t\tthis.bookArray[i] = this.bookArray[i+1];\r\n\t\t\tthis.bookArray[numItems-1] = null;\r\n\t\t\tnumItems--;\r\n\t\t\tSystem.out.println(\"DELETED first book from the Array \\n\");\r\n\t\t\r\n\t\t\treturn ;\r\n\t}", "@Override\n\tpublic String deleteEmp(int eid) {\n\t\treturn eb.deleteEmp(eid);\n\t}", "void removeHadithBookNo(Object oldHadithBookNo);", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public void deleteUlIdPerson()\r\n {\r\n this._has_ulIdPerson= false;\r\n }", "@Override\r\n\tpublic void removeFromElement(Student student) {\n\t\t// Add your implementation here\r\n\t\tif (student == null)\r\n\t\t\tthrow new IllegalArgumentException(\"Null student object detected\");\r\n\r\n\t\tint index = getStudentIndex(student);\r\n\r\n\t\t/*\r\n\t\t * if(index >= 0) { this.students[index] = null; }\r\n\t\t */\r\n\r\n\t\t\r\n\t\tStudent[] students1 = new Student[this.students.length - 1];\r\n\r\n\t\tint i = 0;\r\n\t\tint x = 0;\r\n\t\twhile (i < students.length) {\r\n\t\t\tif (i == index) {\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\r\n\t\t\tstudents1[x] = students[i];\r\n\t\t\ti++;\r\n\t\t\tx++;\r\n\t\t}\r\n\r\n\t\tthis.students = students1;\r\n\t}", "public Builder clearEmployee() {\n if (employeeBuilder_ == null) {\n employee_ = null;\n onChanged();\n } else {\n employee_ = null;\n employeeBuilder_ = null;\n }\n\n return this;\n }", "public Builder clearEmployee() {\n if (employeeBuilder_ == null) {\n employee_ = null;\n onChanged();\n } else {\n employee_ = null;\n employeeBuilder_ = null;\n }\n\n return this;\n }", "public void removeJob(int jNo);", "@Override\n\tpublic void deleteEmpByID(int employeeID) {\n\t\temployeeRepository.deleteById(employeeID);\n\t}", "public void remove() {\n\n }", "public Employee pop() {\n if (isEmpty()) {\n throw new EmptyStackException();\n }\n /*top always contains the index of next available position in the array so, there is nothing at top.\n The top item on the stack is actually stored at top-1\n */\n Employee employee = stack[--top];\n stack[top] = null; //assign removed element position to null\n return employee; // return the removed element\n }", "public Object remove();", "@Override\n\tpublic void removeEmpContactDetail(int id) {\n\t\tEmpContactDetail ecd = (EmpContactDetail) template.get(EmpContactDetail.class, new Integer(id));\n\t\tif (null != ecd) {\n\t\t\ttemplate.delete(ecd);\n\t\t}\n\t}", "public E remove(int index);", "@Override\n\tpublic void removeBycreateBy(long createBy) throws SystemException {\n\t\tfor (EmployeeComplaint employeeComplaint : findBycreateBy(createBy,\n\t\t\t\tQueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {\n\t\t\tremove(employeeComplaint);\n\t\t}\n\t}", "@Override\r\n\tpublic int deleteByExample(EmpExample example) {\n\t\treturn 0;\r\n\t}", "public T remove (T element);", "E remove(int i) throws IndexOutOfBoundsException;", "public void remove(Student s1){\r\n this.studentList.remove(s1);\r\n }", "public long removeEmployerFromDb(String employer){\n \tString selection = Employers.COLUMN_NAME_TITLE + \" LIKE ?\";\n \t\n \t// Specify arguments in placeholder order.\n \tString[] selectionArgs = { employer };\n \t\n \t// Issue SQL statement.\n \treturn db.delete(Employers.TABLE_NAME, selection, selectionArgs);\n\t}", "@Override\n\tpublic EmployeeComplaint remove(long employeeComplaintId)\n\t\tthrows NoSuchEmployeeComplaintException, SystemException {\n\t\treturn remove((Serializable)employeeComplaintId);\n\t}", "public static HashSet<Employee> remove(int id, HashSet<Employee> removedList) {\n\n\t\tEmployee emp = null;\n\t\t\n\t\tHashSet<Employee> removedLists = removedList;\n\t\t\n\t\tfor (Employee emps : removedLists) {\n\n\t\t\temp=new Employee();\n\t\t\tif (id == emps.getEmpId()) {\n\t\t\t\t\n\t\t\t\n\t\t\t\temp.setEmpId(emps.getEmpId());\n\t\t\t\temp.setEmpName(emps.getEmpName());\n\t\t\t\temp.setEmpAge(emps.getEmpAge());\n\t\t\t\temp.setEmpSalary(emps.getEmpSalary());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\n\t//\tremovedLists.remove(value);\n\t\tremovedLists.remove(emp);\n\t\treturn removedLists;\n\n\t}", "public static void deleteContact() {\n System.out.println(\"Enter first name : \");\n String firstName = sc.nextLine();\n for (int i = 0; i < list.size(); i++) {\n if (list.get(i).getFirstName().equalsIgnoreCase(firstName)) {\n list.remove(i);\n } else {\n System.out.println(\"No data found\");\n }\n }\n }" ]
[ "0.6821337", "0.66473645", "0.6518612", "0.6393727", "0.6345462", "0.6333066", "0.63294333", "0.6294809", "0.6286614", "0.6286532", "0.62251544", "0.62114227", "0.61914873", "0.60786533", "0.60682327", "0.6067314", "0.6046104", "0.6012683", "0.60080624", "0.5996201", "0.5982081", "0.59752256", "0.596939", "0.5921625", "0.5900295", "0.5883345", "0.5876588", "0.5794311", "0.57585055", "0.57496", "0.5742652", "0.57229984", "0.5717126", "0.5699559", "0.569781", "0.5695386", "0.5675716", "0.5668133", "0.5663796", "0.5661488", "0.56536853", "0.5649398", "0.56484926", "0.5646198", "0.56388813", "0.5631712", "0.5628714", "0.5626228", "0.5625246", "0.5611976", "0.5609293", "0.5609293", "0.5608256", "0.559562", "0.5581712", "0.5578281", "0.5568867", "0.5567937", "0.55609834", "0.5556835", "0.5555199", "0.55546904", "0.5548495", "0.55372846", "0.5536573", "0.5536076", "0.5532941", "0.5530626", "0.5529657", "0.5529645", "0.55245614", "0.5521037", "0.5515369", "0.55123264", "0.55104953", "0.55096817", "0.55096817", "0.55096817", "0.55096817", "0.55096817", "0.5509003", "0.55058557", "0.5502691", "0.5502691", "0.5501756", "0.5499171", "0.5496864", "0.5494494", "0.54895353", "0.54865324", "0.5481998", "0.5467301", "0.5461523", "0.54597783", "0.5458397", "0.5456457", "0.54513043", "0.5446502", "0.5441239", "0.5440434" ]
0.7303897
0
//BASIC QUERIES//// / ensure Result == name
public String getName() { return name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Query query();", "List<E> queryAll(String namedQuery);", "String query();", "public void namedQuery(String name) throws HibException;", "public abstract DbQuery getQuery(String queryName);", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "java.lang.String getQueryName();", "ResultSet searchName(String name) {\n \ttry {\n \t\tStatement search = this.conn.createStatement();\n \tString query = \"SELECT * FROM Pokemon WHERE Name = \" + \"'\" + name + \"'\";\n \t\n \treturn search.executeQuery(query);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n }", "SparqlResultObject callSelectQuery(String name, Map<String, String> params);", "String queryInformation(String tableName,String queryname){\n Connection con = GetDBConnection.connectDB(\"booklibrarymanager\",\"root\",\"HanDong85\");\n String tar;\n if(tableName.equals(\"authorinformation\"))\n tar = \"author\";\n else if(tableName.equals(\"classificationinformation\"))\n tar = \"classification\";\n else tar = \"press\";\n String sql = \"select \" + tar + \"Id\" + \" from \" + tableName + \" where \";\n if(tableName.equals(\"authorinformation\"))\n sql += \"authorName = ?;\";\n else if(tableName.equals(\"classificationinformation\"))\n sql += \"classifcationName = ?;\";\n else sql += \"pressName = ?;\";\n System.out.println(sql);\n PreparedStatement preSQL;\n try{\n preSQL = con.prepareStatement(sql);\n preSQL.setString(1,queryname);\n ResultSet rs = preSQL.executeQuery();\n rs.beforeFirst();\n if(rs.next()){\n String ans = rs.getString(1);\n GetDBConnection.closeCon(con);\n return ans;\n }\n else{\n GetDBConnection.closeCon(con);\n return ERROR_TIP;\n }\n }\n catch (SQLException e){\n GetDBConnection.closeCon(con);\n return ERROR_TIP;\n }\n }", "@Test\n public void testQuery() {\n DataSetArgument lArgs = new DataSetArgument();\n lArgs.add( \"aMsgId\", \"100\" );\n\n QuerySet lQs = QuerySetFactory.getInstance()\n .executeQuery( \"com.mxi.mx.integration.query.process.LookupQueueId\", lArgs );\n\n Assert.assertEquals( \"Row Count\", 1, lQs.getRowCount() );\n\n lQs.next();\n\n Assert.assertEquals( \"Queue Id\", 1000, lQs.getInt( \"queue_id\" ) );\n }", "public interface IDBQuery {\n String query();\n}", "public QueryResult<T> getResult();", "private Object query(JSONObject jo, String query) {\r\n try {\r\n String[] keys = query.split(\"\\\\.\");\r\n Object r = queryHelper(jo, keys[0]);\r\n for (int i = 1; i < keys.length; i++) {\r\n r = queryHelper(jo.fromObject(r), keys[i]);\r\n }\r\n return r;\r\n } catch (JSONException e) {\r\n return \"\";\r\n }\r\n }", "Object executeQuery(String sparqlQuery);", "private QueryResults query(String queryName, Object[] args) {\n Command command = CommandFactory.newQuery(\"persons\", queryName, args);\n String queryStr = template.requestBody(\"direct:marshall\", command, String.class);\n\n String json = template.requestBody(\"direct:test-session\", queryStr, String.class);\n ExecutionResults res = (ExecutionResults) template.requestBody(\"direct:unmarshall\", json);\n return (QueryResults) res.getValue(\"persons\");\n }", "static ResultSet dataOphalen(String querry) {\n //declaratie anders kan er niks worden gereturnt\n ResultSet rs = null;\n try {\n Statement stmt = connectieMaken().createStatement(); //\n rs = stmt.executeQuery(querry);\n } catch (SQLException se) {\n se.printStackTrace();\n }\n return rs;\n }", "public abstract Statement queryToRetrieveData();", "public ResultSet query(String sQLQuery) throws SQLException {\n\t Statement stmt = c.createStatement();\n\t ResultSet ret = stmt.executeQuery(sQLQuery);\n\t stmt.close();\n\t return ret;\n\t}", "public void queryByName1(String name1) {\n\t\tNAME1 = name1;\n\t}", "public void Query() {\n }", "private void runQuery(QueryTerm qt, String name) {\n\t\tqt.setInferred(false);\n\t\tRDFQuery q = new RDFQuery(qt);\n\t\tSystem.out.println(\"=== \"+name+\" ===\\n* OBD Query:\\n \"+qt);\n\t\tSystem.out.println(\"\\n* Autogenerated SPARQL:\\n \"+q.toSPARQL()+\"\\n\\n\");\n\t\tfor (Node n : this.shard.getNodesByQuery(qt)){\n\t\t\tSystem.out.println(\"Node: \" + n.toString());\n\t\t}\n\t\n\t}", "QueryKey createQueryKey(String name);", "public ResultSet retrivecompname(String compname)throws Exception {\n\trs=DbConnect.getStatement().executeQuery(\"select compname from company where comp_id=\"+compname+\"\");\r\n\treturn rs;\r\n}", "Object callQuery(String name, Map<String, String> params);", "Query queryOn(Connection connection);", "public boolean searchCertainItem(String itemname, String tableName)\n {\n String selectStr;\n ResultSet rs;\n try{\n\n selectStr=\"SELECT \"+itemname+\" FROM \"+tableName;\n rs = stmt.executeQuery(selectStr);\n\n while (rs.next())\n {\n return true;\n }\n }catch(Exception e){\n System.out.println(\"Error occurred in searchLogin\");\n }\n\n return false;\n\n }", "WorldUps.UQuery getQueries(int index);", "public void testUsingQueriesFromQueryManger(){\n\t\tSet<String> names = testDataMap.keySet();\n\t\tUtils.prtObMess(this.getClass(), \"atm query\");\n\t\tDseInputQuery<BigDecimal> atmq = \n\t\t\t\tqm.getQuery(new AtmDiot());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> bdResult = \n\t\t\t\tatmq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(bdResult);\n\n\t\tUtils.prtObMess(this.getClass(), \"vol query\");\n\t\tDseInputQuery<BigDecimal> volq = \n\t\t\t\tqm.getQuery(new VolDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> dbResult = \n\t\t\t\tvolq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(dbResult);\n\t\n\t\tUtils.prtObMess(this.getClass(), \"integer query\");\n\t\tDseInputQuery<BigDecimal> strikeq = \n\t\t\t\tqm.getQuery(new StrikeDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> strikeResult = \n\t\t\t\tstrikeq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(strikeResult);\n\t\n\t}", "public abstract ResultList executeQuery(DatabaseQuery query);", "public void createQuery(String s) throws HibException;", "public abstract ResultList executeSQL(RawQuery rawQuery);", "java.lang.String getQ();", "Future<Map<String, Object>> computeQueryResult(Request request) {\n String query = request.getParam(\"q\");\n Map<String, String> results = new HashMap<String, String>();\n results.put(\"a\", \"1\");\n results.put(\"b\", \"2\");\n results.put(\"c\", \"3\");\n results.put(\"d\", \"4\");\n results.put(\"e\", \"5\");\n\n Map<String, Object> result = new HashMap<String, Object>();\n result.put(\"query\", query);\n result.put(\"numResults\", \"5\");\n result.put(\"results\", results);\n result.put(\"user\", \"Bob\");\n result.put(\"timestamp\", \"Thu, 19 May 2016 00:00:00 +00:00\");\n return Future.value(result);\n }", "java.lang.String getResult();", "com.google.protobuf.ByteString getQueryNameBytes();", "String getRetrieveKeysQuery();", "java.lang.String getQueryLogicName();", "Object executeSelectQuery(String sql) { return null;}", "public List queryTestName(String name) {\n\t\tthis.init();\n\t\tList list = null;\n\t\t try {\n\t\t\t list= sqlMap.queryForList(\"selectTestByUsername\",name);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t\treturn list;\n\t}", "public void query()\n\t{\n\t\tJSONObject queryInfo = new JSONObject();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tqueryInfo.put(\"type\", \"query\");\n\t\t\t\n\t\t\tos.println(queryInfo.toString());\n\t\t\tos.flush();\n\t\t\t\n\t\t\tSystem.out.println(\"send query request : \" + queryInfo.toString());\n\t\t}\n\t\tcatch (JSONException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\r\n\tpublic Admins getQueryByName(String aname) {\n\t\treturn adi.queryByName(aname);\r\n\t}", "public List<Record> executeNativeFinder(String queryName, Object context);", "public abstract String createQuery();", "String getQuery() throws RemoteException;", "@Transactional(propagation=Propagation.SUPPORTS,readOnly=true)\r\n\tpublic Music queryByName(String name) {\n\t\tMusic music = musicdao.selectByName(name);\r\n\t\treturn music;\r\n\t}", "void contactQueryResult(String queryId, Contact contact);", "IQuery getQuery();", "Result getResult();", "public ResultSet getResults(String name,int task_type)\n {\n //Error checking for task_type being a valid number. \n if (task_type < 0 || task_type > 2)\n {\n System.out.println(\"Error in SQLConnect.java.getResults() -- task_type must be 0, 1, or 2\");\n return null;\n }\n \n try {\n //creates a connection and statement and query to get the result set\n Connection con = this.ConnectDB();\n Statement stmt = con.createStatement();\n String query = \"SELECT * FROM TASKS WHERE NAME = '\"+name+\"' AND TASKTYPE = '\"+task_type+\"'\";\n \n return stmt.executeQuery(query);\n } catch (SQLException ex) {\n Logger.getLogger(SQLConnect.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return null;\n }", "public interface Query {\n\n\t/**\n\t * @return ID of the given query\n\t */\n\tint queryID();\n\t\n\t/**\n\t * @return given query\n\t */\n\tString query();\n\t\n\t/**\n\t * @return list of relevant documents to the corresponding query\n\t */\n\tList<RelevanceInfo> listOfRelevantDocuments();\n\t\n\t/**\n\t * @return list of results to the corresponding query after running one of the retrieval models\n\t */\n\tList<Result> resultList();\n\t\n\t/**\n\t * @param resultList\n\t * @Effects adds results to the result list of the corresponding query\n\t */\n\tvoid putResultList(List<Result> resultList);\n}", "<Q, R> CompletableFuture<QueryResponseMessage<R>> query( QueryMessage<Q, R> query );", "List<Item> findByName(String name);", "public static String getQueryValue(String name) {\n String result = null;\n Map<String, ArrayList<String>> query = getQuery();\n\n if (query != null) {\n result = query.get(name).get(0);\n }\n\n return result;\n }", "protected abstract <T extends Group> T doSelectByName(String name, Connection con)\n throws NoRowsException, TooManyRowsException, TorqueException;", "public void executeQuery(String q) throws HiveQueryExecutionException;", "@Override\r\n public QueryResult.ResultQ1[] functionQ1() {\r\n QueryResult.ResultQ1[] res=null;\r\n ArrayList<QueryResult.ResultQ1> re=new ArrayList<QueryResult.ResultQ1>();\r\n String q = \"SELECT b.isbn,b.first_publish_year,p.publisher_id,p.publisher_name FROM book b, publisher p WHERE p.publisher_id = b.publisher_id AND b.page_count = (SELECT max(bo.page_count) FROM book bo ) ORDER BY b.isbn ASC\";\r\n try {\r\n Statement s = this.connection.createStatement();\r\n ResultSet r = s.executeQuery(q);\r\n while(r.next()){\r\n String is = r.getString(\"isbn\");\r\n String fpy= r.getString(\"first_publish_year\");\r\n int pc= r.getInt(\"publisher_id\");\r\n String pn=r.getString(\"publisher_name\");\r\n QueryResult.ResultQ1 qq = new QueryResult.ResultQ1(is,fpy,pc,pn);\r\n re.add(qq);\r\n \r\n \r\n }\r\n res=re.toArray(new QueryResult.ResultQ1[0]);\r\n s.close();\r\n \r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n \r\n return res;\r\n }", "public Query getQuery ()\n {\n\n\treturn this.q;\n\n }", "public void performQuack(){\n qb.quack();\n }", "private static void executeQuery4(PersistenceManager pm) {\n Query query = pm.newQuery(Category.class);\n query.declareParameters(\"int length\");\n query.declareVariables(\"Item item\");\n query.setFilter(\n \"elements.contains(item) && item.name.length() <= length\");\n Collection results = (Collection)query.execute(new Integer(10));\n printCollection(\"Categories containing an item with a short name: \",\n results.iterator());\n query.closeAll();\n }", "@Override\n\tpublic List<Patient> query_Name() {\n\t\tList<Patient> list = dd.query_Name();\n\t\tsqlSession.close();\n\t\treturn list;\n\t}", "@Override\n\tpublic <T> TypedQuery<T> createQuery(String qlString, Class<T> resultClass) {\n\t\treturn null;\n\t}", "public abstract Set<String> getQueryNames();", "Boolean callAskQuery(String name, Map<String, String> params);", "public void setResult(String name) {\r\n DatabaseField returnField = (DatabaseField)getParameters().get(0);\r\n returnField.setName(name);\r\n }", "@Override\n\tpublic <T> TypedQuery<T> createNamedQuery(String name, Class<T> resultClass) {\n\t\treturn null;\n\t}", "String getObjectCheckSql(String name);", "public Items[] findWhereNameEquals(String name) throws ItemsDaoException;", "ArrayList<HashMap<String,Object>> processQueryResult(Object result,String collectionName) {\n ArrayList<Map<String,Object>> rawRows = parseQueryResult(result);\n if (rawRows == null || rawRows.size()==0) return null;\n ArrayList<HashMap<String,Object>> resultRows = new ArrayList<>();\n for (Map<String,Object> rawRow: rawRows) {\n HashMap<String,Object> resultRow = processQueryResultRow(rawRow,collectionName);\n if (resultRow.size()>0) resultRows.add(resultRow);\n }\n return resultRows;\n }", "public interface MySQLDBQuery {\n\n\tString QUERY_ADD_SLOT = \"insert into slot (s_size) values (?)\";\n\tString QUERY_FIND_SLOT = \"select s_id, s_size, s_covered from slot where s_size = ? and s_covered = ? and s_id not in (select s_id from slot_has_vehicle) limit 1\";\n\tString QUERY_GET_SLOT_STATISTICS = \"select count(1) as all_slot, (select count(1) from slot where s_covered > 0) as reserve_slot from slot\";\n\tString QUERY_GET_FIND_A_SLOT = \"select s_id, s_size, s_covered from slot where s_id = ?\";\n\tString QUERY_FREE_SLOT_RESERVATION = \"update slot_has_vehicle set sl_end = now() where sl_id = ?\";\n\tString QUERY_OCCUPY_A_SLOT = \"insert into slot_has_vehicle (s_id, v_id) values (?,?)\";\n\tString QUERY_GET_SLOT_RESERVATION_BY_ID = \"select sl_id, s_id, v_id, sl_start, sl_end from slot_has_vehicle where sl_id = ?\";\n\tString QUERY_FIND_SLOT_OCCUPIED_BY_VEHICLE = \"select sl_id, s_id, v_id, sl_start, sl_end from slot_has_vehicle where v_id = (select v_id from vehicle where v_reg_num = ?) and sl_end IS NULL\";\n\tString QUERY_GET_VEHICLE_BY_REG_NUMBER = \"select v_id, v_reg_num, v_type from vehicle where v_reg_num=?\";\n\tString QUERY_CREATE_A_VEHICLE = \"insert into vehicle (v_reg_num, v_type) values (?,?)\";\n\tString QUERY_DELETE_SLOT_RESERVATION = \"delete from slot_has_vehicle where sl_id=?\";\n}", "public ResultSet getCertainRow(String itemname, String tableName, String columnName)\n {\n\n String selectStr;\n ResultSet rs=null;\n String itemn=\"%\"+itemname+\"%\";\n\n try{\n\n selectStr=\"SELECT * FROM \"+tableName+\" WHERE \"+ columnName+\" LIKE \"+quotate(itemn);\n rs = stmt.executeQuery(selectStr);\n\n\n\n\n\n }catch(Exception e){\n System.out.println(\"Error occurred in searchLogin\");\n }\n\n return rs;\n }", "private SeqIter query(final int db, final int qu) throws Exception {\r\n final int size = qressizes[db * nqueries + qu];\r\n final double qtime = qt[db * nqueries + qu];\r\n \r\n if(size == 0) return new SeqIter();\r\n \r\n // query and cache result\r\n final String que = XQM + \"for $i score $s in \" +\r\n queries.get(qu) + \" order by $s descending \" +\r\n \"return (basex:sum-path($i), $s, base-uri($i))\";\r\n \r\n final Process proc = new XQuery(que);\r\n final CachedOutput res = new CachedOutput();\r\n if(session.execute(proc)) session.output(res);\r\n \r\n final SeqIter sq = new SeqIter();\r\n final StringTokenizer st = new StringTokenizer(res.toString(), \" \");\r\n String lp = \"\";\r\n int z = 0;\r\n while(st.hasMoreTokens() && z < size) {\r\n qtimes[qu] += qtime;\r\n final String p = st.nextToken();\r\n if(!st.hasMoreTokens()) break;\r\n final String s = st.nextToken();\r\n if(!st.hasMoreTokens()) break;\r\n String uri = st.nextToken();\r\n //while(uri.indexOf(\".xml\") == -1) uri = st.nextToken();\r\n uri = uri.substring(uri.lastIndexOf('/') + 1);\r\n final String tmp = uri + \";\" + p;\r\n if(!lp.equals(tmp)) {\r\n final Str str = Str.get(token(uri + \";\" + p));\r\n str.score(Double.parseDouble(s));\r\n sq.add(str);\r\n lp = tmp;\r\n }\r\n z++;\r\n }\r\n \r\n Main.outln(\"Query % on %: %\", qu + 1, databases.get(db), qtime);\r\n return sq;\r\n }", "boolean hasQueryName();", "private void testUserName(){\r\n\t\t//get user with the 'test' userName\r\n\t\tString command = \"SELECT userName FROM users \"\r\n\t\t\t\t+ \"WHERE userName = \\\"\" + commandList.get(1) + \"\\\";\";\r\n\t\tSystem.out.println(command);//print command\r\n\t\ttry {//send command\r\n\t\t\trs = stmt.executeQuery(command);\r\n\t\t\t\r\n\t\t\tif(rs.next()){//if it returns user, userName exists\r\n\t\t\t\tout.println(\"exists\");\r\n\t\t\t} else {//no results returned, empty\r\n\t\t\t\tout.println(\"free\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\tout.println(e.getMessage());//send back error message\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "private List<FollowItem> query(String sql)\r\n {\r\n DbManager db=new DbManager();\r\n ResultSet rs=null;\r\n List<FollowItem> list=new ArrayList<FollowItem>();\r\n rs = db.getRs(sql);\r\n try {\r\n while(rs.next())\r\n {\r\n FollowItem followItem = new FollowItem();\r\n followItem.setUserId(rs.getInt(\"UserID\"));\r\n followItem.setListingId(rs.getInt(\"ListingID\"));\r\n \r\n list.add(followItem);\r\n }\r\n } catch (SQLException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n } finally{\r\n db.destory();\r\n }\r\n return list;\r\n }", "QueryType createQueryType();", "public static List<Book> searchEBookByName(String name) throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n\r\n Query query = session.getNamedQuery(\"INVENTORY_searchBookByName\").setString(\"name\", name);\r\n\r\n List<Book> resultList = query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return resultList;\r\n \r\n }", "public static ResultSet getSensor(String sensorName) {\n ResultSet rs = null;\n\n try (\n PreparedStatement stmt = conn.prepareStatement(SENSORSQL, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);) {\n stmt.setString(1, sensorName);\n\n rs = stmt.executeQuery();\n\n } catch (SQLException e) {\n System.err.println(e);\n System.out.println(\"Query 2 Issue!!\");\n }\n return rs;\n\n }", "ArrayList<Bet> selectBetsWithResult(Account account, int result) throws DAOException;", "public static void main(String[] args) {\n\t\tSession s2=util.getSession();\r\n\t\tQuery qry=s2.getNamedQuery(\"q2\");\r\n\t\t//Query qry=s2.getNamedQuery(\"q3\");\r\n\t\t//qry.setInteger(0, 50);\r\n\t\tList<Object[]> lust=qry.list();\r\n\t\tfor(Object[] row:lust) {\r\n\t\t\tSystem.out.println(Arrays.toString(row));\r\n\t\t}\r\n\t\tSystem.out.println(\"Completed\");\r\n\t}", "private Collection<Record> getResults(SimpleSurnameAndPostcodeQuery query) {\n\t\treturn search(query);\n\t}", "public boolean searchCertainItem(String itemname, String tableName, String columnName)\n {\n String selectStr;\n ResultSet rs;\n try{\n\n selectStr=\"SELECT \"+itemname+\" FROM \"+tableName+\" WHERE \"+ columnName+\" = \"+quotate(itemname);\n rs = stmt.executeQuery(selectStr);\n\n while (rs.next())\n {\n return true;\n }\n }catch(Exception e){\n System.out.println(\"Error occurred in searchLogin\");\n }\n\n return false;\n\n }", "@Override\n public void query(Connection c, SQLEngine engine, Record val, ImmutableList.Builder<Record> result) throws DataException {\n \n Variant varcat = val.get(\"TABLE_CAT\");\n String cat = Variants.isNull(varcat) ? null : varcat.asString();\n \n Variant varschem = val.get(\"TABLE_SCHEM\");\n String schem = Variants.isNull(varschem) ? null : varschem.asString();\n \n Variant varname = val.get(\"TABLE_NAME\");\n String name = Variants.isNull(varname) ? null : varname.asString();\n \n Variant vartype = val.get(\"TABLE_TYPE\");\n String[] tabletypes = Variants.isNull(vartype) ? TABLE_TYPES : new String[]{ vartype.asString() };\n\n try (ResultSet resultset = c.getMetaData().getTables(cat, schem, name, tabletypes)) {\n while (resultset.next()) {\n result.add(read(resultset, val));\n } \n } catch (SQLException ex) {\n throw new DataException(ex);\n }\n }", "private List<Map<String, PrimitiveTypeProvider>> executeQuery(QueryMessage qm) {\r\n ListenableFuture<QueryResultsMessage> f = this.adampro.standardQuery(qm);\r\n QueryResultsMessage result;\r\n try {\r\n result = f.get();\r\n } catch (InterruptedException | ExecutionException e) {\r\n LOGGER.error(LogHelper.getStackTrace(e));\r\n return new ArrayList<>(0);\r\n }\r\n\r\n if (result.getAck().getCode() != AckMessage.Code.OK) {\r\n LOGGER.error(result.getAck().getMessage());\r\n }\r\n\r\n if (result.getResponsesCount() == 0) {\r\n return new ArrayList<>(0);\r\n }\r\n\r\n QueryResultInfoMessage response = result.getResponses(0); // only head (end-result) is important\r\n\r\n List<QueryResultTupleMessage> resultList = response.getResultsList();\r\n return resultsToMap(resultList);\r\n }", "public void listBooksByName(String name) {\n String sql = \"SELECT ISBN, BookName, AuthorName, Price \" +\n \"FROM books \" +\n \"WHERE BookName = ?\";\n\n try (Connection conn = this.connect();\n PreparedStatement pstmt = conn.prepareStatement(sql)) {\n\n // Set values\n pstmt.setString(1, name);\n\n ResultSet rs = pstmt.executeQuery();\n\n // Print results\n while(rs.next()) {\n System.out.println(rs.getInt(\"ISBN\") + \"\\t\" +\n rs.getString(\"BookName\") + \"\\t\" +\n rs.getString(\"AuthorName\") + \"\\t\" +\n rs.getInt(\"Price\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public void customerQuery(){\n }", "public static String getKeyQuery(String queryString, String name) {\n\tMatcher m = FROM_PATTERN.matcher(queryString);\n\tif (m.find()) {\n\t StringBuilder sb = new StringBuilder(\"SELECT \");\n\t sb.append(getAlias(queryString));\n\t sb.append(\".\");\n\t sb.append(name);\n\t sb.append(\" \");\n\t sb.append(m.group());\n\t return sb.toString();\n\t}\n\n\treturn null;\n }", "List<Cemetery> search(String query);", "String getBarcharDataQuery();", "public String getResult(){\n \tString result = \"OK\";\n System.out.print(this.mainQuery);\n Query query = QueryFactory.create(this.mainQuery);\n Query querycount = QueryFactory.create(this.countQuery);\n //System.out.println(this.countQuery);\n QueryExecution qexecCount = QueryExecutionFactory.create(querycount, Initialisation.getModel());\n QueryExecution qexec = QueryExecutionFactory.create(query, Initialisation.getModel());\n try{\n \torg.apache.jena.query.ResultSet results = qexec.execSelect();\n //////////////////////////\n org.apache.jena.query.ResultSet resultsCount = qexecCount.execSelect();\n \tint compteur = 0;\n while (resultsCount.hasNext()){\n QuerySolution soln = resultsCount.nextSolution();\n compteur = soln.getLiteral(\"count\").getInt();\n }\n //System.out.println(\"Compteur = \"+compteur );\n if(compteur>1){\n return \"NONE\";\n }\n else if (compteur==0){\n return \"NF\";\n }\n /////////////////////////\n \twhile (results.hasNext()){\n \t\tcompteur++;\n \t\tQuerySolution soln = results.nextSolution();\n \t\tLiteral title = soln.getLiteral(\"label\");\n \t\tLiteral comment = soln.getLiteral(\"comment\");\n \t\tthis.title = title.getString().replace(\"-\",\" \");\n \t\ttry{\n \t\tthis.comment = comment.getString();\n \t\t}\n \t\tcatch(NullPointerException e){\n \t\t\tthis.comment = \"There is not any summary available for this film.\";\n \t\t}\n \t}\n\n }\n finally{\n \tqexec.close();\n }\n \n return result;\n }", "String getRetrieveResourceQuery();", "@Override\n\tpublic List<Orders> queryOrderOfName(String name) throws SQLException {\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet result = null;\n\t\tList<Orders> messages=null;\n\t\ttry{\n\t\t\tconn = DBCPUtils.getConnection();\n\t\t\tstmt = conn.prepareStatement(\"SELECT * FROM orders WHERE orderName=?\");\n\t\t\tstmt.setString(1, name);\n\t\t\tresult = stmt.executeQuery();\n\t\t\tmessages=new ArrayList<Orders>();\n\t\t\twhile (result.next()) {\n\t\t\t\tOrders order=new Orders();\n\t\t\t\torder.setOrderId(result.getInt(1));\n\t\t\t\torder.setOrderName(result.getString(2));\n\t\t\t\torder.setOrderAddress(result.getString(3));\n\t\t\t\torder.setOrderPhone(result.getString(4));\n\t\t\t\torder.setOrderNumber(result.getInt(5));\n\t\t\t\torder.setOrderTime(result.getString(6));\n\t\t\t\torder.setBookName(result.getString(7));\n\t\t\t\torder.setOrderMemo(result.getString(8));\n\t\t\t\tmessages.add(order);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tDBCPUtils.releaseConnection(conn, stmt, result);\n\t\t}\n\t\treturn messages;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic HashSet<String> queryOnlineResource(String query) {\n\t\treturn new HashSet<String>();\r\n\t}", "public List findByNamedQuery(String queryName);", "public ResultSet query (String query) throws java.sql.SQLException {\n /*\n if (query.indexOf('(') != -1)\n Logger.write(\"VERBOSE\", \"DB\", \"query(\\\"\" + query.substring(0,query.indexOf('(')) + \"...\\\")\");\n else\n Logger.write(\"VERBOSE\", \"DB\", \"query(\\\"\" + query.substring(0,20) + \"...\\\")\");\n */\n Logger.write(\"VERBOSE\", \"DB\", \"query(\\\"\" + query + \"\\\")\");\n \n try {\n Statement statement = dbConnection.createStatement();\n statement.setQueryTimeout(30);\n ResultSet r = statement.executeQuery(query);\n return r;\n } catch (java.sql.SQLException e) {\n Logger.write(\"RED\", \"DB\", \"Failed to query database: \" + e);\n throw e;\n }\n }", "void runQueries();", "<K, R extends IResponse> R query(IQueryRequest<K> queryRequest);" ]
[ "0.6453237", "0.6128517", "0.60037667", "0.5993458", "0.5972398", "0.59042126", "0.59034175", "0.59034175", "0.59027183", "0.59027183", "0.5891623", "0.58664334", "0.5855787", "0.57842064", "0.57325983", "0.5641816", "0.5635817", "0.56268156", "0.55998224", "0.55637246", "0.5526152", "0.54933417", "0.54876083", "0.5483184", "0.54784197", "0.54762197", "0.5476067", "0.5469769", "0.54532236", "0.5451255", "0.54188293", "0.54154766", "0.539157", "0.53882945", "0.5382807", "0.5382295", "0.5374643", "0.5366222", "0.53598225", "0.5359282", "0.5347014", "0.53408307", "0.5337242", "0.5336472", "0.5330562", "0.53252137", "0.53207934", "0.53204", "0.531232", "0.5303222", "0.52930176", "0.52908534", "0.5288875", "0.52736187", "0.52720535", "0.5270026", "0.5261275", "0.5259892", "0.5233256", "0.5222647", "0.52225953", "0.52200806", "0.5215669", "0.5211475", "0.5208673", "0.5199363", "0.51959777", "0.51941645", "0.5191672", "0.5183514", "0.5183013", "0.51768565", "0.51673734", "0.51630193", "0.5159764", "0.5159257", "0.51469535", "0.5136699", "0.5134305", "0.5130549", "0.51290745", "0.5125368", "0.5123486", "0.5120401", "0.51167107", "0.51158696", "0.51146084", "0.5114592", "0.51121724", "0.51101536", "0.51068103", "0.51054156", "0.51049864", "0.5104306", "0.51013505", "0.51012826", "0.51007575", "0.50983536", "0.5097555", "0.50911415", "0.5088771" ]
0.0
-1
/ ensure Result == events
public AbstractList<Event> getEvents() { return (AbstractList<Event>) events; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onResult(int ret);", "private void execute() {\n this.waitForFinish();\n this.stop();\n logger.info(\"Finished eventing test {}\", this.getClass().getSimpleName());\n Event currentEvent = null;\n Map<Long, Integer> orderVerifyMap = new HashMap<Long, Integer>();\n while((currentEvent =eventRecievedList.poll()) != null)\n {\n \tInteger index = (Integer)currentEvent.getProperty(\"index\");\n \tLong threadId = (Long)currentEvent.getProperty(\"thread\");\n\n \tif(index != null && threadId != null){\n \t\tInteger previousIndex = orderVerifyMap.get(threadId);\n \t\tif(previousIndex == null)\n \t\t{\n \t\t\tif(index != 0)\n \t\t\t{\n \t\t\t\tSystem.out.println(\"Event \" + index + \" recieved first for thread \" + threadId);\n \t\t\t}\n \t\t\torderVerifyMap.put(threadId, index);\n \t\t}\n \t\telse\n \t\t{\n \t\t\tif(previousIndex > index)\n \t\t\t{\n \t\t\t\tSystem.out.println(\"Events for thread \" + threadId + \" out of order. Event \" + previousIndex + \" recieved before \" + index);\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\torderVerifyMap.put(threadId, index);\n \t\t\t}\n \t\t}\n \t}\n }\n try {\n Thread.sleep(15 * 1000);\n } catch (final InterruptedException ie) {\n // ignore\n }\n }", "void onResult(T result);", "void onResult(T result);", "public void onResultConsumed() {\n }", "@Test(timeout = 10000)\n public void testEvents() throws Exception {\n EventReader reader = new EventReader(new DataInputStream(new ByteArrayInputStream(getEvents())));\n HistoryEvent e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(JOB_PRIORITY_CHANGED));\n Assert.assertEquals(\"ID\", getJobid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(JOB_STATUS_CHANGED));\n Assert.assertEquals(\"ID\", getJobid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(TASK_UPDATED));\n Assert.assertEquals(\"ID\", getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_KILLED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(JOB_KILLED));\n Assert.assertEquals(\"ID\", getJobid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_STARTED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_FINISHED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_KILLED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_KILLED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_STARTED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_FINISHED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_KILLED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_KILLED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n reader.close();\n }", "public EventResult(String result) {\n\n }", "public void onResult(boolean[] results, String errorMsg);", "public void onEvent(EventIterator events) {\n\n }", "@Override\n\tpublic void visitEnd() {\n\t\tresultReady = true;\n\t}", "boolean onEvent(Event event);", "@Test\n\tpublic void testExitCodes() throws Exception {\n\t\tJsonEventInfoComparatorTest comparatorTest = new JsonEventInfoComparatorTest();\n\t\tcomparatorTest.setup();\n\t\ttestService.events.add(comparatorTest.farEvent);\n\t\ttestService.events.add(comparatorTest.fartherEvent);\n\t\ttestService.events.add(comparatorTest.closeEvent);\n\t\tJsonEventInfo reference = new JsonEventInfo(comparatorTest.referenceEvent);\n\t\tList<JsonEventInfo> sorted = testAssociator.getSortedNearbyEvents(\n\t\t\t\treference, null);\n\t\tJsonEventInfo good = sorted.get(0);\n\t\tJsonEventInfo bad = sorted.get(2);\n\n\t\t// no events\n\t\tAssert.assertEquals(\"no events\",\n\t\t\t\tEventIDAssociator.EXIT_EVENT_NOT_FOUND,\n\t\t\t\ttestAssociator.getExitCode(new ArrayList<JsonEventInfo>()));\n\t\t// multiple events\n\t\tAssert.assertEquals(\"multiple events\",\n\t\t\t\tEventIDAssociator.EXIT_MULTIPLE_EVENTS_FOUND,\n\t\t\t\ttestAssociator.getExitCode(sorted));\n\t\t// one good event\n\t\tsorted.clear();\n\t\tsorted.add(good);\n\t\tAssert.assertEquals(\"one good event\",\n\t\t\t\tEventIDAssociator.EXIT_SUCCESS,\n\t\t\t\ttestAssociator.getExitCode(sorted));\n\t\t// one bad event\n\t\tsorted.clear();\n\t\tsorted.add(bad);\n\t\tAssert.assertEquals(\"one bad event\",\n\t\t\t\tEventIDAssociator.EXIT_EVENT_NOT_SANE,\n\t\t\t\ttestAssociator.getExitCode(sorted));\n\t}", "@Override\n protected void onPostExecute (ArrayList<Event> result) {\n }", "EventType getEvent();", "public void checkEvents()\n\t{\n\t\t((MBoxStandalone)events).processMessages();\n\t}", "private void checkResults() {\n\t\tif (isOver()) {\n\t\t\tfor (GameListener gameListener : gameListeners) {\n\t\t\t\tgameListener.gameOverCallback();\n\t\t\t}\n\t\t}\n\t}", "void onNext(CorfuStreamEntries results);", "public interface Result {\n public void onResult(Object object, String function, boolean IsSuccess, int RequestStatus, String MessageStatus);\n\n\n\n}", "void onResultCalculated(ResultCalculatedEvent event);", "void onResult(AIResponse result);", "public void testHandleActionEvent_RedoChangesEvent_Accuracy()\n throws Exception {\n setUpEventManager();\n actionManager.undoActions(undoableAction1);\n\n RedoChangesEvent redoChangesEvent = new RedoChangesEvent(undoableAction2, new String());\n //actionManager.undoActions(undoableAction3);\n // Handle the event, actionEventListener1 and actionEventListener2 should be notified\n eventManager.handleActionEvent(redoChangesEvent);\n\n // 'undoableAction1' should be handled\n Pair<RedoChangesEvent, UndoableAction> performRecord\n = new Pair<RedoChangesEvent, UndoableAction>(redoChangesEvent, undoableAction1);\n // actionEventListener1 should not be notified\n assertTrue(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener1).getRedoPerformedRecords().contains(performRecord));\n // actionEventListener2 should be notified\n assertTrue(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener2).getRedoPerformedRecords().contains(performRecord));\n // actionEventListener3 should not be notified\n assertFalse(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener3).getRedoPerformedRecords().contains(performRecord));\n\n // 'undoableAction2' should also be handled\n performRecord = new Pair<RedoChangesEvent, UndoableAction>(redoChangesEvent, undoableAction2);\n // actionEventListener1 should not be notified\n assertFalse(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener1).getRedoPerformedRecords().contains(performRecord));\n // actionEventListener2 should be notified\n assertTrue(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener2).getRedoPerformedRecords().contains(performRecord));\n // actionEventListener3 should not be notified\n assertFalse(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener3).getRedoPerformedRecords().contains(performRecord));\n\n // 'undoableAction3' should not be handled\n performRecord = new Pair<RedoChangesEvent, UndoableAction>(redoChangesEvent, undoableAction3);\n // actionEventListener1 should not be notified\n assertFalse(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener1).getRedoPerformedRecords().contains(performRecord));\n // actionEventListener2 should not be notified\n assertFalse(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener2).getRedoPerformedRecords().contains(performRecord));\n // actionEventListener3 should not be notified\n assertFalse(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener3).getRedoPerformedRecords().contains(performRecord));\n }", "@Override\n\tpublic void onTestSuccess(ITestResult result) {\n\t\t\n\t\tSystem.out.println(\"All test casee passed and i m the listener class\");\n\t}", "@Test\n public void testRwbmBoth()\n {\n generateEvents(\"dist-rwbm-both\");\n checkEvents(true, true);\n }", "@Test\n public void test02SendEvents() throws Exception{\n Event event1 = restService.registerEvent(createEvent(\"ACCOUNTS\", createMap(Object.class, \"date\", \"Yesterday\")));\n assertNotNull(event1.getId());\n Event event2 = restService.registerEvent(createEvent(\"TRANSACTIONS\", createMap(Object.class, \"date\", \"Yesterday\")));\n assertNotNull(event2.getId());\n Event event3 = restService.registerEvent(createEvent(\"PRODUCTS\", createMap(Object.class, \"date\", \"Yesterday\")));\n assertNotNull(event3.getId());\n Event event4 = restService.registerEvent(createEvent(\"ACCOUNTS\", createMap(Object.class, \"date\", \"Today\")));\n assertNotNull(event4.getId());\n Event event5 = restService.registerEvent(createEvent(\"TRANSACTIONS\", createMap(Object.class, \"date\", \"Today\")));\n assertNotNull(event5.getId());\n Event event6 = restService.registerEvent(createEvent(\"PRODUCTS\", createMap(Object.class, \"date\", \"Today\")));\n assertNotNull(event6.getId());\n Event event7 = restService.registerEvent(createEvent(\"ACCOUNTS\", createMap(Object.class, \"date\", \"Tomorrow\", \"premise\", \"PC2\")));\n assertNotNull(event7.getId());\n Event event8 = restService.registerEvent(createEvent(\"TRANSACTIONS\", createMap(Object.class, \"date\", \"Tomorrow\", \"premise\", \"PC2\")));\n assertNotNull(event8.getId());\n Event event9 = restService.registerEvent(createEvent(\"PRODUCTS\", createMap(Object.class, \"date\", \"Tomorrow\", \"premise\", \"PC2\")));\n assertNotNull(event9.getId());\n delay(10);\n\n //yesterday events\n List<CallbackData> list = restService.findCallbackInstancesBy(event1.getId(), null, null, null, 0, 0);\n// assertEquals(5, list.size());\n assertEquals(4, list.size());\n list = restService.findCallbackInstancesBy(event2.getId(), null, null, null, 0, 0);\n assertEquals(1, list.size());\n list = restService.findCallbackInstancesBy(event3.getId(), null, null, null, 0, 0);\n assertEquals(4, list.size());\n //today\n list = restService.findCallbackInstancesBy(event4.getId(), null, null, null, 0, 0);\n assertEquals(4, list.size());\n list = restService.findCallbackInstancesBy(event5.getId(), null, null, null, 0, 0);\n assertEquals(1, list.size());\n list = restService.findCallbackInstancesBy(event6.getId(), null, null, null, 0, 0);\n assertEquals(4, list.size());\n //premise\n list = restService.findCallbackInstancesBy(event7.getId(), null, null, null, 0, 0);\n assertEquals(5, list.size());\n list = restService.findCallbackInstancesBy(event8.getId(), null, null, null, 0, 0);\n assertEquals(2, list.size());\n list = restService.findCallbackInstancesBy(event9.getId(), null, null, null, 0, 0);\n assertEquals(5, list.size());\n\n //Event status check\n EventEntity evt = eventRepo.eventById(Long.parseLong(event1.getId()));\n assertEquals(evt.getStatus(), Constants.EVENT_INSTANCE_STATUS_PROCESSED);\n assertEquals(evt.getId(), Long.parseLong(event1.getId()));\n\n }", "public void testHandleActionEvent_UndoChangesEvent_Accuracy()\n throws Exception {\n setUpEventManager();\n\n UndoChangesEvent undoChangesEvent = new UndoChangesEvent(undoableAction2, new String());\n\n // Handle the event, actionEventListener1 and actionEventListener2 should be notified\n eventManager.handleActionEvent(undoChangesEvent);\n\n // 'undoableAction1' should be handled\n Pair<UndoChangesEvent, UndoableAction> performRecord\n = new Pair<UndoChangesEvent, UndoableAction>(undoChangesEvent, undoableAction1);\n // actionEventListener1 should not be notified\n assertFalse(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener1).getUndoPerformedRecords().contains(performRecord));\n // actionEventListener2 should not be notified\n assertFalse(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener2).getUndoPerformedRecords().contains(performRecord));\n // actionEventListener3 should not be notified\n assertFalse(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener3).getUndoPerformedRecords().contains(performRecord));\n\n // 'undoableAction2' should also be handled\n performRecord = new Pair<UndoChangesEvent, UndoableAction>(undoChangesEvent, undoableAction2);\n // actionEventListener1 should not be notified\n assertFalse(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener1).getUndoPerformedRecords().contains(performRecord));\n // actionEventListener2 should be notified\n assertTrue(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener2).getUndoPerformedRecords().contains(performRecord));\n // actionEventListener3 should not be notified\n assertFalse(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener3).getUndoPerformedRecords().contains(performRecord));\n\n // 'undoableAction3' should not be handled\n performRecord = new Pair<UndoChangesEvent, UndoableAction>(undoChangesEvent, undoableAction3);\n // actionEventListener1 should be notified\n assertFalse(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener1).getUndoPerformedRecords().contains(performRecord));\n // actionEventListener2 should be notified\n assertTrue(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener2).getUndoPerformedRecords().contains(performRecord));\n // actionEventListener3 should not be notified\n assertFalse(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener3).getUndoPerformedRecords().contains(performRecord));\n }", "@Override\r\n\tpublic boolean results()\r\n\t{\r\n\t\treturn this.results(this.getRobot());\r\n\t}", "void ackResult(boolean resultMatch);", "private void handleResultListeners(final UIObject sender,\n\t\t\tfinal String listenerType) {\n\t\tGDataObject dataObject = new GDataObject();\n String senderId = getComponentId(sender);\n dataObject.setSenderId(senderId);\n dataObject.setListenerType(listenerType);\n ClientApplicationContext.getInstance().fireResult(dataObject);\n\t}", "Event getEvent();", "@Override\n public void onResult(final AIResponse result) {\n DobbyLog.i(\"Action: \" + result.getResult().getAction());\n }", "public Event nextEVPEC();", "public void onTestSuccess(ITestResult result) {\n\t\t\r\n\t}", "public void onTestSuccess(ITestResult result) {\n\t\t\n\t}", "@SuppressWarnings(\"unused\")\n public void handleTestEvent(int result) {\n ApplicationManager.getApplication().invokeLater(() -> {\n checkInProgress = false;\n setStatusAndShowResults(result);\n com.intellij.openapi.progress.Task.Backgroundable task = getAfterCheckTask(result);\n ProgressManager.getInstance().run(task);\n });\n }", "public void doResult() throws Exception {\n\t\tJSONObject map=new JSONObject(getResult());\n\t\tif(!\"ok\".equalsIgnoreCase(map.getString(\"status\"))){\n\t\t\tdoFailureResult();\n\t\t\treturn;\n\t\t}\n\t\tif(getHandler()!=null){\n\t\t\tMessage hmsg=getHandler().obtainMessage();\n\t\t\thmsg.obj=map;\n\t\t\thmsg.arg1=1;\n\t\t\tgetHandler().sendMessage(hmsg);\n\t\t\tsetHandler(null);\n\t\t}\n\t}", "@Override\r\n public void onResult(DJIError result)\r\n {\n \r\n }", "@Override\r\n\tpublic int getEventType() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic int getEventType() {\n\t\treturn 0;\r\n\t}", "void throwEvents();", "com.walgreens.rxit.ch.cda.EIVLEvent getEvent();", "@Override\r\n public void onReceiveResult(Message message) {\r\n switch (message.what) {\r\n //TODO\r\n }\r\n }", "public void receiveResultservicedis(\n ) {\n }", "interface OnResultListener {\n void onFinished();\n }", "@Test\n public void getEventTest() {\n Event[] event = new Event[3];\n event[0] = Event.ZERO;\n god.getEvent(event, board, actions);\n assertEquals(actions[2][3][0].getStatus(), true);\n assertEquals(actions[4][3][0].getStatus(), false);\n assertEquals(actions[2][2][0].getStatus(), true);\n assertEquals(actions[2][4][0].getStatus(), false);\n assertEquals(actions[0][0][0].getStatus(), false);\n event[0] = Event.BUILD;\n god.getEvent(event, board, actions);\n assertEquals(actions[2][3][0].getStatus(), true);\n assertEquals(actions[4][3][0].getStatus(), false);\n assertEquals(actions[2][2][0].getStatus(), true);\n assertEquals(actions[2][4][0].getStatus(), false);\n assertEquals(actions[0][0][0].getStatus(), false);\n event[0] = Event.MOVE;\n event[1] = Event.UP;\n god.getEvent(event, board, actions);\n for (int i = 2; i < 5; i++) {\n for (int j = 2; j < 5; j++) {\n if ((i == 3 && j\n == 3) || (i == 2 && j == 4) || (i == 4 && j == 3)) {\n assertEquals(actions[i][j][1].getStatus(), false);\n } else if (i == 2 && j ==\n 2) {\n assertEquals(actions[i][j][2].getStatus(), true);\n } else {\n assertEquals(actions[i][j][1].getStatus(), true);\n }\n }\n }\n board[2][2].addBlock(new Block(TypeBlock.WORKER));\n god.setWorker(new int[]{\n 2, 2});\n event[0] = Event.MOVE;\n event[1] = Event.UP;\n god.getEvent(event,\n board, actions);\n assertEquals(StatusPlayer.WIN, god.getPlayerStatus());\n event[0] = Event.BUILD;\n god.getEvent(event, board, actions);\n event[0] =\n Event.ONE;\n god.getEvent(event, board, actions);\n assertEquals(StatusPlayer.WIN, god.getPlayerStatus());\n god.setStatusPlayer(StatusPlayer.GAMING);\n god.getEvent(event, board,\n actions);\n assertEquals(StatusPlayer.IDLE, god.getPlayerStatus());\n for (int i\n = 0; i < 5; i++) {\n for (int j = 0; j < 5; j++) {\n\n actions[i][j][0].set(false);\n actions[i][j][1].set(false);\n actions[i][j][2].set(false);\n }\n }\n event[0] = Event.ONE;\n god.getEvent(event, board, actions);\n assertEquals(StatusPlayer.LOSE, god.getPlayerStatus());\n event[0] = Event.ONE;\n actions[0][0][0].set(true);\n god.getEvent(event, board, actions);\n\n assertEquals(StatusPlayer.GAMING, god.getPlayerStatus());\n event[0] =\n Event.MOVE;\n event[1] = Event.ZERO;\n god.getEvent(event, board, actions);\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 5; j++) {\n\n actions[i][j][0].set(false);\n actions[i][j][1].set(false);\n actions[i][j][2].set(false);\n }\n }\n actions[0][0][1].set(true);\n event[0] = Event.ONE;\n god.getEvent(event, board,\n actions);\n assertEquals(StatusPlayer.GAMING, god.getPlayerStatus());\n event[0]\n = Event.MOVE;\n god.getEvent(event, board, actions);\n\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 5; j++) {\n\n actions[i][j][0].set(false);\n actions[i][j][1].set(false);\n actions[i][j][2].set(false);\n }\n }\n\n actions[0][0][2].set(true);\n\n event[0] = Event.ONE;\n god.getEvent(event, board, actions);\n assertEquals(StatusPlayer.GAMING, god.getPlayerStatus());\n\n event[0] = Event.BUILD;\n god.getEvent(event, board, actions);\n for (int i = 0;\n i < 5; i++) {\n for (int j = 0; j < 5; j++) {\n\n actions[i][j][0].set(false);\n actions[i][j][1].set(false);\n actions[i][j][2].set(false);\n }\n }\n event[0] = Event.TWO;\n god.getEvent(event,\n board, actions);\n assertEquals(StatusPlayer.IDLE, god.getPlayerStatus());\n\n god.setStatusPlayer(StatusPlayer.WIN);\n event[0] = Event.TWO;\n god.getEvent(event, board, actions);\n assertEquals(StatusPlayer.WIN,\n god.getPlayerStatus());\n event[0] = Event.ONE;\n god.getEvent(event, board,\n actions);\n assertEquals(StatusPlayer.WIN, god.getPlayerStatus());\n }", "protected abstract void onCustomSuccess(T result);", "@Test\n public void testRwbmInternalBoth()\n {\n generateEvents(\"dist-rwbm-internal-both\");\n checkEvents(true, true);\n }", "public int getResult() {return resultCode;}", "public interface AsrEventListener {\n\n public void onAsrResult(String result);\n}", "public IStatus getResult();", "@Override\r\n\tpublic void updateState() {\r\n\t\tState<A> result = null;\r\n\t\tif(events.size() > 0){\r\n\t\t\tfor(Event<A> a : events){\r\n\t\t\t\tstate = (result = state.perform(this,a)) == null ? state : result;\r\n\t\t\t}\r\n\t\t\tevents.removeAllElements();\r\n\t\t}\r\n\t\tstate = (result = state.perform(this, null)) == null ? state : result;\r\n\t\trequestInput();\r\n\t\t\r\n\t}", "private void retrieveRemoteEventData(){\n\n //This returns a JSON object with a {\"eventIndex\": int, \"event\": int} pattern.\n String data = getJSON(hostUrl + \"retrieve_remote_event.php?matchId=\" + matchId\n + \"&player=\" + oppositePlayer, 2000);\n\n // Parse the JSON information into an EventIndexPair object.\n Event e = new Gson().fromJson(data, Event.class);\n\n // Set event and eventIndex variables retrieved from JSON to the remoteActiveEvent and\n // remoteEventIndex global variables.\n // These variables will be used to process events locally on the next frame.\n if (e != null){\n if (e.getIndex() > remoteEventIndex){\n\n remoteActiveEvent = e;\n remoteEventIndex = e.getIndex();\n\n }\n }\n\n }", "@Override\n public boolean getResult() {\n return result_;\n }", "@Override\n\tpublic void eventFinished() {\n\t\tstatus=EventCompleted;\n\t}", "@Override\n\tpublic void onTestSuccess(ITestResult result) {\n\t\t\n\t}", "@Override\n public void onSuccess(Void unusedResult) {\n Discoverer.this.eventListener.trigger(EVENT_LOG, \"Connection requested with: \" + endpointId);\n }", "public boolean match(Event e);", "public interface ResultObserver {\r\n\r\n /**\r\n * Invoked when a result has been stored\r\n *\r\n * @param result - The result of the inspection\r\n */\r\n void newResult(Result result);\r\n}", "@Test\n public void EffectSelectedEventTest() {\n EffectSelectedEvent event = null;\n boolean result = true;\n try {\n event = new EffectSelectedEvent(0, \"tony\", null, null);\n turnController.handleEvent(event);\n } catch(Exception e) {\n result = false;\n }\n assertTrue(result);\n\n }", "@Override\n public boolean getResult() {\n return result_;\n }", "public int assertEvents(SerializedObserverTest.TestConcurrencySubscriberEvent expectedEndingEvent) throws IllegalStateException {\n int nextCount = 0;\n boolean finished = false;\n for (SerializedObserverTest.TestConcurrencySubscriberEvent e : events) {\n if (e == (SerializedObserverTest.TestConcurrencySubscriberEvent.onNext)) {\n if (finished) {\n // already finished, we shouldn't get this again\n throw new IllegalStateException(\"Received onNext but we're already finished.\");\n }\n nextCount++;\n } else\n if (e == (SerializedObserverTest.TestConcurrencySubscriberEvent.onError)) {\n if (finished) {\n // already finished, we shouldn't get this again\n throw new IllegalStateException(\"Received onError but we're already finished.\");\n }\n if ((expectedEndingEvent != null) && ((SerializedObserverTest.TestConcurrencySubscriberEvent.onError) != expectedEndingEvent)) {\n throw new IllegalStateException((\"Received onError ending event but expected \" + expectedEndingEvent));\n }\n finished = true;\n } else\n if (e == (SerializedObserverTest.TestConcurrencySubscriberEvent.onComplete)) {\n if (finished) {\n // already finished, we shouldn't get this again\n throw new IllegalStateException(\"Received onComplete but we're already finished.\");\n }\n if ((expectedEndingEvent != null) && ((SerializedObserverTest.TestConcurrencySubscriberEvent.onComplete) != expectedEndingEvent)) {\n throw new IllegalStateException((\"Received onComplete ending event but expected \" + expectedEndingEvent));\n }\n finished = true;\n }\n\n\n }\n return nextCount;\n }", "public void receiveResultsIO_FI_OA_AFS_OA024(out.deal.afs.zc024.MT_FI_OA_AFS_OA024_REP result) {\n\t}", "@Override\n\tprotected void parseResult() {\n\t\t\n\t}", "boolean hasCollectResult();", "@Override\n protected void run(Result result) throws Throwable {\n }", "public interface Events {\n\n /**\n * Archive has stored the entities within a SIP.\n * <p>\n * Indicates that a SIP has been sent to the archive. May represent an add,\n * or an update.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>Number of entities archived</dd>\n * <dt>eventTarget</dt>\n * <dd>every archived entity</dd>\n * </dl>\n * </p>\n */\n public static final String ARCHIVE = \"archive\";\n\n /**\n * Signifies that an entity has been identified as a member of a specific\n * batch load process.\n * <p>\n * There may be an arbitrary number of independent events signifying the\n * same batch (same outcome, date, but different sets of targets). A unique\n * combination of date and outcome (batch label) identify a batch.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>Batch label/identifier</dd>\n * <dt>eventTarget</dt>\n * <dd>Entities in a batch</dd>\n * </dl>\n * </p>\n */\n public static final String BATCH = \"batch\";\n\n /**\n * File format characterization.\n * <p>\n * Indicates that a format has been verifiably characterized. Format\n * characterizations not accompanied by a corresponding characterization\n * event can be considered to be unverified.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>format, in the form \"scheme formatId\" (whitespace separated)</dd>\n * <dt>eventTarget</dt>\n * <dd>id of characterized file</dd>\n * </dl>\n * </p>\n */\n public static final String CHARACTERIZATION_FORMAT =\n \"characterization.format\";\n\n /**\n * Advanced file characterization and/or metadata extraction.\n * <p>\n * Indicates that some sort of characterization or extraction has produced a\n * document containing file metadata.\n * </p>\n * *\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>id of File containing metadata</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File the metadata describes</dd>\n * </dl>\n */\n public static final String CHARACTERIZATION_METADATA =\n \"characterization.metadata\";\n\n /**\n * Initial deposit/transfer of an item into the DCS, preceding ingest.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>SIP identifier uid</dd>\n * <dt>eventTarget</dt>\n * <dd>id of deposited entity</dd>\n * </dl>\n * </p>\n */\n public static final String DEPOSIT = \"deposit\";\n\n /**\n * Content retrieved by dcs.\n * <p>\n * Represents the fact that content has been downloaded/retrieved by the\n * dcs.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>http header-like key/value pairs representing circumstances\n * surrounding upload</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been downloaded</dd>\n * </dl>\n */\n public static final String FILE_DOWNLOAD = \"file.download\";\n\n /**\n * uploaaded/downloaded file content resolution.\n * <p>\n * Indicates that the reference URI to a unit of uploaded or downloaded file\n * content has been resolved and replaced with the DCS file access URI.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd><code>reference_URI</code> 'to' <code>dcs_URI</code></dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been resolved</dd>\n * </dl>\n */\n public static final String FILE_RESOLUTION_STAGED = \"file.resolution\";\n\n /**\n * Indicates the uploading of file content.\n * <p>\n * Represents the physical receipt of bytes from a client.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>http header-like key/value pairs representing circumstanced\n * surrounding upload</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been uploaded</dd>\n * </dl>\n */\n public static final String FILE_UPLOAD = \"file.upload\";\n\n /**\n * Fixity computation/validation for a particular File.\n * <p>\n * Indicates that a particular digest has been computed for given file\n * content. Digest values not accompanied by a corresponding event may be\n * considered to be un-verified.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>computed digest value of the form \"alorithm value\" (whitepsace\n * separated)</dd>\n * <dt>eventTarget</dt>\n * <dd>id of digested file</dd>\n * </dl>\n * </p>\n */\n public static final String FIXITY_DIGEST = \"fixity.digest\";\n\n /**\n * Assignment of an identifier to the given entity, replacing an\n * existing/temporary id. *\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd><code>old_identifier</code> 'to' <code>new_identifier</code></dd>\n * <dt>eventTarget</dt>\n * <dd>new id of object</dd>\n * </dl>\n */\n public static final String ID_ASSIGNMENT = \"identifier.assignment\";\n\n /**\n * Marks the start of an ingest process.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_START = \"ingest.start\";\n\n /**\n * Signifies a successful ingest outcome.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_SUCCESS = \"ingest.complete\";\n\n /**\n * Signifies a failed ingest outcome.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_FAIL = \"ingest.fail\";\n\n /**\n * Signifies that a feature extraction or transform has successfully\n * occurred.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of a DeliverableUnit or Collection</dd>\n * </dl>\n * </p>\n */\n public static final String TRANSFORM = \"transform\";\n\n /**\n * Signifies that a feature extraction or transform failed.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of a DeliverableUnit or Collection</dd>\n * </dl>\n * </p>\n */\n public static final String TRANSFORM_FAIL = \"transform.fail\";\n\n /**\n * Signifies a file has been scanned by the virus scanner.\n * <p>\n * Indicates that a file has been scanned by a virus scanner. There could be\n * more than one event for a file.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of file whose content was scanned</dd>\n * </dl>\n * </p>\n */\n public static final String VIRUS_SCAN = \"virus.scan\";\n\n /**\n * Signifies an new deliverable unit is being ingested as an update to the target deliverable unit.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of the deliverable unit being updated</dd>\n * </dl>\n * </p>\n */\n public static final String DU_UPDATE = \"du.update\";\n\n}", "public boolean check(EventType event);", "@Override\n public void onResult(@NonNull Status status) {\n }", "@Test\n\tpublic void sholdHaveEvents(){\n\t\tcalendar.addEvent(new Event(\"event0\", date0, date1, true),user);\n\t\tcalendar.addEvent(new Event(\"event0\", date1, date1, false), user);\n\t\tassertEquals(calendar.getAllEvents(user).size(), 2);\n\t\t\n\t}", "@Override\n public void result(Message[] messages) {\n synchronized (semaphore) {\n responseMessages[0] = messages;\n notified = true;\n semaphore.notifyAll();\n }\n }", "@Override\r\n public boolean eventSourcing(){\n loadSnapshot();\r\n\r\n // check offsets value\r\n\r\n // rerun events\r\n\r\n // rerun commands\r\n\r\n // print es results\r\n\r\n return true;\r\n }", "@Override\r\n\tpublic void OnResultUpPwder(int result) {\n\t}", "private void onSuccess0(DomainTransformResponse response) {\n\t\t\tsynchronized (CommitToStorageTransformListener.this) {\n\t\t\t\tPermissionsManager.get().setOnlineState(OnlineState.ONLINE);\n\t\t\t\tTransformManager tm = TransformManager.get();\n\t\t\t\ttm.setReplayingRemoteEvent(true);\n\t\t\t\tList<DomainTransformEvent> synthesisedEvents = new ArrayList<>();\n\t\t\t\ttry {\n\t\t\t\t\tlastCreatedObjectLocator = null;\n\t\t\t\t\tfirstCreatedObjectLocator = null;\n\t\t\t\t\t/*\n\t\t\t\t\t * either way we do this (server or client), it's going to\n\t\t\t\t\t * seem a bit hacky but...a client's interpretation of what\n\t\t\t\t\t * is the canonical event (e.g. createObject on the server)\n\t\t\t\t\t * is more its business than the TLTM's\n\t\t\t\t\t *\n\t\t\t\t\t * so...leave here. for now\n\t\t\t\t\t */\n\t\t\t\t\tfor (DomainTransformEvent dte : response\n\t\t\t\t\t\t\t.getEventsToUseForClientUpdate()) {\n\t\t\t\t\t\tlong id = dte.getGeneratedServerId() != 0\n\t\t\t\t\t\t\t\t? dte.getGeneratedServerId()\n\t\t\t\t\t\t\t\t: dte.getObjectId();\n\t\t\t\t\t\tif (dte.getGeneratedServerId() != 0) {\n\t\t\t\t\t\t\tDomainTransformEvent idEvt = new DomainTransformEvent();\n\t\t\t\t\t\t\tidEvt.setObjectClass(dte.getObjectClass());\n\t\t\t\t\t\t\tidEvt.setObjectLocalId(dte.getObjectLocalId());\n\t\t\t\t\t\t\tidEvt.setPropertyName(\n\t\t\t\t\t\t\t\t\tTransformManager.ID_FIELD_NAME);\n\t\t\t\t\t\t\tidEvt.setValueClass(Long.class);\n\t\t\t\t\t\t\tidEvt.setTransformType(\n\t\t\t\t\t\t\t\t\tTransformType.CHANGE_PROPERTY_SIMPLE_VALUE);\n\t\t\t\t\t\t\tidEvt.setNewStringValue(String.valueOf(id));\n\t\t\t\t\t\t\tsynthesisedEvents.add(idEvt);\n\t\t\t\t\t\t\tEntityLocator entityLocator = new EntityLocator(\n\t\t\t\t\t\t\t\t\tdte.getObjectClass(), id,\n\t\t\t\t\t\t\t\t\tdte.getObjectLocalId());\n\t\t\t\t\t\t\tif (firstCreatedObjectLocator == null) {\n\t\t\t\t\t\t\t\tfirstCreatedObjectLocator = entityLocator;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlastCreatedObjectLocator = entityLocator;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// if (dte.getObjectVersionNumber() != 0 && id != 0)\n\t\t\t\t\t\t// {\n\t\t\t\t\t\t// if we have zero id at this stage, we're probably\n\t\t\t\t\t\t// in a\n\t\t\t\t\t\t// race condition\n\t\t\t\t\t\t// with some other persistence mech\n\t\t\t\t\t\t// and it definitely _does_ need to be sorted\n\t\t\t\t\t\tif (CommonUtils.iv(dte.getObjectVersionNumber()) != 0) {\n\t\t\t\t\t\t\tDomainTransformEvent idEvt = new DomainTransformEvent();\n\t\t\t\t\t\t\tidEvt.setObjectClass(dte.getObjectClass());\n\t\t\t\t\t\t\tidEvt.setObjectId(id);\n\t\t\t\t\t\t\tidEvt.setPropertyName(\n\t\t\t\t\t\t\t\t\tTransformManager.VERSION_FIELD_NAME);\n\t\t\t\t\t\t\tidEvt.setNewStringValue(String\n\t\t\t\t\t\t\t\t\t.valueOf(dte.getObjectVersionNumber()));\n\t\t\t\t\t\t\tidEvt.setValueClass(Integer.class);\n\t\t\t\t\t\t\tidEvt.setTransformType(\n\t\t\t\t\t\t\t\t\tTransformType.CHANGE_PROPERTY_SIMPLE_VALUE);\n\t\t\t\t\t\t\tsynthesisedEvents.add(idEvt);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfor (DomainTransformEvent dte : synthesisedEvents) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\ttm.apply(dte);\n\t\t\t\t\t\t\ttm.fireDomainTransform(dte);//\n\t\t\t\t\t\t\t// this notifies storage (for offline replay)\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// also notifies clients who need to\n\t\t\t\t\t\t\t// know chanages were committed\n\t\t\t\t\t\t} catch (DomainTransformException e) {\n\t\t\t\t\t\t\t// shouldn't happen, if the server code's ok\n\t\t\t\t\t\t\t// note - squelching (for the moment)\n\t\t\t\t\t\t\t// sourceentitynotfound -\n\t\t\t\t\t\t\t// assume object was either deregistered or\n\t\t\t\t\t\t\t// deleted\n\t\t\t\t\t\t\t// before these transforms\n\t\t\t\t\t\t\t// made it back from the server\n\t\t\t\t\t\t\t// actually, e.g. deletion - there'll be a\n\t\t\t\t\t\t\t// version\n\t\t\t\t\t\t\t// change which gets propagated back\n\t\t\t\t\t\t\t// more correct would be to record deleted\n\t\t\t\t\t\t\t// objects...but it don't matter much\n\t\t\t\t\t\t\tif (e.getType() == DomainTransformExceptionType.SOURCE_ENTITY_NOT_FOUND\n\t\t\t\t\t\t\t\t\t|| e.getType() == DomainTransformExceptionType.TARGET_ENTITY_NOT_FOUND) {\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthrow new WrappedRuntimeException(e);\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\tList<DomainTransformEvent> items = this.request.getEvents();\n\t\t\t\t\tfor (DomainTransformEvent evt : items) {\n\t\t\t\t\t\tTransformManager.get().setTransformCommitType(evt,\n\t\t\t\t\t\t\t\tCommitType.ALL_COMMITTED);\n\t\t\t\t\t}\n\t\t\t\t\tfor (int i = priorRequestsWithoutResponse.size()\n\t\t\t\t\t\t\t- 1; i >= 0; i--) {\n\t\t\t\t\t\tif (priorRequestsWithoutResponse.get(i)\n\t\t\t\t\t\t\t\t.getRequestId() <= this.request\n\t\t\t\t\t\t\t\t\t\t.getRequestId()) {\n\t\t\t\t\t\t\tpriorRequestsWithoutResponse.remove(i);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (response.getMessage() != null) {\n\t\t\t\t\t\tRegistry.impl(ClientNotifications.class)\n\t\t\t\t\t\t\t\t.showMessage(response.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\tsynchronized (collectionsMonitor) {\n\t\t\t\t\t\tCommitToStorageTransformListener.this.synthesisedEvents\n\t\t\t\t\t\t\t\t.clear();\n\t\t\t\t\t\tCommitToStorageTransformListener.this.synthesisedEvents\n\t\t\t\t\t\t\t\t.addAll(synthesisedEvents);\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\ttm.setReplayingRemoteEvent(false);\n\t\t\t\t\tif (reloadRequired) {\n\t\t\t\t\t\ttopicStateChanged.publish(State.RELOAD);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttopicStateChanged.publish(State.COMMITTED);\n\t\t\t\t\t\ttopicTransformsCommitted.publish(response);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@Override\n\tpublic void onTestSuccess(ITestResult result) {\n\t}", "public MatchOther processResult(ResultItems resultItems, Task task);", "@Override\n public boolean evaluate(Event event) {\n return true;\n }", "@Test\n public void resultMessageTest() {\n assertEquals(\"System: Accepted Transaction\", authResponse.getResultMessage());\n }", "public void setResult() {\n }", "public void ResultVoiceCoincidence(EventVoice event);", "public abstract boolean mo66251a(Result<T> result);", "@Override\r\n\tpublic void QueryResultReceived(List<QueryResult> result) {\n\t\t\r\n\t\twhile (form == null);\r\n\t\tform.UpdateResult(result);\r\n\t}", "public boolean trySuccess(V result)\r\n/* 321: */ {\r\n/* 322:406 */ if (setSuccess0(result))\r\n/* 323: */ {\r\n/* 324:407 */ notifyListeners();\r\n/* 325:408 */ return true;\r\n/* 326: */ }\r\n/* 327:410 */ return false;\r\n/* 328: */ }", "@Test\n public void asyncResultFiresListeners() {\n\n final AtomicBoolean shouldBeSet = new AtomicBoolean(false);\n\n AsyncResult<String> result = new AsyncResult<>(\"hey!\");\n result.addCallback(new ListenableFutureCallback<String>() {\n @Override\n public void onFailure(Throwable throwable) {\n fail(\"This should never happen\");\n }\n\n @Override\n public void onSuccess(String s) {\n shouldBeSet.set(true);\n }\n });\n\n assertTrue(shouldBeSet.get());\n }", "@Test\n public void scanListenerReceivesAllResults() throws RemoteException {\n WifiScanner.ScanSettings requestSettings1 = createRequest(channelsToSpec(2400), 0,\n 0, 20, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN);\n int requestId1 = 12;\n ScanResults results1 = ScanResults.create(0, 2400);\n\n WifiScanner.ScanSettings requestSettings2 = createRequest(channelsToSpec(2450, 5175), 0,\n 0, 20, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN);\n int requestId2 = 13;\n ScanResults results2 = ScanResults.create(0, 2450, 5175, 2450);\n\n WifiScanner.ScanSettings requestSettings3 = createRequest(channelsToSpec(5150), 0,\n 0, 20, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN);\n int requestId3 = 15;\n ScanResults results3 = ScanResults.create(0, 5150, 5150, 5150, 5150);\n\n WifiNative.ScanSettings nativeSettings2and3 = createSingleScanNativeSettingsForChannels(\n WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN, channelsToSpec(2450, 5175, 5150));\n ScanResults results2and3 = ScanResults.merge(results2, results3);\n\n int listenerRequestId = 13;\n\n\n startServiceAndLoadDriver();\n\n when(mWifiScannerImpl.startSingleScan(any(WifiNative.ScanSettings.class),\n any(WifiNative.ScanEventHandler.class))).thenReturn(true);\n\n Handler handler = mock(Handler.class);\n BidirectionalAsyncChannel controlChannel = connectChannel(handler);\n InOrder handlerOrder = inOrder(handler);\n InOrder nativeOrder = inOrder(mWifiScannerImpl);\n\n // Run scan 1\n sendSingleScanRequest(controlChannel, requestId1, requestSettings1, null);\n\n mLooper.dispatchAll();\n WifiNative.ScanEventHandler eventHandler1 = verifyStartSingleScan(nativeOrder,\n computeSingleScanNativeSettings(requestSettings1));\n verifySuccessfulResponse(handlerOrder, handler, requestId1);\n\n\n // Queue scan 2 (will not run because previous is in progress)\n sendSingleScanRequest(controlChannel, requestId2, requestSettings2, null);\n mLooper.dispatchAll();\n verifySuccessfulResponse(handlerOrder, handler, requestId2);\n\n // Queue scan 3 (will not run because previous is in progress)\n sendSingleScanRequest(controlChannel, requestId3, requestSettings3, null);\n mLooper.dispatchAll();\n verifySuccessfulResponse(handlerOrder, handler, requestId3);\n\n // Register scan listener\n registerScanListener(controlChannel, listenerRequestId);\n mLooper.dispatchAll();\n verifySuccessfulResponse(handlerOrder, handler, listenerRequestId);\n\n // dispatch scan 1 results\n when(mWifiScannerImpl.getLatestSingleScanResults())\n .thenReturn(results1.getScanData());\n eventHandler1.onScanStatus(WifiNative.WIFI_SCAN_RESULTS_AVAILABLE);\n\n mLooper.dispatchAll();\n verifyScanResultsReceived(handlerOrder, handler, requestId1, results1.getScanData());\n verifySingleScanCompletedReceived(handlerOrder, handler, requestId1);\n verifyScanResultsReceived(handlerOrder, handler, listenerRequestId, results1.getScanData());\n verify(mContext).sendBroadcastAsUser(any(Intent.class), eq(UserHandle.ALL));\n\n // now that the first scan completed we expect the second and third ones to start\n WifiNative.ScanEventHandler eventHandler2and3 = verifyStartSingleScan(nativeOrder,\n nativeSettings2and3);\n\n // dispatch scan 2 and 3 results\n when(mWifiScannerImpl.getLatestSingleScanResults())\n .thenReturn(results2and3.getScanData());\n eventHandler2and3.onScanStatus(WifiNative.WIFI_SCAN_RESULTS_AVAILABLE);\n\n mLooper.dispatchAll();\n\n verifyMultipleSingleScanResults(handlerOrder, handler, requestId2, results2, requestId3,\n results3, listenerRequestId, results2and3);\n\n assertDumpContainsRequestLog(\"registerScanListener\", listenerRequestId);\n assertDumpContainsCallbackLog(\"singleScanResults\", listenerRequestId,\n \"results=\" + results1.getRawScanResults().length);\n assertDumpContainsCallbackLog(\"singleScanResults\", listenerRequestId,\n \"results=\" + results2and3.getRawScanResults().length);\n }", "public void receiveResultmain(\n ) {\n }", "java.lang.String getEventType();", "@Override\n public void run()\n {\n result[0] = true;\n }", "protected abstract void onFinishObject(T result);", "private static void verifyMultipleSingleScanResults(InOrder handlerOrder, Handler handler,\n int requestId1, ScanResults results1, int requestId2, ScanResults results2,\n int listenerRequestId, ScanResults listenerResults) {\n ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);\n handlerOrder.verify(handler, times(listenerResults == null ? 4 : 5))\n .handleMessage(messageCaptor.capture());\n int firstListenerId = messageCaptor.getAllValues().get(0).arg2;\n assertTrue(firstListenerId + \" was neither \" + requestId2 + \" nor \" + requestId1,\n firstListenerId == requestId2 || firstListenerId == requestId1);\n if (firstListenerId == requestId2) {\n assertScanResultsMessage(requestId2,\n new WifiScanner.ScanData[] {results2.getScanData()},\n messageCaptor.getAllValues().get(0));\n assertSingleScanCompletedMessage(requestId2, messageCaptor.getAllValues().get(1));\n assertScanResultsMessage(requestId1,\n new WifiScanner.ScanData[] {results1.getScanData()},\n messageCaptor.getAllValues().get(2));\n assertSingleScanCompletedMessage(requestId1, messageCaptor.getAllValues().get(3));\n if (listenerResults != null) {\n assertScanResultsMessage(listenerRequestId,\n new WifiScanner.ScanData[] {listenerResults.getScanData()},\n messageCaptor.getAllValues().get(4));\n }\n } else {\n assertScanResultsMessage(requestId1,\n new WifiScanner.ScanData[] {results1.getScanData()},\n messageCaptor.getAllValues().get(0));\n assertSingleScanCompletedMessage(requestId1, messageCaptor.getAllValues().get(1));\n assertScanResultsMessage(requestId2,\n new WifiScanner.ScanData[] {results2.getScanData()},\n messageCaptor.getAllValues().get(2));\n assertSingleScanCompletedMessage(requestId2, messageCaptor.getAllValues().get(3));\n if (listenerResults != null) {\n assertScanResultsMessage(listenerRequestId,\n new WifiScanner.ScanData[] {listenerResults.getScanData()},\n messageCaptor.getAllValues().get(4));\n }\n }\n }", "void event(Event e) throws Exception;", "void onComplete(ResultModel result);", "public boolean run(List<EventType> events) {\n StringBuilder builder = new StringBuilder();\n for (EventType e : events) {\n builder.append(encodings.getEncoding(e));\n }\n return model.run(builder.toString());\n }", "@Override\n public void run() {\n if ((waitOnThese) != null) {\n for (Future<?> f : waitOnThese) {\n try {\n f.get();\n } catch (Throwable e) {\n System.err.println(\"Error while waiting on future in CompletionThread\");\n }\n }\n }\n /* send the event */\n if ((event) == (SerializedObserverTest.TestConcurrencySubscriberEvent.onError)) {\n observer.onError(new RuntimeException(\"mocked exception\"));\n } else\n if ((event) == (SerializedObserverTest.TestConcurrencySubscriberEvent.onComplete)) {\n observer.onComplete();\n } else {\n throw new IllegalArgumentException(\"Expecting either onError or onComplete\");\n }\n\n }", "public void ingresar_a_la_Opcion_de_eventos() {\n\t\t\n\t}", "@Override\n public void onResultClick(SearchResult result) {\n }", "public void testNullGetEvent() throws Exception\n {\n Log.log(\"TEST\", \"[GetFileTypeListActionTest.testNullGetEvent] Enter \");\n\n try\n {\n _response = performEvent(null);\n }\n catch (EventException ex)\n {\n Log.log(\"TEST\", \"[GetFileTypeListActionTest.testNullGetEvent]\" +\n \" Returning fail due to EventException: \"+ex.getMessage());\n Log.log(\"TEST\", \"[GetUserAcccountListActionTest.testNullGetEvent] Exit \");\n return;\n }\n catch (Exception ex)\n {\n Log.err(\"TEST\", \"[GetUserAccountListActionTeset.testNullGetEvent] Error Exit \", ex);\n assertTrue(\"Event Exception\", false);\n }\n\n //check response\n assertNotNull(\"response is null\", _response);\n assertTrue(\"event status is incorrect\", !_response.isEventSuccessful());\n assertEquals(\"Msg code incorrect\", IErrorCode.FIND_ENTITY_LIST_ERROR, _response.getMessageCode());\n assertNotNull(\"Error reason is null\", _response.getErrorReason());\n assertNotNull(\"Error trace is null\", _response.getErrorTrace());\n assertEquals(\"error type is incorrect\", _response.getErrorType(), SystemException.SYSTEM);\n Log.log(\"TEST\", \"[GetFileTypeListActionTest.testNullGetEvent] Exit \");\n }", "V result() throws Exception;", "@Override\n\t\t\t\tpublic void onSuccess(FacebookResult result)\n\t\t\t\t{\n\t\t\t\t\tFacebookResultReceivedEvent.fire(eventBus, result);\t\t\t\t\n\t\t\t\t}", "void onTestSuccess(ITestResult result);", "@Override\n\tpublic boolean isEventComplete() {\n\t\treturn status==EventCompleted;\n\t}", "public abstract void onNext();", "public void receiveUpEvent(Event evt) {\n switch(evt.getType()) {\n case Event.GET_DIGEST_OK:\n digest_promise.setResult(evt.getArg());\n return; // don't pass further up\n }\n super.receiveUpEvent(evt);\n }" ]
[ "0.6128906", "0.61242586", "0.5970629", "0.5970629", "0.5963805", "0.5961462", "0.5952263", "0.58434784", "0.5747295", "0.5713577", "0.5694556", "0.5649282", "0.5643413", "0.56255126", "0.5604614", "0.5593326", "0.5591974", "0.5577932", "0.5542979", "0.5507601", "0.5500113", "0.54881924", "0.54774725", "0.5447216", "0.5429386", "0.5420666", "0.5418018", "0.5410489", "0.5408423", "0.5394376", "0.537918", "0.53668916", "0.5366355", "0.535275", "0.534523", "0.5337058", "0.53313386", "0.53313386", "0.53274095", "0.5325317", "0.53175175", "0.5312414", "0.53118235", "0.5303279", "0.5294187", "0.5289465", "0.5288309", "0.5287122", "0.52840954", "0.52788234", "0.52708966", "0.5269666", "0.5254853", "0.5244156", "0.52396715", "0.523912", "0.5238351", "0.52283186", "0.52238226", "0.5221335", "0.52175677", "0.5206605", "0.5199685", "0.5198436", "0.5195361", "0.5189097", "0.5185707", "0.5184744", "0.5183258", "0.5182614", "0.51745063", "0.5158855", "0.5158427", "0.51481706", "0.51406944", "0.513893", "0.5133012", "0.5132294", "0.5131691", "0.513091", "0.51289123", "0.51280546", "0.51254195", "0.5122871", "0.51204294", "0.511902", "0.51118356", "0.51095515", "0.51030403", "0.5095439", "0.5091291", "0.50885046", "0.5075922", "0.5074078", "0.5073118", "0.50721973", "0.5071473", "0.5068123", "0.5059396", "0.5057354", "0.5056831" ]
0.0
-1
/ require isEvent(String name) == true ensure result.name == name
AbstractList<Event> getEventByName(String eventName) { return events; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getEventType();", "public String getEventName();", "boolean onEvent(Event event);", "public interface Event {\n String getName();\n void setName(String name);\n}", "String event_type () throws BaseException;", "@Test\n public void stateNameExtraction() {\n final String EVENT_NAME = \"TestEvent\";\n StateTransitionEvent event = new StateTransitionEventImpl( EVENT_NAME );\n\n assertThat( event.getEventName(), equalTo( EVENT_NAME ) );\n LOG.debug( \"Successfully created stateTransitionEvent=[\" + event + \"]\" );\n }", "EventType getEvent();", "@objid (\"0480e45a-6886-42c0-b13c-78b8ab8f713d\")\n boolean isIsEvent();", "String getEventType();", "public void setEventName(String name);", "boolean hasEvent();", "Event getEvent();", "public boolean match(Event e);", "public boolean check(EventType event);", "boolean isSetEvent();", "Event createEvent();", "Event createEvent();", "public Event nextEVPEC();", "public boolean isEvent(String eventName) {\r\n\t\tboolean result = false;\r\n\t\tfor (Event e : events) {\r\n\t\t\tif (e.getName().equals(eventName)) {\r\n\t\t\t\tresult = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "@Override\n public boolean isCorrespondingTo(Event event){\n String n = event.getName();\n return n.equals(name) || n.equals(name_lt) || n.equals(name_gt);\n }", "public interface Events {\n\n /**\n * Archive has stored the entities within a SIP.\n * <p>\n * Indicates that a SIP has been sent to the archive. May represent an add,\n * or an update.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>Number of entities archived</dd>\n * <dt>eventTarget</dt>\n * <dd>every archived entity</dd>\n * </dl>\n * </p>\n */\n public static final String ARCHIVE = \"archive\";\n\n /**\n * Signifies that an entity has been identified as a member of a specific\n * batch load process.\n * <p>\n * There may be an arbitrary number of independent events signifying the\n * same batch (same outcome, date, but different sets of targets). A unique\n * combination of date and outcome (batch label) identify a batch.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>Batch label/identifier</dd>\n * <dt>eventTarget</dt>\n * <dd>Entities in a batch</dd>\n * </dl>\n * </p>\n */\n public static final String BATCH = \"batch\";\n\n /**\n * File format characterization.\n * <p>\n * Indicates that a format has been verifiably characterized. Format\n * characterizations not accompanied by a corresponding characterization\n * event can be considered to be unverified.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>format, in the form \"scheme formatId\" (whitespace separated)</dd>\n * <dt>eventTarget</dt>\n * <dd>id of characterized file</dd>\n * </dl>\n * </p>\n */\n public static final String CHARACTERIZATION_FORMAT =\n \"characterization.format\";\n\n /**\n * Advanced file characterization and/or metadata extraction.\n * <p>\n * Indicates that some sort of characterization or extraction has produced a\n * document containing file metadata.\n * </p>\n * *\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>id of File containing metadata</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File the metadata describes</dd>\n * </dl>\n */\n public static final String CHARACTERIZATION_METADATA =\n \"characterization.metadata\";\n\n /**\n * Initial deposit/transfer of an item into the DCS, preceding ingest.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>SIP identifier uid</dd>\n * <dt>eventTarget</dt>\n * <dd>id of deposited entity</dd>\n * </dl>\n * </p>\n */\n public static final String DEPOSIT = \"deposit\";\n\n /**\n * Content retrieved by dcs.\n * <p>\n * Represents the fact that content has been downloaded/retrieved by the\n * dcs.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>http header-like key/value pairs representing circumstances\n * surrounding upload</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been downloaded</dd>\n * </dl>\n */\n public static final String FILE_DOWNLOAD = \"file.download\";\n\n /**\n * uploaaded/downloaded file content resolution.\n * <p>\n * Indicates that the reference URI to a unit of uploaded or downloaded file\n * content has been resolved and replaced with the DCS file access URI.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd><code>reference_URI</code> 'to' <code>dcs_URI</code></dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been resolved</dd>\n * </dl>\n */\n public static final String FILE_RESOLUTION_STAGED = \"file.resolution\";\n\n /**\n * Indicates the uploading of file content.\n * <p>\n * Represents the physical receipt of bytes from a client.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>http header-like key/value pairs representing circumstanced\n * surrounding upload</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been uploaded</dd>\n * </dl>\n */\n public static final String FILE_UPLOAD = \"file.upload\";\n\n /**\n * Fixity computation/validation for a particular File.\n * <p>\n * Indicates that a particular digest has been computed for given file\n * content. Digest values not accompanied by a corresponding event may be\n * considered to be un-verified.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>computed digest value of the form \"alorithm value\" (whitepsace\n * separated)</dd>\n * <dt>eventTarget</dt>\n * <dd>id of digested file</dd>\n * </dl>\n * </p>\n */\n public static final String FIXITY_DIGEST = \"fixity.digest\";\n\n /**\n * Assignment of an identifier to the given entity, replacing an\n * existing/temporary id. *\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd><code>old_identifier</code> 'to' <code>new_identifier</code></dd>\n * <dt>eventTarget</dt>\n * <dd>new id of object</dd>\n * </dl>\n */\n public static final String ID_ASSIGNMENT = \"identifier.assignment\";\n\n /**\n * Marks the start of an ingest process.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_START = \"ingest.start\";\n\n /**\n * Signifies a successful ingest outcome.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_SUCCESS = \"ingest.complete\";\n\n /**\n * Signifies a failed ingest outcome.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_FAIL = \"ingest.fail\";\n\n /**\n * Signifies that a feature extraction or transform has successfully\n * occurred.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of a DeliverableUnit or Collection</dd>\n * </dl>\n * </p>\n */\n public static final String TRANSFORM = \"transform\";\n\n /**\n * Signifies that a feature extraction or transform failed.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of a DeliverableUnit or Collection</dd>\n * </dl>\n * </p>\n */\n public static final String TRANSFORM_FAIL = \"transform.fail\";\n\n /**\n * Signifies a file has been scanned by the virus scanner.\n * <p>\n * Indicates that a file has been scanned by a virus scanner. There could be\n * more than one event for a file.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of file whose content was scanned</dd>\n * </dl>\n * </p>\n */\n public static final String VIRUS_SCAN = \"virus.scan\";\n\n /**\n * Signifies an new deliverable unit is being ingested as an update to the target deliverable unit.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of the deliverable unit being updated</dd>\n * </dl>\n * </p>\n */\n public static final String DU_UPDATE = \"du.update\";\n\n}", "public boolean isSameEvent(Event event) {\n if (this == event) {\n return true;\n } else if (event == null) {\n return false;\n } else {\n return this.getName().equals(event.getName())\n && this.getTime().equals(event.getTime());\n }\n }", "BasicEvent createBasicEvent();", "public interface Event\n\t{\n\t\tpublic static final String EVENT_ID = \"aether.event.id\";\n\t\tpublic static final String TIME = \"aether.event.time\";\n\t\tpublic static final String EVENT_TYPE = \"aether.event.type\";\n\t}", "public Event createEvent(String name) {\r\n\t\tEvent newEvent = new Event(this.GID, name);\r\n\t\tevents.add(newEvent);\r\n\t\treturn newEvent;\r\n\t}", "public Set<EventTO> getEventByName(String name) {\n\n Set<Event> events = eventRepository.findByName(name);\n if (!(events.isEmpty())) {\n LOGGER.info(\"returning event with name '{}'\", name);\n return mapperService.convertToEventTO(events);\n }\n else {\n LOGGER.error(\"no event with name '{}' could be found\", name);\n throw new ResourceNotFoundException(\"Event not found\");\n }\n }", "public interface Event {\n\n // Events emitted by Logic or StateMonitors\n String STATE_SYNCHRONIZED = \"state_synchronized\";\n String MEMBER_RECONNECTED = \"member_reconnected\";\n\n // Event emitted explicitly by Game part\n interface Game {\n\n // Bank\n String TRANSACTION = \"transaction\";\n\n // Lobby\n String POKE = \"poke\";\n String MEMBER_READY = \"member_ready\";\n }\n\n}", "public abstract NAEventType getEventType();", "public interface Event {\n\n}", "public interface Event {\n\n}", "EventUse createEventUse();", "@Override\n protected boolean acceptEvent(BuilderEvent event)\n {\n if (getEventType() == null)\n {\n return false;\n }\n assert event != null : \"Event is null!\";\n\n Class<?> eventClass = event.getClass();\n try\n {\n Method method = eventClass.getMethod(METHOD_TYPE);\n Object eventType = method.invoke(event);\n if (eventType instanceof Enum<?>)\n {\n return getEventType().equals(((Enum<?>) eventType).name());\n }\n }\n catch (Exception ex)\n {\n // All exceptions cause the event to be not accepted\n }\n\n return false;\n }", "@Test\n public void testNearFront()\n {\n String sName = \"near-front-listener\";\n generateEvents(sName);\n checkEvents(true, false);\n }", "@Override\n public boolean isCorrespondingTo(String eventName) {\n return eventName.equals(name) || eventName.equals(name_lt) || eventName.equals(name_gt) ;\n }", "@Test\n public void testDispatchEvent(){\n\n final SampleClass sample = new SampleClass();\n\n assertEquals(\"\", sample.getName());\n\n eventDispatcher.addSimulatorEventListener(new SimulatorEventListener(){\n\n public void onNewMessage(Exchange exchange, Conversation conversation) {\n sample.setName(\"Modified\");\n }\n\n public void onMatchingScenario(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onResponseBuilt(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onResponseSent(Exchange exchange, Conversation conversation) {\n \n }\n });\n\n eventDispatcher.dispatchEvent(SimulatorEventType.NEW_MESSAGE, null, null);\n\n assertEquals(\"Modified\",sample.getName());\n }", "private\n static\n void\n assertEventDataEqual( MingleReactorEvent ev1,\n String ev1Name,\n MingleReactorEvent ev2,\n String ev2Name )\n {\n Object o1 = null;\n Object o2 = null;\n String desc = null;\n\n switch ( ev1.type() ) {\n case VALUE: o1 = ev1.value(); o2 = ev2.value(); desc = \"value\"; break;\n case FIELD_START:\n o1 = ev1.field(); o2 = ev2.field(); desc = \"field\"; break;\n case STRUCT_START:\n o1 = ev1.structType(); o2 = ev2.structType(); desc = \"structType\";\n break;\n default: return;\n }\n\n state.equalf( o1, o2, \"%s.%s != %s.%s (%s != %s)\",\n ev1Name, desc, ev2Name, desc, o1, o2 );\n }", "void event(Event e) throws Exception;", "public interface Event {\n enum eventTriggers{\n Add_Event,\n Delete_Event,\n Reject_Event,\n Accept_Event,\n Find_Free_time\n }\n\n void addevent(AbstractEvent event);\n\n public void deleteEvent(String eventName);\n\n void update(AbstractEvent oldEvent,AbstractEvent newEvent);\n\n}", "com.walgreens.rxit.ch.cda.EIVLEvent getEvent();", "@Override\n public boolean evaluate(Event event) {\n return true;\n }", "public EventResult(String result) {\n\n }", "Event getE();", "Answer perform(final String event);", "HabitEvent getPassedHabitEvent();", "CatchingEvent createCatchingEvent();", "@Test\n public void testNear()\n {\n String sName = \"near-client-listener\";\n generateEvents(sName);\n checkEvents(true, false);\n }", "public Event setName(String name) {\n this.name = name;\n return this;\n }", "public abstract void processEvent(Object event);", "public interface IEvent {\n String execute(String params);\n}", "@Override\r\n public EventBean findEventByName(String name, String idTxoko)throws NameNotOkException,BusinessLogicException {\n return null;\r\n }", "public void testMetaDataVerificationForLSEventName(final String programeName,\n final String eventName) throws ParseException;", "public interface EventFilter {\n\n /**\n * Filter an event\n *\n * @param eventName\n * name of the event to filter\n * @param params\n * objects sent with the event\n * @param eventBus\n * event bus used to fire the event\n * @return false if event should be stopped, true otherwise\n */\n boolean filterEvent(String eventName, Object[] params, Object eventBus);\n}", "public interface IEvent {\n}", "public String getEventName() {\n\t\treturn mEventName;\n\t}", "void onNewEvent(Event event);", "BasicEvents createBasicEvents();", "Event getCondition();", "private boolean isWholeGameEvent(String eventType){\n return eventType.equals(\"Stonks\") || eventType.equals(\"Riot\") || eventType.equals(\"Mutate\") || eventType.equals(\"WarpReality\");\n }", "ProgramEventEvent createProgramEventEvent();", "com.google.speech.logs.timeline.InputEvent.Event getEvent();", "public interface EventCallback {\n void invoke(String receiver,Object result);\n}", "public static Matcher<CallbackEvent> isCallbackEvent(String callbackName)\n {\n return new FeatureMatcher<CallbackEvent, String>(equalTo(callbackName), \"is the callback event\", \"callback name\")\n {\n @Override\n protected String featureValueOf(final CallbackEvent actual)\n {\n return actual.getCallbackName();\n }\n };\n }", "public interface Event {\n public static final String NAMESPACE = \"http://purl.org/NET/c4dm/event.owl#\";\n\n // classes\n public static final URI\n Event = new URIImpl(NAMESPACE + \"Event\"),\n Factor = new URIImpl(NAMESPACE + \"Factor\"),\n Product = new URIImpl(NAMESPACE + \"Product\");\n\n // properties\n public static final URI\n agent = new URIImpl(NAMESPACE + \"agent\"),\n agent_in = new URIImpl(NAMESPACE + \"agent_in\"),\n factor = new URIImpl(NAMESPACE + \"factor\"),\n factor_of = new URIImpl(NAMESPACE + \"factor_of\"),\n hasAgent = new URIImpl(NAMESPACE + \"hasAgent\"),\n hasFactor = new URIImpl(NAMESPACE + \"hasFactor\"),\n hasLiteralFactor = new URIImpl(NAMESPACE + \"hasLiteralFactor\"),\n hasProduct = new URIImpl(NAMESPACE + \"hasProduct\"),\n hasSubEvent = new URIImpl(NAMESPACE + \"hasSubEvent\"),\n isAgentIn = new URIImpl(NAMESPACE + \"isAgentIn\"),\n isFactorOf = new URIImpl(NAMESPACE + \"isFactorOf\"),\n literal_factor = new URIImpl(NAMESPACE + \"literal_factor\"),\n place = new URIImpl(NAMESPACE + \"place\"),\n producedIn = new URIImpl(NAMESPACE + \"producedIn\"),\n produced_in = new URIImpl(NAMESPACE + \"produced_in\"),\n product = new URIImpl(NAMESPACE + \"product\"),\n sub_event = new URIImpl(NAMESPACE + \"sub_event\"),\n time = new URIImpl(NAMESPACE + \"time\");\n}", "public int compareTo(Event e)\n { \n int x =eventName.compareToIgnoreCase(e.eventName);\n if (x != 0 )\n return x;\n else return 0;\n \n }", "public interface DomainEvent {}", "private String getOutputEventName(String outputEvent) throws IOException {\n return outputEvent != null ? objectMapper.readValue(outputEvent, EventDefinition.class).getName() : null;\n }", "public interface ChoosableEvent extends Event{\n\n void chooseAnswer(String answer, String username);\n}", "public boolean matchesEventData(String nameTest, HistoricalPeriod periodTest, String descriptionTest) {\r\n\t\tif(matchesName(nameTest) && matchesPeriod(periodTest) && matchesDescription(descriptionTest))\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "boolean handlesEventsOfType(RuleEventType type);", "public void processEvent(Event event) {\n\t\t\n\t}", "public EventName getName() {\n return this.name;\n }", "String getEventId();", "@Override\n public boolean execute(String input) throws DukeException {\n switch (stage) {\n case 0:\n setEventName(input);\n setResponse(ui.askEventStartTime());\n incrementStage();\n break;\n case 1:\n setEventStartTime(input);\n setResponse(ui.askEventEndTime());\n incrementStage();\n break;\n case 2:\n setEventEndTime(input);\n tm.addEvent(new Event(eventName, eventStartTime, eventEndTime));\n setResponse(\"Event added\");\n setEventEndTime(input);\n setDone();\n }\n return true;\n }", "private Transition findTransitionByNameAndEvent(PetriNet sourcePN,\n\t\t\tString name, String event) {\n\t\tTransition noTransition = null;\n\t\t// get the petrinet of the input simulation model\n\t\tIterator<Transition> transitions = sourcePN.getTransitions().iterator();\n\t\twhile (transitions.hasNext()) {\n\t\t\tTransition transition = transitions.next();\n\t\t\tLogEvent le = transition.getLogEvent();\n\n\t\t\t// ignore invisible tasks\n\t\t\tif (le != null) {\n\t\t\t\tString leName = le.getModelElementName();\n\t\t\t\tString leType = le.getEventType();\n\t\t\t\t// return the first matching transition found in the model\n\t\t\t\tif (leName.equals(name) && leType.equals(event)) {\n\t\t\t\t\treturn transition;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn noTransition;\n\t}", "public interface CustomEventNamesResolver {\n String resolveCustomEventName(String str);\n }", "public EventDetails getByEventName(String eventName);", "EventUses createEventUses();", "boolean hasChangeEvent();", "protected abstract void regEvent(boolean regEvent);", "public String getTypeEvent() {\n\t\treturn typeEvent;\n\t}", "@Test\n public void EffectSelectedEventTest() {\n EffectSelectedEvent event = null;\n boolean result = true;\n try {\n event = new EffectSelectedEvent(0, \"tony\", null, null);\n turnController.handleEvent(event);\n } catch(Exception e) {\n result = false;\n }\n assertTrue(result);\n\n }", "public interface EventUtils {\n String SYNC_FRIENDS = \"sync_friends\";\n String TYPING_MSG = \"typing ...\";\n String TYPING = \"typing\";\n String PAUSED = \"paused\";\n int STATUS_SUCCESS = 1;\n int STATUS_PENDING = 2;\n int STATUS_FAILURE = 3;\n int STATUS_DELIVERED = 4;\n int STATUS_SEEN = 5;\n int ADD_USERS_RESULT_CODE = 201;\n String YOU = \"You\";\n String USER = \"user\";\n}", "com.walgreens.rxit.ch.cda.EIVLEvent addNewEvent();", "public T caseEvent(Event object)\n {\n return null;\n }", "public abstract void onEvent(T event);", "abstract void checkSafeEventOnTransition (Node transNode, String eventName)\n throws Exception;", "public interface IEvent {\r\n\r\n\t/**\r\n\t * Returns the source of the event. As events are emitted\r\n\t * by instances that are bound to an instance, this method\r\n\t * will point to the corresponding source emitter that \r\n\t * received the event.\r\n\t * \r\n\t * @return The source of the event.\r\n\t */\r\n\tpublic IEventCollector getSource();\r\n\t\r\n\t/**\r\n\t * The type of the event. This will be the string that is\r\n\t * negotiated in the contract. \r\n\t * \r\n\t * @return The type of the event that has been sent. This\r\n\t * \twill be the parameter as defined in the contract.\r\n\t */\r\n\tpublic String getType();\r\n\t\r\n\t/**\r\n\t * The data object that has been sent as event object. \r\n\t * \r\n\t * @return The data object of this event.\r\n\t */\r\n\tpublic Object getData();\r\n\r\n}", "public void getEventByName()\r\n {\r\n \r\n boolean b=false;\r\n \r\n \r\n String output = \"\";\r\n output=\"Id \"+\"Event Name \"+\"Organizer \"+\"Date \"+\" Fees($)\"+\"\\n\"; \r\n \r\n \r\n List<Event> list2=new ArrayList();\r\n do{\r\n \r\n List<Event> list1=fillArrayList();\r\n \r\n \r\n String string=JOptionPane.showInputDialog(\"Enter Event Name to search Event by Name\");\r\n \r\n for(Event e:list1)\r\n {\r\n if(e.getName().equals(string))\r\n {\r\n list2.add(e);\r\n b=true;\r\n break;\r\n }\r\n else\r\n {\r\n \r\n b=false;\r\n }\r\n }\r\n if(!b)\r\n JOptionPane.showMessageDialog(null,\"Event \"+string+\" Does not exist! please try again\",\"Error\",JOptionPane.ERROR_MESSAGE);\r\n }while(!b);\r\n \r\n \r\n for(int i = 0; i<list2.size(); i++){\r\n \r\n String everything2 = list2.get(i).toString();\r\n\r\n output += everything2+\"\\n\"; \r\n }\r\n JOptionPane.showMessageDialog(null,output,\"Event\",JOptionPane.INFORMATION_MESSAGE);\r\n \r\n allMenuClass.userMenu();\r\n }", "public String getEventType()\r\n {\r\n return eventType;\r\n }", "public interface NoEventType {\n\n}", "@Override\n public boolean equals(Object other) {\n if (this == other) {\n return true;\n } else if (!(other instanceof Event)) {\n return false;\n } else if (other == null) {\n return false;\n } else {\n Event otherEvent = (Event) other;\n return this.getName().equals(otherEvent.getName())\n && this.getTime().equals(otherEvent.getTime())\n && this.getTags().equals(otherEvent.getTags());\n }\n }", "public java.lang.String getEventtype() {\n\treturn eventtype;\n}", "private VEvent eventExists(VEvent testMe)\n {\n for (ComparableCalendar current : queue)\n {\n VEvent currEv = (VEvent) current.getComponent(\"VEVENT\");\n if (testMe.getSummary().equals(currEv.getSummary()))\n return testMe;\n }\n return null;\n }", "public boolean isEventCondition() {\n return true;\n }", "public T caseEvent(Event object) {\r\n\t\treturn null;\r\n\t}", "@Override\n public String getEventType()\n {\n\t return null;\n }", "@Then(\"the {string} event is broadcast\")\n public void the_event_is_broadcast(String string) throws Exception {\n ArgumentCaptor<Event> argumentCaptor = ArgumentCaptor.forClass(Event.class);\n verify(eventSender, atLeastOnce()).sendEvent(argumentCaptor.capture());\n assertEquals(EventType.valueOf(string), argumentCaptor.getValue().getType());\n }", "public String getEventTypeName()\n {\n return eventTypeName;\n }", "@Override\n public List<ProcessEvent> getAvailableEventsByStateName(\n List<ProcessEvent> processEvents, String processStateName)\n {\n List<ProcessEvent> allEvents = new ArrayList<>();\n for (ProcessEvent processEventValue : processEvents)\n {\n if (processStateName.endsWith(processEventValue.getInitialState().getInternalName()))\n {\n allEvents.add(processEventValue);\n }\n }\n return allEvents;\n }", "public interface IMainEvent {\n\n void showEvent(String data);\n}", "public void testHandlerWithNameAttributeForApplicationEvent() throws Exception {\n DefDescriptor<ComponentDef> componentDefDescriptor = DefDescriptorImpl.getInstance(\n \"handleEventTest:handlerWithNameForApplicationEvent\", ComponentDef.class);\n try {\n componentDefDescriptor.getDef();\n fail(\"Expected InvalidReferenceException\");\n } catch (InvalidReferenceException e) {\n assertEquals(\n \"Incorrect exception message\",\n \"A aura:handler that specifies a name=\\\"\\\" attribute must handle a component event. Either change the aura:event to have type=\\\"COMPONENT\\\" or alternately change the aura:handler to specify an event=\\\"\\\" attribute.\",\n e.getMessage());\n }\n }" ]
[ "0.6672214", "0.66486824", "0.65719426", "0.65647835", "0.65492284", "0.6542457", "0.6525358", "0.6505537", "0.64446133", "0.64282936", "0.6337599", "0.63345593", "0.6185693", "0.6158291", "0.6115939", "0.6112305", "0.6112305", "0.6088878", "0.6087007", "0.6068267", "0.60121334", "0.5962486", "0.5953378", "0.5894926", "0.5870738", "0.5852263", "0.58501834", "0.58492756", "0.58390397", "0.58390397", "0.581587", "0.5810836", "0.5781804", "0.575177", "0.56957084", "0.5692677", "0.56748396", "0.567246", "0.5670331", "0.5663945", "0.56585526", "0.5656602", "0.56455237", "0.5629898", "0.5629365", "0.56206584", "0.5619014", "0.56115556", "0.560696", "0.5594099", "0.5589469", "0.5569023", "0.55387", "0.5529672", "0.5513955", "0.55099136", "0.55070287", "0.5506959", "0.54977435", "0.5475431", "0.54671204", "0.5463944", "0.5460091", "0.54561627", "0.54492253", "0.5442939", "0.543888", "0.5433837", "0.5431851", "0.5429275", "0.54233634", "0.5419178", "0.5409096", "0.5395714", "0.5392409", "0.53768665", "0.5374877", "0.53744954", "0.5373191", "0.5362469", "0.53609157", "0.5340988", "0.5335733", "0.5334766", "0.53308874", "0.53294337", "0.5328203", "0.53231126", "0.53081805", "0.52976584", "0.5296136", "0.5295598", "0.5293271", "0.52767974", "0.52762043", "0.5269981", "0.5268149", "0.5265567", "0.52650726", "0.5263669", "0.52567595" ]
0.0
-1
/ require name != null
public boolean isEvent(String eventName) { boolean result = false; for (Event e : events) { if (e.getName().equals(eventName)) { result = true; } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isNameRequired();", "private boolean isNameValid(String name) {\n\n }", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "public boolean checkName(String name)\n {\n return true;\n }", "private static boolean validName(String name) {\n return name != null && !name.strip().isBlank();\n }", "@Test\n public void testIsNullValidName() {\n FieldVerifier service = new FieldVerifier();\n String name = null;\n boolean result = service.isValidName(name);\n assertEquals(false, result);\n }", "@Test\r\n\t@Order(1)\r\n void testName() {\r\n robot.setName(null);\r\n assertNotEquals(null, robot.getName(),\"Name test failed\\nREASON: null name not allowed!\");\r\n }", "private boolean examineName(String name) {\r\n resourceName = null;\r\n resourceIsClass = false;\r\n\r\n if (name.endsWith(\".java\")) {\r\n return false;\r\n }\r\n\r\n if (name.endsWith(\".class\")) {\r\n name = name.substring(0, name.length() - 6);\r\n if (classMap.containsKey(name)) {\r\n return false;\r\n }\r\n resourceIsClass = true;\r\n } else {\r\n if (resourceMap.containsKey(name)) {\r\n return false;\r\n }\r\n }\r\n\r\n resourceName = name;\r\n return true;\r\n }", "private static void checkNull(Object value, String name) throws LateDeliverablesProcessingException {\r\n if (value == null) {\r\n throw new LateDeliverablesProcessingException(\"The \" + name + \" should not be null.\");\r\n }\r\n }", "private void checkNotNull(Object reference, String name) {\n\t\tif (reference == null) {\n\t\t\tthrow new NullPointerException(getString(R.string.error_config, name));\n\t\t}\n\t}", "private boolean isInternal(String name) {\n return name.startsWith(\"java.\")\n || name.startsWith(\"javax.\")\n || name.startsWith(\"com.sun.\")\n || name.startsWith(\"javax.\")\n || name.startsWith(\"oracle.\");\n }", "default void checkInOk(String name) {\n }", "public static void checkNull(Object value, String name) {\r\n if (value == null) {\r\n throw new IllegalArgumentException(\"The \" + name + \" is null.\");\r\n }\r\n }", "public boolean exsitName(String name) {\n\t\tKynamic kynamic = this.kynamicDao.getKynamicByName(name);\r\n\t\treturn kynamic!=null?true:false;\r\n\t}", "@Override\n public String nameAndType() {\n\t String n = \"noname\";\n\t if (name != null) {\n\t\t n=name;\n\t }\n\t return \"if \"+n+\":\";\n }", "private boolean checkName(String name) {\n if (!name.equals(\"\")) {\n //Check si le nom est déjà utilisé\n return myDbA.checkName(name);\n }\n return false;\n }", "private static void assertJarName(String jarName) throws SQLException\n\t{\n\t\tif(jarName != null)\n\t\t{\n\t\t\tint len = jarName.length();\n\t\t\tif(len > 0 && Character.isJavaIdentifierStart(jarName.charAt(0)))\n\t\t\t{\n\t\t\t\tint idx = 1;\n\t\t\t\tfor(; idx < len; ++idx)\n\t\t\t\t\tif(!Character.isJavaIdentifierPart(jarName.charAt(idx)))\n\t\t\t\t\t\tbreak;\n\n\t\t\t\tif(idx == len)\n\t\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tthrow new SQLException(\"The jar name '\" + jarName\n\t\t\t+ \"' is not a valid name\");\n\t}", "@Override\n public String visit(NameExpr n, Object arg) {\n return null;\n }", "private void checkNameValidation(String name) throws noStudentNameException{\n\t\tif (name.isEmpty()){\n\t\t\tthrow new noStudentNameException(\"Student Name Cannot be Empty!\");\n\t\t}\n\t}", "@Test(expected = IllegalArgumentException.class)\n public void deserialization_with_null_name_test() throws Exception{\n ConstantRegexScorerParams params = new ConstantRegexScorerParams().setName(null);\n doDeserialization(params, \"java.lang.IllegalArgumentException\", AbstractScorerConf.NULL_OR_EMPTY_NAME_ERROR_MSG);\n }", "boolean hasDataName();", "private <T> T mandatory( final String name, final T object )\n {\n if( object == null )\n {\n throw new IllegalStateException( name + \" cannot be null\" );\n }\n return object;\n }", "public boolean checkName(String name)\n\t{\n\t\treturn (robotHM.containsKey(name));\n\t}", "@Test\n\tpublic void caseNameWithNull() {\n\t\tString caseName = \"null\";\n\t\ttry {\n\t\t\tStringNumberUtil.stringUtil(caseName);\n\t\t\tfail();\n\t\t} catch (StringException e) {\n\n\t\t}\n\t}", "static public boolean isSanitaryName(String name) {\n return sanitizeName(name).equals(name);\n }", "@Test\n public void testIsEmptyValidName() {\n FieldVerifier service = new FieldVerifier();\n String name = \"\";\n boolean result = service.isValidName(name);\n assertEquals(false, result);\n }", "boolean _non_existent();", "public boolean isNamed(String n) {\n return name.equals(n);\n }", "@NotNull\n String getName();", "public Classification nameOf(String name) {\n throw new IllegalStateException(\"Unknown definition: \" + this); // basically unreachable\n }", "public boolean hasParameter(String name) throws IllegalArgumentException {\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"hasParameter() \");\n Via via=(Via)sipHeader;\n \n if(name == null) throw new IllegalArgumentException\n (\"JAIN-EXCEPTION: null parameter\");\n return via.hasParameter(name);\n }", "@Test\n public void testCheckNull() {\n Helper.checkNull(\"non-null\", \"non-null name\");\n }", "private void ensureNameExists(String name) throws BadFileException {\n\t\tif (name.equals(\"OuterWalls\") || boardItemMap.containsKey(name)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthrow new BadFileException(name + \" name does not exist yet\");\r\n\t}", "boolean hasOriginName();", "@Override\n public String visit(Name n, Object arg) {\n return null;\n }", "boolean isResolvable(String name);", "default boolean isPresent(String name) {\n return getOptionStrings(name) != null;\n }", "protected void check(String name, Object value) {\n\t\tcheck(name,value,false);\n\t}", "String getName( String name );", "public ContainsNamedTypeChecker(String name) {\n myNames.add(name);\n }", "public static void checkObjectNotNull(Object obj, String name) {\n if (obj == null) {\n throw new IllegalArgumentException(name + \" is null.\");\n }\n }", "@Test\n public void testIsValidName() {\n FieldVerifier service = new FieldVerifier();\n String name = \"toto\";\n boolean result = service.isValidName(name);\n assertEquals(true, result);\n }", "void getName(String name);", "void checkBlockName(String name) throws IllegalArgumentException {\n\t\tif (!Memory.isValidMemoryBlockName(name)) {\n\t\t\tthrow new IllegalArgumentException(\"Invalid block name: \" + name);\n\t\t}\n\t}", "public final void testNoName() {\n testTransaction1.setName(\"\");\n assertFalse(testTransaction1.isValidTransaction());\n }", "@NotNull\n String simpleName();", "@Override\n public String getName() {\n return null;\n }", "private String checkName() {\n\n System.out.println(\"Enter file name along with extension\");\n\n String fileName = scanner.next();\n\n if (fileName.equals(\"\") || !(fileName.contains(\".\")))\n return null;\n\n return fileName;\n }", "@Override\n public String getName() {\n return null;\n }", "private static final void assertName(final WadlElementName name, final XMLStreamReader reader) {\n if (!match(name, reader)) {\n throw new AssertionError(reader.getLocalName());\n }\n }", "public void testGetName() {\n String name = mb.getName();\n assertNotNull(name);\n assertTrue(name.length() > 0);\n }", "@Override\n public String getName() {\n return null;\n }", "boolean hasCodeName();", "public abstract boolean isNameAvailable(String readerName);", "public boolean isValidName(String name)\r\n {\r\n // check for illegal combinations of characters\r\n // this is probably not a complete check, but hopefully it is good enough\r\n if ( (name == null) ||\r\n (name.equals(\"\")) ||\r\n Character.isUpperCase(name.charAt(0)) ||\r\n containsSubString(name, TIGHT_BINDING) ||\r\n containsSubString(name, LOOSE_BINDING) ||\r\n containsSubString(name, SINGLE_MATCH) ||\r\n containsSubString(name, \"/\") ||\r\n containsSubString(name, \" \") ||\r\n containsSubString(name, \"\\t\") ||\r\n containsSubString(name, \"\\n\") ||\r\n name.equals(UNIQUE_NAME) )\r\n {\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "public static boolean isName( String name )\n {\n return isOs( null, name, null, null );\n }", "@Override\n\tpublic boolean isExist(String name) {\n\t\treturn false;\n\t}", "public boolean isValidName(String proposedName);", "abstract String name();", "public static boolean checkName(String name) {\r\n\t\tboolean result = false;\r\n\t\tif (check(name) && name.matches(CommandParameter.REG_EXP_NAME)) {\r\n\t\t\tresult = true;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public String getName(){return null;}", "@Override\n public String getName() {\n return null;\n }", "@Override\n public String getName() {\n return null;\n }", "@Override\n public String getName() {\n return null;\n }", "public static boolean isValid(String name) {\n\t\tif ((name == null) || name.isEmpty()) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "@Override\n public String validNameProject(String name, Integer project_Oid) {\n return null;\n }", "private NFAState checkIfExists(String name) {\r\n\t\tNFAState ret = null;\r\n\t\tfor (NFAState s : states) {\r\n\t\t\tif (s.getName().equals(name)) {\r\n\t\t\t\tret = s;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "private NFAState checkIfExists(String name) {\n\t\tNFAState ret = null;\n\t\tfor(NFAState s : states){\n\t\t\tif(s.getName().equals(name)){\n\t\t\t\tret = s;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "boolean hasVName();", "public Boolean comprovaName(String name) {\n\t\treturn (rv.validateName(name));\n\t}", "public static YesNo nameOf(String name) {\n if (name == null) { return null; }\n try { return valueOf(name); } catch (RuntimeException ignored) { return null; }\n }", "public boolean strictMatches(@Nullable String name, ReflectionClassWrapper[] params) {\n\n if(name != null)\n if(!getName().equals(name))\n return false;\n\n var paramTypes = getExecutable().getParameterTypes();\n\n if(!(paramTypes.length == params.length))\n return false;\n\n for (int i = 0; i < params.length; i++) {\n\n if(!params[i].getName().equals(paramTypes[i].getName()))\n return false;\n\n }\n\n return true;\n\n }", "public abstract String filterLibraryName(final String name);", "abstract boolean canHandle(\n final PathReal name);", "private String getUser(String name) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic String getName()\r\n\t{\n\t\treturn null;\r\n\t}", "public void check( Name name ) throws ParseException\n\t{\n\t\tif (map.containsKey( name.name ))\n\t\t\tthrow new ParseException( String.format(\n\t\t\t\t\"duplicate name (%s) at line %d\", name.name, name.token.beginLine ) );\n\t}", "abstract String getName();", "private static boolean isValidRegattaName(String name) {\n\t\tif(name.length() == 0) {\n\t\t\tSystem.out.println(\"\\nRegatta names must be atleast one character!\"); \n\t\t\treturn false;\n\t\t}\n\n\t\tif(name.indexOf('.') == -1 && name.length() != 0) return true;\n\t\telse {\n\t\t\tSystem.out.println(\"\\nRegatta names cannot have \\'.\\' in them!\"); \n\t\t\treturn false;\n\t\t}\n\t}" ]
[ "0.6718677", "0.66389525", "0.6536822", "0.6536822", "0.6536822", "0.6536822", "0.6536822", "0.6536822", "0.6536822", "0.6536822", "0.6536822", "0.6536822", "0.6536822", "0.6536822", "0.6536822", "0.6536822", "0.6536822", "0.6536822", "0.6536822", "0.6536822", "0.6536822", "0.6536822", "0.6536822", "0.6536822", "0.6536822", "0.6505257", "0.6247052", "0.62167937", "0.6150527", "0.60953057", "0.5974713", "0.59569174", "0.5883119", "0.5873108", "0.579821", "0.57758135", "0.5772697", "0.5762725", "0.57553226", "0.5749437", "0.5715108", "0.57063246", "0.56993353", "0.5686141", "0.5685021", "0.56847197", "0.5683862", "0.56823456", "0.56653655", "0.5662027", "0.5655913", "0.56496465", "0.5649509", "0.5648701", "0.56364405", "0.5636091", "0.5617373", "0.5615708", "0.5596964", "0.5581597", "0.55541474", "0.55519575", "0.55505973", "0.55484587", "0.5542317", "0.55388993", "0.55385613", "0.55267113", "0.5524271", "0.5523869", "0.552307", "0.55182046", "0.5509994", "0.54943997", "0.5491498", "0.5484759", "0.548193", "0.5480058", "0.54800224", "0.54785085", "0.54777765", "0.5468388", "0.54680306", "0.5450057", "0.5450057", "0.5450057", "0.54438233", "0.54399157", "0.5436523", "0.5431114", "0.542242", "0.54185236", "0.54168683", "0.54103893", "0.54097384", "0.5407717", "0.5404361", "0.5400152", "0.5399107", "0.5398352", "0.539521" ]
0.0
-1
/ ensure Result == netBalance
public double getNetBalance() { return netBalance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double getBalance();", "double getBalance();", "abstract int checkBalance(String accountno) throws RemoteException;", "public boolean isBalanced ();", "public abstract boolean isBalanced();", "public void checkBalance()\n\t{\n\t\tList<Account> accounts = Main.aDao.getAllAccounts(this.loggedIn.getUserId());\n\t\tdouble accountsTotal = 0;\n\t\t\n\t\tfor(Account a : accounts)\n\t\t{\n\t\t\taccountsTotal += a.getBalance();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Total funds available across all accounts:\\n\" + accountsTotal);\n\t}", "public Money getTotalBalance();", "@Test\n public void test_total_balance3() {\n assertEquals(0, ao3.totalBalanceOfAccountsOwned(), EPS);\n }", "public abstract int getBalancesRead();", "@Test\n public void test_total_balance2() {\n assertEquals(1200, ao2.totalBalanceOfAccountsOwned(), EPS);\n }", "public int getPropertyBalance();", "void checkBalance() {\n\t\tSystem.out.println(\"Account balance: \" + balance);\n\t}", "protected double getTotalBalance()\r\n {\r\n return totalBalance;\r\n }", "private double getBalance() { return balance; }", "@Override\r\npublic void checkBalance() {\n\t\r\n}", "@Override\n\tpublic void checkBalance() {\n\t\tSystem.out.println(\"balance is checked\");\n\t}", "public double getCheckingBalance() {\n return checkingBalance;\n }", "public double getBalance()\n \n {\n \n return balance;\n \n }", "double getBalance(UUID name);", "@Test\n public void testGetBalance() {\n System.out.println(\"getBalance\");\n Member instance = member;\n \n double expResult = 120.00;\n double result = instance.getBalance();\n \n assertEquals(expResult, result, 120.00);\n }", "private int calculateBalance() {\n return height(getRight()) - height(getLeft());\n }", "public double getBalance() {\n\n double balance = 0;\n balance = overDraftLimit;\n return balance;\n\n }", "public int getBalance()\n {\n return balance;\n }", "@Test\n\tpublic void testWithdraw(){\n\t\t\n\t\t// Arrange\n\t\tBigDecimal amountToWithdraw = new BigDecimal(10.00);\n\t\tBigDecimal expectedBalance = new BigDecimal(110.5);\n\t\tdouble delta = 1e-3;\n\t\t// Act\n\t\tcurrentAccount.withdraw(amountToWithdraw);\n\t\tBalance actualBalance = currentAccount.checkBalance();\n\t\t\n\t\t// Assert\n\t\tassertEquals(expectedBalance.doubleValue(), actualBalance.getAmount().doubleValue(), delta);\n\t}", "public int getBalance() {\n return total_bal;\n }", "@Test\n public void testGetBalance() {\n System.out.println(\"getBalance\");\n BankAccount instance = new BankAccount(\"Kelly\", 99.99);\n double expResult = 99.99;\n double result = instance.getBalance();\n assertEquals(expResult, result, 0.0);\n }", "public int getBalance() {\n return balance;\n }", "public int getBalance() {\n return balance;\n }", "public Coin getBalance(BalanceType balanceType) {\n try {\n if (balanceType == BalanceType.AVAILABLE || balanceType == BalanceType.AVAILABLE_SPENDABLE) {\n List<TransactionOutput> candidates = calculateAllSpendCandidates(true, balanceType == BalanceType.AVAILABLE_SPENDABLE);\n CoinSelection selection = coinSelector.select(NetworkParameters.MAX_MONEY, candidates);\n return selection.valueGathered;\n } else if (balanceType == BalanceType.ESTIMATED || balanceType == BalanceType.ESTIMATED_SPENDABLE) {\n List<TransactionOutput> all = calculateAllSpendCandidates(false, balanceType == BalanceType.ESTIMATED_SPENDABLE);\n Coin value = Coin.ZERO;\n for (TransactionOutput out : all) value = value.add(out.getValue());\n return value;\n } else {\n throw new AssertionError(\"Unknown balance type\"); // Unreachable.\n }\n } finally {\n }\n }", "public long getBalance() {\n return this.balance;\n }", "public long getBalance() {\n\t\n\treturn balance;\n}", "public boolean checkBalance() {\n checkBalanceHelper(root);\n if (unbalanced == null) {\n return true;\n } else {\n return false;\n }\n }", "public Integer getBalance() {\n return balance;\n }", "public Integer getBalance() {\n return balance;\n }", "public int hasBalance(UUID uuid, int number) {\r\n\t\tPennyGame plugin = PennyGame.getPlugin(PennyGame.class);\r\n\t\t//int previousTicketCount = getTicketCount(uuid);\r\n\t\t//number = Math.min(number, this.maxTicketCount - previousTicketCount);\r\n\t\tRegisteredServiceProvider<Economy> rsp = plugin.getServer().getServicesManager().getRegistration(Economy.class);\r\n\t\tEconomy econ = rsp.getProvider();\r\n\t\tOfflinePlayer player = Bukkit.getOfflinePlayer(uuid);\r\n\t\tdouble balance = econ.getBalance(player);\r\n\t\tnumber = (int)Math.min(number, (balance / this.ticketPrice));\r\n\t\t//number = (int)Math.min(number - (number - (balance / this.ticketPrice)), number);\r\n\t\t\r\n\t\treturn number;\t\r\n\t}", "@Test\n public void testGetBalance() {\n System.out.println(\"getBalance\");\n Account instance = new Account(\"Piper\", 10.0);\n double expResult = 10.0;\n double result = instance.getBalance();\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "public void balance(int arg1)\n \n {\n \tint sum=0;\n int s;\n int i=0;\n response=RestAssured.get(\"http://18.222.188.206:3333/accounts\");\n Bala=response.jsonPath().getList(\"Balance\");\n while(i<=Bala.size())\n {\n try\n {\n if(Bala.get(i)!=null)\n {\n s=Integer.parseInt(Bala.get(i));\n if(s>arg1)\n {\n sum++;\n }\n }\n }\n catch(Exception e)\n {\n \n }\n i++;\n \n }\n System.out.println(\"The number of accounts with balance 200000= \"+sum);\n }", "public String balance() {\n\t\treturn this.apiCall(\"balance\", \"\", \"\", true);\n\t}", "public double getBalance()\n {\n return startingBalance;\n }", "public double getBalance()\r\n\t{\r\n\t\treturn balance;\t\t\r\n\t}", "private void listBalances() {\n\t\t\r\n\t}", "public int getBalance() {\n return this.balance;\n\n }", "public double getBalance(){\r\n\t\treturn balance;\r\n\t}", "@Test\n public void testGetBalance() {\n AVLNode<Integer> instance = new AVLNode<> ();\n instance.setBalance( 4 );\n int expResult = 4;\n int result = instance.getBalance();\n assertEquals(expResult, result);\n }", "public BigDecimal getBalance()\n\t{\n\t\tBigDecimal retValue = Env.ZERO;\n\t//\tlog.config( toString() + \" Balance=\" + retValue);\n\t\treturn retValue;\n\t}", "public double getBalance()\n {\n return balance;\n }", "public Double getBalance() {\r\n return balance;\r\n }", "public double getBalance(){\n return this.balance;\r\n }", "private void doCheckBalance() {\n while (true){\n try{\n Account userAccount = ui.readAccount(currentUser.getAccounts());\n ui.displayMessage(\"Balance: \" + userAccount.getBalance());\n break;\n } catch (Exception e){\n ui.displayError(\"Please enter a valid number.\");\n }\n }\n\n }", "public double getBalance(){\n return balance.getBalance();\n }", "public double getBalance() {\n return balance;\n }", "public float getBalance() {\n return balance;\n }", "public double getBalance() {\n return balance;\n }", "public double getBalance() {\n return balance;\n }", "public double getBalance() {\n return balance;\n }", "public double getBalance() {\n return balance;\n }", "public double getPendingBalance() {\n return pendingBalance;\n }", "public double getCurrentBalance(){\n if(!checkAccountOpen()){\n System.out.println(\"This transaction could not be processed. Please check your account status.\");\n }\n System.out.println(\"Your current balance is: $\"+currentBalance);\n return currentBalance;\n }", "public void getBalance() {\n\t\tSystem.out.println(\"Balance in Savings account is\" + balance);\n\t\t//return balance;\n\t}", "public double getBalance(){\n\t\treturn balance;\n\t}", "@Test\r\n public void testCalculateNet() {\r\n int hours = 30;\r\n int rate = 15;\r\n int tax = 58;\r\n CalculateNet test = new CalculateNet();\r\n int result = CalculateNet.calculateNet(hours, rate, tax);\r\n assertEquals(392, result);\r\n }", "public double getBalance() {\n return this.balance;\n }", "public static int getRandomBalance(){\n return rand.nextInt(1000000);\n }", "@Test\n public void noFrozenBalance() {\n UnfreezeBalanceActuator actuator = new UnfreezeBalanceActuator(getContractForBandwidth(UnfreezeBalanceActuatorTest.OWNER_ADDRESS), UnfreezeBalanceActuatorTest.dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n try {\n actuator.validate();\n actuator.execute(ret);\n TestCase.fail(\"cannot run here.\");\n } catch (ContractValidateException e) {\n Assert.assertTrue((e instanceof ContractValidateException));\n Assert.assertEquals(\"no frozenBalance(BANDWIDTH)\", e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse((e instanceof ContractExeException));\n }\n }", "public double getBalance() \n\t{\n\t\treturn balance;\n\t\t\n\t}", "@Test\n\tpublic void moneyTrnasferExcetionInsufficientBalanceOfFromAccount() {\n\t\t\n\t\tString accountNumberFrom = createAccount(\"krishna\",4000);\n\t\tString accountNumberTo = createAccount(\"ram\",2000);\n\t\tdouble amountToBeTranfered = 40000.0;\n\t\tMoneyTransfer moneyTransfer = new MoneyTransfer();\n\t\tmoneyTransfer.setAccountNumberFrom(Integer.parseInt(accountNumberFrom));\n\t\tmoneyTransfer.setAccountNumberTo(Integer.parseInt(accountNumberTo));\n\t\tmoneyTransfer.setAmount(amountToBeTranfered);\n\t\t\n\t\tString requestBody = gson.toJson(moneyTransfer);\n\t\t\n\t\tRequestSpecification request = RestAssured.given();\n\t\trequest.body(requestBody);\n\t\tResponse response = request.put(\"/transfer\");\n\t\t\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - START\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"Account Number - \");\n\t\tsb.append(accountNumberFrom);\n\t\tsb.append(\" do not have sufficient amout to transfer.\");\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - END\n\t\t\n\t\tAssertions.assertEquals(sb.toString(), response.asString());\n\t\t\n\t}", "public double getBalance(){\n return balance;\n }", "double getBalance() {\n\t\treturn balance;\n\t}", "@Override\n\tpublic void transferBalnace() {\n\t\tSystem.out.println(\"balance is transferd\");\n\t}", "public double getBalance(){\n return balance;\r\n }", "private int getBalance() throws SQLException {\n\t\tgetBalanceStatement.clearParameters();\n\t\tgetBalanceStatement.setString(1, this.username);\n\t\tResultSet result = getBalanceStatement.executeQuery();\n\t\tresult.next();\n\t\tint out = result.getInt(1);\n\t\tresult.close();\n\t\treturn out;\n\t}", "public String getBalance() {\n return this.balance;\n }", "private Node<T> balance(Node<T> current) {\n hAndBF(current);\n int balance = current.getBalanceFactor();\n if (balance > 1) {\n hAndBF(current.getLeft());\n if (current.getLeft().getBalanceFactor() < 0) {\n return doubleWithLeft(current);\n } else {\n return rotateWithLeft(current);\n }\n }\n if (balance < -1) {\n hAndBF(current.getRight());\n if (current.getRight().getBalanceFactor() <= 0) {\n return rotateWithRight(current);\n } else {\n return doubleWithRight(current);\n }\n }\n return current;\n }", "public double getBalance() {\r\n\t\t\r\n\t\treturn balance;\r\n\t\t\r\n\t}", "public void printBalance() {\n logger.info(\"Wallet balance : \" + total_bal);\n }", "public double getBalance(){\n return balance;\n }", "public BigDecimal getBalance() {\n return balance;\n }", "public BigDecimal getBalance() {\n return balance;\n }", "boolean isBalance(Node node) {\n\t\tint i = isBalance1(node);\n\t\tif(i!=-1)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public double getBalance(){\n return balance;\n }", "public int getBalance() {\n\t\treturn balance;\n\t}", "public final float getBalance() {\n return balance;\n }", "Boolean checkAccountHasSufficientBalance(PrintWriter out, Account from, Double amount);", "public Long getAvailableBalance() {\n return availableBalance;\n }", "int updateBalance(CardVO cv) throws RemoteException;", "public double getBalance()\t{\n\t\treturn balance;\n\t}", "public static int balanceOf(Hash160 owner) {\n return getBalanceOf(owner);\n }", "public static double totalBalance() {\n return totalBalance;\n }", "public double getBalance() {\n\t\treturn balance;\n\t}", "public double getBalance() {\n\t\treturn balance;\n\t}", "public double getBalance() {\n\t\treturn balance;\n\t}", "public double getBalance() {\n\t\treturn balance;\n\t}", "public double getBalance() {\n\t\treturn balance;\n\t}", "public double calculateNetPay() {\r\n return net_pay = grosspay - Statetax - Fedtax; }", "public boolean isBalanced() {\n\t if (checkHeight(root)==-1)\n\t \t\treturn false;\n\t \telse\n\t \t\treturn true;\n\t}", "public Boolean balanced() {\r\n\t\tif(allocated() > getAmount()) {\r\n\t\t\treturn false;\r\n\t\t}else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public int getPropertyBalance()\n {\n return iPropertyBalance.getValue();\n }", "public float showBalance() {\n\t\treturn dao.showBalance();\r\n\t}", "public lnrpc.Rpc.WalletBalanceResponse walletBalance(lnrpc.Rpc.WalletBalanceRequest request) {\n return blockingUnaryCall(\n getChannel(), getWalletBalanceMethod(), getCallOptions(), request);\n }", "@Override\n\tpublic double queryBalance(int accNo) {\n\t\treturn 0;\n\t}" ]
[ "0.7091037", "0.7091037", "0.70720905", "0.70119894", "0.68355846", "0.6635089", "0.66134346", "0.65343904", "0.65003127", "0.64978325", "0.64900213", "0.64501405", "0.6442396", "0.6426944", "0.64092517", "0.6385037", "0.63530254", "0.63402593", "0.63297814", "0.63007", "0.6297816", "0.6259191", "0.6243813", "0.6207674", "0.6203801", "0.620066", "0.6172703", "0.6172703", "0.61720157", "0.6161698", "0.6161019", "0.6143671", "0.6135621", "0.6135621", "0.61341554", "0.61249965", "0.6102961", "0.6101297", "0.60973203", "0.6090817", "0.60838544", "0.60728467", "0.6070835", "0.60586345", "0.6045205", "0.60421795", "0.6024856", "0.60170555", "0.59907895", "0.5984731", "0.59846485", "0.5983243", "0.5963902", "0.5963902", "0.5963902", "0.5963902", "0.59620273", "0.59565634", "0.59447527", "0.593983", "0.5934751", "0.5933237", "0.5930491", "0.59285146", "0.59278184", "0.59202766", "0.5915565", "0.5914651", "0.59132147", "0.5910271", "0.5904843", "0.590385", "0.58918023", "0.5890262", "0.58775353", "0.5874492", "0.5854439", "0.5854439", "0.5853394", "0.585253", "0.5842383", "0.5836472", "0.58292645", "0.5828824", "0.5800413", "0.57989496", "0.57987297", "0.57979417", "0.5792675", "0.5792675", "0.5792675", "0.5792675", "0.5792675", "0.5789084", "0.57852316", "0.5780177", "0.5775948", "0.57689726", "0.5765863", "0.57635117" ]
0.6625267
6
/ ensure Result == totalOwedToYou
public double getTotalOwed() { return totalOwedToYou; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkResults() {\n\n if (Dealer.calcTotal() == p1.calcTotal()) {\n System.out.println(\"You and the dealer Tie, Here is your money back.\");\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (p1.calcTotal() > Dealer.calcTotal() && !bust) {\n System.out.println(\"You win!\");\n totalWinnings += betNum;\n p1.addPointCount(betNum);\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (Dealer.calcTotal() > 31) {\n System.out.println(\"Dealer busts. You Win!\");\n totalWinnings += betNum;\n p1.addPointCount(betNum);\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (Dealer.getTotal() > p1.calcTotal() && Dealer.getTotal() < 32) {\n System.out.println(\"Dealer Wins.\");\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n p1.subPointCount(betNum);\n }\n }", "public void collectWinnings() {\n\t\tif (hand.checkBlackjack()) {\n\t\t\tdouble win = bet * 1.5;\n\t\t\ttotalMoney += (win + bet);\n\t\t} else {\n\t\t\ttotalMoney += (bet + bet);\n\t\t}\n\t}", "boolean hasTotalBet();", "boolean hasTotalBet();", "public int totalOrdersTaken();", "private boolean verifyTotal(ArrayList<Integer> oneSetOfChoices, ArrayList<Integer> listAllIntegers, int target) {\n\t\t\tboolean matchFound = false;\n\t\t\tint currentTotal = 0;\n\t\t\tint valueInList = 0;\n\t\t\t for (Integer positionInteger: oneSetOfChoices) {\n\t\t\t\t valueInList = listAllIntegers.get(positionInteger.intValue()).intValue();\n\t\t\t\t currentTotal += valueInList;\n\t\t\t }\n\t\t\t\n\t\t\t if (target == currentTotal) {\n\t\t\t\t matchFound = true;\n\t\t\t }\n\t\t\treturn matchFound;\n\t}", "public static void checkResult() {\n\t\tint sum = PlayerBean.PLAYERONE - PlayerBean.PLAYERTWO;\n\n\t\tif (sum == 1 || sum == -2) {\n\t\t\tScoreBean.addWin();\n\t\t\tresult = \"player one wins\";\n\t\t} else {\n\t\t\tScoreBean.addLoss();\n\t\t\tresult = \"player two wins\";\n\t\t}\n\t}", "public int getAmountDone();", "public int checkNoOfRapelPlayerHolds () { return noOfRapels; }", "int getTotalLeased();", "public int getWorth() { return 1; }", "boolean hasFinalTallyResult();", "public Integer countGoals();", "public int getWorth()\n {\n return worth;\n }", "Integer total();", "int getReaultCount();", "public void checkResult(){\n\t\tif(throwNum == 0){\n\t\t\tthis.firstThrow = this.sumOfDice;\n\t\t}\n\n\t\tif((this.sumOfDice == 7 || this.sumOfDice==11) && throwNum==0){\n\t\t\tthis.game = gameStatus.WON;\n\t\t}\n\t\telse if(this.sumOfDice ==2 || this.sumOfDice== 3 ||this.sumOfDice==12){\n\t\t\tthis.game = gameStatus.LOST;\n\t\t}\n\t\telse if((this.game == gameStatus.CONTINUE && this.sumOfDice == 7)){\n\t\t\tthis.game = gameStatus.LOST;\n\t\t}\n\t\telse if((this.sumOfDice== this.firstThrow) && throwNum!=0){\n\t\t\tthis.game = gameStatus.WON;\n\t\t}\n\t\telse{\n\t\t\tthis.game = gameStatus.CONTINUE;\n\t\t}\n\t}", "void computeResult() {\n // Get the winner (null if draw).\n roundWinner = compareTopCards();\n\n\n if (roundWinner == null) {\n logger.log(\"Round winner: Draw\");\n logger.log(divider);\n // Increment statistic.\n numDraws++;\n\n } else {\n logger.log(\"Round winner: \" + roundWinner.getName());\n\t logger.log(divider);\n this.gameWinner = roundWinner;\n if (roundWinner.getIsHuman()) {\n // Increment statistic.\n humanWonRounds++;\n }\n }\n\n setGameState(GameState.ROUND_RESULT_COMPUTED);\n }", "@Test\n public void testOriginalAmountOwed() {\n //Just ensure that the first two digits are the same\n assertEquals(expectedResults.getOriginalAmountOwed(), results.getOriginalAmountOwed(), 0.15);\n }", "int getFaintedPokemonCount();", "public Integer collectAmountAndGiveItToMe() {\n\t\t\n\t\t//void will not return anything\n\t\tSystem.out.println(\"Daddy collected rupee is\" + collectedAmount+\" and Sent it to you\");\n\t\treturn collectedAmount;\n\t\t\n\t}", "public int trickWinner(){\n Card.NUMBER one = player1Play.getValue();\n Card.NUMBER two = player2Play.getValue();\n Card.NUMBER three = player3Play.getValue();\n Card.NUMBER four = player4Play.getValue();\n Card.SUIT oneSuit = player1Play.getSuit();\n Card.SUIT twoSuit = player2Play.getSuit();\n Card.SUIT threeSuit = player3Play.getSuit();\n Card.SUIT fourSuit = player4Play.getSuit();\n int[] value = new int[4];\n value[0] = Card.getValsVal(one, oneSuit, currentTrumpSuit);\n value[1] = Card.getValsVal(two, twoSuit, currentTrumpSuit);\n value[2] = Card.getValsVal(three, threeSuit, currentTrumpSuit);\n value[3] = Card.getValsVal(four, fourSuit, currentTrumpSuit);\n if(player1Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[0] += 10;\n }\n if(player2Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[1] += 10;\n }\n if(player3Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[2] += 10;\n }\n if(player4Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[3] += 10;\n }\n if(player1Play.getSuit() == currentTrumpSuit || value[0] == 7){\n value[0] += 20;\n }\n if(player2Play.getSuit() == currentTrumpSuit || value[1] == 7){\n value[1] += 20;\n }\n if(player3Play.getSuit() == currentTrumpSuit || value[2] == 7){\n value[2] += 20;\n }\n if(player4Play.getSuit() == currentTrumpSuit || value[3] == 7){\n value[3] += 20;\n }\n int winner = 0;\n int winVal = 0;\n for(int i = 0; i < 4; i++){\n if(value[i] > winVal){\n winVal = value[i];\n winner = i;\n }\n }\n return winner;\n }", "@Test\n public void test_total_balance3() {\n assertEquals(0, ao3.totalBalanceOfAccountsOwned(), EPS);\n }", "private void warResult() {\r\n // Get number of survivors alive\r\n int survivorCount = safeCount(survivors);\r\n if (survivorCount == 0) {\r\n System.out.println(\"None of the survivors made it.\");\r\n\t\t}\r\n else {\r\n System.out.println(\"It seems \" + survivorCount + \" have made it to safety.\");\r\n\t\t}\r\n }", "public static double sanityCheck(Match match)\n {\n Lane lane;\n Role role;\n \n int bot = 0;\n int bottom = 0;\n int jungle = 0;\n int mid = 0;\n int middle = 0;\n int top = 0;\n \n int solo = 0;\n int duo = 0;\n int duo_carry = 0;\n int duo_support = 0;\n int none = 0;\n \n\n \n for(int i = 0; i<10; i++)\n {\n lane = match.getParticipants().get(i).getTimeline().getLane();\n role = match.getParticipants().get(i).getTimeline().getRole();\n \n switch(lane)\n {\n case BOT:\n bot++;\n break;\n \n case BOTTOM:\n bottom++;\n break;\n \n case JUNGLE:\n jungle++;\n break;\n \n case MID:\n mid++;\n break;\n \n case MIDDLE:\n middle++;\n break;\n \n case TOP:\n top++;\n break;\n }\n \n switch(role)\n {\n case SOLO:\n solo++;\n break;\n \n case DUO:\n duo++;\n break;\n \n case DUO_CARRY:\n duo_carry++;\n break;\n \n case DUO_SUPPORT:\n duo_support++;\n break;\n \n case NONE:\n none++;\n break;\n }\n }\n \n double total = 0;\n \n if(top == 2)\n total++;\n if(mid+middle == 2)\n total++;\n if(jungle == 2)\n total++;\n if(bot + bottom == 4)\n total++;\n \n if(solo == 4)\n total++;\n if(duo + duo_carry + duo_support == 4);\n total++;\n if( duo_carry == 2);\n total++;\n if(duo_support == 2)\n total++;\n if(none == 2)\n total++;\n \n //it would be total =/ 9 but I figured every time one is wrong it makes another wrong, but there's really only 1 error \n total = ((total/18.0)+.5);\n \n \n //TestPrints\n //System.out.println(\"Sanity Check:\\nTop: \"+ top + \"\\nJungle: \"+ jungle + \"\\nMid: \" + (mid+middle) + \"\\nBot: \" + (bot+bottom)+ \"\\n\\nSolo: \"+solo + \"\\nDuo: \" + (duo+duo_carry+duo_support)\n //+ \"\\n\\\"Bot\\\": \"+ duo+\"\\nADC: \"+ duo_carry+ \"\\nSupport: \"+duo_support+ \"\\nNone: \" + none + \"\\nTotal Score: \" +total);\n \n \n \n return total;\n \n }", "public int totalWorth() {\n\t\tint val = 0;\n\t\tfor (Card c : cards) {\n\t\t\tval += c.value();\n\t\t}\n\t\treturn val;\n\t}", "protected boolean checkChance(ReturnValue returnValue) {\n\t\tint sum = 0;\n\t\t\t\tfor (Integer i : intList) {\n\t\t\t\t\tsum += i;\n\t\t\t\t}\n\t\treturnValue.setValue(true, sum, Box.CHANCE);\n\t\treturn true;\n\t}", "public int gotExtraCredit() {\n int counter = 0;\n\n // goes through each student and checks if best score is 100\n // and student only has 1 submission\n for (int i = 0; i < studentList.size(); i++) {\n if ((studentList.get(i)).getBestScore() == 100 && (studentList.get(i)).getNumberSubmits() == 1) {\n counter++;\n }\n }\n // return accumulated amount of students\n return counter;\n }", "double getTotalReward();", "int getActAmountCount();", "public int getCurrentPlayerFunds(){return currentPlayerTurn.getFunds();}", "long getTotalAcceptCount();", "int getReservePokemonCount();", "Object getNumberMatched();", "int getAchievementsCount();", "@Test\n public void is_totalPrice_Is_displayed_properly_Added_To_The_Menu_Failure_Senario_Summation_Incorrect(){\n int isTotalPriceDisplayedSumIncorrect = restaurant.displayCost(totalPrice).size();\n restaurant.displayCost(\"InCorrect Amount Displayed due to Wrong Summation\", isTotalPriceDisplayedSummationCorrect);\n assertEquals(isTotalPriceDisplayedSumIncorrect,restaurant.displayCost(totalPrice).size());\n\n\n }", "public int checkNoOfExplosivesPlayerHolds () { return noOfExplosives; }", "public int check(){\r\n\r\n\treturn count ++;\r\n\t\r\n}", "private void updateExpectedTotalOffices() {\n mExpectedTotalOffices++;\n }", "public int getWinner();", "@Test\n public void testInterestAccumulated() {\n //Just ensure that the first two digits are the same\n assertEquals(expectedResults.getInterestAccumulated(), results.getInterestAccumulated(), 0.15);\n }", "int getBattlesLost();", "private int scoreCounter(int result) {\n result +=1;\n return result;\n }", "private int calculateTotalHeads() { //kept a separate method with a specific purpose instead of writing code in main\n\t\t//no need to static method, althouth static won't hurt in such a small code\n\t\tint headsCount = 0;\n\t\tfor (int currentCoinNo = 1; currentCoinNo <= noCoins; currentCoinNo++) { \n\t\t\tif(isHead(currentCoinNo)) {\n\t\t\t\theadsCount++;\n\t\t\t}\n\t\t}\n\t\treturn headsCount;\n\t}", "@Test\n public void test_total_balance2() {\n assertEquals(1200, ao2.totalBalanceOfAccountsOwned(), EPS);\n }", "public int addWinningGame() {\n\t\tgamesWon++;\n\t\treturn gamesWon;\n\t}", "public static int BlockCheckWin(ArrayList<BlockObject> objects)\n\t{\n\t\tint sum = 0;\n\t\t//Checks horizontal\n\t\tsum = BlockSumMatrix(objects);\n\t\t//Return sum if someone won.\n\t\tif(sum == 27 || sum == 30)\n\t\t\treturn sum;\n\t\t\n\t\treturn sum;\n\t}", "protected int getTotalEnrolled() {\n return getTotalEnrolledEvening() + getTotalEnrolledMorning();\n }", "int getBattlesWon();", "int getTotalCount();", "public Double getTotalMatched(){\n return totalMatched;\n }", "public int getAddItems(int totalCollected, int totalItemInGame);", "public static int fullHouseYahtzee(int... result) {\n\n int score = nSame(3, 6, result);\n int firstPairVal = score/3;\n\n result = IntStream.of(result).filter(val -> val != firstPairVal).toArray();\n score = nSame(2, 6, result);\n int secondPairVal = score/2;\n\n if (firstPairVal*secondPairVal > 0) {\n score = 25;\n } else {\n score = 0;\n }\n\n return score;\n }", "private double calculateMoneyInserted() {\r\n double amount = 0.0;\r\n\r\n for(VendingMachine.Coin coin : coins) {\r\n amount += coin.amount();\r\n }\r\n return amount;\r\n }", "@Override\n public int howManyCoins() {\n return 7;\n }", "@Override\n public int tonKho() {\n return getAmount() - amountBorrow;\n }", "int numberOfCandidates();", "private static int iteration(int considerWinning) {\r\n boolean won = false;\r\n int weeks = 0;\r\n while(won == false) {\r\n int winning[] = calculateLotto();\r\n int collision = Arrays.containsSameValues(USER_LOTTERY, winning);\r\n weeks++;\r\n if(collision == considerWinning) {\r\n\r\n if(weeks < 52) {\r\n System.out.println(\"Got \"+ collision+\" right. Took \"+ weeks + \" weeks.\");\r\n } else {\r\n System.out.println(\"Got \"+ collision+\" right. Took \"+ weeks/52 + \" years.\");\r\n }\r\n\r\n won = true;\r\n }\r\n }\r\n\r\n return (int) weeks / 52;\r\n\r\n }", "@Test\n public void testTotalPaid() {\n //Just ensure that the first two digits are the same\n assertEquals(expectedResults.getTotalPaid(), results.getTotalPaid(), 0.15);\n }", "long getMisses();", "@Test\n @DisplayName(\"Verify collecting the remaining stones after end-game\")\n void collectRemainingStones() {\n boardService.collectRemainingStones();\n int homeCount1 = boardService.getPlayerHomeCount(playerService.getP1());\n int homeCount2 = boardService.getPlayerHomeCount(playerService.getP2());\n Assert.assertEquals(36, homeCount1);\n Assert.assertEquals(36, homeCount2);\n }", "public static int ShadowCheckWin(ArrayList<ShadowObject> objects)\n\t{\n\t\tint sum = 0;\n\t\t//Checks horizontal\n\t\tsum = ShadowSumMatrix(objects);\n\t\t//Return sum if someone won.\n\t\tif(sum == 27 || sum == 30)\n\t\t\treturn sum;\n\t\t\n\t\treturn sum;\n\t}", "@Override\r\n\tint check_sweetness() {\n\t\treturn 30;\r\n\t}", "private boolean checkGreedyWinRate() {\r\n return myTotal.get(0) > enTotal.get(0)+2 && (myself.health > 50 || myself.health > opponent.health);\r\n }", "private Boolean calculateTotalEmission() {\n\t\ttry {\n\n\t\t\tfoodCO2E = Double.valueOf(JTFFood.getText().isEmpty() ? \"0.0\" : JTFFood.getText())\n\t\t\t\t\t* energySourceDetail.get(FoodIntake).get(JCBFoodUnit.getSelectedItem().toString());\n\n\t\t\tlandfillingFoodWasteCO2E = Double\n\t\t\t\t\t.valueOf(JTFLandfillingFoodWaste.getText().isEmpty() ? \"0.0\" : JTFLandfillingFoodWaste.getText())\n\t\t\t\t\t* energySourceDetail.get(LandfillingFoodWaste)\n\t\t\t\t\t\t\t.get(JCBLandfillingFoodWasteUnit.getSelectedItem().toString());\n\n\t\t\tcompostingFoodWasteCO2E = Double\n\t\t\t\t\t.valueOf(JTFCompostingFoodWaste.getText().isEmpty() ? \"0.0\" : JTFCompostingFoodWaste.getText())\n\t\t\t\t\t* energySourceDetail.get(CompostingFoodWaste)\n\t\t\t\t\t\t\t.get(JCBCompostingFoodWasteUnit.getSelectedItem().toString());\n\n\t\t} catch (NumberFormatException ne) {\n\t\t\tSystem.out.println(\"Number Format Exception while calculating House Hold Emission\" + ne);\n\t\t\treturn false;\n\t\t}\n\t\t//\n\t\ttotalFoodCO2E = foodCO2E + landfillingFoodWasteCO2E + compostingFoodWasteCO2E;\n\t\ttotalFoodCO2E = Math.round(totalFoodCO2E * 100D) / 100D;\n\t\treturn true;\n\t}", "public void checkBalance()\n\t{\n\t\tList<Account> accounts = Main.aDao.getAllAccounts(this.loggedIn.getUserId());\n\t\tdouble accountsTotal = 0;\n\t\t\n\t\tfor(Account a : accounts)\n\t\t{\n\t\t\taccountsTotal += a.getBalance();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Total funds available across all accounts:\\n\" + accountsTotal);\n\t}", "public long calcRemaining(){\n return getGrandTotal() - getTotalPaid();\n }", "int getLuckyTicket();", "public int getTotRuptures();", "static int utilityFunction(int choice, double[] finalRes) {\n\t\t// U(choice) = P(In loses to choice | history) - P(In wins to choice | history)\n\t\t// U(0) = P(2 | history) - P(1 | history)\n\t\t// U(1) = P(0 | history) - P(2 | history)\n\t\t// U(2) = P(1 | history) - P(0 | history)\n\t\tdouble u0, u1, u2;\n\t\tu0 = finalRes[2] - finalRes[1];\n\t\tu1 = finalRes[0] - finalRes[2];\n\t\tu2 = finalRes[1] - finalRes[0];\n\t\tRandom random = new Random();\n\t\t// If all three utilities are the same, randomize between the three\n\t\tif(u0 == u1 && u1 == u2)\n\t\t\treturn random.nextInt() % 3;\n\t\t// If two choices' utilities are the same, randomize between the two\n\t\telse if((u1 > u0 && u1 == u2) || (u2 > u0 && u2 == u1)) \n\t\t\treturn random.nextBoolean() ? 2 : 1;\n\t\telse if((u1 > u2 && u1 == u0)|| (u0 > u2 && u0 == u1)) \n\t\t\treturn random.nextBoolean() ? 0 : 1;\n\t\telse if((u2 > u1 && u2 == u0) || (u0 > u1 && u0 == u2)) \n\t\t\treturn random.nextBoolean() ? 2 : 0;\n\t\t// If one choice's utility is greater than the rest\n\t\telse if(u0 > u1 && u0 > u2) \n\t\t\treturn 0;\n\t\telse if(u1 > u2 && u1 > u0) \n\t\t\treturn 1;\n\t\t//(u2 > u0 && u2 > u1) \n\t\telse return 2;\n\t}", "public int calculateVotes() {\n return 1;\n }", "int getMarbles(int remainingMarbles) ;", "public void finalResult() {\n ConnectionSockets.getInstance().sendMessage(Integer.toString(points)+\"\\n\");\n System.out.println(\"escreveu para o oponente\");\n opponentPoints = Integer.parseInt(ConnectionSockets.getInstance().receiveMessage());\n System.out.println(\"leu do oponente\");\n if(points != opponentPoints) {\n if (points > opponentPoints) {// Won\n MatchController.getInstance().getSets().add(1);\n MatchController.getInstance().increaseSet();\n } else { //Lost\n MatchController.getInstance().getSets().add(0);\n MatchController.getInstance().increaseSet();\n }\n }\n }", "int getTotalFree();", "@Override\n public void computeSatisfaction() {\n\n }", "public int numberOfResult() throws Exception;", "long getOwnedEntryCount();", "private int get2(String name) {\n int t = 0;\n PlayerRecord curr = playerlist.first();\n while (curr != null) {\n if (curr.getTeamname().equals(name))\n t = t + curr.getWinninggoals(); // sum of all GWGs\n curr = playerlist.next();\n }\n return t;\n }", "public static int bigStraightYahtzee(int... result) {\n\n Arrays.sort(result);\n\n int[] uniqueValues = IntStream.of(result).distinct().sorted().toArray();\n long noUniqVals = IntStream.of(uniqueValues).distinct().count();\n int score = 0;\n\n if (noUniqVals >= 5) {\n ArrayList<int[]> matchArrays = new ArrayList<>();\n matchArrays.add(new int[]{1, 2, 3, 4, 5});\n matchArrays.add(new int[]{2, 3, 4, 5, 6});\n\n ArrayList<int[]> resultSubArrays = new ArrayList<>();\n for (int i = 0; i < noUniqVals - 4; i++) {\n resultSubArrays.add(Arrays.copyOfRange(uniqueValues, i, i + 5));\n }\n\n for (int[] arr : resultSubArrays) {\n for (int[] match : matchArrays) {\n if (Arrays.equals(arr, match)) {\n score = 40;\n }\n\n }\n }\n }\n return score;\n }", "int getAoisCount();", "@Override\n\tpublic boolean worthTaking(Roll roll) {\n\t\tStatBean bean = StatBuilder.getBean(roll.getDiceLeft());\n\t\tdouble offered = roll.getScore();\n\t\toffered *= (1 - bean.getFarkelChance());\n\t\toffered += bean.getRollWorth();\n\n\n\t\t// calculate worth of new roll\n\t\tbean = StatBuilder.getBean(6);\n\t\tdouble newRoll = bean.getRollWorth();\t\t\n\t\t\n\t\t//compare the two values- if the offered roll is more valuable than a new roll,\n\t\t\t//take it.\n\t\treturn offered >= newRoll;\n\t}", "int findCount();", "public void calcTroops() {\r\n\t\t//Based on how many troops the player owns this will add to their spendage with a minimum of 2\r\n\t\ttroopSpendage = (players.get(turnCounter).getCountries().size()) / 3;\r\n\t\tif (troopSpendage < 3) {\r\n\t\t\ttroopSpendage = 3;\r\n\t\t}\r\n\t\t//If a player owns an entire continent, they will get a continent bonus to their spendage\r\n\t\t//these counters record how much of a continent the player owns\r\n\t\tint Kjersia = 0;\r\n\t\tint Estoveria = 0;\r\n\t\tint Moa = 0;\r\n\t\tint Shilov = 0;\r\n\t\tint Tormudd = 0;\r\n\t\tint Eschilles = 0;\r\n\t\t\r\n\t\t//increment the corresponding continent counter based on the continent value stored in the country objects the player owns\r\n\t\tfor (Country c:players.get(turnCounter).getCountries()) {\r\n\t\t\tswitch (c.getContinent()) {\r\n\t\t\tcase \"Kjersia\": Kjersia++;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Estoveria\": Estoveria++;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Moa\": Moa++;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Shilov\": Shilov ++;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Tormudd\": Tormudd++;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Eschilles\": Eschilles++;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//If the player owns all countries in a continent (each continent has different numbers of countries), give them a corresponding troop bonus as decided by the rules of the game\r\n\t\tif (Kjersia == 4) {\r\n\t\t\ttroopSpendage += 2;\r\n\t\t}\r\n\t\tif (Estoveria == 8) {\r\n\t\t\ttroopSpendage += 5;\r\n\t\t}\r\n\t\tif (Moa == 9) {\r\n\t\t\ttroopSpendage += 6;\r\n\t\t}\r\n\t\tif (Shilov == 4) {\r\n\t\t\ttroopSpendage += 3;\r\n\t\t}\r\n\t\tif (Tormudd == 5) {\r\n\t\t\ttroopSpendage += 3;\r\n\t\t}\r\n\t\tif (Eschilles == 12) {\r\n\t\t\ttroopSpendage += 7;\r\n\t\t}\r\n\r\n\t\t//If a player owns the card and owns the coresponding country on that card they get one extra troop\r\n\t\tfor(Card C: players.get(turnCounter).getCards()) \r\n\t\t\tfor(Country co: players.get(turnCounter).getCountries())\r\n\t\t\t\tif (C.getCountry().equals(co.getName()))\r\n\t\t\t\t\ttroopSpendage++;\t\t\r\n\t\t\r\n\t\t//Updates the display of how many troops the player has to deploy\r\n\t\ttroopsToDeploy.setText(\"Troops to Deploy: \" + troopSpendage);\r\n\t}", "public abstract Integer gethourNeed();", "public double trueCount() {\n\t\t\t\n\t\t\treturn (double)total_count/((double)size/52);\n\t\t}", "public static int[] mucScore(LeanDocument key, LeanDocument response)\n{\n // System.out.println(\"==========================================================\");\n // System.out.println(\"Key:\\n\"+key.toStringNoSing()+\"\\n*************************\\nResponse:\\n\"+response.toStringNoSing());\n\n Iterator<TreeMap<Integer, Integer>> goldChains = key.chainIterator();\n // double mucRecall = 0.0;\n int mucRecallNom = 0;\n int mucRecallDenom = 0;\n while (goldChains.hasNext()) {\n TreeMap<Integer, Integer> keyChain = goldChains.next();\n if (keyChain.size() > 1) {\n int numInt = numIntersect(key, keyChain, response);\n\n // int numMatched = getNumMatched(key, keyChain);\n // if(numMatched>0){\n // mucRecallNom += numMatched-numInt;\n mucRecallNom += (keyChain.size() - numInt);\n // mucRecallDenom += numMatched-1;\n mucRecallDenom += keyChain.size() - 1;\n\n // System.out.println(keyChain+\"\\n\"+(keyChain.size() - numInt)+\"/\"+(keyChain.size()-1));\n // }\n }\n }\n int[] result = { mucRecallNom, mucRecallDenom };\n\n return result;\n}", "public double getWorth() {\r\n\t\treturn worth;\r\n\t}", "public String checkOut(int remaining) {\n\n String result = \"\";\n\n\n Map<Integer, String> checkouts = check.getMap();\n\n Set<Integer> outs = checkouts.keySet();\n\n for (int i : outs) {\n if (i == remaining) {\n result = checkouts.get(i);\n\n\n }\n\n }\n return result;\n\n }", "@Override\n public int viability() {\n int[] newStats = getNewStats();\n return newStats[0] * newStats[1];\n }", "public void calculateResult() {\n\t\tfor (GameEngineCallback callback : callbacks) {\n\t\t\t// Roll for house\n\t\t\tthis.rollHouse(INITIAL_DELAY, FINAL_DELAY, DELAY_INCREMENT);\n\t\t\t\n\t\t\tfor (Player player : this.players.values()) {\n\t\t\t\t// Players who are playing must have a bet and a score\n\t\t\t\t// This conditional may not be required in Assignment 2\n\t\t\t\tif (player.getBet() > 0 && player.getRollResult()\n\t\t\t\t\t\t.getTotalScore() > 0) {\n\t\t\t\t\t// Compare rolls, set result and add/subtract points\n\t\t\t\t\tif (this.houseDice.getTotalScore() > player.\n\t\t\t\t\t\t\tgetRollResult().getTotalScore()) {\n\t\t\t\t\t\tGameStatus status = GameEngine.GameStatus.LOST;\t\t\t\t\t\n\t\t\t\t\t\tplayer.setGameResult(status);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Subtract bet from player points\n\t\t\t\t\t\tint points = player.getPoints() - player.getBet();\n\t\t\t\t\t\tthis.setPlayerPoints(player, points);\n\t\t\t\t\t}\n\t\t\t\t\telse if (houseDice.getTotalScore() == player.\n\t\t\t\t\t\t\tgetRollResult().getTotalScore()) {\n\t\t\t\t\t\tGameStatus status = GameEngine.GameStatus.DREW;\t\t\t\t\t\n\t\t\t\t\t\tplayer.setGameResult(status);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// No change to points on a draw\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tGameStatus status = GameEngine.GameStatus.WON;\t\t\t\t\t\n\t\t\t\t\t\tplayer.setGameResult(status);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Add bet to player points\n\t\t\t\t\t\tint points = player.getPoints() + player.getBet();\n\t\t\t\t\t\tthis.setPlayerPoints(player, points);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Display result\n\t\t\t\t\tcallback.gameResult(this.getPlayer(player.getPlayerId()), \n\t\t\t\t\t\t\tthis.getPlayer(player.getPlayerId()).getGameResult(), this);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "static int calculateScore(Card[] winnings) {\n int score = 0;\n for (Card card : winnings)\n if (card != null)\n score++;\n else\n break;\n return score;\n }", "public int getToughness();", "@Override\n\tpublic int checkHandVal(List<Integer> Hand) {\n\t\tint total = 0;\n\t\tfor (Integer v : Hand) {\n\t\t\ttotal += v;\n\t\t}\n\t\treturn total;\n\t}", "@Test\n public void is_totalPrice_Is_displayed_properly_Added_To_The_Menu_Success_Senario_Correct_Sum(){\n int isTotalPriceDisplayedSummationCorrect = restaurant.displayCost(totalPrice).size();\n restaurant.displayCost(\"Correct Sum Amount Displayed\", isTotalPriceDisplayed);\n assertEquals(isTotalPriceDisplayed,restaurant.getTotalPrice().size());\n\n\n }", "int getTrucksCount();", "protected int getTotalEnrolledEvening() {\n return getEveningRoster().size();\n }", "int getFundsCount();", "int getFundsCount();", "int getChestsAmount();", "public int computeStatus() {\n\t\tif(isOutcomeExceeded()) return 0;\r\n\t\t\r\n\t\t//the new loan is too expensive\r\n\t\tif(isOutcomeExceeded(mMonthlyLoan)) return 0;\r\n\t\t\r\n\t\tint domainCoeff = DBOperations.getDomainCoeffById(mDomainId); // (0, 10] \r\n\t\tint expCoeff = DBOperations.getExperienceCoeffById(mExperienceId); // (0, 5]\r\n\t\t\r\n\t\tint backgroundCoeff = domainCoeff * expCoeff; // (0, 50]\r\n\t\tif(isIncomeRaising) backgroundCoeff *= 2; // (0, 100]\r\n\t\t\r\n\t\tint incomeCoeff = getIncomeWeight(mMonthlyIncome); // (0, 100]\r\n\t\t\r\n\t\tint coeff = (int) ((backgroundCoeff * 0.20) + (incomeCoeff * 0.55)); // (0, 75]\r\n\t\tif(mHadOtherLoans) coeff += 5; // (0, 80]\r\n\t\tif(mHasDelayedPays) coeff -= 10; // (0, 80]\r\n\t\t\r\n\t\tif((mMonthlyIncome - mMonthlyOutcome) * MAXIMUM_SURE_OUTCOME_PERCENTAGE / 100 >= mMonthlyLoan) {\r\n\t\t\tcoeff += 20; // (0, 100]\r\n\t\t}\r\n\t\t\r\n\t\tif(coeff <= 25) return 0;\r\n\t\treturn coeff < 55 ? 1 : 2;\r\n\t}" ]
[ "0.6526172", "0.6280842", "0.62656695", "0.62656695", "0.62390965", "0.61457396", "0.6139616", "0.61160994", "0.6064409", "0.60321033", "0.60221934", "0.59922284", "0.5973714", "0.5965073", "0.59403646", "0.59346247", "0.58971345", "0.58942765", "0.589267", "0.5891944", "0.58516955", "0.5846106", "0.58342934", "0.58289355", "0.5814824", "0.5808921", "0.5802849", "0.5780348", "0.5774225", "0.57738084", "0.5772038", "0.576147", "0.5760907", "0.57599074", "0.5757126", "0.5747021", "0.57234377", "0.5709964", "0.5705083", "0.5693511", "0.56721234", "0.56563735", "0.56537235", "0.565058", "0.5650329", "0.564348", "0.5639666", "0.5635853", "0.56275284", "0.56211925", "0.5613524", "0.5603775", "0.5602483", "0.55938107", "0.55916876", "0.5590796", "0.5587033", "0.5586616", "0.55842984", "0.5581635", "0.55779266", "0.5573871", "0.5568952", "0.5560273", "0.55580825", "0.55556625", "0.5553647", "0.5552217", "0.55481774", "0.5536384", "0.5526953", "0.5523618", "0.5520066", "0.55148494", "0.5510267", "0.55096245", "0.55054903", "0.5499175", "0.54955876", "0.54950595", "0.54897094", "0.5489013", "0.5487687", "0.54847205", "0.54843265", "0.54821646", "0.5481601", "0.54802793", "0.54786265", "0.5477778", "0.54743975", "0.54740953", "0.5470194", "0.5468277", "0.5465566", "0.5462508", "0.5457144", "0.5457144", "0.54479647", "0.54472435" ]
0.66006994
0
/ ensure Result == totalYouOwe
public double getTotalYouOwe() { return totalYouOwe; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void checkResult() {\n\t\tint sum = PlayerBean.PLAYERONE - PlayerBean.PLAYERTWO;\n\n\t\tif (sum == 1 || sum == -2) {\n\t\t\tScoreBean.addWin();\n\t\t\tresult = \"player one wins\";\n\t\t} else {\n\t\t\tScoreBean.addLoss();\n\t\t\tresult = \"player two wins\";\n\t\t}\n\t}", "private void checkResults() {\n\n if (Dealer.calcTotal() == p1.calcTotal()) {\n System.out.println(\"You and the dealer Tie, Here is your money back.\");\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (p1.calcTotal() > Dealer.calcTotal() && !bust) {\n System.out.println(\"You win!\");\n totalWinnings += betNum;\n p1.addPointCount(betNum);\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (Dealer.calcTotal() > 31) {\n System.out.println(\"Dealer busts. You Win!\");\n totalWinnings += betNum;\n p1.addPointCount(betNum);\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (Dealer.getTotal() > p1.calcTotal() && Dealer.getTotal() < 32) {\n System.out.println(\"Dealer Wins.\");\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n p1.subPointCount(betNum);\n }\n }", "public static double sanityCheck(Match match)\n {\n Lane lane;\n Role role;\n \n int bot = 0;\n int bottom = 0;\n int jungle = 0;\n int mid = 0;\n int middle = 0;\n int top = 0;\n \n int solo = 0;\n int duo = 0;\n int duo_carry = 0;\n int duo_support = 0;\n int none = 0;\n \n\n \n for(int i = 0; i<10; i++)\n {\n lane = match.getParticipants().get(i).getTimeline().getLane();\n role = match.getParticipants().get(i).getTimeline().getRole();\n \n switch(lane)\n {\n case BOT:\n bot++;\n break;\n \n case BOTTOM:\n bottom++;\n break;\n \n case JUNGLE:\n jungle++;\n break;\n \n case MID:\n mid++;\n break;\n \n case MIDDLE:\n middle++;\n break;\n \n case TOP:\n top++;\n break;\n }\n \n switch(role)\n {\n case SOLO:\n solo++;\n break;\n \n case DUO:\n duo++;\n break;\n \n case DUO_CARRY:\n duo_carry++;\n break;\n \n case DUO_SUPPORT:\n duo_support++;\n break;\n \n case NONE:\n none++;\n break;\n }\n }\n \n double total = 0;\n \n if(top == 2)\n total++;\n if(mid+middle == 2)\n total++;\n if(jungle == 2)\n total++;\n if(bot + bottom == 4)\n total++;\n \n if(solo == 4)\n total++;\n if(duo + duo_carry + duo_support == 4);\n total++;\n if( duo_carry == 2);\n total++;\n if(duo_support == 2)\n total++;\n if(none == 2)\n total++;\n \n //it would be total =/ 9 but I figured every time one is wrong it makes another wrong, but there's really only 1 error \n total = ((total/18.0)+.5);\n \n \n //TestPrints\n //System.out.println(\"Sanity Check:\\nTop: \"+ top + \"\\nJungle: \"+ jungle + \"\\nMid: \" + (mid+middle) + \"\\nBot: \" + (bot+bottom)+ \"\\n\\nSolo: \"+solo + \"\\nDuo: \" + (duo+duo_carry+duo_support)\n //+ \"\\n\\\"Bot\\\": \"+ duo+\"\\nADC: \"+ duo_carry+ \"\\nSupport: \"+duo_support+ \"\\nNone: \" + none + \"\\nTotal Score: \" +total);\n \n \n \n return total;\n \n }", "public int getWorth() { return 1; }", "public void checkResult(){\n\t\tif(throwNum == 0){\n\t\t\tthis.firstThrow = this.sumOfDice;\n\t\t}\n\n\t\tif((this.sumOfDice == 7 || this.sumOfDice==11) && throwNum==0){\n\t\t\tthis.game = gameStatus.WON;\n\t\t}\n\t\telse if(this.sumOfDice ==2 || this.sumOfDice== 3 ||this.sumOfDice==12){\n\t\t\tthis.game = gameStatus.LOST;\n\t\t}\n\t\telse if((this.game == gameStatus.CONTINUE && this.sumOfDice == 7)){\n\t\t\tthis.game = gameStatus.LOST;\n\t\t}\n\t\telse if((this.sumOfDice== this.firstThrow) && throwNum!=0){\n\t\t\tthis.game = gameStatus.WON;\n\t\t}\n\t\telse{\n\t\t\tthis.game = gameStatus.CONTINUE;\n\t\t}\n\t}", "boolean hasTotalBet();", "boolean hasTotalBet();", "public int trickWinner(){\n Card.NUMBER one = player1Play.getValue();\n Card.NUMBER two = player2Play.getValue();\n Card.NUMBER three = player3Play.getValue();\n Card.NUMBER four = player4Play.getValue();\n Card.SUIT oneSuit = player1Play.getSuit();\n Card.SUIT twoSuit = player2Play.getSuit();\n Card.SUIT threeSuit = player3Play.getSuit();\n Card.SUIT fourSuit = player4Play.getSuit();\n int[] value = new int[4];\n value[0] = Card.getValsVal(one, oneSuit, currentTrumpSuit);\n value[1] = Card.getValsVal(two, twoSuit, currentTrumpSuit);\n value[2] = Card.getValsVal(three, threeSuit, currentTrumpSuit);\n value[3] = Card.getValsVal(four, fourSuit, currentTrumpSuit);\n if(player1Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[0] += 10;\n }\n if(player2Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[1] += 10;\n }\n if(player3Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[2] += 10;\n }\n if(player4Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[3] += 10;\n }\n if(player1Play.getSuit() == currentTrumpSuit || value[0] == 7){\n value[0] += 20;\n }\n if(player2Play.getSuit() == currentTrumpSuit || value[1] == 7){\n value[1] += 20;\n }\n if(player3Play.getSuit() == currentTrumpSuit || value[2] == 7){\n value[2] += 20;\n }\n if(player4Play.getSuit() == currentTrumpSuit || value[3] == 7){\n value[3] += 20;\n }\n int winner = 0;\n int winVal = 0;\n for(int i = 0; i < 4; i++){\n if(value[i] > winVal){\n winVal = value[i];\n winner = i;\n }\n }\n return winner;\n }", "@Override\n public void verifyResult() {\n assertThat(calculator.getResult(), is(4));\n }", "Integer total();", "public void finalResult() {\n ConnectionSockets.getInstance().sendMessage(Integer.toString(points)+\"\\n\");\n System.out.println(\"escreveu para o oponente\");\n opponentPoints = Integer.parseInt(ConnectionSockets.getInstance().receiveMessage());\n System.out.println(\"leu do oponente\");\n if(points != opponentPoints) {\n if (points > opponentPoints) {// Won\n MatchController.getInstance().getSets().add(1);\n MatchController.getInstance().increaseSet();\n } else { //Lost\n MatchController.getInstance().getSets().add(0);\n MatchController.getInstance().increaseSet();\n }\n }\n }", "public static int fullHouseYahtzee(int... result) {\n\n int score = nSame(3, 6, result);\n int firstPairVal = score/3;\n\n result = IntStream.of(result).filter(val -> val != firstPairVal).toArray();\n score = nSame(2, 6, result);\n int secondPairVal = score/2;\n\n if (firstPairVal*secondPairVal > 0) {\n score = 25;\n } else {\n score = 0;\n }\n\n return score;\n }", "private int scoreCounter(int result) {\n result +=1;\n return result;\n }", "public int checkNoOfRapelPlayerHolds () { return noOfRapels; }", "boolean hasFinalTallyResult();", "private boolean verifyTotal(ArrayList<Integer> oneSetOfChoices, ArrayList<Integer> listAllIntegers, int target) {\n\t\t\tboolean matchFound = false;\n\t\t\tint currentTotal = 0;\n\t\t\tint valueInList = 0;\n\t\t\t for (Integer positionInteger: oneSetOfChoices) {\n\t\t\t\t valueInList = listAllIntegers.get(positionInteger.intValue()).intValue();\n\t\t\t\t currentTotal += valueInList;\n\t\t\t }\n\t\t\t\n\t\t\t if (target == currentTotal) {\n\t\t\t\t matchFound = true;\n\t\t\t }\n\t\t\treturn matchFound;\n\t}", "public int check(){\r\n\r\n\treturn count ++;\r\n\t\r\n}", "@Test\n public void is_totalPrice_Is_displayed_properly_Added_To_The_Menu_Failure_Senario_Summation_Incorrect(){\n int isTotalPriceDisplayedSumIncorrect = restaurant.displayCost(totalPrice).size();\n restaurant.displayCost(\"InCorrect Amount Displayed due to Wrong Summation\", isTotalPriceDisplayedSummationCorrect);\n assertEquals(isTotalPriceDisplayedSumIncorrect,restaurant.displayCost(totalPrice).size());\n\n\n }", "@Test\n public void testInterestAccumulated() {\n //Just ensure that the first two digits are the same\n assertEquals(expectedResults.getInterestAccumulated(), results.getInterestAccumulated(), 0.15);\n }", "@Override\r\n\tpublic int getResult() {\n\t\treturn 0;\r\n\t}", "public int numberOfResult() throws Exception;", "@Override\r\n\tint check_sweetness() {\n\t\treturn 10;\r\n\t}", "public static int tower(int... result) {\n\n int score = nSame(4, 6, result);\n int firstMatch = score/4;\n\n result = IntStream.of(result).filter(val -> val != firstMatch).toArray();\n score = nSame(2, 6, result);\n int secondMatch = score/2;\n\n if (firstMatch*secondMatch > 0) {\n score = 4*firstMatch + 2*secondMatch;\n } else {\n score = 0;\n }\n\n return score;\n }", "static int utilityFunction(int choice, double[] finalRes) {\n\t\t// U(choice) = P(In loses to choice | history) - P(In wins to choice | history)\n\t\t// U(0) = P(2 | history) - P(1 | history)\n\t\t// U(1) = P(0 | history) - P(2 | history)\n\t\t// U(2) = P(1 | history) - P(0 | history)\n\t\tdouble u0, u1, u2;\n\t\tu0 = finalRes[2] - finalRes[1];\n\t\tu1 = finalRes[0] - finalRes[2];\n\t\tu2 = finalRes[1] - finalRes[0];\n\t\tRandom random = new Random();\n\t\t// If all three utilities are the same, randomize between the three\n\t\tif(u0 == u1 && u1 == u2)\n\t\t\treturn random.nextInt() % 3;\n\t\t// If two choices' utilities are the same, randomize between the two\n\t\telse if((u1 > u0 && u1 == u2) || (u2 > u0 && u2 == u1)) \n\t\t\treturn random.nextBoolean() ? 2 : 1;\n\t\telse if((u1 > u2 && u1 == u0)|| (u0 > u2 && u0 == u1)) \n\t\t\treturn random.nextBoolean() ? 0 : 1;\n\t\telse if((u2 > u1 && u2 == u0) || (u0 > u1 && u0 == u2)) \n\t\t\treturn random.nextBoolean() ? 2 : 0;\n\t\t// If one choice's utility is greater than the rest\n\t\telse if(u0 > u1 && u0 > u2) \n\t\t\treturn 0;\n\t\telse if(u1 > u2 && u1 > u0) \n\t\t\treturn 1;\n\t\t//(u2 > u0 && u2 > u1) \n\t\telse return 2;\n\t}", "void computeResult() {\n // Get the winner (null if draw).\n roundWinner = compareTopCards();\n\n\n if (roundWinner == null) {\n logger.log(\"Round winner: Draw\");\n logger.log(divider);\n // Increment statistic.\n numDraws++;\n\n } else {\n logger.log(\"Round winner: \" + roundWinner.getName());\n\t logger.log(divider);\n this.gameWinner = roundWinner;\n if (roundWinner.getIsHuman()) {\n // Increment statistic.\n humanWonRounds++;\n }\n }\n\n setGameState(GameState.ROUND_RESULT_COMPUTED);\n }", "private int computeBetterResponse(int player, GameObserver go) {\n int[] devOutcome = currentOutcome.clone();\n double aspirationPayoff = eGame.getPayoff(currentOutcome, player) + aspirationLevel;\n double bestPayoff = eGame.getPayoff(currentOutcome, player);\n int bestResponse = currentOutcome[player];\n\n ///System.out.println(\"Finding BR: \" + Arrays.toString(currentOutcome));\n\n // get the order in which to test best responses\n List<Integer> order = deviationTestOrder.getDeviationTestOrder(currentOutcome, player);\n\n// if (order.size() < nActs[player]-1) {\n// System.out.println(\"To few actions in order listing: \" + order.size());\n// }\n\n int itr = 0;\n for (int a : order) {\n // skip current action\n if (a == currentOutcome[player]) continue;\n devOutcome[player] = a;\n\n //System.out.println(\"Testing dev: \" + Arrays.toString(devOutcome));\n\n // check whether this profile is \"tabu\"\n if (tabu.getValue(devOutcome)) {\n //System.out.println(\"TABU\");\n continue;\n }\n\n // sample if necessary; flag not enough samples\n if (eGame.getNumSamples(devOutcome) == 0) {\n if (go.numObsLeft() <= 0) return NO_SAMPLES_FLAG;\n sampleAndUpdate(devOutcome, go);\n //System.out.println(\"SAMPLED\");\n }\n\n // check BR\n double devPayoff = eGame.getPayoff(devOutcome, player);\n\n// if (devPayoff > aspirationPayoff) {\n// //System.out.println(\"Aspiration met.\");\n// return a;\n// } else\n\n if (devPayoff > bestPayoff) {\n //System.out.println(\"Br, but not aspiration level\");\n bestPayoff = devPayoff;\n bestResponse = a;\n }\n\n itr++;\n if (itr > minDeviationsTested &&\n bestPayoff > aspirationPayoff) {\n return bestResponse;\n }\n\n }\n\n if (bestResponse != currentOutcome[player]) {\n //System.out.println(\"return non-aspiration BR\");\n return bestResponse;\n }\n //System.out.println(\"NO BR\");\n return NO_BR_FLAG;\n }", "@Test\n\tpublic void completeHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfCompleteHires() == 2);\n\t}", "@Test\n public void testOriginalAmountOwed() {\n //Just ensure that the first two digits are the same\n assertEquals(expectedResults.getOriginalAmountOwed(), results.getOriginalAmountOwed(), 0.15);\n }", "@Override\r\n\tint check_sweetness() {\n\t\treturn 30;\r\n\t}", "public int Check(){\n return 6;\n }", "@Test\n\tpublic void totalHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getTotalHires() == 4);\n\t}", "public Double getTotalMatched(){\n return totalMatched;\n }", "public int getWinner();", "public void decideResult() {\n\t\t\n\t\tif (mUser.getHandValue() < 22 && mUser.getHandValue() > mDealer.getHandValue()) {\n\t\t\tmResult = \"win\";\n\t\t}else if(mUser.getHandValue() < 22 && mUser.getHandValue() == mDealer.getHandValue()) {\n\t\t\tmResult = \"draw\";\n\t\t}else {\n\t\t\tmResult = \"lose\";\n\t\t}\n\t\t\n\t}", "int getTotalLeased();", "public static int bigStraightYahtzee(int... result) {\n\n Arrays.sort(result);\n\n int[] uniqueValues = IntStream.of(result).distinct().sorted().toArray();\n long noUniqVals = IntStream.of(uniqueValues).distinct().count();\n int score = 0;\n\n if (noUniqVals >= 5) {\n ArrayList<int[]> matchArrays = new ArrayList<>();\n matchArrays.add(new int[]{1, 2, 3, 4, 5});\n matchArrays.add(new int[]{2, 3, 4, 5, 6});\n\n ArrayList<int[]> resultSubArrays = new ArrayList<>();\n for (int i = 0; i < noUniqVals - 4; i++) {\n resultSubArrays.add(Arrays.copyOfRange(uniqueValues, i, i + 5));\n }\n\n for (int[] arr : resultSubArrays) {\n for (int[] match : matchArrays) {\n if (Arrays.equals(arr, match)) {\n score = 40;\n }\n\n }\n }\n }\n return score;\n }", "public double checkPot(){\r\n\t\treturn totalPot;\r\n\t}", "double getTotalReward();", "public abstract Integer gethourNeed();", "public int result() {\n\t\treturn total;\n\t}", "public Integer countGoals();", "int getToughness(Unit unit);", "private void warResult() {\r\n // Get number of survivors alive\r\n int survivorCount = safeCount(survivors);\r\n if (survivorCount == 0) {\r\n System.out.println(\"None of the survivors made it.\");\r\n\t\t}\r\n else {\r\n System.out.println(\"It seems \" + survivorCount + \" have made it to safety.\");\r\n\t\t}\r\n }", "@Test\n public void testCalculerDroitPassage() {\n int nbrDoitPassage = 3;\n double valeurLot = 1000;\n double expResult = 350;\n double result = CalculAgricole.calculerMontantDroitsPassage(nbrDoitPassage, valeurLot);\n assertEquals(\"Montant pour las droits du passage n'était pas correct.\", expResult, result, 0);\n\n }", "public int totalOrdersTaken();", "private int calculateResultQ4(boolean radioButton1) {\n int result = 0;\n if (radioButton1) {\n result = 1;\n }\n return result;\n }", "public int getToughness();", "@Override\n public int viability() {\n int[] newStats = getNewStats();\n return newStats[0] * newStats[1];\n }", "public int getUtility(PentagoBoard board) {\n char humanPiece = humanPlayer.getPiece();\n char aiPiece = aiPlayer.getPiece();\n int utility = 0;\n boolean won = board.fiveInARow(humanPiece);\n boolean lost = board.fiveInARow(aiPiece);\n\n if(won) {\n utility = 100;\n } else if (lost) {\n utility = -100;\n } else {\n for(int i = 2; i < 5; i++) {\n int inARows = board.inARows(2, humanPiece);\n int inARowsAi = board.inARows(2, aiPiece);\n utility += (inARows - inARowsAi);\n }\n }\n return utility;\n }", "public static int smallStraightYahtzee(int... result) {\n\n Arrays.sort(result);\n\n int[] uniqueValues = IntStream.of(result).distinct().sorted().toArray();\n long noUniqVals = IntStream.of(uniqueValues).distinct().count();\n\n int score = 0;\n\n if (noUniqVals >= 4) {\n\n ArrayList<int[]> matchArrays = new ArrayList<>();\n matchArrays.add(new int[] {1, 2, 3, 4});\n matchArrays.add(new int[] {2, 3, 4, 5});\n matchArrays.add(new int[] {3, 4, 5, 6});\n\n ArrayList<int[]> resultSubArrays = new ArrayList<>();\n for (int i = 0; i < noUniqVals - 3; i++) {\n int[] testArr = Arrays.copyOfRange(uniqueValues, i, i + 4);\n resultSubArrays.add(testArr);\n }\n\n for (int[] arr : resultSubArrays) {\n for (int[] match : matchArrays) {\n if (Arrays.equals(arr, match)) {\n score = 30;\n }\n }\n }\n }\n return score;\n }", "int getWrongAnswers();", "private Boolean calculateTotalEmission() {\n\t\ttry {\n\n\t\t\tfoodCO2E = Double.valueOf(JTFFood.getText().isEmpty() ? \"0.0\" : JTFFood.getText())\n\t\t\t\t\t* energySourceDetail.get(FoodIntake).get(JCBFoodUnit.getSelectedItem().toString());\n\n\t\t\tlandfillingFoodWasteCO2E = Double\n\t\t\t\t\t.valueOf(JTFLandfillingFoodWaste.getText().isEmpty() ? \"0.0\" : JTFLandfillingFoodWaste.getText())\n\t\t\t\t\t* energySourceDetail.get(LandfillingFoodWaste)\n\t\t\t\t\t\t\t.get(JCBLandfillingFoodWasteUnit.getSelectedItem().toString());\n\n\t\t\tcompostingFoodWasteCO2E = Double\n\t\t\t\t\t.valueOf(JTFCompostingFoodWaste.getText().isEmpty() ? \"0.0\" : JTFCompostingFoodWaste.getText())\n\t\t\t\t\t* energySourceDetail.get(CompostingFoodWaste)\n\t\t\t\t\t\t\t.get(JCBCompostingFoodWasteUnit.getSelectedItem().toString());\n\n\t\t} catch (NumberFormatException ne) {\n\t\t\tSystem.out.println(\"Number Format Exception while calculating House Hold Emission\" + ne);\n\t\t\treturn false;\n\t\t}\n\t\t//\n\t\ttotalFoodCO2E = foodCO2E + landfillingFoodWasteCO2E + compostingFoodWasteCO2E;\n\t\ttotalFoodCO2E = Math.round(totalFoodCO2E * 100D) / 100D;\n\t\treturn true;\n\t}", "public void theDude() {\n\t\ttotal_targets = 0;\n\t\ttotal = 0;\n\t\tint target_count = 0;\n\t\tresult.clear();\n\t\t\n\t\tfor(int k=0; k<input.getWords().size();k++) {\n\t\t\tWord currentWordStat = input.getWordStatistics().get(k);\n\t\t\ttarget_count = 0;\n\t\t\t\n\t\t\tfor(int i=0;i<input.getWords().get(k).length();i++) {\n\t\t\t\tif(target.contains(input.getWords().get(k).charAt(i))) {\n\t\t\t\t\ttarget_count++;\n\t\t\t\t\ttotal_targets++;\n\t\t\t\t}\n\t\t\t\ttotal++;\n\t\t\t}\n\t\t\t\n\t\t\tif(result.containsKey(currentWordStat)) {\n\t\t\t\tresult.put(currentWordStat, result.get(currentWordStat)+target_count);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tresult.put(currentWordStat, target_count);\n\t\t\t}\n\t\t}\t\n\t}", "Object getNumberMatched();", "public int result() {\n return EQUAL;\n }", "int getResult();", "public Integer collectAmountAndGiveItToMe() {\n\t\t\n\t\t//void will not return anything\n\t\tSystem.out.println(\"Daddy collected rupee is\" + collectedAmount+\" and Sent it to you\");\n\t\treturn collectedAmount;\n\t\t\n\t}", "@Test\n public void testTotalPaid() {\n //Just ensure that the first two digits are the same\n assertEquals(expectedResults.getTotalPaid(), results.getTotalPaid(), 0.15);\n }", "private boolean isWrong() {\n\t\treturn wrongMatches >= 5;\n\t}", "public int getWorth()\n {\n return worth;\n }", "@Test\r\n public void testSumHand() {\r\n Player player = new Player();\r\n int expResult = 0;\r\n int result = player.sumHand();\r\n assertEquals(expResult, result);\r\n \r\n \r\n Tile tile=new Tile(2,3);\r\n Tile tile2=new Tile(4,5);\r\n ArrayList<Tile> temp=new ArrayList<>();\r\n temp.add(tile);\r\n temp.add(tile2);\r\n player.setHand(temp);\r\n int expResult2 = 14;\r\n int result2 = player.sumHand();\r\n assertEquals(expResult2, result2);\r\n \r\n }", "public int getAmountDone();", "public int getResult() {\n whiteTotal = 0;\n blackTotal = 0;\n rest = 0;\n for (int row = 0; row < BOARD_SIZE; row++) {\n for (int column = 0; column < BOARD_SIZE; column++) {\n if (board[row][column] == BLACK) {\n blackTotal++;\n } else if (board[row][column] == WHITE) {\n whiteTotal++;\n } else {\n rest++;\n }\n }\n }\n int winner = -1;\n if (rest == 0) {\n if (blackTotal < whiteTotal) {\n winner = 1;\n } else if (blackTotal > whiteTotal) {\n winner = 2;\n } else {\n winner = 0;\n }\n }\n\n if (blackTotal == 0 || whiteTotal == 0) {\n\n if (blackTotal != 0) {\n winner = 2;\n } else if (whiteTotal != 0) {\n winner = 1;\n }\n }\n\n if (getValidateMoveList('W', 'B').isEmpty() && getValidateMoveList('B', 'W').isEmpty()) {\n\n if (blackTotal < whiteTotal) {\n winner = 1;\n } else if (blackTotal > whiteTotal) {\n winner = 2;\n } else {\n winner = 0;\n }\n }\n return winner;\n }", "private void asserEquals(int esperado, int resultado) {\n\t\t\r\n\t}", "@Test\n public void is_totalPrice_Is_displayed_properly_Added_To_The_Menu_Success_Senario_Correct_Sum(){\n int isTotalPriceDisplayedSummationCorrect = restaurant.displayCost(totalPrice).size();\n restaurant.displayCost(\"Correct Sum Amount Displayed\", isTotalPriceDisplayed);\n assertEquals(isTotalPriceDisplayed,restaurant.getTotalPrice().size());\n\n\n }", "private boolean checkGreedyWinRate() {\r\n return myTotal.get(0) > enTotal.get(0)+2 && (myself.health > 50 || myself.health > opponent.health);\r\n }", "@Test\n\tpublic void bikesOnHire()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfBikesOnHire() == 2);\n\t}", "@Test\n\tvoid getResultsTest() {\n\t\tassertEquals(22, utilities.getResults(-21));\n\t\tassertEquals(20, utilities.getResults(-20));\n\t\tassertEquals(40, utilities.getResults(-19));\n\t\tassertEquals(38, utilities.getResults(-18));\n\t\tassertEquals(22, utilities.getResults(21));\n\t\tassertEquals(20, utilities.getResults(20));\n\t\tassertEquals(22, utilities.getResults(2));\n\t\tassertEquals(22, utilities.getResults(1));\n\t}", "public int winner() {\n if(humanPlayerHits == 17) {\n return 1;\n }\n if(computerPlayerHits == 17){\n return 2;\n }\n return 0;\n }", "@Test\n public void testSell() {\n Game game = Game.getInstance();\n Player player = new Player(\"Chisom\", 2, 2, 2,\n 2, SolarSystems.SOMEBI);\n game.setPlayer(player);\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(2, Goods.Water));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(1, Goods.Food));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(1, Goods.Furs));\n CargoItem good = game.getPlayer().getShip().getShipCargo().get(2);\n good.getGood().sell(good.getGood(), 1);\n CargoItem water = game.getPlayer().getShip().getShipCargo().get(0);\n water.setQuantity(2);\n CargoItem food = game.getPlayer().getShip().getShipCargo().get(1);\n food.setQuantity(1);\n good.setQuantity(0);\n int P = good.getGood().getPrice(1);\n int total = game.getPlayer().getCredits();\n boolean quan = water.getQuantity() == 2 && food.getQuantity() == 1 && good.getQuantity() == 0;\n boolean check = water.getQuantity() == 2;\n System.out.print(total);\n assertTrue(quan && total == 1560);\n //assertEquals(true, quan && total == 1560);\n }", "@Test\n public void test_total_balance3() {\n assertEquals(0, ao3.totalBalanceOfAccountsOwned(), EPS);\n }", "void checkWinner() {\n\t}", "boolean hasCorrect();", "public void sumaPuntos() {\r\n int rojo = 0;\r\n int azul = 0;\r\n for (int i = 1; i < 10; i++) {\r\n\r\n if (tablero[1][i].getTipo().equals(\"Rojo\")) {\r\n rojo += tablero[1][i].getValor();\r\n }\r\n\r\n if (tablero[8][i].getTipo().equals(\"Azul\")) {\r\n azul += tablero[8][i].getValor();\r\n }\r\n\r\n }\r\n if (rojo > azul) {\r\n this.setResultado(\"Rojo\");\r\n this.agregarVictoria(jugadorRojo);\r\n }\r\n if (azul > rojo) {\r\n this.setResultado(\"Azul\");\r\n this.agregarVictoria(jugadorAzul);\r\n }\r\n \r\n this.setReplay(true);\r\n }", "@Test\n public void notSell() {\n Game game = Game.getInstance();\n Player player = new Player(\"ED\", 4, 4, 4,\n 4, SolarSystems.GHAVI);\n game.setPlayer(player);\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(2, Goods.Water));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(1, Goods.Food));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(0, Goods.Furs));\n CargoItem good = game.getPlayer().getShip().getShipCargo().get(2);\n \n int oldCredits = game.getPlayer().getCredits();\n good.getGood().sell(good.getGood(), 1);\n \n CargoItem water = game.getPlayer().getShip().getShipCargo().get(0);\n CargoItem food = game.getPlayer().getShip().getShipCargo().get(1);\n water.setQuantity(2);\n food.setQuantity(1);\n good.setQuantity(0);\n //int P = good.getGood().getPrice(1);\n int curr = game.getPlayer().getCredits();\n //boolean qn = water.getQuantity() == 2 && food.getQuantity() == 1 && good.getQuantity() == 0;\n boolean check = water.getQuantity() == 2;\n System.out.print(curr);\n assertEquals(curr, oldCredits);\n }", "public int result() {\n return 0;\n }", "long getMisses();", "public static int[] mucScore(LeanDocument key, LeanDocument response)\n{\n // System.out.println(\"==========================================================\");\n // System.out.println(\"Key:\\n\"+key.toStringNoSing()+\"\\n*************************\\nResponse:\\n\"+response.toStringNoSing());\n\n Iterator<TreeMap<Integer, Integer>> goldChains = key.chainIterator();\n // double mucRecall = 0.0;\n int mucRecallNom = 0;\n int mucRecallDenom = 0;\n while (goldChains.hasNext()) {\n TreeMap<Integer, Integer> keyChain = goldChains.next();\n if (keyChain.size() > 1) {\n int numInt = numIntersect(key, keyChain, response);\n\n // int numMatched = getNumMatched(key, keyChain);\n // if(numMatched>0){\n // mucRecallNom += numMatched-numInt;\n mucRecallNom += (keyChain.size() - numInt);\n // mucRecallDenom += numMatched-1;\n mucRecallDenom += keyChain.size() - 1;\n\n // System.out.println(keyChain+\"\\n\"+(keyChain.size() - numInt)+\"/\"+(keyChain.size()-1));\n // }\n }\n }\n int[] result = { mucRecallNom, mucRecallDenom };\n\n return result;\n}", "@Test\n public void allStrikesExpected_300(){\n String input = \"XXXXXXXXXXXX\";\n assertEquals(game.scoreOfGame(input),300);\n }", "public void calculateResult() {\n\t\tfor (GameEngineCallback callback : callbacks) {\n\t\t\t// Roll for house\n\t\t\tthis.rollHouse(INITIAL_DELAY, FINAL_DELAY, DELAY_INCREMENT);\n\t\t\t\n\t\t\tfor (Player player : this.players.values()) {\n\t\t\t\t// Players who are playing must have a bet and a score\n\t\t\t\t// This conditional may not be required in Assignment 2\n\t\t\t\tif (player.getBet() > 0 && player.getRollResult()\n\t\t\t\t\t\t.getTotalScore() > 0) {\n\t\t\t\t\t// Compare rolls, set result and add/subtract points\n\t\t\t\t\tif (this.houseDice.getTotalScore() > player.\n\t\t\t\t\t\t\tgetRollResult().getTotalScore()) {\n\t\t\t\t\t\tGameStatus status = GameEngine.GameStatus.LOST;\t\t\t\t\t\n\t\t\t\t\t\tplayer.setGameResult(status);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Subtract bet from player points\n\t\t\t\t\t\tint points = player.getPoints() - player.getBet();\n\t\t\t\t\t\tthis.setPlayerPoints(player, points);\n\t\t\t\t\t}\n\t\t\t\t\telse if (houseDice.getTotalScore() == player.\n\t\t\t\t\t\t\tgetRollResult().getTotalScore()) {\n\t\t\t\t\t\tGameStatus status = GameEngine.GameStatus.DREW;\t\t\t\t\t\n\t\t\t\t\t\tplayer.setGameResult(status);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// No change to points on a draw\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tGameStatus status = GameEngine.GameStatus.WON;\t\t\t\t\t\n\t\t\t\t\t\tplayer.setGameResult(status);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Add bet to player points\n\t\t\t\t\t\tint points = player.getPoints() + player.getBet();\n\t\t\t\t\t\tthis.setPlayerPoints(player, points);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Display result\n\t\t\t\t\tcallback.gameResult(this.getPlayer(player.getPlayerId()), \n\t\t\t\t\t\t\tthis.getPlayer(player.getPlayerId()).getGameResult(), this);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "int getFaintedPokemonCount();", "public int calculateVotes() {\n return 1;\n }", "public static int villa(int... result) {\n\n int score = nSame(3, 6, result);\n int firstPairVal = score/3;\n\n result = IntStream.of(result).filter(val -> val != firstPairVal).toArray();\n score = nSame(3, 6, result);\n int secondPairVal = score/3;\n\n if (firstPairVal*secondPairVal > 0) {\n score = 3*firstPairVal + 3*secondPairVal;\n } else {\n score = 0;\n }\n\n return score;\n }", "public boolean hasResult()\n/* */ {\n/* 119 */ return this.result != RESULT_NONE;\n/* */ }", "@Override\n public void computeSatisfaction() {\n\n }", "@Test\n\tpublic void totalBikes()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getTotalBikes() == 4);\n\t}", "public int checkNoOfExplosivesPlayerHolds () { return noOfExplosives; }", "int getBattlesWon();", "public int runTrialsMemoized() {\n int minTests = 0;\n // Your optional code here\n return minTests;\n }", "private boolean checkGreedyDefense() {\r\n return enTotal.get(2)+1 < myTotal.get(2) && enTotal.get(0)+1 < myTotal.get(0);\r\n }", "@Test\n public void testCalculation() {\n int expResult = 321;\n game.calculation(180);\n int result = Integer.valueOf(game.getRemainigScore());\n assertEquals(\"testCalculation: \",expResult, result);\n }", "int getResultMonster();", "@Override\n public int tonKho() {\n return getAmount() - amountBorrow;\n }", "protected boolean checkChance(ReturnValue returnValue) {\n\t\tint sum = 0;\n\t\t\t\tfor (Integer i : intList) {\n\t\t\t\t\tsum += i;\n\t\t\t\t}\n\t\treturnValue.setValue(true, sum, Box.CHANCE);\n\t\treturn true;\n\t}", "int getChksum();", "public double trueCount() {\n\t\t\t\n\t\t\treturn (double)total_count/((double)size/52);\n\t\t}", "boolean hasHasAlcoholResult();", "@Test\r\n\tpublic void testSum() { //testing the adding method\r\n\t\tnum1 = 2; \r\n\t\tnum2 = 8;\r\n\t\tresult = calculate.sum(num1, num2); //result stores the method of add\r\n\t\texpected = 10;\r\n\t\t\r\n\t\tassertEquals(expected,result); //compares add to the expected, if no match then error \r\n\t}", "private int get2(String name) {\n int t = 0;\n PlayerRecord curr = playerlist.first();\n while (curr != null) {\n if (curr.getTeamname().equals(name))\n t = t + curr.getWinninggoals(); // sum of all GWGs\n curr = playerlist.next();\n }\n return t;\n }", "private int aleatorizarNaipe() {\n\t\tint aux;\n\t\taux = r.getIntRand(4);\n\t\treturn aux;\n\t}" ]
[ "0.6472461", "0.6278016", "0.61583394", "0.60852045", "0.6000299", "0.59829825", "0.59829825", "0.5935133", "0.5920788", "0.5900062", "0.5883166", "0.5881073", "0.5876738", "0.5847678", "0.5836639", "0.58116686", "0.57955104", "0.5761903", "0.57556045", "0.57532233", "0.5733223", "0.57294816", "0.57238483", "0.5721423", "0.57173914", "0.5689734", "0.56875944", "0.56853616", "0.56851685", "0.5674875", "0.5661527", "0.565122", "0.5648677", "0.5638999", "0.5636508", "0.5604687", "0.5603834", "0.558486", "0.5583478", "0.5579482", "0.5565562", "0.5559275", "0.5527886", "0.55202764", "0.55056834", "0.5504598", "0.55026853", "0.5500576", "0.5492027", "0.5487632", "0.54832", "0.5475655", "0.5470901", "0.54684234", "0.5465919", "0.5456871", "0.5454435", "0.54442126", "0.5443017", "0.54373914", "0.54363537", "0.5432", "0.5431987", "0.5430938", "0.54275167", "0.5422597", "0.5421038", "0.5417882", "0.5415341", "0.54017216", "0.5401705", "0.54008436", "0.5396649", "0.5390804", "0.5390606", "0.53822994", "0.53793323", "0.5378781", "0.5377673", "0.53730756", "0.5369161", "0.5366913", "0.5351436", "0.53508747", "0.53437185", "0.53417176", "0.5340317", "0.5340185", "0.5339466", "0.5338638", "0.53359324", "0.5328602", "0.53255606", "0.53243756", "0.5319987", "0.5319932", "0.5318019", "0.5311562", "0.53111184", "0.5309985" ]
0.5742397
20
/ ensure Result = Account.currentAccount
public static Account getCurrentAccount() { return currentAccount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Account getAccount();", "public String getCurrentUserAccount();", "java.lang.String getAccount();", "public Account getAccount() {\n return account;\n }", "public Account getAccount() {\n return account;\n }", "public LocalAccount\t\tgetAccount();", "public String getAccount() {\r\n return account;\r\n }", "public AccountInfo getAccount()\n {\n if(accountInfo == null)\n {\n System.out.println(\"You need to generate an account before getting the details.\");\n return null;\n }\n return accountInfo;\n }", "public Account getAccount() {\r\n\t\treturn account;\r\n\t}", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public CloudStackAccount getCurrentAccount() throws Exception {\n if (currentAccount != null) {\n // verify this is the same account!!!\n for (CloudStackUser user : currentAccount.getUser()) {\n if (user.getSecretkey() != null && user.getSecretkey().equalsIgnoreCase(UserContext.current().getSecretKey())) {\n return currentAccount;\n }\n }\n }\n // otherwise let's find this user/account\n List<CloudStackAccount> accounts = getApi().listAccounts(null, null, null, null, null, null, null, null);\n for (CloudStackAccount account : accounts) {\n CloudStackUser[] users = account.getUser();\n for (CloudStackUser user : users) {\n String userSecretKey = user.getSecretkey();\n if (userSecretKey != null && userSecretKey.equalsIgnoreCase(UserContext.current().getSecretKey())) {\n currentAccount = account;\n return account;\n }\n }\n }\n // if we get here, there is something wrong...\n return null;\n }", "public\n Account\n getAccount()\n {\n return itsAccount;\n }", "public String getAccount() {\r\n\t\treturn account;\r\n\t}", "public String getAccount(){\n\t\treturn account;\n\t}", "GlAccount getGlAccount();", "Account getAccount(Integer accountNumber);", "UserAccount getUserAccountById(long id);", "public boolean privateCurrentAccount()\n {\n if(accountInfo == null)\n {\n System.out.println(\"You need to generate an account before getting the details.\");\n return false;\n }\n return accountInfo.privateAccount();\n }", "protected final Account getAccount() {\n\t\treturn getRegisterView().getAccount();\n\t}", "public AccountInfo getAccountInfo() {\n return accountInfo;\n }", "AccountDetail getAccount(String number) throws Exception;", "Account getAccount(int id);", "java.lang.String getAccountId();", "java.lang.String getAccountId();", "java.lang.String getAccountId();", "BillingAccount getBillingAccount();", "private int getCurrentAccountId() {\n accountLock.lock();\n int nmr = 1;\n try (\n Statement s = rawDataSource.getConnection().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n ResultSet res = s.executeQuery(\n \"SELECT ACCOUNT_ID FROM APP.ACCOUNTS ORDER BY ACCOUNT_ID ASC\")) {\n\n if (res.last()) {\n nmr = Integer.parseInt(res.getString(\"ACCOUNT_ID\")) + 1;\n }\n } catch (SQLException ex) {\n return nmr;\n }\n\n accountLock.unlock();\n return nmr;\n }", "public Account findAccount() {\n Account[] accounts = accountManager.getAccountsByType(ACCOUNT_TYPE);\n\n // only one matching account - use it, and remember it for the next time.\n if (accounts.length == 1) {\n persistAccountName(accounts[0].name);\n return accounts[0];\n }\n\n // No accounts, create one and use it if created, otherwise we have no account to use\n\n if (accounts.length == 0) {\n String accountName = createAccount();\n if (accountName != null) {\n persistAccountName(accountName);\n return accountManager.getAccountsByType(ACCOUNT_TYPE)[0];\n } else {\n Log.i(LOG_TAG, \"User failed to create a valid account\");\n return null;\n }\n }\n\n // Still valid previously chosen account - use it\n\n Account account;\n String accountName = getPersistedAccountName();\n if (accountName != null && (account = chooseAccount(accountName, accounts)) != null) {\n return account;\n }\n\n // Either there is no saved account name, or our saved account vanished\n // Have the user select the account\n\n accountName = selectAccount(accounts);\n if (accountName != null) {\n persistAccountName(accountName);\n return chooseAccount(accountName, accounts);\n }\n\n // user didn't choose an account at all!\n Log.i(LOG_TAG, \"User failed to choose an account\");\n return null;\n }", "String getTradingAccount();", "Account apply();", "boolean hasAccount();", "boolean hasAccount();", "boolean hasAccount();", "public java.lang.String getAccount() {\n java.lang.Object ref = account_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n account_ = s;\n return s;\n }\n }", "public com.huawei.www.bme.cbsinterface.cbs.businessmgr.Account getAccount() {\r\n return account;\r\n }", "String getAccountID();", "String getAccountID();", "public java.lang.String getAccount() {\n java.lang.Object ref = account_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n account_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "private Account getAccount( int accountNumber )\n {\n for( Account currentAccount : accounts )\n {\n if( currentAccount.getAccountNumber() == accountNumber )\n {\n return currentAccount;\n }\n \n }\n return null;\n }", "public long getAccountId()\r\n/* 115: */ {\r\n/* 116:121 */ return this.accountId;\r\n/* 117: */ }", "public java.lang.String getAccount() {\n java.lang.Object ref = account_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n account_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public interface Account extends LrsObject {\n /**\n * The canonical home page for the system the account is on. This is based on FOAF's accountServiceHomePage.\n */\n InternationalizedResourceLocator getHomePage();\n\n /**\n * The unique id or name used to log in to this account. This is based on FOAF's accountName.\n */\n String getName();\n}", "public java.lang.String getAccount() {\n java.lang.Object ref = account_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n account_ = s;\n }\n return s;\n }\n }", "java.lang.String getLoginAccount();", "java.lang.String getLoginAccount();", "public boolean getHasAccount() {\n return hasAccount_;\n }", "Long getAccountId();", "public MnoAccount getAccountById(String id);", "public static Account getAccount(String accountId) {\r\n return (accounts.get(accountId));\r\n }", "public String getUserAccount() {\n return sessionData.getUserAccount();\n }", "public BigDecimal getBasicAccount() {\r\n return basicAccount;\r\n }", "@AfterPermissionGranted(REQUEST_PERMISSION_GET_ACCOUNTS)\n private void chooseAccount() {\n if (EasyPermissions.hasPermissions(\n this, Manifest.permission.GET_ACCOUNTS)) {\n String accountName = getPreferences(Context.MODE_PRIVATE)\n .getString(PREF_ACCOUNT_NAME, null);\n if (accountName != null) {\n mCredential.setSelectedAccountName(accountName);\n getResultsFromApi(this);\n } else {\n // Start a dialog from which the user can choose an account\n startActivityForResult(\n mCredential.newChooseAccountIntent(),\n REQUEST_ACCOUNT_PICKER);\n }\n } else {\n // Request the GET_ACCOUNTS permission via a user dialog\n EasyPermissions.requestPermissions(this, getString(R.string.str_needs_account),\n REQUEST_PERMISSION_GET_ACCOUNTS, Manifest.permission.GET_ACCOUNTS);\n }\n }", "public String getAccountName() {\n return this.accountName;\n }", "public int getAccountNumber() {\n return accountNumber;\n }", "boolean getHasAccount();", "public boolean getHasAccount() {\n return hasAccount_;\n }", "public abstract GDataAccount getAccount(String account) throws ServiceException;", "public BankAccount findAccountById(int currentBankID) throws SQLException;", "public boolean favouriteCurrentAccount()\n {\n if(accountInfo == null)\n {\n System.out.println(\"You need to generate an account before getting the details.\");\n return false;\n }\n return accountInfo.favouriteAccount();\n }", "public\n boolean\n hasAccount()\n {\n return getAccount() != null;\n }", "public int getAccountID() {\n return accountID;\n }", "@Override\n public BigDecimal getCurrentBalance(Account account) {\n return null;\n }", "java.lang.String getAccountNumber();", "public String getAccountName() {\r\n return accountName;\r\n }", "public Long getAccountID() {\n return accountID;\n }", "public Long getAccountID() {\n return accountID;\n }", "boolean hasHasAccount();", "public BankAccount getCheckingAccount() {\n return checkingAccount;\n }", "public Account getExistingAccount(String accountId) {\n return this.currentBlock.getAccount(accountId);\n }", "public Account getAccount(Player p) {\n\t\tif (p == null)\n\t\t\treturn null; // safety\n\t\t// If the account is in memory, return it\n\t\tfor ( Account a : accounts) {\n\t\t\tif (a.isFor(p.getUniqueId()))\n\t\t\t\treturn a;\n\t\t}\n\t\t// spawn a new account object with default values\n\t\tAccount acct = new Account(p.getName(), p.getUniqueId());\n\t\t// load account status from yml file, if it exists\n\t\tacct.openAccount();\n\t\t// append to the bank list\n\t\taccounts.add(acct);\n\t\treturn acct;\n\t}", "public String getAccountName() {\n return accountName;\n }", "public String getAccountName() {\n return accountName;\n }", "public String getAccountName() {\n return accountName;\n }", "@Override\n\tpublic Account getSingleAccount() {\n\t\treturn null;\n\t}", "net.nyhm.protonet.example.proto.AccountProto.Account getAccount();", "net.nyhm.protonet.example.proto.AccountProto.Account getAccount();", "public String viewAccount() {\n ConversationContext<Account> ctx = AccountController.newEditContext(getPart().getAccount());\n ctx.setLabelWithKey(\"part_account\");\n getCurrentConversation().setNextContextSubReadOnly(ctx);\n return ctx.view();\n }", "public static Account getAccountDetails(int accountId) throws SQLException {\n boolean cdt1 = Checker.checkValidUserAccountAccountId(accountId);\n // if it is a account id, establish a connection\n if (cdt1) {\n EnumMapRolesAndAccounts map = new EnumMapRolesAndAccounts();\n map.createEnumMap();\n Connection connection = DatabaseDriverHelper.connectOrCreateDataBase();\n ResultSet results = DatabaseSelector.getAccountDetails(accountId, connection);\n while (results.next()) {\n // get the account details\n String name = results.getString(\"NAME\");\n BigDecimal balance = new BigDecimal(results.getString(\"BALANCE\"));\n // make an account class (either chequing, savings, or tfsa) based on the type\n if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.CHEQUING)) {\n ChequingAccount chequing = new ChequingAccountImpl(accountId, name, balance);\n connection.close();\n return chequing;\n } else if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.SAVINGS)) {\n SavingsAccount savings = new SavingsAccountImpl(accountId, name, balance);\n connection.close();\n return savings;\n } else if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.TFSA)) {\n TFSA tfsa = new TFSAImpl(accountId, name, balance);\n connection.close();\n return tfsa;\n } else if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.RESTRICTEDSAVING)) {\n RestrictedSavingsAccount rsa = new RestrictedSavingsAccountImpl(accountId, name, balance);\n connection.close();\n return rsa;\n } else if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.BALANCEOWING)) {\n BalanceOwingAccount boa = new BalanceOwingAccountImpl(accountId, name, balance);\n connection.close();\n return boa;\n }\n }\n }\n return null;\n }", "@AfterPermissionGranted(REQUEST_PERMISSION_GET_ACCOUNTS)\r\n private void chooseAccount() {\r\n if (EasyPermissions.hasPermissions(\r\n getActivity(), Manifest.permission.GET_ACCOUNTS)) {\r\n String accountName = getActivity().getPreferences(Context.MODE_PRIVATE)\r\n .getString(PREF_ACCOUNT_NAME, null);\r\n\r\n if (accountName != null) {\r\n mCredential.setSelectedAccountName(accountName);\r\n Log.i(accountName,\"accountName:\");\r\n getResultsFromApi();\r\n } else {\r\n // Start a dialog from which the user can choose an account\r\n startActivityForResult(\r\n mCredential.newChooseAccountIntent(),\r\n REQUEST_ACCOUNT_PICKER);\r\n }\r\n } else {\r\n // Request the GET_ACCOUNTS permission via a user dialog\r\n EasyPermissions.requestPermissions(\r\n this,\r\n \"This app needs to access your Google account (via Contacts).\",\r\n REQUEST_PERMISSION_GET_ACCOUNTS,\r\n Manifest.permission.GET_ACCOUNTS);\r\n }\r\n }", "public final AfAccount getAccount(String accountName) {\n return _accounts.get(accountName);\n }", "public int getAccountId() {\n return accountId;\n }", "public String getAccountNo();", "public String getAccount() {\n\t\treturn getUsername() + \":\" + getPassword() + \"@\" + getUsername();\n\t}", "public Account getAccount(int accound_index){\n return accounts[accound_index];\n }", "public long getAccountId() {\n return accountId;\n }", "public Long getAccountID() {\n return accountID;\n }", "public Long getAccountID() {\n return accountID;\n }", "Account apply(Context context);", "public int getBankAccount() {\n return bankAccount;\n }", "private void loadAccount() {\n if (mSingleAccountApp == null) {\n return;\n }\n\n mSingleAccountApp.getCurrentAccountAsync(new ISingleAccountPublicClientApplication.CurrentAccountCallback() {\n @Override\n public void onAccountLoaded(@Nullable IAccount activeAccount) {\n // You can use the account data to update your UI or your app database.\n mAccount = activeAccount;\n updateUI();\n }\n\n @Override\n public void onAccountChanged(@Nullable IAccount priorAccount, @Nullable IAccount currentAccount) {\n if (currentAccount == null) {\n // Perform a cleanup task as the signed-in account changed.\n showToastOnSignOut();\n }\n }\n\n @Override\n public void onError(@NonNull MsalException exception) {\n displayError(exception);\n }\n });\n }", "public BankAccountInterface getAccount(String accountID){\n BankAccountInterface account = null;\n for(int i = 0; i < accounts.size(); i++){\n if(accounts.get(i).getAccountID().equals(accountID)){\n account = accounts.get(i);\n break;\n } \n }\n return account;\n }" ]
[ "0.79096943", "0.7810814", "0.7742932", "0.737202", "0.737202", "0.73557633", "0.7312707", "0.72968704", "0.7290805", "0.727083", "0.727083", "0.727083", "0.727083", "0.727083", "0.727083", "0.727083", "0.727083", "0.727083", "0.727083", "0.72590846", "0.72196764", "0.71969026", "0.7103564", "0.71023285", "0.7058403", "0.68776584", "0.6875112", "0.6812244", "0.6792145", "0.6777634", "0.6772122", "0.6745635", "0.6745635", "0.6745635", "0.67319256", "0.6697848", "0.66467637", "0.66435033", "0.66315025", "0.66086966", "0.66086966", "0.66086966", "0.6607257", "0.65947914", "0.65808505", "0.65808505", "0.65702224", "0.6561482", "0.65612185", "0.65478617", "0.6543902", "0.65386003", "0.65337175", "0.65337175", "0.6532514", "0.65263766", "0.65172756", "0.6506076", "0.6503298", "0.64949757", "0.6483117", "0.6478875", "0.6475645", "0.647239", "0.6469563", "0.6468139", "0.64656264", "0.6461756", "0.6460324", "0.6458302", "0.64545816", "0.6445035", "0.6444987", "0.64417624", "0.64417624", "0.64309067", "0.64250004", "0.64238864", "0.64107615", "0.64085615", "0.64085615", "0.64085615", "0.6405303", "0.6397682", "0.6397682", "0.63918567", "0.6391613", "0.6388578", "0.6384271", "0.63770545", "0.6376267", "0.637483", "0.6369435", "0.6338631", "0.6334336", "0.6334336", "0.6330233", "0.63186324", "0.63184154", "0.63179165" ]
0.7761975
2
//END OF BASIC QUERIES//// //CREATION COMMANDS//// / Account for a known GID
public Account(String GID, String name) { this.GID = GID; this.name = name; events = new ArrayList<Event>(); pastRelations = new ArrayList<Account>(); settings = new ArrayList<String>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Account createNewAccount(String GID, String name, Context activity) {\r\n\t\t\r\n\t\tString[] emailParts = GID.split(\"@\"); \r\n\t\t\r\n\t\t//Check if this Account is already stored\r\n\t\tString fileName = name + \"_\" + emailParts[0] + \"_\" + emailParts[1]; \r\n\t\t\r\n\t\tFile f = new File(activity.getFilesDir(), fileName);\r\n\t\t\r\n\t\tif(f.exists()) {\r\n\t\t try {\r\n\t\t //use buffering\r\n\t\t FileInputStream fis = activity.openFileInput(fileName);\r\n\t\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tAccount recoveredAccount = (Account) ois.readObject();\r\n\t\t\t\t\tcurrentAccount = recoveredAccount;\r\n\t\t\t return recoveredAccount;\r\n\t\t\t\t}\r\n\t\t finally {\r\n\t\t \tois.close();\r\n\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t catch(ClassNotFoundException ex){\r\n\t\t \tSystem.out.println(\"Cannot perform input. Class not found.\");\r\n\t\t \treturn createAndStoreAccount(fileName, GID, name);\r\n\t\t }\r\n\t\t catch(IOException ex){\r\n\t\t System.out.println(\"Cannot perform input.\");\r\n\t\t return createAndStoreAccount(fileName, GID, name);\r\n\t\t }\r\n\t\t \r\n\t\t} else {\r\n\t\t\treturn createAndStoreAccount(fileName, GID, name, activity);\r\n\t\t}\r\n\t}", "public static Account createNewAccount(String GID, String name) {\r\n\t\t\r\n\t\tString[] emailParts = GID.split(\"@\"); \r\n\t\t\r\n\t\t//Check if this Account is already stored\r\n\t\tString fileName = name + \"_\" + emailParts[0] + \"_\" + emailParts[1]; \r\n\t\t\r\n\t\tFile f = new File(fileName);\r\n\t\t\r\n\t\tif(f.exists()) {\r\n\t\t try {\r\n\t\t //use buffering\r\n\t\t InputStream file = new FileInputStream(fileName);\r\n\t\t InputStream buffer = new BufferedInputStream(file);\r\n\t\t ObjectInput input = new ObjectInputStream(buffer);\r\n\t\t \r\n\t\t try {\r\n\t\t\t //deserialize the Account object\r\n\t\t\t Account recoveredAccount = (Account)input.readObject();\r\n\t\t\t currentAccount = recoveredAccount;\r\n\t\t\t return recoveredAccount;\r\n\t\t }\r\n\t\t \r\n\t\t finally {\r\n\t\t \tinput.close();\r\n\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t catch(ClassNotFoundException ex){\r\n\t\t \tSystem.out.println(\"Cannot perform input. Class not found.\");\r\n\t\t \treturn createAndStoreAccount(fileName, GID, name);\r\n\t\t }\r\n\t\t catch(IOException ex){\r\n\t\t System.out.println(\"Cannot perform input.\");\r\n\t\t return createAndStoreAccount(fileName, GID, name);\r\n\t\t }\r\n\t\t \r\n\t\t} else {\r\n\t\t\treturn createAndStoreAccount(fileName, GID, name);\r\n\t\t}\r\n\t}", "String getAccountID();", "String getAccountID();", "private String generateUID()\n {\n String uid;\n int nbAccounts = this.getNumberOfAccounts();\n String host = this.registration.getHost();\n int nbAccountsForHost = this.getNbAccountForHost(host);\n \n if (nbAccounts == 0 || (this.isModification() && nbAccounts == 1) ||\n nbAccountsForHost == 0 || (this.isModification() && nbAccountsForHost == 1))\n {\n // We create the first account or we edit the onlyone\n // Or we create the first account for this server or edit the onlyone\n uid = host;\n }\n else\n {\n uid = host + \":\" + this.registration.getPort();\n }\n \n return uid;\n }", "private String newQi4jAccount()\n throws UnitOfWorkCompletionException\n {\n UnitOfWork work = unitOfWorkFactory.newUnitOfWork();\n EntityBuilder<AccountComposite> entityBuilder = work.newEntityBuilder( AccountComposite.class );\n AccountComposite accountComposite = entityBuilder.instance();\n accountComposite.name().set( ACCOUNT_NAME );\n accountComposite = entityBuilder.newInstance();\n String accoutnIdentity = accountComposite.identity().get();\n work.complete();\n\n return accoutnIdentity;\n }", "GenerateUserAccount () {\r\n }", "private void createPassenger() {\n account = new Account(\"driver\", \"password\", \"driver@uclive.ac.nz\",\n \"Dan\", \"20 Howard Street\", 1234567, 64278182123L);\n }", "int createAccount(Account account);", "public Account(String owner, int ownerID, int accountID, double growthRate){\n this.owner = owner;\n this.ownerID = ownerID;\n this.accountID = accountID;\n this.growthRate = growthRate;\n \n }", "@Override\r\n\tpublic int generateAccountId() {\n\t\tint AccountId = (int) (Math.random()*10000);\r\n\t\treturn 0;\r\n\t}", "public G obtener(Long id) throws AppException;", "TGG createTGG();", "public void obtenerID();", "private String genNewAccountNumber(int clientId) {\r\n\t\t// keep 4 digits\r\n\t\tint acNumber = clientId * 1000 + (int) (Math.random() * 900);\r\n\t\treturn String.valueOf(acNumber);\r\n\t}", "public account() {\n initComponents();\n autoID();\n branch();\n }", "public Account()\n {\n id = UUID.randomUUID();\n }", "String generateUID();", "Account create();", "public void createAccount() {\n System.out.println(\"Would you like to create a savings or checking account?\");\n String AccountRequest = input.next().toLowerCase().trim();\n createAccount(AccountRequest);\n\n }", "public void createAccount(){\n System.out.println(\"vi skal starte \");\n }", "String allocateId() throws SessionStorageException;", "java.lang.String getUserID();", "java.lang.String getUserID();", "java.lang.String getUserID();", "private void setAccountNumber() // setare numar de cont\n {\n int random = ThreadLocalRandom.current().nextInt(1, 100 + 1);\n accountNumber = ID + \"\" + random + SSN.substring(0,2);\n System.out.println(\"Your account number is: \" + accountNumber);\n }", "@Test\n\tpublic void createAccount() {\t\n\t\t\n\t\tRediffOR.setCreateAccoutLinkClick();\n\t\tRediffOR.getFullNameTextField().sendKeys(\"Kim Smith\");\n\t\tRediffOR.getEmailIDTextField().sendKeys(\"Kim Smith\");\n\t\t\t\t\t\n\t\t\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn accountID;\n\t}", "public static NewAccountPG newAccountPG(AccountPG prototype) {\n return new AccountPGImpl(prototype);\n }", "private Account createAccount8() {\n Account account = new Account(\"123456008\", \"Jean Sans Enfant\",\n new SimpleDate(4, 23, 1976).asDate(), \"jse@qui.fr\", true, false, new CreditCard(\"4320123412340008\"));\n\n return account;\n }", "private UniqueIdentifier(){\n\t\t\n\t}", "GlAccount getGlAccount();", "private void getGCM_ID() {\n if (regIDValue.length() <= 0)\n regIDValue = DriverApplication.getGCMRegistrationId(ctx);\n Log.d(\"GCM_REG_ID \", regIDValue);\n }", "String getGeneralID() throws ApplicationException;", "@Override\r\n\tpublic String createID() {\r\n\t\t \r\n\t\t\t\treturn transCode.toString();\r\n\t\t\t\t}", "public static void requestNewAccount(String uid){\n accountManager.requestNewAccount(uid);\n }", "AionAddress createAccount(String password);", "String getUserID();", "private GetAccount()\r\n/* 19: */ {\r\n/* 20:18 */ super(new APITag[] { APITag.ACCOUNTS }, new String[] { \"account\" });\r\n/* 21: */ }", "public void createAccount() {\n\t\tSystem.out.print(\"Enter Name: \");\n\t\tString name = nameCheck(sc.next());\n\t\tSystem.out.print(\"Enter Mobile No.: \");\n\t\tlong mobNo = mobCheck(sc.nextLong());\n\t\tlong accNo = mobNo - 1234;\n\t\tSystem.out.print(\"Enter Balance: \"); \n\t\tfloat balance = amountCheck(sc.nextFloat());\n\t\tuserBean BeanObjCreateAccountObj = new userBean(accNo, name, mobNo, balance);\n\t\tSystem.out.println(\"Account created with Account Number: \" +accNo);\n\t\tServiceObj.bankAccountCreate(BeanObjCreateAccountObj);\n\t\t\n\t\n\t}", "Account() { }", "public void setGID(String GID) {\r\n\t\tString[] emailParts = this.GID.split(\"@\");\r\n\t\t//Recover the original file name\r\n\t\tString fileName = this.name + \"_\" + emailParts[0] + \"_\" + emailParts[1];\r\n\r\n\t\tFile f = new File(fileName);\r\n\t\tif (f.exists()) {\r\n\t\t\tf.delete();\r\n\t\t} \r\n\t\tthis.GID = GID;\r\n\t\tsaveAccount();\r\n\t}", "public static Account generate() {\n return Account.fromHexString(Util.generateRandom32BytesHex());\n }", "private static Account createAndStoreAccount(String fileName, String GID, String name, Context activity) {\r\n\t\tAccount newAccount = new Account(GID, name); \r\n\t\tAccount.currentAccount = newAccount;\r\n\t\t\r\n\t try {\r\n\t //use buffering\r\n\t FileOutputStream fos = activity.openFileOutput(fileName, Context.MODE_PRIVATE);\r\n\t\t\tObjectOutputStream oos = new ObjectOutputStream(fos);\r\n\t\t\toos.writeObject(newAccount); \r\n\t try {\r\n\t \toos.writeObject(newAccount);\r\n\t }\r\n\t finally {\r\n\t \toos.close();\r\n\t }\r\n\t } \r\n\t catch(IOException ex){\r\n\t System.out.println(\"Cannot perform output.\");\r\n\t }\r\n\t\t\r\n\t\treturn newAccount;\r\n\t}", "int insertGenDetail(Integer uid, Integer merid, Double paymoney, Double sendmoney, Double tomoney, Double balance, Double topupbalance, Double givebalance, String ordernum, Date createTime, Integer paysource, String remark);", "public int makeNewAccount(int balance){\n int generated_id = 0;\n\n try {\n accountLock.lock();\n executeNewAccount(generated_id = currentAccountId++, balance, rawDataSource.getConnection());\n accountLock.unlock();\n\n cache.add(new Account(generated_id, balance));\n\n operationLock.lock();\n logNewAccount(currentOperationId, generated_id, balance);\n currentOperationId++;\n operationLock.unlock();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return generated_id;\n }", "@Override\n public String toString()\n {\n return getClass().getSimpleName() + \"(\" + getAccountID() + \")\";\n }", "private static String accountNumberGenerator() {\n char[] chars = new char[10];\n for (int i = 0; i < 10; i++) {\n chars[i] = Character.forDigit(rnd.nextInt(10), 10);\n }\n return new String(chars);\n }", "public void requestAccountCreation(Secretary sec) {\n \n System.out.println(this.iD + \": Requesting account creation from secretary \" + sec.iD);\n sec.addToWaitingListForApproval(this);\n }", "private Account createAccount4() {\n Account account = new Account(\"123456004\", \"Chad I. Cobbs\",\n new SimpleDate(4, 23, 1976).asDate(), \"chadc@netzero.com\", true, false,\n new CreditCard(\"1234123412340004\"), new CreditCard(\"4320123412340005\"));\n\n final Percentage percent50 = new Percentage(0.5);\n final Percentage percent25 = new Percentage(0.25);\n account.addBeneficiary(\"Jane\", percent25);\n account.addBeneficiary(\"Amy\", percent25);\n account.addBeneficiary(\"Susan\", percent50);\n return account;\n }", "public BankAccountKey(java.lang.String argAccID) {\n\taccID = argAccID;\n}", "public void createUserAccount(UserAccount account);", "public static Account createSyncAccount(Context context) {\n // Create the account type and default account\n Account newAccount = new Account(Constants.ACCOUNT, context.getResources().getString(R.string.sync_account_type));\n // Get an instance of the Android account manager\n AccountManager accountManager = (AccountManager) context.getSystemService(ACCOUNT_SERVICE);\n\n if (accountManager.addAccountExplicitly(newAccount, null, null)) {\n ContentResolver.setIsSyncable(newAccount, context.getResources().getString(R.string.content_authority), 1);\n ContentResolver.setSyncAutomatically(newAccount, context.getResources().getString(R.string.content_authority), true);\n //Set periodic sync duration in seconds\n ContentResolver.addPeriodicSync(newAccount, context.getResources().getString(R.string.content_authority), new Bundle(), Constants.SYNC_FREQUENCY);\n if (INFO_LOG) {\n Log.i(\"BDCloudUtils-createSyncAccount\", \"Sync Account added = \" + newAccount);\n }\n } else {\n if (ERROR_LOG) {\n Log.wtf(\"BDCloudUtils-createSyncAccount\", \"Error creating sync account\");\n }\n }\n\n return newAccount;\n }", "public static ATMAccount createAccount() {\r\n\t\tString userName;\r\n\t\tdouble userBalance;\r\n\t\tint digit = -1;\r\n\r\n\t\tSystem.out.println(\"Please enter a name for the account: \");\r\n\t\tuserInput.nextLine();\r\n\t\tuserName = userInput.nextLine();\r\n\r\n\t\t//Requests digits 1 by 1 for the pin number\r\n\t\tString accPin = \"\";\r\n\t\tfor (int i = 1; i < 5; i++) {\r\n\t\t\tdigit = -1;\r\n\t\t\tSystem.out.println(\"Please enter digit #\" + i + \" of\" + \"your pin.\");\r\n\t\t\tdo {\r\n\t\t\t\tdigit = userInput.nextInt();\r\n\t\t\t} while (digit < 0 || digit > 9);\r\n\t\t\taccPin += digit;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Please put the amount of money you would like to \" + \"initially deposit into the account: \");\r\n\t\tuserBalance = userInput.nextDouble();\r\n\t\tRandom accountIDGenerator = new Random();\r\n\t\tint userID = accountIDGenerator.nextInt(2147483647);\r\n\t\tATMAccount account = new ATMAccount(userID, userName, Integer.parseInt(accPin), userBalance);\r\n\t\tSystem.out.println(\"Acount Information: \\n\"+account.toString());\r\n\t\treturn account;\r\n\t}", "java.lang.String getAccount();", "Xid createXid();", "java.lang.String getAccountNumber();", "public void joindreGroupe(int g_id) throws RemoteException{\r\n\t\t\t\r\n\t\t String requete = \"INSERT INTO demande VALUES(DEFAULT, \"+ g_id +\", \"+ _etudiant.getId() +\" )\";\r\n\t\t System.out.println(\"\\nrequete joindreGroupe: \" + requete);\r\n\t\t database.executeUpdate(requete);\t\r\n\t\t \r\n\t\t}", "String getBbgGlobalId();", "String getInstanceID();", "public interface GoogleAccountDataClient {\n AccountNameCheckResponse checkAccountName(AccountNameCheckRequest accountNameCheckRequest) throws ;\n\n CheckFactoryResetPolicyComplianceResponse checkFactoryResetPolicyCompliance(CheckFactoryResetPolicyComplianceRequest checkFactoryResetPolicyComplianceRequest) throws ;\n\n PasswordCheckResponse checkPassword(PasswordCheckRequest passwordCheckRequest) throws ;\n\n CheckRealNameResponse checkRealName(CheckRealNameRequest checkRealNameRequest) throws ;\n\n void clearFactoryResetChallenges() throws ;\n\n ClearTokenResponse clearToken(ClearTokenRequest clearTokenRequest) throws ;\n\n boolean clearWorkAccountAppWhitelist() throws ;\n\n TokenResponse confirmCredentials(ConfirmCredentialsRequest confirmCredentialsRequest) throws ;\n\n TokenResponse createAccount(GoogleAccountSetupRequest googleAccountSetupRequest) throws ;\n\n TokenResponse createPlusProfile(GoogleAccountSetupRequest googleAccountSetupRequest) throws ;\n\n @Deprecated\n GoogleAccountData getAccountData(@Deprecated String str) throws ;\n\n Bundle getAccountExportData(String str) throws ;\n\n String getAccountId(String str) throws ;\n\n AccountRecoveryData getAccountRecoveryCountryInfo() throws ;\n\n AccountRecoveryData getAccountRecoveryData(AccountRecoveryDataRequest accountRecoveryDataRequest) throws ;\n\n AccountRecoveryGuidance getAccountRecoveryGuidance(AccountRecoveryGuidanceRequest accountRecoveryGuidanceRequest) throws ;\n\n GetAndAdvanceOtpCounterResponse getAndAdvanceOtpCounter(String str) throws ;\n\n GoogleAccountData getGoogleAccountData(Account account) throws ;\n\n String getGoogleAccountId(Account account) throws ;\n\n GplusInfoResponse getGplusInfo(GplusInfoRequest gplusInfoRequest) throws ;\n\n OtpResponse getOtp(OtpRequest otpRequest) throws ;\n\n TokenResponse getToken(TokenRequest tokenRequest) throws ;\n\n boolean installAccountFromExportData(String str, Bundle bundle) throws ;\n\n AccountRemovalResponse removeAccount(AccountRemovalRequest accountRemovalRequest) throws ;\n\n boolean setWorkAccountAppWhitelistFingerprint(String str, String str2) throws ;\n\n TokenResponse signIn(AccountSignInRequest accountSignInRequest) throws ;\n\n AccountRecoveryUpdateResult updateAccountRecoveryData(AccountRecoveryUpdateRequest accountRecoveryUpdateRequest) throws ;\n\n TokenResponse updateCredentials(UpdateCredentialsRequest updateCredentialsRequest) throws ;\n\n ValidateAccountCredentialsResponse validateAccountCredentials(AccountCredentials accountCredentials) throws ;\n}", "public String generateAccountNumber(int ACCT_LIMIT, String CHECKING_PREFIX)\n\t{\n\n\t\tint savingsRndNum = ranNumGenerator.nextInt(ACCT_LIMIT);\n\t\t\n\t\treturn (CHECKING_PREFIX + savingsRndNum);\n\t\t\n\t}", "public void setGid(Integer gid) {\r\n this.gid = gid;\r\n }", "Account getAccount(Integer accountNumber);", "public Garage() {\n\t\tid = generateId();\n\t}", "String getDistributionID();", "@Override\n\t\t\tprotected String doInBackground(Void... params) {\n\t\t\t\tString id = null;\n\t\t\t\t\n\t\t\t\tGoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(context);\n\t\t\t\t\n\t\t\t\t/** PROBLEM MIGHT OCCURE SO TRY MAX NUMBER OF TIMES MAX = 5 **/\n\t\t\t\tfor (int count = 1; count <= MAX_TRIES; count++) {\n\t\t\t\t\t\n\t\t\t\t\tlogMessage(\"Trying to register on cloud, try: \"+count);\n\t\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\t\tid = gcm.register(GCMConfig.senderID(ActivityRegister.this));\n\t\t\t\t\t\t\n\t\t\t\t\t\t// WE HAVE A REGISTRATION ID, BREAK THE LOOP AND RETURN\n\t\t\t\t\t\tif (id != null) {break;}\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (Exception e) {logMessage(\"Unable to register on cloud, error: \"+e.getMessage());}\n\t\t\t\t}\n\n\t\t\t\treturn id;\n\t\t\t}", "BankAccount(){\n\t\tSystem.out.println(\"NEW ACCOUNT CREATED\");\t\n\t}", "private void attemptCreateAccountWithGoogle() {\n // Configure sign-in to request the user's ID, email address, and basic profile. ID and\n // basic profile are included in DEFAULT_SIGN_IN.\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestEmail()\n .build();\n if (mGoogleApiClient == null) {\n // Build a GoogleApiClient with access to GoogleSignIn.API and the options above.\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .enableAutoManage(this, this)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n }\n\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "private IIdentifierElement createIdentifier() throws RodinDBException {\n\t\tfinal IContextRoot ctx = createContext(\"ctx\");\n\t\treturn ctx.createChild(ICarrierSet.ELEMENT_TYPE, null, null);\n\t}", "public void setGid(Integer gid) {\n this.gid = gid;\n }", "public static Account CreateSyncAccount(Context context) {\n Account newAccount = new Account(\n ACCOUNT, ACCOUNT_TYPE);\n // Get an instance of the Android account manager\n AccountManager accountManager =\n (AccountManager) context.getSystemService(\n ACCOUNT_SERVICE);\n /*\n * Add the account and account type, no password or user data\n * If successful, return the Account object, otherwise report an error.\n */\n if (accountManager.addAccountExplicitly(newAccount, null, null)) {\n /*\n * If you don't set android:syncable=\"true\" in\n * in your <provider> element in the manifest,\n * then call context.setIsSyncable(account, AUTHORITY, 1)\n * here.\n */\n } else {\n /*\n * The account exists or some other error occurred. Log this, report it,\n * or handle it internally.\n */\n }\n\n return newAccount;\n }", "public int getUser1X_ID();", "public static Account createSyncAccount(Context context) {\n Account newAccount = new Account(\n ACCOUNT, ACCOUNT_TYPE);\n // Get an instance of the Android account manager\n AccountManager accountManager =\n (AccountManager) context.getSystemService(\n ACCOUNT_SERVICE);\n /*\n * Add the account and account type, no password or user data\n * If successful, return the Account object, otherwise report an error.\n */\n if (accountManager.addAccountExplicitly(newAccount, null, null)) {\n /*\n * If you don't set android:syncable=\"true\" in\n * in your <provider> element in the manifest,\n * then call context.setIsSyncable(account, AUTHORITY, 1)\n * here.\n */\n } else {\n /*\n * The account exists or some other error occurred. Log this, report it,\n * or handle it internally.\n */\n }\n return newAccount;\n }", "private String generateNewCallId()\n {\n\n\t\t// Generate the variant number\n\t\tint variable = NumberUtils.getIntRandom();\n\n\t\t// Convert to hex value\n\t\tString hex = NumberUtils.toHexValue(variable);\n\n\t\t// Compose the final call id\n\t\treturn \"{2B073406-65D8-A7B2-5B13-B287\" + hex + \"}\";\n\t}", "Account getAccount(Long recvWindow, Long timestamp);", "public AccountManager(){\r\n allAccounts.put(\"CreditCard\",credits);\r\n allAccounts.put(\"LineOfCredit\",lineOfCredits);\r\n allAccounts.put(\"Chequing\",chequing);\r\n allAccounts.put(\"Saving\",saving);\r\n createAccount(\"3\", 0);\r\n primaryAccount = chequing[0];\r\n }", "@Test\n\tpublic void testG(){\n\t\tSystem.out.println(\"Test G\");\n\t\tUUID aliceSecret = secretService.storeSecret(\"Alice\", new Secret());\n\t\tsecretService.shareSecret(\"Alice\", aliceSecret, \"Bob\");\n\t\tsecretService.shareSecret(\"Bob\", aliceSecret, \"Carl\");\n\t\tsecretService.unshareSecret(\"Bob\", aliceSecret, \"Carl\");\n\t\tsecretService.readSecret(\"Carl\", aliceSecret);\n\t}", "@Override\n\tpublic String createAccount() {\n\t\treturn \"Created Saving Account Sucessfully\";\n\t}", "UUID getCreatedUUID()\n {\n return conglomerateUUID;\n }", "public Integer getGid() {\n return gid;\n }", "public Integer getGid() {\r\n return gid;\r\n }", "public int createAccount(UUID uuid, double startingBalance)\n {\n PreparedStatement preparedStatement = null;\n try\n {\n preparedStatement = connection.prepareStatement(\n String.format(\"INSERT INTO %s.accounts (id, uuid, balance) VALUES (NULL, ?, ?);\",\n simpleEconomy.getConfig().getString(\"db.database\")), Statement.RETURN_GENERATED_KEYS);\n preparedStatement.setString(1, uuid.toString());\n preparedStatement.setDouble(2, startingBalance);\n preparedStatement.execute();\n ResultSet generatedKeys = preparedStatement.getGeneratedKeys();\n if (generatedKeys.next())\n {\n return generatedKeys.getInt(1);\n }\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n }\n return -1;\n }", "public void addAccount(Account account,Person person);", "private static long getRandAccount() {\n int bid = rand.nextInt(noOfBranches);\n return getRandAccountFromBranch(bid);\n }", "public void AddToAccountInfo();", "long getUID() throws UidGenerateException;", "com.google.protobuf.ByteString getRegistIdBytes();", "public int gid() { return gid; }", "public int getAD_User_ID();", "private void RegisterGoogleSignup() {\n\n\t\ttry {\n\t\t\tLocalData data = new LocalData(SplashActivity.this);\n\n\t\t\tArrayList<String> asName = new ArrayList<String>();\n\t\t\tArrayList<String> asValue = new ArrayList<String>();\n\n\t\t\tasName.add(\"email\");\n\t\t\tasName.add(\"firstname\");\n\t\t\tasName.add(\"gender\");\n\t\t\tasName.add(\"id\");\n\t\t\tasName.add(\"lastname\");\n\t\t\tasName.add(\"name\");\n\t\t\t// asName.add(\"link\");\n\n\t\t\tasName.add(\"device_type\");\n\t\t\tasName.add(\"device_id\");\n\t\t\tasName.add(\"gcm_id\");\n\t\t\tasName.add(\"timezone\");\n\n\t\t\tasValue.add(data.GetS(LocalData.EMAIL));\n\t\t\tasValue.add(data.GetS(LocalData.FIRST_NAME));\n\t\t\tasValue.add(data.GetS(LocalData.GENDER));\n\t\t\tasValue.add(data.GetS(LocalData.ID));\n\t\t\tasValue.add(data.GetS(LocalData.LAST_NAME));\n\t\t\tasValue.add(data.GetS(LocalData.NAME));\n\t\t\t// asValue.add(data.GetS(LocalData.LINK));\n\n\t\t\tasValue.add(\"A\");\n\n\t\t\tString android_id = Secure\n\t\t\t\t\t.getString(SplashActivity.this.getContentResolver(),\n\t\t\t\t\t\t\tSecure.ANDROID_ID);\n\n\t\t\tasValue.add(android_id);\n\n\t\t\tLocalData data1 = new LocalData(SplashActivity.this);\n\t\t\tasValue.add(data1.GetS(\"gcmId\"));\n\t\t\tasValue.add(Main.GetTimeZone());\n\t\t\tString sURL = StringURLs.getQuery(StringURLs.GOOGLE_LOGIN, asName,\n\t\t\t\t\tasValue);\n\n\t\t\tConnectServer connectServer = new ConnectServer();\n\t\t\tconnectServer.setMode(ConnectServer.MODE_POST);\n\t\t\tconnectServer.setContext(SplashActivity.this);\n\t\t\tconnectServer.setListener(new ConnectServerListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onServerResponse(String sJSON, JSONObject jsonObject) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\tLog.d(\"JSON DATA\", sJSON);\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tif (sJSON.length() != 0) {\n\t\t\t\t\t\t\tJSONObject object = new JSONObject(sJSON);\n\t\t\t\t\t\t\tJSONObject response = object\n\t\t\t\t\t\t\t\t\t.getJSONObject(JSONStrings.JSON_RESPONSE);\n\t\t\t\t\t\t\tString sResult = response\n\t\t\t\t\t\t\t\t\t.getString(JSONStrings.JSON_SUCCESS);\n\n\t\t\t\t\t\t\tif (sResult.equalsIgnoreCase(\"1\") == true) {\n\n\t\t\t\t\t\t\t\tString user_id = response.getString(\"userid\");\n\n\t\t\t\t\t\t\t\tLocalData data = new LocalData(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this);\n\t\t\t\t\t\t\t\tdata.Update(\"userid\", user_id);\n\t\t\t\t\t\t\t\tdata.Update(\"name\", response.getString(\"name\"));\n\n\t\t\t\t\t\t\t\tGetNotificationCount();\n\n\t\t\t\t\t\t\t} else if (sResult.equalsIgnoreCase(\"0\") == true) {\n\n\t\t\t\t\t\t\t\tString msgcode = jsonObject.getJSONObject(\n\t\t\t\t\t\t\t\t\t\t\"response\").getString(\"msgcode\");\n\n\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, msgcode),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (Exception exp) {\n\n\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tconnectServer.execute(sURL);\n\n\t\t} catch (Exception exp) {\n\n\t\t\tToast.makeText(SplashActivity.this,\n\t\t\t\t\tMain.getStringResourceByName(SplashActivity.this, \"c100\"),\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t}\n\t}", "java.lang.String getRegistId();", "public int getID() {\n return gID;\n }", "public Account(String guid, String password, int charId, int nextCharId) {\r\n this.guid = guid;\r\n this.password = password;\r\n this.charId = charId;\r\n this.nextCharId = nextCharId;\r\n }", "public abstract void createAccount(JSONObject account);", "BankAccount(String accountType){\n\t\tSystem.out.println(\"NEW ACCOUNT: \" + accountType);\n\t\tthis.accountType = accountType; \n\t}", "private synchronized String processCreate(String query) {\r\n\t\tString[] valuesCommand = query.split(\" \");\r\n\t\tif ( valuesCommand.length != 3 )\r\n\t\t\treturn \"ERROR Bad syntaxe command CREATE - Usage : CREATE id initial_solde\";\r\n\t\tString id = valuesCommand[1];\r\n\t\tif ( this.bank.existAccount(id) ) {\r\n\t\t\treturn \"ERROR Account alwready exist\";\r\n\t\t}\r\n\t\tdouble number = Double.valueOf(valuesCommand[2]);\r\n\t\tthis.bank.createAccount(id, number);\r\n\t\treturn \"OK \" + this.bank.getLastOperation(id);\r\n\t}", "private void registerInBackground()\n {\n\tnew AsyncTask<Void, Void, String>()\n\t{\n\t @Override\n\t protected String doInBackground(Void... params)\n\t {\n\t \tLog.i(Globals.TAG, \"backroundregister calisri\");\n\t\tString msg = \"\";\n\t\ttry\n\t\t{\n\t\t if (gcm == null)\n\t\t {\n\t\t \tgcm = GoogleCloudMessaging.getInstance(context);\n\t\t }\n\t\t\t regid = gcm.register(Globals.GCM_SENDER_ID);\n\t\t\t msg = \"Device registered, registration ID=\" + regid;\n\n\t\t // You should send the registration ID to your server over\n\t\t // HTTP, so it can use GCM/HTTP or CCS to send messages to your app.\n\t\t sendRegistrationIdToBackend();\n\n\t\t // For this demo: we use upstream GCM messages to send the\n\t\t // registration ID to the 3rd party server\n\n\t\t // Persist the regID - no need to register again.\n\t\t storeRegistrationId(context, regid);\n\t\t}\n\t\tcatch (IOException ex)\n\t\t{\n\t\t msg = \"Error :\" + ex.getMessage();\n\t\t // If there is an error, don't just keep trying to register.\n\t\t // Require the user to click a button again, or perform\n\t\t // exponential back-off.\n\t\t}\n\t\treturn msg;\n\t }\n\n\t @Override\n\t protected void onPostExecute(String msg)\n\t {\n\t\t((TextView) findViewById(R.id.gcm_userid_textview)).setText(regid);\n\t }\n\t}.execute(null, null, null);\n }", "String getTheirPartyId();", "public BoshProxyDialog(Context context, JabberAccountRegistration jbrReg)\n {\n super(context);\n mContext = context;\n\n this.jbrReg = jbrReg;\n String editedAccUID = jbrReg.getAccountUniqueID();\n AccountManager accManager = ProtocolProviderActivator.getAccountManager();\n ProtocolProviderFactory factory = JabberAccountRegistrationActivator.getJabberProtocolProviderFactory();\n mAccountUuid = accManager.getStoredAccountUUID(factory, editedAccUID);\n }" ]
[ "0.6257914", "0.6240963", "0.61284405", "0.61284405", "0.6025338", "0.6013544", "0.59144545", "0.5821658", "0.5715172", "0.56985694", "0.5685846", "0.5642529", "0.56410563", "0.5509044", "0.5508904", "0.5489924", "0.5482998", "0.547476", "0.5459749", "0.544053", "0.53860486", "0.5384914", "0.53695077", "0.53695077", "0.53695077", "0.5367864", "0.53653204", "0.53607345", "0.532855", "0.5326365", "0.53163284", "0.5308226", "0.5299337", "0.5298895", "0.528541", "0.5279499", "0.52724755", "0.52550286", "0.5251806", "0.5251539", "0.5238733", "0.52271426", "0.52226454", "0.521824", "0.52012616", "0.5185777", "0.5183791", "0.51832867", "0.517184", "0.51717085", "0.51667154", "0.51593226", "0.5152151", "0.51518625", "0.5131827", "0.51316", "0.51305", "0.5126684", "0.5126397", "0.51233774", "0.51225966", "0.51213276", "0.51173496", "0.5110575", "0.50937337", "0.5093404", "0.5084921", "0.508321", "0.5079853", "0.50717723", "0.5070654", "0.5063604", "0.5063224", "0.5062985", "0.5061756", "0.5056994", "0.50516796", "0.5045918", "0.50431776", "0.50331706", "0.50312287", "0.50260997", "0.50218415", "0.5020185", "0.5014576", "0.50143474", "0.50138485", "0.5013632", "0.5009699", "0.5009123", "0.4999984", "0.49997282", "0.49985704", "0.49943063", "0.4991721", "0.4988701", "0.49852148", "0.49832132", "0.4981654", "0.49804133" ]
0.5996145
6
/ Account for an unknown contact
public Account() { this("unknown@billsplit.com", "Account"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onNoAccountsFound();", "private static void lookupAccount(String email) {\n\t\t\n\t}", "@Override\n\tpublic String addContact(Contact contact) {\n\t\treturn null;\n\t}", "void getEmergencyContact();", "kr.pik.message.Profile.Contact getContact();", "@Override\n\tpublic String checkAccount(int idc) {\n\t\treturn null;\n\t}", "@Override\n\tpublic void onUserIdGetByPhoneNum(int result, AirContact contact)\n\t{\n\n\t}", "private void contactUs() {\n }", "public void setContact(String contact) {\n this.contact = contact;\n }", "public void setContact(String contact) {\n this.contact = contact;\n }", "public void setContact(String contact) {\n this.contact = contact;\n }", "public void setContact(String contact) {\n this.contact = contact;\n }", "private void createContact( HashMap<String,String> contactObject ) {\r\n\t\t\t\t\r\n\t\t//validate input object\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tif (contactObject == null || contactObject.isEmpty()) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//DEBUG: output all values\r\n\t\t\t/*\r\n\t\t\tLogger.debug(\"***\");\r\n\t\t\t \r\n\t\t\tfor (String key : contactObject.keySet() ) {\r\n\t\t\t\tLogger.debug(\"key:\" + key + \", value:\" + contactObject.get(key));\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tLogger.debug(\"***\");\r\n\t\t\t*/\r\n\t\t\t\r\n\t\t\tnumProcessed++;\r\n\t\t\t\r\n\t\t\t//validate required Active Directory fields\r\n\t\t\tif (type.equals(TYPE_AD)) {\t\t\r\n\t\t\t\t\r\n\t\t\t\tString objectClass = contactObject.get(\"objectclass\");\r\n\t\t\t\t\r\n\t\t\t\tif (objectClass == null || ( !objectClass.equalsIgnoreCase(\"user\") && !objectClass.equalsIgnoreCase(\"person\") )) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t//no or no valid object class: skip\r\n\t\t\t\t\tthrow( new Exception(\"missing required \\\"objectClass\\\" attribute\"));\r\n\t\t\t\t\t\r\n\t\t\t\t} else if ( !contactObject.containsKey(\"userprincipalname\") && !contactObject.containsKey(\"objectguid\") ) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t//no identifier: skip\r\n\t\t\t\t\tthrow( new Exception(\"missing required attribute to identify user\"));\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t//check required attributes:\r\n\t\t\tif (\r\n\t\t\t\t!contactObject.containsKey(\"givenname\") || \r\n\t\t\t\t!contactObject.containsKey(\"sn\") ||\r\n\t\t\t\t!contactObject.containsKey(\"mail\")\r\n\t\t\t) {\r\n\t\t\t\tthrow( new Exception(\"missing required attribute(s)\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//create contact object using values\r\n\t\t\tContact c = new Contact();\r\n\t\t\t\r\n\t\t\tc.setUserType(Authorizations.USER_TYPE_CONTACT);\t\t//default user type = \"contact\"\r\n\t\t\t\r\n\t\t\tc.setLastName( contactObject.get(\"sn\") );\r\n\t\t\tc.setFirstName(contactObject.get(\"givenname\") );\r\n\t\t\tc.setEmail( contactObject.get(\"mail\"));\r\n\t\t\t\r\n\t\t\tif ( contactObject.containsKey(\"objectguid\")) {\r\n\t\t\t\tc.setImportIdentifier(contactObject.get(\"objectguid\"));\r\n\t\t\t} else if (contactObject.containsKey(\"userprincipalname\") ) {\r\n\t\t\t\tc.setImportIdentifier(contactObject.get(\"userprincipalname\"));\r\n\t\t\t} else {\r\n\t\t\t\tc.setImportIdentifier(contactObject.get(\"id\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (contactObject.containsKey(\"title\")) {\r\n\t\t\t\tc.setJobTitle(contactObject.get(\"title\"));\r\n\t\t\t}\r\n\t\t\tif (contactObject.containsKey(\"telephonenumber\")) {\r\n\t\t\t\tc.setPhoneWork( contactObject.get(\"telephonenumber\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//optional: set org name/ alias from import file based on the (first?) 'OU' parameter in the user's DN\r\n\t\t\t\r\n\t\t\tc.create();\r\n\t\t\t\r\n\t\t\tnumSuccess++;\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tnumFailed++;\r\n\t\t\tLogger.error(\"error while creating contact: \" + e.getMessage() );\r\n\t\t}\r\n\t\t\r\n\t}", "private void requestContactInformation() {\n CONTACTS = new ArrayList<>();\n\n Cursor c = getContentResolver().query(ContactsContract.Contacts.CONTENT_URI,\n null, null, null,\n ContactsContract.Contacts.DISPLAY_NAME_PRIMARY + \" asc\");\n\n while(c.moveToNext()) {\n HashMap<String, String> map = new HashMap<String, String>();\n String id = c.getString(c.getColumnIndex(ContactsContract.Contacts._ID));\n String name = c.getString(c.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME_PRIMARY));\n\n Cursor phoneCursor = getContentResolver().query(\n ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n null,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \" = \" + id,\n null, null\n );\n\n if (phoneCursor.moveToFirst()) {\n String number = phoneCursor.getString(phoneCursor.getColumnIndex(\n ContactsContract.CommonDataKinds.Phone.NUMBER\n ));\n CONTACTS.add(Pair.create(name, number));\n }\n\n phoneCursor.close();\n }\n\n }", "private int findContact(Contact contact) {\n return this.myContacts.indexOf(contact); //If exists in the ArrayList, will return 0 or greater. If not, will return a number less than 0.\n }", "public void addContact() {\n\t\tif (contactCounter == contactList.length) {\n\t\t\tSystem.err.println(\"Maximum contacts reached. \"\n\t\t\t\t\t\t\t\t+ \"No more contact can be added\");\n\t\treturn;\n\t\t}\n\t\t\n\t\treadContactInfo();\t\n\t}", "public void findContact(){\n EtecsaDB database = new EtecsaDB(this.getContext());\n if (!database.hasDatabase()){\n Toast.makeText(this.getContext(), R.string.no_database, Toast.LENGTH_SHORT).show();\n }\n else //buscar contacto\n new Search(this.getActivity()).execute(advancedSearch);\n }", "protected String getEmployeeNumber(\n \tContact contact\n ) throws ServiceException {\n \treturn null;\n }", "void addContact(String name,String number);", "void addContact(String name, String number);", "protected String getUid(\n \tContact contact\n ) throws ServiceException {\n \treturn contact.getAliasName();\n }", "kr.pik.message.Profile.ProfileMessage.ContactAddress getContactAddress(int index);", "public boolean addNewContact(Contact contact){\n if(findContact(contact.getName()) >= 0){\n // recall, x >= 0, if x is true than x is in the index of contact\n // if false, x will return -1 meaning the same contact wasn't found\n System.out.println(\"Contact is already on file\");\n return false; //\n }\n myContacts.add(contact);\n return true;\n }", "com.polytech.spik.protocol.SpikMessages.Contact getContact();", "public void setContact(String contact) {\n\t\tthis.contact = contact;\n\t}", "protected void onResume(){\n List<Activity> accountActivities = accountHelper.getCachedAccountActivities();\n ContactDataSource contactDataSource = mApplication.getContactDataSource();\n Map<String, Contact> contactMap = contactDataSource.getAddressBookContacts()\n\n for(Activity activity: accountActivities){\n String phoneNumber = activity.getContactPhoneNumber();\n\n Contact contact = contactMap.get(phoneNumber);\n\n if( contact == null){\n continue;\n }\n\n // Displays the activity on the UI\n showActivity(contact, activity);\n }\n }", "private static boolean addContact (String name){\n\t\t//If the contact is found, we donīt add it\n\t\tif (findContact(name)!=-1) return false;\n\t\t//Looking where to store the contact \n\t\tboolean added = false;\n\t\tfor (int ii=0; ii<contacts.length && !added; ii++){\n\t\t\t//We look for the first element that is null (empty position)\n\t\t\tif (contacts[ii]==null) {\n\t\t\t\tcontacts[ii]= new Contact(name);\n\t\t\t\tadded = true;\n\t\t\t}\n\t\t}\n\t\t//If added is still false it is because there are no empty positions\n\t\treturn added;\n\t}", "boolean hasContact();", "private void setDisconnectCauseForMissingAccounts(Call call) {\n android.telecom.Call telecomCall = call.getTelecommCall();\n\n Bundle extras = telecomCall.getDetails().getIntentExtras();\n // Initialize the extras bundle to avoid NPE\n if (extras == null) {\n extras = new Bundle();\n }\n\n final List<PhoneAccountHandle> phoneAccountHandles = extras.getParcelableArrayList(\n android.telecom.Call.AVAILABLE_PHONE_ACCOUNTS);\n\n if (phoneAccountHandles == null || phoneAccountHandles.isEmpty()) {\n String scheme = telecomCall.getDetails().getHandle().getScheme();\n final String errorMsg = PhoneAccount.SCHEME_TEL.equals(scheme) ?\n mContext.getString(R.string.callFailed_simError) :\n mContext.getString(R.string.incall_error_supp_service_unknown);\n DisconnectCause disconnectCause =\n new DisconnectCause(DisconnectCause.ERROR, null, errorMsg, errorMsg);\n call.setDisconnectCause(disconnectCause);\n }\n }", "public void setPrimaryContact(String contact);", "public void addContact(Contact contact) {\n\t\tif (!isContactExist(findContact(contact.getName()))) {\n\t\t\tcontacts.add(contact);\n\t\t\tSystem.out.println(\"Contact added\");\n\t\t}\n\t\telse System.out.println(\"Contact already exists\");\n\t}", "AccountDetail getAccount(String number) throws Exception;", "Contact createUnresolvedContact(String address, String persistentData, ContactGroup parentGroup);", "private boolean isContactValid(Contact contact) {\n return contact != null && contact.getmContactID() != null;\n }", "public kr.pik.message.Profile.Contact getContact() {\n kr.pik.message.Profile.Contact result = kr.pik.message.Profile.Contact.valueOf(contact_);\n return result == null ? kr.pik.message.Profile.Contact.UNRECOGNIZED : result;\n }", "public void setContact(Contact contact) {\n this.contact = contact;\n }", "public void setContact(Contact contact) {\n this.contact = contact;\n }", "public boolean checkContacts() \n\t{\n\t\tif (this.contacts.size() < 1) \n\t\t{\n\t\t\tSystem.out.printf(\"%nNo Contacts Stored%n\");\n\t\t\treturn false;\n\t\t} else \n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}", "public Account searchAccounts(Account account) {\n\t\treturn null;\r\n\t}", "public static Message checkAccountNumber(LaborTransaction transaction) {\n String accountNumber = transaction.getAccountNumber();\n Account account = getAccountingCycleCachingService().getAccount(((LaborOriginEntry) transaction).getChartOfAccountsCode(), ((LaborOriginEntry) transaction).getAccountNumber());\n if (StringUtils.isBlank(accountNumber) || ObjectUtils.isNull(account)) {\n String chartOfAccountsCode = transaction.getChartOfAccountsCode();\n String accountKey = chartOfAccountsCode + \"-\" + accountNumber;\n return MessageBuilder.buildMessage(KFSKeyConstants.ERROR_ACCOUNT_NOT_FOUND, accountKey, Message.TYPE_FATAL);\n }\n return null;\n }", "@Override\r\n\tpublic boolean isAccountExist(Account account) {\n\t\treturn false;\r\n\t}", "@Override\n public void onClick(View v) {\n String name = nameEditText.getText().toString();\n String phoneNumber = phoneEditText.getText().toString();\n\n //create a Contact Object to add\n Contact contact1 = new Contact(name, phoneNumber);\n\n //add contact1 object to database\n int temp = 0;\n for (Contact contact : contacts) {\n if (contact.getName().equals(name) && contact.getPhoneNumber().equals(phoneNumber)){\n Toast.makeText(MainActivity.this, \"This contact does exists\", Toast.LENGTH_SHORT).show();\n temp = 1;\n break;\n }\n if (contact.getName().equals(name)) {\n replaceContact(contact1);\n temp = 1;\n break;\n }\n }\n if (temp == 0) {\n addContact(contact1);\n }\n }", "public static UserInfo getAccountInfoFromProfile(Context context) {\n Cursor dc = null;\n ContentResolver resolver= context.getContentResolver();\n Cursor pc = resolver.query(Profile.CONTENT_URI, PROFILE_PROJECTION, null, \n null, null);\n if (pc == null) {\n return null;\n }\n UserInfo acctInfo = null;\n try {\n while (pc.moveToNext()) {\n String displayName = pc.getString(COLUMN_DISPLAY_NAME);\n if (displayName == null || displayName.isEmpty()) {\n continue;\n }\n if (acctInfo == null) {\n acctInfo = new UserInfo();\n }\n acctInfo.setDisplayName(displayName);\n long rawContactsId = pc.getLong(COLUMN_RAW_CONTACTS_ID);\n \n Uri profileDataUri = Uri.withAppendedPath(Profile.CONTENT_URI, \"data\");\n dc = resolver.query(profileDataUri, PROFILE_DATA_PROJECTION,\n Data.RAW_CONTACT_ID+\"=? AND \"+Data.MIMETYPE+\" IN (?,?)\", \n new String[] { String.valueOf(rawContactsId), \n Phone.CONTENT_ITEM_TYPE, Email.CONTENT_ITEM_TYPE }, null);\n boolean firstEmail = true, firstPhone = true;\n while (dc != null && dc.moveToNext()) {\n String data;\n int type = dc.getInt(COLUMN_TYPE);\n int isPrimary = dc.getInt(COLUMN_ISPRIMARY);\n boolean isPhone = Phone.CONTENT_ITEM_TYPE.equals(dc.getString(COLUMN_MIMETYPE));\n if (isPhone) {\n data = dc.getString(COLUMN_PHONENUM);\n if (isPrimary == 1 || firstPhone) {\n // TODO: phone number is not supported yet.\n// acctInfo.setPhone(data);\n firstPhone = false;\n }\n } else {\n data = dc.getString(COLUMN_EMAILADDR);\n if (isPrimary == 1 || firstEmail) {\n acctInfo.setEmail(data);\n firstEmail = false;\n }\n }\n }\n }\n return acctInfo;\n } finally {\n pc.close();\n if (dc != null) {\n dc.close();\n }\n }\n }", "public boolean add(Contact contact) {\n /* first we determine if the contact is already present */\n boolean alreadyPresent = false;\n for (Contact c : contacts) {\n if (c.getContactID().equals(contact.getContactID())) {\n alreadyPresent = true;\n }\n }\n /* if the contact is not present then we add it, and return true */\n if (!alreadyPresent) {\n contacts.add(contact);\n System.out.println(\"Contact Added Successfully!\");\n return true;\n } else {\n System.out.println(\"Contact already present\");\n return false;\n }\n }", "public String getPrimaryContact();", "public AccountIDNotRecognisedException() {\n\t\tsuper(\"Not found an ID corresponding to any account on the system\");\n\t}", "private void defaultIndContactCharShouldNotBeFound(String filter) throws Exception {\n restIndContactCharMockMvc\n .perform(get(ENTITY_API_URL + \"?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restIndContactCharMockMvc\n .perform(get(ENTITY_API_URL + \"/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"0\"));\n }", "private void addContact(Contact contact) {\n contactList.add(contact);\n System.out.println(\"contact added whose name is : \" + contact.getFirstName() + \" \" + contact.getLastName());\n\n }", "@Override\n\tpublic void onUserOrganizationTreeSearch(boolean isOk, List<AirContact> contacts)\n\t{\n\n\t}", "private Optional<Contact> findContact(AthenzTenant tenant) {\n if (!tenant.propertyId().isPresent()) {\n return Optional.empty();\n }\n List<List<String>> persons = organization.contactsFor(tenant.propertyId().get())\n .stream()\n .map(personList -> personList.stream()\n .map(User::displayName)\n .collect(Collectors.toList()))\n .collect(Collectors.toList());\n return Optional.of(new Contact(organization.contactsUri(tenant.propertyId().get()),\n organization.propertyUri(tenant.propertyId().get()),\n organization.issueCreationUri(tenant.propertyId().get()),\n persons));\n }", "public void onActivityResult(int reqCode, int resultCode, Intent data) {\n super.onActivityResult(reqCode, resultCode, data);\n if (reqCode != Activity.RESULT_OK && data != null) {\n Uri contactUri = data.getData();\n String[] rcontact = {ContactsContract.CommonDataKinds.Phone.NUMBER, ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME};\n Cursor c = getContentResolver()\n .query(contactUri, rcontact, null, null, null);\n c.moveToFirst();\n int contact_name = c.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER);\n int contact_number = c.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME);\n String contact_number1 = c.getString(contact_number);\n String contact_name1 = c.getString(contact_name);\n input_msg.setText(\"Number: \" + contact_number1 + \" Name:\" + contact_name1);\n Toast.makeText(this, contact_name1 + \" has number \" + contact_number1, Toast.LENGTH_LONG).show();\n }\n else{\n Toast.makeText(this, \" This Device has no Contacs \", Toast.LENGTH_LONG).show();\n finish();\n }\n }", "org.multibit.hd.core.protobuf.MBHDContactsProtos.Contact getContact(int index);", "public String getContact() {\r\n return this.contact;\r\n }", "private boolean accountChecks(Account account){\n // ie. if the account has to be personal for the round-up service to apply\n account.getName(); // check personal\n return true;\n }", "public void addContact() throws IOException {\n\t\t\n\t\tContact contact = Contact.getContact();\n\t\twhile (checkPhone(contact.getPhone()) != -1) {\n\t\t\tSystem.out.println(\"Phone already exits. Please input again!\");\n\t\t\tcontact.setPhone(getString(\"phone\"));\n\t\t}\n\t\tlist.add(contact);\n\t\tSystem.out.println(\"---Added\");\n\t}", "public boolean containsContact(Contact c);", "int isValidNumber(String typedNumber){\n for(int i = 0; i<numContacts; ++i){\n Contact contact = ValidContactsArray[i];\n String number = contact.getContactNumber();\n if(typedNumber.equals(number)){\n return i;\n }\n }\n //if the contact is not found, return -1\n return -1;\n\n }", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "public kr.pik.message.Profile.Contact getContact() {\n kr.pik.message.Profile.Contact result = kr.pik.message.Profile.Contact.valueOf(contact_);\n return result == null ? kr.pik.message.Profile.Contact.UNRECOGNIZED : result;\n }", "public abstract ContactId getRemoteContact() throws RcsServiceException;", "public void chekcAllPhoneNumbers() {\n\t\t\n\t\tif(remaining!=-9999999 && remaining!=0)\n\t\t{\n\t\t\tAlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(\n\t\t\t\t\tcon);\n\t \n\t\t\t\t\t// create alert dialog\n\t\t \t\t\talertDialog = alertDialogBuilder.setTitle(\"Please wait\")\n\t\t\t\t\t\t.setMessage(\"Already an update is going on.\")\n\t\t\t\t\t\t.setCancelable(false)\n\t\t\t\t\t\t.setPositiveButton(\"Ok.\",new DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,int id) {\n\t\t\t\t\t\t\t\talertDialog.dismiss();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t }).create();\n\t \n\t\t\t\t\t// show it\n\t\t\t\t\talertDialog.show();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tUri uri = ContactsContract.CommonDataKinds.Phone.CONTENT_URI;\n\t\t\tString[] projection = new String[] {ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME,\n\t\t\t ContactsContract.CommonDataKinds.Phone.NUMBER};\n\n\t\t\tCursor people = getContentResolver().query(uri, projection, null, null, null);\n\n\t\t\tint indexName = people.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME);\n\t\t\tint indexNumber = people.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER);\n\n\t\t\tint total_size = people.getCount();\n\t\t\tif(total_size<=0)\n\t\t\t{\n\t\t\t\tsetSupportProgressBarIndeterminateVisibility(false);\n\t\t\t\tToast.makeText(con, \"No contacts found.\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tpeople.moveToFirst();\n\t\t\t\tdo {\n\t\t\t\t\t String name = people.getString(indexName);\n\t\t\t\t\t String number = people.getString(indexNumber);\n\t\t\t\t\t number = (new To_international(con)).change_to_international(number);\n\t\t\t\t\t if(number!=null)\n\t\t\t\t\t {\n\t\t\t\t\t \tvalid_name.add(name);\n\t\t\t\t\t \tvalid_number.add(number);\n\t\t\t\t\t }\n\t\t\t\t} while (people.moveToNext());\n\t\t\t\t\n\t\t\t\tLog.d(\"size\", \"\"+valid_name.size());\n\t\t\t\t\n\t\t\t\tif(valid_name.size()>0)\n\t\t\t\t{\n\t\t\t\t\tif(valid_name.size()>10)\n\t\t\t\t\t{\n\t\t\t\t\t\tflag = valid_name.size();\n\t\t\t\t\t\tremaining = valid_name.size();\n\t\t\t\t\t\tindex = -1;\n\t\t\t\t\t\tfor(int i=0;i<valid_name.size();i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparse_phone_number_query();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tflag = valid_name.size();\n\t\t\t\t\t\tremaining = valid_name.size();\n\t\t\t\t\t\tindex = -1;\n\t\t\t\t\t\tfor(int i=0;i<valid_name.size();i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparse_phone_number_query();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tsetSupportProgressBarIndeterminateVisibility(false);\n\t\t\t\t\tToast.makeText(con, \"No friends found in contacts.\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\t\t}\n\t\t\t\t\n\t}", "int getContactAddressCount();", "public void accessAddressBook() {\n boolean isExit = false;\n while(!isExit) {\n System.out.println(\"Select option: \\n1.Add Contact\\n2.Edit Contact\\n\" +\n \"3.Delete Contact\\n4.Find contact\\n5.Exit\");\n int option = scannerForAddressBook.scannerProvider().nextInt();\n switch(option) {\n case 1:\n if(!isContactExist(getName())) {\n addContact();\n } else {\n System.out.println(\"Contact already exists!\");\n }\n break;\n case 2:\n String name = getName();\n if(isContactExist(name)) {\n editDetails(name);\n } else {\n System.out.println(\"Contact does not exists!\");\n }\n break;\n case 3:\n String name1 = getName();\n if(isContactExist(name1)) {\n Contacts contact = getContact(name1);\n deleteContact(contact);\n } else {\n System.out.println(\"Contact does not exists!\");\n }\n break;\n case 4:\n findContactOptions();\n break;\n default:\n System.out.println(\"Thanks!\");\n isExit = true;\n }\n }\n }", "private void getListAccountHandleMakeCall(Context context){\n mPhoneAccountIdList.clear();\n Cursor cursor = context.getContentResolver().query(CallLog.Calls.CONTENT_URI, null,\n null, null, null);\n int phoneAccountIdColumn = cursor.getColumnIndex(CallLog.Calls.PHONE_ACCOUNT_ID);\n while (cursor.moveToNext()){\n String id = cursor.getString(phoneAccountIdColumn);\n if (!mPhoneAccountIdList.contains(id)){\n mPhoneAccountIdList.add(id);\n }\n }\n }", "private void permisosContactos() {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_CONTACTS) != PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_CONTACTS) != PERMISSION_GRANTED) {\n\n ActivityCompat.requestPermissions(this, new String[]{\n Manifest.permission.READ_CONTACTS, Manifest.permission.WRITE_CONTACTS\n }, CONTACTS_REQUEST_CODE);\n\n }\n\n else{\n llenarLista();\n }\n }", "@Test\r\n\tvoid testContactServiceAddUniqueContact() {\r\n\t\tassertTrue(contactService.getContactFirstName(id).equals(firstName));\r\n\t\tassertTrue(contactService.getContactLastName(id).equals(lastName));\r\n\t\tassertTrue(contactService.getContactPhone(id).equals(phone));\r\n\t\tassertTrue(contactService.getContactAddress(id).equals(address));\r\n\t}", "private void readContactInfo() {\n\t\tScanner console = new Scanner(System.in);\n\t\tPerson tempPerson = new Person();\n\t\tString stringInput;\n\t\t\n\t\tSystem.out.println(\"Please press enter after each input, or \"\n\t\t\t\t\t\t\t+ \"input only 'c' to cancel.\");\n\t\tSystem.out.print(\"Last name: \");\n\t\tstringInput = console.nextLine().trim();\n\t\tif (isCancelled(stringInput)) { //terminates if user enters \"c\"\n\t\t\tSystem.out.println(\"No contact added.\");\n\t\t\treturn;\n\t\t} else if (stringInput.isEmpty()) { //terminates if last name is blank\n\t\t\tSystem.err.println(\"Last name is required. No contact added!\");\n\t\t\treturn;\n\t\t} else {\n\t\t\ttempPerson.setLastName(stringInput);\n\t\t}\n\t\t\n\t\tSystem.out.print(\"First name: \");\n\t\tstringInput = console.nextLine().trim();\n\t\tif (isCancelled(stringInput)) { //terminates if user enters \"c\"\n\t\t\tSystem.out.println(\"No contact added.\");\n\t\t\treturn;\n\t\t} else if (stringInput.isEmpty()) { //terminates if first name is blank\n\t\t\tSystem.err.println(\"First name is required. No contact added!\");\n\t\t\treturn;\n\t\t} else {\n\t\t\ttempPerson.setFirstName(stringInput);\n\t\t}\n\t\t\n\t\t\n\t\tStreetAddress address = new StreetAddress();\n\t\tSystem.out.println(\"Address: \");\n\t\tSystem.out.print(\"\\tHouse/Apartment: \");\n\t\tstringInput = console.nextLine().trim();\n\t\tif (isCancelled(stringInput)) { //terminates if user enters \"c\"\n\t\t\tSystem.out.println(\"No contact added.\");\n\t\t\treturn;\n\t\t} else {\n\t\t\taddress.setHouse(stringInput);\n\t\t}\n\t\t\n\t\tSystem.out.print(\"\\tCity: \");\n\t\tstringInput = console.nextLine().trim();\n\t\tif (isCancelled(stringInput)) { //terminates if user enters \"c\"\n\t\t\tSystem.out.println(\"No contact added.\");\n\t\t\treturn;\n\t\t} else {\n\t\t\taddress.setCity(stringInput);\n\t\t}\n\t\t\n\t\tSystem.out.print(\"\\tState: \");\n\t\tstringInput = console.nextLine().trim();\n\t\tif (isCancelled(stringInput)) { //terminates if user enters \"c\"\n\t\t\tSystem.out.println(\"No contact added.\");\n\t\t\treturn;\n\t\t} else {\n\t\t\taddress.setState(stringInput);\n\t\t}\n\t\t\n\t\tSystem.out.print(\"\\tZip code: \");\n\t\tstringInput = console.nextLine().trim();\n\t\tif (isCancelled(stringInput)) { //terminates if user enters \"c\"\n\t\t\tSystem.out.println(\"No contact added.\");\n\t\t\treturn;\n\t\t} else {\n\t\t\taddress.setZip(stringInput);\n\t\t}\n\t\t\n\t\tSystem.out.print(\"\\tCountry: \");\n\t\tstringInput = console.nextLine().trim();\n\t\tif (isCancelled(stringInput)) { //terminates if user enters \"c\"\n\t\t\tSystem.out.println(\"No contact added.\");\n\t\t\treturn;\n\t\t} else {\n\t\t\taddress.setCountry(stringInput);\n\t\t\ttempPerson.setAddress(address);\n\t\t}\n\t\t\t\n\t\tSystem.out.print(\"Email address: \");\n\t\tstringInput = console.nextLine().trim();\n\t\tif (isCancelled(stringInput)) { //terminates if user enters \"c\"\n\t\t\tSystem.out.println(\"No contact added.\");\n\t\t\treturn;\n\t\t} else {\n\t\t\ttempPerson.setEmail(stringInput);\n\t\t}\n\t\t\n\t\tSystem.out.print(\"Phone number(XXX XXX XXXX): \");\n\t\tstringInput = console.nextLine().trim();\n\t\tif (isCancelled(stringInput)) { //terminates if user enters \"c\"\n\t\t\tSystem.out.println(\"No contact added.\");\n\t\t\treturn;\n\t\t} else {\n\t\t\ttempPerson.setPhone(stringInput);\n\t\t}\n\t\n\t\tSystem.out.print(\"Notes: \");\n\t\tstringInput = console.nextLine().trim();\n\t\tif (isCancelled(stringInput)) { //terminates if user enters \"c\"\n\t\t\tSystem.out.println(\"No contact added.\");\n\t\t\treturn;\n\t\t} else {\n\t\t\ttempPerson.setNotes(stringInput);\n\t\t}\n\t\t\n\t\tcontactList[contactCounter] = tempPerson;\n\t\tSystem.out.println(\"New contact added!\");\n\t\tcontactCounter++;\n\t}", "public AccountTypeAlreadyExistException(Account akun){\n super(\"Unable to create duplicate account of type \");\n this.akun=akun;\n }", "public static void addContact()\n {\n System.out.println(\"Enter your firstName : \");\n String firstName = sc.nextLine();\n for (int i = 0; i < list.size(); i++)\n {\n if (list.get(i).getFirstName().equalsIgnoreCase(firstName))\n {\n System.out.println(\"Name already exists. Try another name\");\n addPersons();\n break;\n }\n }\n\n System.out.println(\"Enter your lastName : \");\n String lastName = sc.nextLine();\n System.out.println(\"Enter your address : \");\n String address = sc.nextLine();\n System.out.println(\"Enter your city : \");\n String city = sc.nextLine();\n System.out.println(\"Enter your state : \");\n String state = sc.nextLine();\n System.out.println(\"Enter your zipCode : \");\n String zip = sc.nextLine();\n System.out.println(\"Enter your phoneNo : \");\n long phoneNo = sc.nextLong();\n System.out.println(\"Enter your emailId : \");\n String email = sc.nextLine();\n Contact contact = new Contact(firstName, lastName, address, city, state, zip, phoneNo, email);\n list.add(contact);\n }", "public void removeContact() {\r\n\t\tSystem.out.println(\"enter the name of the contact you want to delete?\");\r\n\t\tString name = scanner.nextLine();\r\n\t\tint rowsEffected = service.removeContact(name);\r\n\t\tSystem.out.println(rowsEffected+\" row was removed\");\r\n\t}", "public void AddToAccountInfo();", "public void setContact(String contact) {\r\n this.contact = contact.trim();\r\n }", "Account getAccount(Integer accountNumber);", "@Override\n\tpublic void result(ContactResult arg0) {\n\t\t\n\t}", "protected void add(Contact contact) throws IllegalArgumentException {\n\t\t// Concatenate my lists.\n\t\tsuper.add(contact);\n\t}", "public boolean existeContacto(String usuario,String contacto){\n query=\"select count(*) as cantidad from contactos where nombre='%s' and contacto='%s';\";\n query= String.format(query,usuario,contacto);\n try{\n if(miBaseDatos.executeQuery(query,\"respuesta\")){\n miBaseDatos.next(\"respuesta\");\n String aparece = miBaseDatos.getString(\"cantidad\",\"respuesta\");\n if(aparece.equals(\"1\")){\n return true;\n }else{\n return false;\n }\n }else{\n System.out.println(\"No se pudo hacer la consulta\");\n return false;\n }\n }catch(Exception e){\n System.out.println(e.getClass());\n System.out.println(e.getMessage());\n e.printStackTrace();\n return false;\n }\n }", "public void addContact(String on_cloudkibo, String lname, String phone, String uname, String uid, String shareddetails,\r\n \t\tString status) {\r\n\r\n\r\n ContentValues values = new ContentValues();\r\n //values.put(Contacts.CONTACT_FIRSTNAME, fname); // FirstName\r\n //values.put(Contacts.CONTACT_LASTNAME, lname); // LastName\r\n values.put(Contacts.CONTACT_PHONE, phone); // Phone\r\n values.put(\"display_name\", uname); // UserName\r\n values.put(Contacts.CONTACT_UID, uid); // Uid\r\n values.put(Contacts.CONTACT_STATUS, status); // Status\r\n values.put(Contacts.SHARED_DETAILS, shareddetails); // Created At\r\n values.put(\"on_cloudkibo\", on_cloudkibo);\r\n\r\n // Inserting Row\r\n try {\r\n// if(getContactName(phone) != null){\r\n// SQLiteDatabase db = this.getWritableDatabase();\r\n// db.update(Contacts.TABLE_CONTACTS,values,\"phone='\"+phone+\"'\",null);\r\n// db.close();\r\n// }else{\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n db.replace(Contacts.TABLE_CONTACTS, null, values);\r\n db.close();\r\n// }\r\n } catch (android.database.sqlite.SQLiteConstraintException e){\r\n Log.e(\"SQLITE_CONTACTS\", uname + \" - \" + phone);\r\n ACRA.getErrorReporter().handleSilentException(e);\r\n }\r\n // Closing database connection\r\n }", "public void addEntry(AddressEntry contact) {\r\n insertAlphabeticalOrder(contact);\r\n }", "public boolean hasContact() {\n return typeCase_ == 1;\n }", "public ClientAccount(String name, Name contact, Address address) {\n\t\tthis.name = name;\n\t\tthis.contact = contact;\n\t\tthis.address = address;\n\t}", "private static int findContact (String name){\n\t\tfor (int ii=0; ii<contacts.length; ii++){\n\t\t\t//If the element is null it means we didn't find the contact in the previous ones,\n\t\t\t//so we return false\n\t\t\tif (contacts[ii]==null) return -1;\n\t\t\tif(contacts[ii].getName().equals(name)) return ii;\n\t\t\t}\n\t\treturn -1;\n\t}", "public void viewContact() \n\t{\n\t\tSystem.out.printf(\"%n--[ View Contact ]--%n\");\n\t\tScanner s = new Scanner(System.in);\n\t\tshowContactIndex();\n\t\tSystem.out.printf(\"%n%nClient Number: \");\n\t\tint index = s.nextInt();\n\t\tdisplayAll(index - 1);\n\t}", "public void setTxtrShowContactsHere(String contacts);", "@Test\n void testGetRegistrarForUser_inContacts_isNotAdmin() throws Exception {\n expectGetRegistrarSuccess(\n CLIENT_ID_WITH_CONTACT,\n USER,\n \"user user@gmail.com has [OWNER] access to registrar TheRegistrar\");\n verify(lazyGroupsConnection).get();\n }", "private void lookupUserAccount() {\n String userId = tokens.getString(\"principalID\", \"\");\n String accessToken = tokens.getString(\"authorisationToken\", \"\");\n\n if (!\"\".equals(userId) && !\"\".equals(accessToken)) {\n // Make new json request\n String url = String.format(Constants.APIUrls.lookupUserAccount, userId);\n JsonRequest jsonRequest = new JsonObjectRequest(Request.Method.GET, url, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n String email;\n try {\n email = response.getString(\"email\");\n } catch (JSONException ex){\n email = \"unknown\";\n }\n String name;\n try{\n JSONObject nameObject = response.getJSONObject(\"name\");\n String firstName = nameObject.getString(\"givenName\");\n String lastName = nameObject.getString(\"familyName\");\n name = firstName + \" \" + lastName;\n } catch (JSONException ex){\n name = \"unknown\";\n }\n Boolean accountBlocked;\n try{\n JSONObject accountInfo = response.getJSONObject(\"urn:mace:oclc.org:eidm:schema:persona:wmscircselfinfo:20180101\").getJSONObject(\"circulationInfo\");\n accountBlocked = accountInfo.getBoolean(\"isCircBlocked\");\n } catch (JSONException ex){\n ex.printStackTrace();\n accountBlocked = true;\n }\n String borrowerCategory;\n try {\n JSONObject accountInfo = response.getJSONObject(\"urn:mace:oclc.org:eidm:schema:persona:wmscircselfinfo:20180101\").getJSONObject(\"circulationInfo\");\n borrowerCategory = accountInfo.getString(\"borrowerCategory\");\n } catch (JSONException ex){\n borrowerCategory = \"\";\n }\n String userBarcode;\n try {\n JSONObject accountInfo = response.getJSONObject(\"urn:mace:oclc.org:eidm:schema:persona:wmscircselfinfo:20180101\").getJSONObject(\"circulationInfo\");\n userBarcode = accountInfo.getString(\"barcode\");\n } catch (JSONException ex){\n userBarcode = \"\";\n }\n tokens.edit().putString(\"name\", name).apply();\n tokens.edit().putString(\"email\", email).apply();\n tokens.edit().putBoolean(\"accountBlocked\", accountBlocked).apply();\n tokens.edit().putString(\"borrowerCategory\", borrowerCategory).apply();\n tokens.edit().putString(\"userBarcode\", userBarcode).apply();\n sendBroadcast(new Intent(Constants.IntentActions.LOOKUP_USER_ACCOUNT_RESPONSE));\n LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(new Intent(Constants.IntentActions.LOOKUP_USER_ACCOUNT_RESPONSE));\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n sendBroadcast(new Intent(Constants.IntentActions.LOOKUP_USER_ACCOUNT_ERROR));\n }\n }\n ){\n @Override\n public Map<String, String> getHeaders() {\n Map<String, String> headers = new HashMap<>();\n headers.put(\"Authorization\", accessToken);\n return headers;\n }\n };\n\n requestQueue.add(jsonRequest);\n\n\n Log.e(TAG, \"user response sent\");\n }\n\n }", "public Address SearchContact(String firstName,String lastName) {\r\n int i = 0;\r\n while (!contact.get(i).getFirstName().equals(firstName) && !contact.get(i).getLastName().equals(lastName)){\r\n i++;\r\n }\r\n return contact.get(i);\r\n }", "public void addContact(Contact contactToAdd)\n {\n for (Contact contact: mContacts)\n {\n if (contact.getEmail().equals(contactToAdd.getEmail()))\n {\n //exit if contact exists in the list\n return;\n }\n }\n mContacts.add(contactToAdd);\n }", "public void llenarContactos() {\n\t\t SharedPreferences prefs = getSharedPreferences(\"MisPreferenciasTrackxi\",Context.MODE_PRIVATE);\n String telemer = prefs.getString(\"telemer\", null);\n String correoemer = prefs.getString(\"correoemer\", null);\n String telemer2 = prefs.getString(\"telemer2\", null);\n String correoemer2 = prefs.getString(\"correoemer2\", null);\n \n\t\taddContact(telemer,correoemer);\n\n\t\tif(telemer2!=null){\n\t\t\taddContact(telemer2,correoemer2);\n\t\t}\n\t}", "public void addContact(Contact contact) {\n SQLiteDatabase db = null;\n try {\n db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n //values.put(KEY_ID, contact.getID()); // Contact ID id identity\n values.put(KEY_DEVICE_ID, contact.getDeviceID()); // Contact DeviceID\n values.put(KEY_DISPLAY_WIDTH, contact.getDisplayWidth()); // Contact DisplayWidth\n values.put(KEY_DISPLAY_HEIGHT, contact.getDisplayHeight()); // Contact DisplayHeight\n values.put(KEY_SURNAME, contact.getSurname()); // Contact Surname\n values.put(KEY_IP, contact.getIP()); // Contact IP\n values.put(KEY_HOST_NAME, contact.getHostName()); // Contact hostName\n values.put(KEY_AVATAR, contact.getAvatar()); // Contact Avatar\n values.put(KEY_OSTYPE, contact.getOSType()); // Contact OSType\n values.put(KEY_VER_NO, contact.getVersionNumber()); // Contact versionNumber\n values.put(KEY_PH_NO, contact.getPhoneNumber()); // Contact PhoneNumber\n values.put(KEY_SERVICE_NAME, contact.getServiceName()); // Contact ServiceName\n values.put(KEY_IS_ONLINE, contact.getOnline()?1:0); // Contact PhoneNumber\n\n // Inserting Row\n db.insert(TABLE_CONTACT, null, values);\n }catch (Exception e){\n Log.e(TAG,\"addContact:\"+e.getMessage());\n throw e;\n }finally {\n if(db!= null && db.isOpen())\n db.close(); // Closing database connection\n }\n\n }", "public boolean hasContact() {\n return typeCase_ == 1;\n }", "public void setContactNick(String contactNick) {\n this.contactNick = contactNick;\n }", "private Account findAccount(String name, String email) throws AccountNotFoundException {\n for (Account current: accounts) {\n if (name.equals(current.getName()) && email.equals(current.getEmail())) {\n return current;\n }\n }\n throw new AccountNotFoundException();\n }", "public void addContact() {\n Contacts contacts = new Contacts();\n System.out.println(\"Enter first name\");\n contacts.setFirstName(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter last name\");\n contacts.setLastName(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter address\");\n contacts.setAddress(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter city\");\n contacts.setCity(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter state\");\n contacts.setState(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter email\");\n contacts.setEmail(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter zip\");\n contacts.setZip(scannerForAddressBook.scannerProvider().nextInt());\n System.out.println(\"Enter phone number\");\n contacts.setPhoneNumber(scannerForAddressBook.scannerProvider().nextLine());\n contactList.add(contacts);\n }", "public void identificarPersona() {\n try {\n //Obtiene todas las huellas de la bd\n ResultSet rsIdentificar = identificarhue.executeQuery();\n \n //Si se encuentra la huella en la base de datos\n while(rsIdentificar.next()){\n //Lee la plantilla de la base de datos\n byte templateBuffer[] = rsIdentificar.getBytes(\"huellap\");\n //Crea una nueva plantilla\n Template referenceTemplate = new Template(templateBuffer);\n \n //compara las plantilas (actual vs bd)\n boolean coinciden = fingerprintSDK.verify(template,referenceTemplate);\n \n //Si encuentra coincidencia entonces envia true y si no entonces envia false\n if (coinciden){ \n objpantprincipal.coincidehuella(true);\n return;\n }\n else{\n objpantprincipal.coincidehuella(false);\n }\n } \n \n } catch (SQLException e) { \n initDB();\n identificarPersona();\n } catch (GrFingerJavaException e) {\n Toolkit.getDefaultToolkit().beep();\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "public Contact getContactById(int contactId);", "public void failedLogin(){\n\t\tstate = ATM_State.LOGINID;\n\t\tgui.setDisplay(\"ID does not exist. \\n\"\n\t\t\t\t+ \"Enter your account ID: \\n\");\n\t}", "public void deleteContact(Address address){\n Address address2 = SearchContact(address.getFirstName(),address.getLastName());\r\n if (address2 != null) {\r\n contact.remove(address2);\r\n }\r\n else {\r\n System.out.println(\"Does not exist\");\r\n }\r\n }", "void createCustomerAccount(String mobileNumber) throws Exception;" ]
[ "0.613532", "0.6125857", "0.5935185", "0.59044874", "0.5870987", "0.57114273", "0.5704951", "0.5696625", "0.5695086", "0.5695086", "0.5695086", "0.5695086", "0.56887525", "0.56707394", "0.5644734", "0.5625593", "0.56032515", "0.55513906", "0.55088127", "0.550428", "0.5447553", "0.54442084", "0.54318804", "0.54249364", "0.54243964", "0.5398886", "0.53903484", "0.5384053", "0.5383443", "0.5361562", "0.53535306", "0.535269", "0.5351503", "0.5339842", "0.53277165", "0.530637", "0.530637", "0.5296243", "0.52866745", "0.5281691", "0.5281619", "0.5278945", "0.5274342", "0.52716297", "0.52630174", "0.52593243", "0.52569884", "0.5250365", "0.5238569", "0.523772", "0.5232013", "0.5223121", "0.521545", "0.5203807", "0.5191293", "0.5183062", "0.51817995", "0.51650625", "0.51650625", "0.51650625", "0.51650625", "0.51610345", "0.51591957", "0.5156736", "0.51528245", "0.5151243", "0.5147176", "0.51466376", "0.51361006", "0.51325905", "0.5130212", "0.5130152", "0.5126799", "0.51247305", "0.5124642", "0.5121144", "0.51147264", "0.510903", "0.5103162", "0.50915164", "0.5089394", "0.5088742", "0.5085609", "0.50810987", "0.5080623", "0.5073463", "0.5070384", "0.50626487", "0.5061948", "0.5059319", "0.5056402", "0.50538945", "0.50533295", "0.50519276", "0.50503033", "0.5049043", "0.50462705", "0.504574", "0.50354725", "0.502861", "0.5027045" ]
0.0
-1
/ This method should be called when the user creates a new account in the firsttime use scenario
public static Account createNewAccount(String GID, String name) { String[] emailParts = GID.split("@"); //Check if this Account is already stored String fileName = name + "_" + emailParts[0] + "_" + emailParts[1]; File f = new File(fileName); if(f.exists()) { try { //use buffering InputStream file = new FileInputStream(fileName); InputStream buffer = new BufferedInputStream(file); ObjectInput input = new ObjectInputStream(buffer); try { //deserialize the Account object Account recoveredAccount = (Account)input.readObject(); currentAccount = recoveredAccount; return recoveredAccount; } finally { input.close(); } } catch(ClassNotFoundException ex){ System.out.println("Cannot perform input. Class not found."); return createAndStoreAccount(fileName, GID, name); } catch(IOException ex){ System.out.println("Cannot perform input."); return createAndStoreAccount(fileName, GID, name); } } else { return createAndStoreAccount(fileName, GID, name); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createNewAccount() {\n\n // if user has not provided valid data, do not create an account and return from method\n if (!validateData()) {\n return;\n }\n\n // If flag value is false, that means email provided by user doesn't exists in database\n // so initialize the loader to create a new account\n if (!mEmailExistsFlag) {\n getLoaderManager().initLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n } else {\n // If flag is true, that means email provided by user already exists in database\n // so restart the loader and allow user to enter new email address for account\n getLoaderManager().restartLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n }\n\n }", "private void createAccount()\n {\n // check for blank or invalid inputs\n if (Utils.isEmpty(edtFullName))\n {\n edtFullName.setError(\"Please enter your full name.\");\n return;\n }\n\n if (Utils.isEmpty(edtEmail) || !Utils.isValidEmail(edtEmail.getText().toString()))\n {\n edtEmail.setError(\"Please enter a valid email.\");\n return;\n }\n\n if (Utils.isEmpty(edtPassword))\n {\n edtPassword.setError(\"Please enter a valid password.\");\n return;\n }\n\n // check for existing user\n AppDataBase database = AppDataBase.getAppDataBase(this);\n User user = database.userDao().findByEmail(edtEmail.getText().toString());\n\n if (user != null)\n {\n edtEmail.setError(\"Email already registered.\");\n return;\n }\n\n user = new User();\n user.setId(database.userDao().findMaxId() + 1);\n user.setFullName(edtFullName.getText().toString());\n user.setEmail(edtEmail.getText().toString());\n user.setPassword(edtPassword.getText().toString());\n\n database.userDao().insert(user);\n\n Intent intent = new Intent(this, LoginActivity.class);\n intent.putExtra(\"user\", user);\n startActivity(intent);\n }", "GenerateUserAccount () {\r\n }", "@Override\n\tpublic String createAccount() {\n\t\treturn \"Created Saving Account Sucessfully\";\n\t}", "public void createUserAccount(UserAccount account);", "public void createAccount(){\n System.out.println(\"vi skal starte \");\n }", "private void registerUser()\n {\n /*AuthService.createAccount takes a Consumer<Boolean> where the result will be true if the user successfully logged in, or false otherwise*/\n authService.createAccount(entryService.extractText(namedFields), result -> {\n if (result.isEmpty()) {\n startActivity(new Intent(this, DashboardActivity.class));\n } else {\n makeToast(result);\n formContainer.setAlpha(1f);\n progressContainer.setVisibility(View.GONE);\n progressContainer.setOnClickListener(null);\n }\n });\n }", "private void createAccount() {\n mAuth.createUserWithEmailAndPassword(mTextEmail.getText().toString(), mTextPassword.getText().toString()).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n\n if(!task.isSuccessful()){\n Toast.makeText(SignInActivity.this, \"Account creation failed!\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(SignInActivity.this, \"Account creation success!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "public void createAccount() {\n\t\tSystem.out.print(\"Enter Name: \");\n\t\tString name = nameCheck(sc.next());\n\t\tSystem.out.print(\"Enter Mobile No.: \");\n\t\tlong mobNo = mobCheck(sc.nextLong());\n\t\tlong accNo = mobNo - 1234;\n\t\tSystem.out.print(\"Enter Balance: \"); \n\t\tfloat balance = amountCheck(sc.nextFloat());\n\t\tuserBean BeanObjCreateAccountObj = new userBean(accNo, name, mobNo, balance);\n\t\tSystem.out.println(\"Account created with Account Number: \" +accNo);\n\t\tServiceObj.bankAccountCreate(BeanObjCreateAccountObj);\n\t\t\n\t\n\t}", "@Test\n\tpublic void createAccount() {\t\n\t\t\n\t\tRediffOR.setCreateAccoutLinkClick();\n\t\tRediffOR.getFullNameTextField().sendKeys(\"Kim Smith\");\n\t\tRediffOR.getEmailIDTextField().sendKeys(\"Kim Smith\");\n\t\t\t\t\t\n\t\t\n\t}", "public void onCreateAccountPressed(View view) {\n\n\n mUserName = mEditTextUsernameCreate.getText().toString();\n mUserEmail = mEditTextEmailCreate.getText().toString().toLowerCase();\n mPassword = mEditTextPasswordCreate.getText().toString();\n\n /**\n * Check that email and user name are okay\n */\n boolean validEmail = isEmailValid(mUserEmail);\n boolean validUserName = isUserNameValid(mUserName);\n boolean validPassword = isPasswordValid(mPassword);\n if (!validEmail || !validUserName || !validPassword) return;\n /**\n * If everything was valid show the progress dialog to indicate that\n * account creation has started\n */\n mAuthProgressDialog.show();\n\n\n // [START create_user_with_email]\n mAuth.createUserWithEmailAndPassword(mUserEmail, mPassword)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(LOG_TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n\n // If sign in fails, display a message to the user. If sign in succeeds\n // the auth state listener will be notified and logic to handle the\n // signed in user can be handled in the listener.\n if (!task.isSuccessful()) {\n Toast.makeText(CreateAccountActivity.this, R.string.auth_failed,\n Toast.LENGTH_SHORT).show();//error message\n //showErrorToast(\"createUserWithEmail : \"+task.isSuccessful());\n }\n\n // [START_EXCLUDE]\n mAuthProgressDialog.dismiss();\n Intent intent = new Intent(CreateAccountActivity.this, LoginActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n finish();\n // [END_EXCLUDE]\n //end\n }\n });\n // [END create_user_with_email]\n\n\n\n /**\n * Create new user with specified email and password\n */\n /*mFirebaseRef.createUser(mUserEmail, mPassword, new Firebase.ValueResultHandler<Map<String, Object>>() {\n @Override\n public void onSuccess(Map<String, Object> result) {\n Dismiss the progress dialog\n mAuthProgressDialog.dismiss();\n Log.i(LOG_TAG, getString(R.string.log_message_auth_successful));\n }\n\n @Override\n public void onError(FirebaseError firebaseError) {\n *//* Error occurred, log the error and dismiss the progress dialog *//*\n Log.d(LOG_TAG, getString(R.string.log_error_occurred) +\n firebaseError);\n mAuthProgressDialog.dismiss();\n *//* Display the appropriate error message *//*\n if (firebaseError.getCode() == FirebaseError.EMAIL_TAKEN) {\n mEditTextEmailCreate.setError(getString(R.string.error_email_taken));\n } else {\n showErrorToast(firebaseError.getMessage());\n }\n\n }\n });*/\n }", "@Override\n public void onSuccess(AuthResult authResult) {\n userWAPFirebase.create(newUser, firebaseAuth.getCurrentUser().getUid()).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.d(TAG, \"User \" + newUser.getUsername() + \" has been successfully created\");\n Toast.makeText(SignUpActivity.this, \"Sign up successful!\", Toast.LENGTH_SHORT).show();\n\n //Go back to Login Activity\n Intent loginIntent = new Intent(SignUpActivity.this, LoginActivity.class);\n loginIntent.putExtra(PASSWORD_KEY, etPasswordSignup.getText().toString());\n loginIntent.putExtra(EMAIL_KEY, newUser.getEmail());\n startActivity(loginIntent);\n }\n });\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n if (CREATE_USER_REQUEST_CODE == requestCode && RESULT_OK == resultCode){\n if (data != null) {\n String username = data.getStringExtra(UserCreationActivity.BUNDLE_NEW_USER_NAME);\n\n User user = new User(username, User.EMPTY_CASE, User.EMPTY_CASE);\n\n createUser(user);\n }\n }\n }", "Account create();", "private void signUpNewUserToDB(){\n dbAuthentication.createUserWithEmailAndPassword(this.newUser.getEmail(), this.newUser.getPassword())\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n /**signUp success, will update realTime DB ant firebase Authentication*/\n FirebaseUser currentUser = dbAuthentication.getCurrentUser();\n addToRealDB(currentUser.getUid());\n /**will send verification email to the user from Firebase Authentication*/\n currentUser.sendEmailVerification().addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n }\n });\n }else{isBadEmail = true;}\n }\n });\n }", "public void createAccount() {\n System.out.println(\"Would you like to create a savings or checking account?\");\n String AccountRequest = input.next().toLowerCase().trim();\n createAccount(AccountRequest);\n\n }", "private void CreateUserAccount(final String lname, String lemail, String lpassword, final String lphone, final String laddress, final String groupid, final String grouppass ){\n mAuth.createUserWithEmailAndPassword(lemail,lpassword).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n //account creation successful\n showMessage(\"Account Created\");\n //after user account created we need to update profile other information\n updateUserInfo(lname, pickedImgUri,lphone, laddress, groupid, grouppass, mAuth.getCurrentUser());\n }\n else{\n //account creation failed\n showMessage(\"Account creation failed\" + task.getException().getMessage());\n regBtn.setVisibility(View.VISIBLE);\n loadingProgress.setVisibility(View.INVISIBLE);\n\n }\n }\n });\n }", "@Override\n\tpublic void createUserProfile(User user) throws Exception {\n\n\t}", "private void initial(){\n storeAccount(\"201799990001030047\");\n }", "public LandingPage registerNewAccount(){\n\t\taction.WaitForWebElement(linkRegisterNewAccount)\n\t\t\t .Click(linkRegisterNewAccount);\n\t\treturn this;\n\t}", "@Override\n\tpublic void create(User user) {\n\t\t\n\t}", "private void createAccountActivity() {\n // everything is converted to string\n String userName = createUserName.getText().toString().trim();\n String phoneNumber = createPhoneNumber.getText().toString().trim();\n String email = createEmail.getText().toString().trim();\n String password = createPassword.getText().toString().trim();\n\n\n // Validate that the entry should not be empty\n if (userName.isEmpty()) {\n createUserName.setError(\"It should not be empty. \");\n createUserName.requestFocus();\n return;\n }\n if (phoneNumber.isEmpty()) {\n createPhoneNumber.setError(\"It should not be empty. \");\n createPhoneNumber.requestFocus();\n return;\n }\n if (email.isEmpty()) {\n createEmail.setError(\"It should not be empty. \");\n createEmail.requestFocus();\n return;\n } else if (!Patterns.EMAIL_ADDRESS.matcher(email).matches()) {\n createEmail.setError(\"Invalid email\");\n createEmail.requestFocus();\n return;\n }\n\n if (password.isEmpty()) {\n createPassword.setError(\"It should not be empty. \");\n createPassword.requestFocus();\n return;\n }\n\n // connect to the firebase\n auth.createUserWithEmailAndPassword(email, password).addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n String userID = FirebaseAuth.getInstance().getCurrentUser().getUid();\n User user = new User(userName, phoneNumber, email, password, userID);\n // We will send everything in user to the firebase database\n FirebaseDatabase.getInstance()\n .getReference(\"User\")\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n .setValue(user).addOnCompleteListener(task1 -> {\n if (task1.isSuccessful()) {\n Toast.makeText(RegisterUser.this, \"The account has been created successfully. \", Toast.LENGTH_LONG).show();\n finish(); //basically same as clicking back button\n } else {\n Toast.makeText(RegisterUser.this, \"The account creation failed!\", Toast.LENGTH_LONG).show();\n }\n });\n } else {\n Toast.makeText(RegisterUser.this, \"The account creation failed!\", Toast.LENGTH_LONG).show();\n }\n });\n }", "public SavingAccount()\n\t\t{\n\t\t\tsuper();\n\t\t}", "@Override\n\tpublic User createNewUser(Account account) {\n\t\treturn new User(account);\n\t\t\n\t}", "public void createUser(User user) {\n\n\t}", "public void createAccount() {\n\t\t// Assigns variables based on user input\n\t\tString username = usernameField.getText();\n\t\tString firstName = firstNameField.getText();\n\t\tString lastName = lastNameField.getText();\n\t\tString address = addressField.getText();\n\t\tString postCode = postcodeField.getText();\n\t\tString phoneNumber = phoneNumberField.getText();\n\t\tlong phoneNumberLong;\n\t\tif (username.isEmpty() || firstName.isEmpty() || lastName.isEmpty() || address.isEmpty() || postCode.isEmpty()\n\t\t\t\t|| phoneNumber.isEmpty()) { // Checks if number is correct format\n\n\t\t\tAlert alert = new Alert(AlertType.ERROR); // Error message\n\t\t\talert.setTitle(\"Error\");\n\n\t\t\talert.setHeaderText(\"Could not create an user\");\n\t\t\talert.setContentText(\"Make sure you fill all fields and press button again\");\n\t\t\talert.showAndWait();\n\n\t\t\treturn;\n\t\t}\n\n\t\telse {\n\t\t\ttry {\n\t\t\t\tphoneNumberLong = Long.parseLong(phoneNumber);\n\t\t\t} catch (Exception e) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\n\t\t\t\talert.setHeaderText(\"Wrong format of phone number\");\n\t\t\t\talert.setContentText(\"Please enter correct phone number\");\n\t\t\t\talert.showAndWait();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif(FileReader.exists(username)) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\n\t\t\t\talert.setHeaderText(\"User with the username \"+ username +\" already exists. \");\n\t\t\t\talert.setContentText(\"Please choose another username\");\n\t\t\t\talert.showAndWait();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tString userdata = \"\";\n\t\t\tuserdata += \"\\n Username: \" + username;\n\t\t\tuserdata += \"\\n First name: \" + firstName;\n\t\t\tuserdata += \"\\n Last name: \" + lastName;\n\t\t\tuserdata += \"\\n Address: \" + address;\n\t\t\tuserdata += \"\\n Post code: \" + postCode;\n\t\t\tuserdata += \"\\n Phone number: \" + phoneNumberLong;\n\t\t\t\n\n\t\t\tif(custom) {\n\t\t\t\tavatarIndex = 101;\n\t\t\t\t// Gives users the custom avatar\n\t\t\t\tFile file1 = new File(\"artworkImages/\" + username);\n\t\t\t\tfile1.mkdir();\n\t\t\t\tPath path = Paths.get(\"customAvatars/\" + username + \".png\");\n\t\t\t\tString path1 = \"tmpImg.png\";\n\t\t\t\tFile file = new File(path1);\n\n\t\t\t\ttry {\n\t\t\t\t\tFiles.copy(file.toPath(), path, StandardCopyOption.REPLACE_EXISTING);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tUser user = new User(username, firstName, lastName, address, postCode, phoneNumberLong, avatarIndex);\n\t\t\tFileReader.addUser(user); // Creates user\n\n\t\t\ttry {\n\t\t\t\tWriter.writeUserFile(user); // Adds user to memory\n\t\t\t} catch (IOException e) {\n\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\n\t\t\tAlert alert = new Alert(AlertType.INFORMATION); // Success message\n\t\t\talert.setTitle(\"Success\");\n\n\t\t\talert.setHeaderText(\"The user has been created\");\n\t\t\talert.setContentText(\"Close this window to return to login screen\");\n\t\t\talert.showAndWait();\n\n\t\t\tcreateAccountButton.getScene().getWindow().hide();\n\t\t}\n\n\t}", "public void run() {\n int id = getIdentity();\n iUser user = createUser(id);\n boolean userCreated = (user != null);\n if (userCreated) {\n presenter.printAccountCreated();\n } else {\n presenter.printRequestDeclined();\n }\n }", "Boolean registerNewUser(User user);", "@Test(priority=1, dataProvider=\"User Details\")\n\t\tpublic void registration(String firstname,String lastname,String emailAddress,\n\t\t\t\tString telephoneNum,String address1,String cityName,String postcodeNum,\n\t\t\t\tString country,String zone,String pwd,String confirm_pwd) throws Exception{\n\t\t\t\n\t\t\thomePage = new HomePage(driver);\n//'**********************************************************\t\t\t\n//Calling method to click on 'Create Account' link\n\t\t\tregistraionPageOC = homePage.clickCreateAccount();\n//'**********************************************************\t\t\t\n//Calling method to fill user details in Registration page and verify account is created\n\t\t\tregistraionPageOC.inputDetails(firstname,lastname,emailAddress,telephoneNum,address1,cityName,postcodeNum,country,zone,pwd,confirm_pwd);\n\t\t\ttry{\n\t\t\tAssert.assertEquals(\"Your Account Has Been Created!\", driver.getTitle(),\"Titles Not Matched: New Account Not Created\");\n\t\t\textentTest.log(LogStatus.PASS, \"Registration: New User Account is created\");\n\t\t\t}catch(Exception e){\n\t\t\t\textentTest.log(LogStatus.FAIL, \"Registration is not successful\");\n\t\t\t}\n\t\t}", "public static void requestNewAccount(String uid){\n accountManager.requestNewAccount(uid);\n }", "@Override\n\tpublic String createUserAccountQuery(String username, String password, String firstName, String lastName,\n\t\t\tString dob, String accountType, String accountID, String creationDate, String requestDate,\n\t\t\tString phoneNumber, String email, boolean isApproved) {\n\t\treturn null;\n\t}", "private final static void onRegister(TextField username, TextField email, PasswordField password, PasswordField passwordAgain)\n\t{\n\t\t// TODO no password = passwordAgain check\n\t\t// TODO check if username exists\n\t\t// TODO check if email exists\n\n\t\tint id = ProfileManipulation.getHighestId(\"Profile\", true);\n\t\tProfileManipulation.registerUser(id, username.getText(), email.getText(),\n\t\t\t\tpassword.getText());\n\t\tPartylize.setUsername(username.getText());\n\t\tPartylize.showMainScene();\n\t}", "public void addingNewUser() throws Exception {\n\t\tlog.info(\"Started ----- Adding New User -----\");\n\t\tFirstNameField.sendKeys(pr.loaddata(\"FirstNameField\"));\n\t\tExcelAPI e=new ExcelAPI(System.getProperty(\"user.dir\")\n\t\t\t\t+ \"/src/main/java/WebTesting/AutomationTask/TestData/AutomationTask_TestData.xlsx\");\n\t\tint rcnt = e.getRowCount(\"Task2_TestData\");\n\t\tfor (int i = 1; i < rcnt; i++) {\n\t\t\tLastNameField.clear();\n\t\t\tLastNameField.sendKeys(e.getCellData(\"Task2_TestData\", \"Last Name\", i));\n\t\t\tPasswordField.sendKeys(e.getCellData(\"Task2_TestData\", \"Password\", i));\n\t\t\tEmailField.sendKeys(e.getCellData(\"Task2_TestData\", \"Email\", i));\n\t\t}\n\t\tUserNameField.sendKeys(pr.loaddata(\"username\") + pr.randomusername());\n\t\tWebElement radio_Button = CustomerField;\n\t\tif (!radio_Button.isSelected()) {\n\t\t\tCustomerField.click();\n\t\t\tThread.sleep(1000);\n\t\t}\n\t\tRoleField.click();\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); // Implicitly Wait\n\t\tPhoneField.sendKeys(pr.loaddata(\"phonenumber\") + pr.randomphonenumber());\n\t\tSaveButtonField.click();\n\t\twaitforElement(SearchField, 30); // Explicitly Wait\n\t\tlog.info(\"Ended ----- Adding New User -----\");\n\t}", "private void createNewUser() {\n ContentValues contentValues = new ContentValues();\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.GENDER, getSelectedGender());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.PIN, edtConfirmPin.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.LAST_NAME, edtLastName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.FIRST_NAME, edtFirstName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.STATUS, spnStatus.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.DATE_OF_BIRTH, edtDateOfBirth.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.BLOOD_GROUP, spnBloodGroup.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.IS_DELETED, \"N\");\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.MOBILE_NUMBER, edtMobileNumber.getText().toString());\n contentValues.put(DataBaseConstants.Constants_TBL_CATEGORIES.CREATE_DATE, Utils.getCurrentDateTime(Utils.DD_MM_YYYY));\n\n dataBaseHelper.saveToLocalTable(DataBaseConstants.TableNames.TBL_PATIENTS, contentValues);\n context.startActivity(new Intent(CreatePinActivity.this, LoginActivity.class));\n }", "BankAccount(){\n\t\tSystem.out.println(\"NEW ACCOUNT CREATED\");\t\n\t}", "@Override\n public void run() {\n try {\n stringOrganizationIds.remove(defaultOrg);\n List<Integer> organizationIds = FluentIterable.from(stringOrganizationIds)\n .transform(Ints.stringConverter()).toList();\n\n newUser.setActive(false);\n UserProfileStruct savedUser = createAccountInternal(conn, newUser, password, resetQuestion,\n resetAnswer, givenName, surname, organizationId);\n for (Integer orgId : organizationIds) {\n Profile profile = new Profile();\n profile.setGivenName(givenName);\n profile.setSurname(surname);\n profile.setOrganizationId(orgId);\n profile.setUserId(savedUser.credentialedUser.getId());\n profile = profilePersister.createProfile(profile, conn);\n\n authService.grantAtLeast(profile.getId(), ROLE_READER, orgId);\n authService.grantAtLeast(orgId, ROLE_ADMIN, profile.getId());\n }\n\n User user = savedUser.credentialedUser.getUser();\n user.setActive(true);\n persistenceService.process(conn, new UserPersister.UpdateUserFunc(user));\n conn.commit();\n } catch (Exception e) {\n closeConnection(conn);\n }\n }", "private static void onAccountCreated(Account newAccount, Context context) {\n ScoreSyncAdapter.configurePeriodicSync(context);\n /*\n * Without calling setSyncAutomatically, our periodic sync will not be enabled.\n */\n ContentResolver.setSyncAutomatically(newAccount, context.getString(R.string.content_authority), true);\n\n /*\n * Finally, let's do a sync to get things started\n */\n syncImmediately(context);\n }", "private void createUser(String Address, String Phone_number,String needy) {\n // TODO\n // In real apps this userId should be fetched\n // by implementing firebase auth\n if (TextUtils.isEmpty(userId)) {\n userId = mFirebaseDatabase.push().getKey();\n }\n\n com.glitch.annapurna.needy user = new needy(Address,Phone_number,needy);\n\n mFirebaseDatabase.child(userId).setValue(user);\n\n addUserChangeListener();\n }", "@Override\n public void onClick(View v) {\n CreateAccount();\n }", "private void createAccount(String email, String password) {\n if (!validateForm()) {\n return;\n }\n\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (!task.isSuccessful()) {\n Toast.makeText(MainActivity.this, \"Unable to creat Account\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "public void saveProfileCreateData() {\r\n\r\n }", "public void userCreated(UserCreateCommand command) {\n\t\t}", "@BeforeMethod\n\tpublic void NavigateToCreateUserTest() {\n\t\ttry {\n\t\t\tassertTrue(CreateUserCukes.clickCreateUserTab(wd));\n\t\t\tassertTrue(CreateUserCukes.loadedCreateUserTab(wd));\n\n\t\t} catch (Throwable e) {\n\t\t\tfail(\"Error: Failed to navigate to Create User tab\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void createEmailAndPasswordAccount(String email, String password){\n\n if(!checkForInvalidInput()) return;\n\n // Copied from Firebase documentation\n Log.d(\"CreateAccount\", \"In create method\");\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n FirebaseUser user = mAuth.getCurrentUser();\n\n if(user == null){\n Log.d(TAG, \"User is null?\");\n }\n\n else if(isStudent){\n createLocalStudentUserData(user);\n onCreateSuccessStudent();\n }\n\n else if(isTeacher){\n createLocalTeacherUserData(user);\n onCreateSuccessTeacher();\n }\n\n else{\n Log.d(TAG, \"A problem has occurred in choosing between creating a teacher or student\");\n }\n\n\n } else {\n Log.d(TAG, \"Creating the user account was not successful\");\n Toast.makeText(getApplicationContext(),\n \"Account creation unsuccessful. Perhaps one already exists with this email\",\n Toast.LENGTH_LONG).show();\n }\n\n }\n });\n\n }", "public void onCreationEvent(UserCreateEvent event){\n user = new UserBean(event.getUser());\n }", "@Test\n public void testCreateAccountWithPassword() {\n final CreateUserRequest createUserRequest = new CreateUserRequest();\n createUserRequest.setUsername(\"alpha@gamma.net\");\n createUserRequest.setPassword(\"beta\");\n createUserRequest.setFirstname(\"Alpha\");\n createUserRequest.setLastname(\"Gamma\");\n\n // Now, perform the actual test - create the Account, and verify that\n // the response is ok, and that a Notification was sent\n final CreateUserResponse result = administration.createUser(token, createUserRequest);\n assertThat(result.isOk(), is(true));\n assertThat(result.getUser(), is(not(nullValue())));\n assertThat(result.getUser().getUserId(), is(not(nullValue())));\n // Creating a new User should generate an Activate User notification\n final NotificationType type = NotificationType.ACTIVATE_NEW_USER;\n assertThat(spy.size(type), is(1));\n final String activationCode = spy.getNext(type).getFields().get(NotificationField.CODE);\n assertThat(activationCode, is(not(nullValue())));\n }", "private void registerUser() {\n\n // Get register name\n EditText mRegisterNameField = (EditText) findViewById(R.id.register_name_field);\n String nickname = mRegisterNameField.getText().toString();\n\n // Get register email\n EditText mRegisterEmailField = (EditText) findViewById(R.id.register_email_field);\n String email = mRegisterEmailField.getText().toString();\n\n // Get register password\n EditText mRegisterPasswordField = (EditText) findViewById(R.id.register_password_field);\n String password = mRegisterPasswordField.getText().toString();\n\n AccountCredentials credentials = new AccountCredentials(email, password);\n credentials.setNickname(nickname);\n\n if (DataHolder.getInstance().isAnonymous()) {\n credentials.setOldUsername(DataHolder.getInstance().getUser().getUsername());\n }\n\n sendRegistrationRequest(credentials);\n }", "private static void onAccountCreated(Account newAccount, Context context) {\n MovieSyncAdapter.configurePeriodicSync(context, SYNC_INTERVAL, SYNC_INTERVAL/2);\n ContentResolver.setSyncAutomatically(newAccount, context.getString(R.string.content_authority), true);\n syncNextPage(context, true);\n }", "@Override\n public void onCreated(ISingleAccountPublicClientApplication application) {\n mSingleAccountApp = application;\n loadAccount();\n }", "void onUserCreated(FirebaseUser firebaseUser);", "Account create(Context context);", "UserAccount createUserAccount(User user, double amount);", "public static void createUser(Context context, String email, String password, String name, String bio) {\n if (name.isEmpty() || name.contains(\".\") || name.contains(\"$\") || name.contains(\"#\") || name.contains(\"[\") || name.contains(\"]\") || name.contains(\"/\")) { // No characters that would conflict with firebase path name restrictions\n Log.d(\"RecipeFinderAuth\", \"Sign up Failed!\");\n Toast.makeText(context, \"Sign Up Failed!\", Toast.LENGTH_SHORT).show();\n return;\n }\n FirebaseDatabase.getInstance().getReference().child(\"displayNames\").addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n if (snapshot.hasChild(name)) { // Display name taken\n Log.d(\"RecipeFinderAuth\", \"Sign up Failed!\");\n Toast.makeText(context, \"Sign Up Failed!\", Toast.LENGTH_SHORT).show();\n } else {\n FirebaseAuth.getInstance().createUserWithEmailAndPassword(email, password).addOnCompleteListener(new OnCompleteListener<AuthResult> () {\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) { // Account was successfully created\n Log.d(\"RecipeFinderAuth\", \"Account Created!\");\n Toast.makeText(context, \"Account Created!\", Toast.LENGTH_SHORT).show();\n addNewToDataBase(name, bio); // Add the user to the database of users\n ((AppCompatActivity)(context)).finish();\n\n // Logged in, show home\n Intent intent = new Intent(context, HomeActivity.class);\n context.startActivity(intent);\n } else { // Account was not successfully created\n Log.d(\"RecipeFinderAuth\", \"Sign up Failed!\");\n Toast.makeText(context, \"Sign Up Failed!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n }", "public void createUser(User user);", "public void onClickcreateUserSignup(View view){\n\n String newName = ((EditText)findViewById(R.id.createUserUsername)).getText().toString();\n if(!newName.equals(\"\")) {\n Account.getInstance().setName(newName);\n\n SharedPreferences settings = getSharedPreferences(Utils.ACCOUNT_PREFS, 0);\n SharedPreferences.Editor editor = settings.edit();\n editor.putString(\"accountName\", newName);\n editor.commit();\n\n startActivity(new Intent(this, MainActivity.class));\n }\n }", "@BeforeClass(alwaysRun = true)\r\n\tpublic void createUser() throws ParseException, SQLException, JoseException {\r\n\t\tSystem.out.println(\"******STARTING***********\");\r\n\t\tUser userInfo = User.builder().build();\r\n\t\tuserInfo.setUsername(userName);\r\n\t\tuserInfo.setPassword(\"Test@123\");\r\n\t\tsessionObj = EnvSession.builder().cobSession(config.getCobrandSessionObj().getCobSession())\r\n\t\t\t\t.path(config.getCobrandSessionObj().getPath()).build();\r\n\t\t//userHelper.getUserSession(\"InsightsEngineusers26 \", \"TEST@123\", sessionObj); \r\n\t\tuserHelper.getUserSession(userInfo, sessionObj);\r\n\t\tlong providerId = 16441;\r\n\t\tproviderAccountId = providerId;\r\n\t\tResponse response = providerAccountUtils.addProviderAccountStrict(providerId, \"fieldarray\",\r\n\t\t\t\t\"budget1_v1.site16441.1\", \"site16441.1\", sessionObj);\r\n\t\tproviderAccountId = response.jsonPath().getLong(JSONPaths.PROVIDER_ACC_ID);\r\n\t\tAssert.assertTrue(providerAccountId!=null);\r\n\t\t\r\n\t\t}", "@Test\n public void whenAccountCreationSucceeds() throws Exception {\n Mockito.when(view.getName()).thenReturn(USERNAME);\n Mockito.when(view.getEmail()).thenReturn(VALID_EMAIL);\n Mockito.when(view.getPassword()).thenReturn(VALID_PASSWORD);\n Mockito.when(view.getPasswordConfirmation()).thenReturn(VALID_PASSWORD);\n\n presenter.onCreateAccountClick();\n\n Mockito.verify(view).startProfilePageActivity();\n }", "public void new_user(){\n }", "@Override\n public void performNextStep(String type) {\n FirebaseUser mUser = FirebaseAuth.getInstance().getCurrentUser();\n\n // validate for null to make sure we are logged in\n if (mUser != null) {\n\n // depending on the type of account that was just created, perform the next step\n switch (type) {\n case \"tenant\":\n // send the new tenant to the verification screen to attach their UserID to their TenantID\n FragmentTransaction tenantVerification = getSupportFragmentManager().beginTransaction();\n tenantVerification.replace(R.id.create_container, new VerifyTenantFragment()).commit();\n break;\n case \"staff\":\n // send the new tenant to the verification screen to attach their UserID to their TenantID\n FragmentTransaction staffVerification = getSupportFragmentManager().beginTransaction();\n staffVerification.replace(R.id.create_container, new VerifyStaffFragment()).commit();\n break;\n case \"manager\":\n // send the new manager to the company creation screen\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.create_container, new NewCompanyCreation()).commit();\n break;\n }\n }\n }", "@Test\n public void testCreateAccountWithoutPassword() {\n final CreateUserRequest createUserRequest = new CreateUserRequest();\n createUserRequest.setUsername(\"beta@gamma.net\");\n createUserRequest.setFirstname(\"Beta\");\n createUserRequest.setLastname(\"Gamma\");\n\n // Now, perform the actual test - create the Account, and verify that\n // the response is ok, and that a Notification was sent\n final Response result = administration.createUser(token, createUserRequest);\n assertThat(result.isOk(), is(true));\n // Creating a new User should generate an Activate User notification\n final NotificationType type = NotificationType.ACTIVATE_NEW_USER;\n assertThat(spy.size(type), is(1));\n final String activationCode = spy.getNext(type).getFields().get(NotificationField.CODE);\n assertThat(activationCode, is(not(nullValue())));\n\n // Check that the user is in the list of members\n final String memberGroupId = findMemberGroup(token).getGroupId();\n token.setGroupId(memberGroupId);\n final FetchGroupRequest groupRequest = new FetchGroupRequest(memberGroupId);\n final FetchGroupResponse groupResponse = administration.fetchGroup(token, groupRequest);\n assertThat(groupResponse, is(not(nullValue())));\n }", "@Override\r\n\tpublic boolean create(Account newAccount) {\n\t\treturn daoref.create(newAccount);\r\n\t}", "@Override\r\n\tpublic boolean createAccount(Account account) {\n\t\treturn dao.createAccount(account);\r\n\t}", "private void handleAccountUpdateOnPre() {\n }", "public String create() {\r\n\t\tuserService.create(userAdd);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"create\";\r\n\t}", "private static void onAccountCreated(Account newAccount, Context context) {\n MovieSyncAdapter.configurePeriodicSync(context, SYNC_INTERVAL, SYNC_FLEXTIME);\n\n /*\n * Without calling setSyncAutomatically, our periodic sync will not be enabled.\n */\n ContentResolver.setSyncAutomatically(newAccount, context.getString(R.string.content_authority), true);\n\n /*\n * Finally, let's do a sync to get things started\n */\n syncImmediately(context);\n }", "public void createUserAccount(String email, String password, final String userId, final SignUpInterface listner) {\n collectionReference = db.collection(\"Users\");\n firebaseAuth = FirebaseAuth.getInstance();\n firebaseAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if(task.isSuccessful()){\n currentUser = FirebaseAuth.getInstance().getCurrentUser();\n assert currentUser!= null;\n final String currentUserId = currentUser.getUid();\n\n Map<String, String> userMap = new HashMap<>();\n userMap.put(\"UserIdInDB\", currentUserId);\n userMap.put(\"UserName\", userId);\n\n collectionReference.add(userMap)\n .addOnSuccessListener(new OnSuccessListener<DocumentReference>() {\n @Override\n public void onSuccess(DocumentReference documentReference) {\n documentReference.get()\n .addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n if(task.getResult().exists()) {\n\n String name = task.getResult().getString(\"UserName\");\n\n EntityClass entityObj = EntityClass.getInstance();\n entityObj.setUserName(name);\n entityObj.setUserIdInDb(currentUserId);\n listner.signUpStatus(true);\n }\n }\n });\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(TAG, \"onFailure: \" + e.getMessage());\n listner.signUpStatus(false);\n listner.onFailure(e.getMessage());\n }\n });\n }\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(TAG, \"onFailure: \" + e.getMessage());\n listner.signUpStatus(false);\n listner.onFailure(e.getMessage());\n }\n });\n }", "@Override\n public boolean createAccount(String fullName, String username, String password, String email){\n // will change this if we make some errors.\n if(!usernameToPerson.containsKey(username)) { // check that there is not someone with that username\n Organizer og = new Organizer(fullName, username, password, email);\n updateUsernameToPerson(og.getUsername(), og); // see below\n idToPerson.put(og.getID(), og);\n return true;\n }\n\n return false;\n\n }", "@Override\n public void createNewAccount(String accountType) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.create_container, new CreateAccount().newInstance(accountType)).commit();\n }", "private void register_user() {\n\n\t\tHttpRegister post = new HttpRegister();\n\t\tpost.execute(Config.URL + \"/api/newuser\");\n\n\t}", "@Test\n @Order(4)\n void create_account_2() {\n Account empty = service.createAccount(client.getId());\n Assertions.assertEquals(client.getId(), empty.getClientId());\n Assertions.assertNotEquals(-1, empty.getId());\n Assertions.assertEquals(0, empty.getAmount());\n client.addAccount(empty);\n }", "@Test\n public void testCreateOnBehalfUser() throws Exception {\n String password = \"abcdef\";\n VOUserDetails result = idService\n .createOnBehalfUser(customer.getOrganizationId(), password);\n checkCreatedUser(result, customer, password, false);\n }", "public void onCreateAccountPressed(final View view) throws FirebaseAuthUserCollisionException{\n username=mEditTextUsernameCreate.getText().toString();\n email=mEditTextEmailCreate.getText().toString();\n password=mEditTextPasswordCreate.getText().toString();\n\n if(!isEmailValid(email) || !isUserNameValid(username) || !isPasswordValid(password)){\n return;\n }\n mAuthProgressDialog.show();\n final FirebaseAuth auth=FirebaseAuth.getInstance();\n final DatabaseReference ref=mReference.child(Constants.FIREBASE_LOCATION_USER_ACCOUNTS).child(Utils.encodeEmail(email));\n auth.createUserWithEmailAndPassword(email, password).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if (task.isSuccessful()){\n Log.d(TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n mAuthProgressDialog.dismiss();\n ref.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.getValue()==null){\n User user=new User(username, email);\n ref.setValue(user);\n }\n else {\n showErrorToast(getResources().getString(R.string.error_email_taken));\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Log.e(LOG_TAG, databaseError.getMessage());\n }\n });\n onSignInPressed(view);\n\n }\n else {\n mAuthProgressDialog.dismiss();\n Log.d(TAG, \"createUserWithEmail:onFailure:\" + task.getException());\n showErrorToast(task.getException().getMessage());\n\n }\n }\n\n\n });\n }", "@Override\n public void onSuccess(Map<String, Object> result) {\n Firebase newUserRef = ref.child(\"users\").child(\"username\");\n User newUser = new User();\n\n newUser.email = signUpEmail;\n newUser.fullName = fullName;\n newUser.password = password;\n\n newUserRef.setValue(newUser);\n\n Toast.makeText(SignupActivity.this, \"Successfully created new account\", Toast.LENGTH_LONG).show();\n finish();\n }", "Account() { }", "private void createGuestProfile() {\n saveData();\n signupDelegate.enableNextButton(Boolean.FALSE);\n SwingUtil.setCursor(this, java.awt.Cursor.WAIT_CURSOR);\n errorMessageJLabel.setText(getString(\"SigningUp\"));\n errorMessageJLabel.paintImmediately(0, 0, errorMessageJLabel.getWidth(),\n errorMessageJLabel.getHeight());\n try {\n getSignupHelper().createGuestProfile();\n } catch (final OfflineException ox) {\n logger.logError(ox, \"An offline error has occured.\");\n addInputError(getSharedString(\"ErrorOffline\"));\n } catch (final ReservationExpiredException rex) {\n logger.logWarning(rex, \"The username/e-mail reservation has expired.\");\n addInputError(getString(\"ErrorReservationExpired\"));\n } catch (final Throwable t) {\n logger.logFatal(t, \"An unexpected error has occured.\");\n addInputError(getSharedString(\"ErrorUnexpected\"));\n } finally {\n errorMessageJLabel.setText(\" \");\n }\n }", "@Test(priority = 1)\r\n\tpublic void validUserTest() {\t\t\t\r\n\r\n\t\tAdminDashboardPage adminPage=new AdminDashboardPage(driver);\r\n\t\tadminPage.clickUsersTab();\t\r\n\t\t\r\n\t\tUsersListViewPage ulPage=new UsersListViewPage(driver);\r\n\t\tulPage.clickNewUser();\r\n\t\t\r\n\t\tCreateNewUserPage crUserPage=new CreateNewUserPage(driver);\r\n\t\tcrUserPage.enterUserDetails(\"Kathy\",\"pass\",\"Kathy@noreply.com\");\r\n\t\tcrUserPage.clickCreateUser();\t\t\r\n\t\t\r\n\t\tadminPage.clickUsersTab();\r\n\t\tString actUserCreated=ulPage.verifyCreatedUser();\r\n\t\tAssert.assertEquals(actUserCreated,\"Kathy\");\r\n\t\t\r\n\t}", "protected void createAccount(JSONArray args, final CallbackContext callbackContext) {\n\t\tLog.d(TAG, \"CREATEACCOUNT\");\n\t\ttry {\n\t\t\tString email = args.getString(0);\n\t\t\tString password = args.getString(1);\n\t\t\tString userName = null;\n\t\t\tif (args.length() == 3) {\n\t\t\t\tuserName = args.optString(2);\n\t\t\t}\n\t\t\tNotificare.shared().createAccount(email, password, userName, new NotificareCallback<Boolean>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(Boolean result) {\n\t\t\t\t\tif (callbackContext == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tcallbackContext.success();\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onError(NotificareError error) {\n\t\t\t\t\tif (callbackContext == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tcallbackContext.error(error.getLocalizedMessage());\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (JSONException e) {\n\t\t\tcallbackContext.error(\"JSON parse error\");\n\t\t}\n\t}", "int createAccount(Account account);", "public void setupUser() {\n }", "@Test\n\tvoid testCreateAccount() {\n\t\t\n\t\t// Data Object for unregister user\n\t\tUser user = new User(\"Create AccountExample\", \"CreateAccount\", \"CreateAccount@upr.edu\");\n\t\t\n\t\t// Prepare data\n\t\tUserDAO dao = new UserDAO();\n\t\tboolean exist = false;\n\t\t\n\t\ttry {\n\t\t\t// Creating User in DB\n\t\t\tdao.createAccount(user, \"CreateAccountPassword\");\n\t\t\t\n\t\t\t// Boolean confirming if exist\n\t\t\texist = !dao.availabilityUsername(user.getUsername());\n\t\t\t\n\t\t\t// Deleting account\n\t\t\tdao.deleteAccount(user.getUsername());\n\t\t\t\n\t\t} catch (ClassNotFoundException | UnsupportedEncodingException | SQLException | GeneralSecurityException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t// Asserting that the create account works\n\t\tassertTrue(exist);\n\t}", "private void addNewUser() throws Exception, UnitException {\n String firstNameInput = firstName.getText();\n String lastNameInput = lastName.getText();\n String unitInput = unitID.getText();\n String accountInput = accountTypeValue;\n String passwordInput = password.getText();\n User newUserInfo;\n\n // Create user type based on the commandbox input\n switch (accountInput) {\n case \"Employee\":\n newUserInfo = new Employee(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n case \"Lead\":\n newUserInfo = new Lead(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n case \"Admin\":\n newUserInfo = new Admin(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n default:\n throw new IllegalStateException(\"Unexpected value: \" + accountInput);\n }\n\n // Try adding this new user information to the database, if successful will return success prompt\n try {\n Admin.addUserToDatabase(newUserInfo);\n\n // If successful, output message dialog\n String msg = \"New User \" + firstNameInput + \" \" + lastNameInput + \" with UserID \"\n + newUserInfo.returnUserID() + \" successfully created\";\n JOptionPane.showMessageDialog(null, msg);\n\n // Reset Values\n firstName.setText(\"\");\n lastName.setText(\"\");\n unitID.setText(\"\");\n password.setText(\"\");\n } catch (UserException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "private void createAccount(String email, String password) {\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n FirebaseUser user = mAuth.getCurrentUser();\n textViewStatus.setText(\"Signed In\");\n } else {\n // If sign in fails, display a message to the user.\n Toast.makeText(MainActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n textViewStatus.setText(\"Signed Out\");\n }\n\n }\n });\n }", "@Test\n public void createUserTestTest()\n {\n HashMap<String, Object> values = new HashMap<String, Object>();\n values.put(\"age\", \"22\");\n values.put(\"dob\", new Date());\n values.put(\"firstName\", \"CreateFName\");\n values.put(\"lastName\", \"CreateLName\");\n values.put(\"middleName\", \"CreateMName\");\n values.put(\"pasword\", \"user\");\n values.put(\"address\", \"CreateAddress\");\n values.put(\"areacode\", \"CreateAddressLine\");\n values.put(\"city\", \"CreateCity\");\n values.put(\"country\", \"CreateCountry\");\n values.put(\"road\", \"CreateRoad\");\n values.put(\"suberb\", \"CreateSuberb\");\n values.put(\"cell\", \"CreateCell\");\n values.put(\"email\", \"user\");\n values.put(\"homeTell\", \"CreateHomeTell\");\n values.put(\"workTell\", \"CreateWorkTell\");\n createUser.createNewUser(values);\n\n Useraccount useraccount = useraccountCrudService.findById(ObjectId.getCurrentUserAccountId());\n Assert.assertNotNull(useraccount);\n\n Garage garage = garageCrudService.findById(ObjectId.getCurrentGarageId());\n Assert.assertNotNull(garage);\n\n Saleshistory saleshistory = saleshistoryCrudService.findById(ObjectId.getCurrentSalesHistoryId());\n Assert.assertNotNull(saleshistory);\n }", "public void requestAccountCreation(Secretary sec) {\n \n System.out.println(this.iD + \": Requesting account creation from secretary \" + sec.iD);\n sec.addToWaitingListForApproval(this);\n }", "public long registerUserProfile(User user);", "public void create(UserValidator account) {\n Account validated = new Account();\n validated.setUsername(account.getUsername());\n validated.setPassword(passwordEncoder.encode(account.getPassword()));\n validated.setFirstName(account.getFirstName());\n validated.setLastName(account.getLastName());\n validated.getAuthorities().add(\"USER\");\n\n this.accountRepository.save(validated);\n }", "@Transactional\n\t@Override\n\tpublic void createUser(User user) {\n\t\tString token = UUID.randomUUID().toString();\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.add(Calendar.DAY_OF_YEAR, 1);\n\n\t\tuser.setExpiryDate(cal.getTime());\n\t\tuser.setToken(token);\n\t\tAccount account = user.getAccount();\n\t\tRole role = new Role(\"ROLE_CUSTOMER\");\n\t\taccount.setRole(role);\n\t\taccount.setEnabled(false);\n\t\taccountService.createAccount(account);\n\t\tuserRepository.insertUser(user);\n\t\tthis.sendRegistrationToken(user);\n\t}", "public boolean createUser(UserAccountDTO userAccountDTO) {\n boolean userCreated = true;\n userAccountDTO.setPassword((new BCryptPasswordEncoder()).encode(userAccountDTO.getPassword()));\n try {\n userData.insertUserDataAccount(userAccountDTO);\n } catch (Exception e){\n userCreated = false;\n }\n return userCreated;\n }", "public abstract void createAccount(JSONObject account);", "@PrePersist\n void beforeInsert() {\n System.out.println(\"SETTING DEFAULT VALUES FOR USER\");\n emailConfirmed = false;\n deleted = false;\n _2FaEnabled = false;\n verificationToken = VerificationTokenGenerator.generateVerificationToken();\n }", "private void CreateNewAccount(final String phone, final String password, final String name) {\n if (TextUtils.isEmpty(phone)){\n Toast.makeText(this,\"Please enter your phone number ...\",Toast.LENGTH_SHORT).show();\n }\n else if(TextUtils.isEmpty(password)){\n Toast.makeText(this,\"Please enter your phone password ...\",Toast.LENGTH_SHORT).show();\n }\n else if(TextUtils.isEmpty(name)){\n Toast.makeText(this,\"Please enter your phone name ...\",Toast.LENGTH_SHORT).show();\n }\n else{\n //start creating account\n LoadingBar.show();\n\n final DatabaseReference mRef;\n mRef = FirebaseDatabase.getInstance().getReference();\n mRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n if (!(snapshot.child(\"Users\").child(phone).exists())){\n //if user not exist then we create account in database\n HashMap<String,Object> userdata = new HashMap<>();\n userdata.put(\"phone\",phone);\n userdata.put(\"password\",password);\n userdata.put(\"name\",name);\n mRef.child(\"Users\").child(phone).updateChildren(userdata)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()){\n LoadingBar.dismiss();\n Toast.makeText(RegisterActivity.this,\"Registration Successful\",Toast.LENGTH_SHORT).show();\n }\n else{\n LoadingBar.dismiss();\n Toast.makeText(RegisterActivity.this,\"Please try again after sometime ....\",Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n else{\n LoadingBar.dismiss();\n Toast.makeText(RegisterActivity.this,\"User with this number already exist ....\",Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n\n }\n }", "public void createAccount (String email, String password) {\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if (!task.isSuccessful()) {\n Toast.makeText(Login.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(Login.this, \"Registration Successful\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n //Sign in existing users\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n //Log.d(TAG, \"signInWithEmail:onComplete:\" + task.isSuccessful());\n\n // If sign in fails, display a message to the user. If sign in succeeds\n // the auth state listener will be notified and logic to handle the\n // signed in user can be handled in the listener.\n if (!task.isSuccessful()) {\n //Log.w(TAG, \"signInWithEmail\", task.getException());\n Toast.makeText(Login.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }\n });\n }", "private void createUser(String username) {\n if (TextUtils.isEmpty(username)) {\n Toast.makeText(this, \"Username Field Required!\", Toast.LENGTH_SHORT).show();\n return;\n }else {\n FirebaseUser current_user = FirebaseAuth.getInstance().getCurrentUser();\n String userID = current_user.getUid();\n User user = new User(et_username.getText().toString(), et_gender.getText().toString(), \"Newbie\", \"Online\", \"Active\", userID, \"default_url\");\n mRef.child(mAuth.getCurrentUser().getUid()).setValue(user);\n }\n }", "@Override\n\tpublic boolean create(User user) {\n\t\treturn false;\n\t}", "@Test\n public void createUser() {\n Response response = regressionClient.createUser();\n dbAssist.responseValidation(response);\n }", "public void insertUser() {}", "@Test\n\tpublic void testCreateAdminAccountSuccessfully() {\n\t\tassertEquals(2, adminAccountService.getAllAdminAccounts().size());\n\n\t\tString username = \"newUsername\";\n\t\tAdminAccount user = null;\n\t\ttry {\n\t\t\tuser = adminAccountService.createAdminAccount(username, PASSWORD1, NAME1);\n\t\t} catch (InvalidInputException e) {\n\t\t\tfail();\n\t\t}\n\t\tassertNotNull(user);\n\t\tassertEquals(username, user.getUsername());\n\t\tassertEquals(PASSWORD1, user.getPassword());\n\t\tassertEquals(NAME1, user.getName());\n\t}", "CreateUserResult createUser(CreateUserRequest createUserRequest);", "public int createAccount(User user) throws ExistingUserException,\n UnsetPasswordException;", "@Override\n public void onError(FirebaseError firebaseError) {\n Log.d(TAG, \"New user creation Firebase error\");\n }", "HttpStatus createUserAccount(final String realm, final String username, final String firstName,\n\t\t\tfinal String lastName, final String email, final String password);" ]
[ "0.7545858", "0.7292975", "0.7220188", "0.7032148", "0.69873726", "0.696777", "0.6849743", "0.6793763", "0.6720953", "0.66911423", "0.6604397", "0.6583172", "0.6549651", "0.6502066", "0.6495484", "0.6487245", "0.64864165", "0.6483205", "0.64366895", "0.6429921", "0.6405074", "0.6396376", "0.6395318", "0.63938344", "0.6373538", "0.6354486", "0.6332975", "0.6320827", "0.63187975", "0.6295692", "0.6294542", "0.62679803", "0.626464", "0.6258317", "0.62579036", "0.6252715", "0.6246942", "0.6230428", "0.62299055", "0.6227855", "0.6226731", "0.62149537", "0.6211763", "0.62085015", "0.62041885", "0.6187514", "0.6181997", "0.617721", "0.6162504", "0.61596787", "0.6154634", "0.6148135", "0.6147485", "0.61398816", "0.61391836", "0.6128753", "0.6123677", "0.61200756", "0.6119089", "0.61185855", "0.6111157", "0.6079609", "0.6077814", "0.60749334", "0.6074567", "0.6070113", "0.60671175", "0.606058", "0.6046529", "0.6045991", "0.6040902", "0.6035285", "0.60321146", "0.60259193", "0.6017158", "0.6012971", "0.60118526", "0.5988681", "0.59886456", "0.5988577", "0.5987591", "0.5986894", "0.5980276", "0.5971549", "0.5970193", "0.5965269", "0.5961077", "0.5960816", "0.59521383", "0.59491646", "0.59445214", "0.59439313", "0.59401876", "0.5937769", "0.59352237", "0.5934658", "0.59282935", "0.59273964", "0.59271836", "0.59224844", "0.5917337" ]
0.0
-1
/a new version of createNewAccount that also takes in a context
public static Account createNewAccount(String GID, String name, Context activity) { String[] emailParts = GID.split("@"); //Check if this Account is already stored String fileName = name + "_" + emailParts[0] + "_" + emailParts[1]; File f = new File(activity.getFilesDir(), fileName); if(f.exists()) { try { //use buffering FileInputStream fis = activity.openFileInput(fileName); ObjectInputStream ois = new ObjectInputStream(fis); try { Account recoveredAccount = (Account) ois.readObject(); currentAccount = recoveredAccount; return recoveredAccount; } finally { ois.close(); } } catch(ClassNotFoundException ex){ System.out.println("Cannot perform input. Class not found."); return createAndStoreAccount(fileName, GID, name); } catch(IOException ex){ System.out.println("Cannot perform input."); return createAndStoreAccount(fileName, GID, name); } } else { return createAndStoreAccount(fileName, GID, name, activity); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Account create(Context context);", "Account create();", "public void createUserAccount(UserAccount account);", "int createAccount(Account account);", "Account apply(Context context);", "protected void createAccount(JSONArray args, final CallbackContext callbackContext) {\n\t\tLog.d(TAG, \"CREATEACCOUNT\");\n\t\ttry {\n\t\t\tString email = args.getString(0);\n\t\t\tString password = args.getString(1);\n\t\t\tString userName = null;\n\t\t\tif (args.length() == 3) {\n\t\t\t\tuserName = args.optString(2);\n\t\t\t}\n\t\t\tNotificare.shared().createAccount(email, password, userName, new NotificareCallback<Boolean>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(Boolean result) {\n\t\t\t\t\tif (callbackContext == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tcallbackContext.success();\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onError(NotificareError error) {\n\t\t\t\t\tif (callbackContext == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tcallbackContext.error(error.getLocalizedMessage());\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (JSONException e) {\n\t\t\tcallbackContext.error(\"JSON parse error\");\n\t\t}\n\t}", "public abstract void createAccount(JSONObject account);", "private void createNewAccount() {\n\n // if user has not provided valid data, do not create an account and return from method\n if (!validateData()) {\n return;\n }\n\n // If flag value is false, that means email provided by user doesn't exists in database\n // so initialize the loader to create a new account\n if (!mEmailExistsFlag) {\n getLoaderManager().initLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n } else {\n // If flag is true, that means email provided by user already exists in database\n // so restart the loader and allow user to enter new email address for account\n getLoaderManager().restartLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n }\n\n }", "@Override\n\tpublic User createNewUser(Account account) {\n\t\treturn new User(account);\n\t\t\n\t}", "@Override\r\n\tpublic boolean create(Account newAccount) {\n\t\treturn daoref.create(newAccount);\r\n\t}", "public void createAccount() {\n\t\tSystem.out.print(\"Enter Name: \");\n\t\tString name = nameCheck(sc.next());\n\t\tSystem.out.print(\"Enter Mobile No.: \");\n\t\tlong mobNo = mobCheck(sc.nextLong());\n\t\tlong accNo = mobNo - 1234;\n\t\tSystem.out.print(\"Enter Balance: \"); \n\t\tfloat balance = amountCheck(sc.nextFloat());\n\t\tuserBean BeanObjCreateAccountObj = new userBean(accNo, name, mobNo, balance);\n\t\tSystem.out.println(\"Account created with Account Number: \" +accNo);\n\t\tServiceObj.bankAccountCreate(BeanObjCreateAccountObj);\n\t\t\n\t\n\t}", "public static Account CreateSyncAccount(Context context) {\n Account newAccount = new Account(\n ACCOUNT, ACCOUNT_TYPE);\n // Get an instance of the Android account manager\n AccountManager accountManager =\n (AccountManager) context.getSystemService(\n ACCOUNT_SERVICE);\n /*\n * Add the account and account type, no password or user data\n * If successful, return the Account object, otherwise report an error.\n */\n if (accountManager.addAccountExplicitly(newAccount, null, null)) {\n /*\n * If you don't set android:syncable=\"true\" in\n * in your <provider> element in the manifest,\n * then call context.setIsSyncable(account, AUTHORITY, 1)\n * here.\n */\n } else {\n /*\n * The account exists or some other error occurred. Log this, report it,\n * or handle it internally.\n */\n }\n\n return newAccount;\n }", "private void createAccount()\n {\n // check for blank or invalid inputs\n if (Utils.isEmpty(edtFullName))\n {\n edtFullName.setError(\"Please enter your full name.\");\n return;\n }\n\n if (Utils.isEmpty(edtEmail) || !Utils.isValidEmail(edtEmail.getText().toString()))\n {\n edtEmail.setError(\"Please enter a valid email.\");\n return;\n }\n\n if (Utils.isEmpty(edtPassword))\n {\n edtPassword.setError(\"Please enter a valid password.\");\n return;\n }\n\n // check for existing user\n AppDataBase database = AppDataBase.getAppDataBase(this);\n User user = database.userDao().findByEmail(edtEmail.getText().toString());\n\n if (user != null)\n {\n edtEmail.setError(\"Email already registered.\");\n return;\n }\n\n user = new User();\n user.setId(database.userDao().findMaxId() + 1);\n user.setFullName(edtFullName.getText().toString());\n user.setEmail(edtEmail.getText().toString());\n user.setPassword(edtPassword.getText().toString());\n\n database.userDao().insert(user);\n\n Intent intent = new Intent(this, LoginActivity.class);\n intent.putExtra(\"user\", user);\n startActivity(intent);\n }", "public static Account createSyncAccount(Context context) {\n Account newAccount = new Account(\n ACCOUNT, ACCOUNT_TYPE);\n // Get an instance of the Android account manager\n AccountManager accountManager =\n (AccountManager) context.getSystemService(\n ACCOUNT_SERVICE);\n /*\n * Add the account and account type, no password or user data\n * If successful, return the Account object, otherwise report an error.\n */\n if (accountManager.addAccountExplicitly(newAccount, null, null)) {\n /*\n * If you don't set android:syncable=\"true\" in\n * in your <provider> element in the manifest,\n * then call context.setIsSyncable(account, AUTHORITY, 1)\n * here.\n */\n } else {\n /*\n * The account exists or some other error occurred. Log this, report it,\n * or handle it internally.\n */\n }\n return newAccount;\n }", "@POST\r\n @Path(\"/create\")\r\n @Consumes(MediaType.APPLICATION_FORM_URLENCODED)\r\n @Produces(MediaType.APPLICATION_JSON)\r\n public NewAccount createNewCustomerAccount(@FormParam(\"accountNumber\") int accountNumber,\r\n @FormParam(\"accountType\") String accountType,\r\n @FormParam(\"accountBalance\") double accountBalance\r\n ){\r\n return newaccountservice.createNewAccount(accountNumber, accountType, accountBalance);\r\n }", "UserAccount createUserAccount(User user, double amount);", "public Account createAccount(Account account){\n\t\t\n\t\taccount.createdDate = new Date();\n\t\taccount.isActive = true;\n\t\t\n\t\t\n\t\taccount.person = personService.createPerson(account.person);\n\t\taccount.person.personSettings = personalSettingsService.createSettings(account.person.personSettings);\n\t\t\n\t\t\n\t\treturn account;\n\t}", "GenerateUserAccount () {\r\n }", "WithCreate withProperties(AccountProperties properties);", "@Override\n\tpublic Account createAccount(Account account) {\n\t\tif(account != null) {\n\t\t\taccountList.add(account);\n\t\t\treturn account;\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public static Account createSyncAccount(Context context) {\n // Create the account type and default account\n Account newAccount = new Account(Constants.ACCOUNT, context.getResources().getString(R.string.sync_account_type));\n // Get an instance of the Android account manager\n AccountManager accountManager = (AccountManager) context.getSystemService(ACCOUNT_SERVICE);\n\n if (accountManager.addAccountExplicitly(newAccount, null, null)) {\n ContentResolver.setIsSyncable(newAccount, context.getResources().getString(R.string.content_authority), 1);\n ContentResolver.setSyncAutomatically(newAccount, context.getResources().getString(R.string.content_authority), true);\n //Set periodic sync duration in seconds\n ContentResolver.addPeriodicSync(newAccount, context.getResources().getString(R.string.content_authority), new Bundle(), Constants.SYNC_FREQUENCY);\n if (INFO_LOG) {\n Log.i(\"BDCloudUtils-createSyncAccount\", \"Sync Account added = \" + newAccount);\n }\n } else {\n if (ERROR_LOG) {\n Log.wtf(\"BDCloudUtils-createSyncAccount\", \"Error creating sync account\");\n }\n }\n\n return newAccount;\n }", "public abstract void createAccount(final GDataAccount account)\n throws ServiceException;", "@Override\n\tpublic String createAccount() {\n\t\treturn \"Created Saving Account Sucessfully\";\n\t}", "String addAccount(UserInfo userInfo);", "@Override\r\n\tpublic boolean createAccount(Account account) {\n\t\treturn dao.createAccount(account);\r\n\t}", "public void createAccount(){\n System.out.println(\"vi skal starte \");\n }", "@TargetApi(Build.VERSION_CODES.FROYO)\n public static void createSyncAccount(Context context) {\n boolean newAccount = false;\n boolean setupComplete = PreferenceManager\n .getDefaultSharedPreferences(context).getBoolean(PREF_SETUP_COMPLETE, false);\n\n // Create account, if it's missing. (Either first run, or user has deleted account.)\n Account account = acccountBuilder(context);\n AccountManager accountManager = (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE);\n if (accountManager.addAccountExplicitly(account, null, null)) {\n // Inform the system that this account supports sync\n ContentResolver.setIsSyncable(account, CONTENT_AUTHORITY, 1);\n // Inform the system that this account is eligible for auto sync when the network is up\n ContentResolver.setSyncAutomatically(account, CONTENT_AUTHORITY, true);\n // Recommend a schedule for automatic synchronization. The system may modify this based\n // on other scheduled syncs and network utilization.\n ContentResolver.addPeriodicSync(account, CONTENT_AUTHORITY, new Bundle(), SYNC_FREQUENCY);\n newAccount = true;\n }\n\n if (newAccount) {\n AccountUtils.setActiveAccount(context, account.name);\n }\n\n // Schedule an initial sync if we detect problems with either our account or our local\n // data has been deleted. (Note that it's possible to clear app data WITHOUT affecting\n // the account list, so wee need to check both.)\n if (newAccount || !setupComplete) {\n requestManualSync(account);\n PreferenceManager.getDefaultSharedPreferences(context).edit()\n .putBoolean(PREF_SETUP_COMPLETE, true).commit();\n }\n }", "AionAddress createAccount(String password);", "public void createAccount() {\n System.out.println(\"Would you like to create a savings or checking account?\");\n String AccountRequest = input.next().toLowerCase().trim();\n createAccount(AccountRequest);\n\n }", "@POST\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.TEXT_PLAIN)\n public Response createAccount(\n AccountModel input, @Context HttpServletResponse response) {\n if (input.getEmail() == null || input.getEmail().equals(\"\") || input.getPassword() == null || input.getPassword().isEmpty()\n || input.getUserName() == null || input.getUserName().isEmpty()) {\n return Response.status(Response.Status.BAD_REQUEST).build();\n }\n Customer customer = new Customer();\n customer.setEmail(input.getEmail());\n customer.setPassword(input.getPassword());\n customer.setUserName(input.getUserName());\n String sendToken = TokenUtil.getToken(input.getEmail(), input.getPassword());\n customer.setToken(sendToken);\n Long id = customerRef.save(customer);\n if (id != null || id > 0) {\n response.setHeader(\"AuthHeader\", sendToken);\n return Response.status(Response.Status.CREATED).build();\n }\n return Response.status(Response.Status.NOT_IMPLEMENTED).build();\n\n }", "public static JSONObject createAccount(Context context, String firstName, String lastName, String email, String password) {\n\t\ttry {\n\t\t\tfirstName = URLEncoder.encode(firstName, \"UTF-8\");\n\t\t\tlastName = URLEncoder.encode(lastName, \"UTF-8\");\n\t\t\temail = URLEncoder.encode(email, \"UTF-8\");\n\t\t\tpassword = URLEncoder.encode(password, \"UTF-8\");\n\t\t\tString response = makeAPICall(context, \"createuser.php?first_name=\" + firstName + \"&last_name=\" + lastName + \"&email=\" + email + \"&password=\" + password);\n\t\t\treturn new JSONObject(response);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n\tpublic String createUserAccountQuery(String username, String password, String firstName, String lastName,\n\t\t\tString dob, String accountType, String accountID, String creationDate, String requestDate,\n\t\t\tString phoneNumber, String email, boolean isApproved) {\n\t\treturn null;\n\t}", "public Account createAccount(Account newAccount, Integer userId){\n if(!userRepository.existsById(userId))\n return null;\n\n List<Account> ownersAccounts = getAllAccountsFromUser(userId);\n\n // User already has two accounts, a user is allowed to have only one current account and one savings account.\n if(ownersAccounts.size() == 1) {\n Account ownersAccount = ownersAccounts.get(0);\n // User already has a current account\n if(ownersAccount.getAccountType() == Account.AccountTypeEnum.CURRENT && newAccount.getAccountType() == Account.AccountTypeEnum.CURRENT)\n return null;\n // User already has a savings account\n else if(ownersAccount.getAccountType() == Account.AccountTypeEnum.SAVINGS && newAccount.getAccountType() == Account.AccountTypeEnum.SAVINGS)\n return null;\n }\n if(!(newAccount.getAccountType() == Account.AccountTypeEnum.CURRENT || newAccount.getAccountType() == Account.AccountTypeEnum.SAVINGS))\n return null;\n\n // User does not already have an account with the same accounttype, he is allowed to make another account.\n newAccount.setIban(createIban());\n newAccount.setOwner(userId);\n\n bankAccount.addAmountToBankBalance(newAccount.getBalance());\n accountRepository.save(newAccount);\n return newAccount;\n\n }", "public Account createAccount() {\n\t\t\n\t\tAccountBuilder builder = new AccountBuilder();\n\t\tUserRole role = new UserRole();\n\t\trole.setUsername(getUsername());\n\t\trole.setRole(\"ROLE_USER\");\n\t\t\n\t\t//builds the account entity using the front end POJO\n\t\tbuilder\n\t\t\t.withUsername(getUsername())\n\t\t\t.withPassword(getPassword())\n\t\t\t.withLastName(getLastName())\n\t\t\t.withFirstName(getFirstName())\n\t\t\t.withRole(role)\n\t\t\t.withStatus(AccountStatus.ACTIVE)\n\t\t\t.withEmail(getEmail())\n\t\t\t.withStoreCd(getStoreCd());\n\t\t\n return builder.build();\n\t}", "public static void requestNewAccount(String uid){\n accountManager.requestNewAccount(uid);\n }", "@Override\n public void createNewAccount(String accountType) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.create_container, new CreateAccount().newInstance(accountType)).commit();\n }", "public SignUpProcess(Context context1) {\n this.context = context1;\n\n }", "Account() { }", "public Account createAccount(String accountId) throws LedgerException {\n // Check uniqueness of 'accountId'\n if (getExistingAccount(accountId) != null) {\n throw new LedgerException(\n \"create account\",\n String.format(\"The account '%s' already exists.\", accountId)\n );\n }\n\n // The accountId is unique, so create new account\n Account newAccount = new Account(accountId);\n\n // Update currentBlock with new account\n this.currentBlock.addAccount(newAccount);\n return newAccount;\n }", "public void addAccount(Account account,Person person);", "public void create(UserValidator account) {\n Account validated = new Account();\n validated.setUsername(account.getUsername());\n validated.setPassword(passwordEncoder.encode(account.getPassword()));\n validated.setFirstName(account.getFirstName());\n validated.setLastName(account.getLastName());\n validated.getAuthorities().add(\"USER\");\n\n this.accountRepository.save(validated);\n }", "public static Account getSyncAccount(Context context) {\n // Get an instance of the Android account manager\n AccountManager accountManager =\n (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE);\n\n // Create the account type and default account\n Account newAccount = new Account(\n context.getString(R.string.app_name), context.getString(R.string.sync_account_type));\n\n // If the password doesn't exist, the account doesn't exist\n if ( null == accountManager.getPassword(newAccount) ) {\n\n /*\n * Add the account and account type, no password or user data\n * If successful, return the Account object, otherwise report an error.\n */\n if (!accountManager.addAccountExplicitly(newAccount, \"\", null)) {\n return null;\n }\n\n onAccountCreated(newAccount, context);\n }\n return newAccount;\n }", "@Test\n\tpublic void createAccount() {\t\n\t\t\n\t\tRediffOR.setCreateAccoutLinkClick();\n\t\tRediffOR.getFullNameTextField().sendKeys(\"Kim Smith\");\n\t\tRediffOR.getEmailIDTextField().sendKeys(\"Kim Smith\");\n\t\t\t\t\t\n\t\t\n\t}", "public int createAccount(User user) throws ExistingUserException,\n UnsetPasswordException;", "private void createAccount() {\n mAuth.createUserWithEmailAndPassword(mTextEmail.getText().toString(), mTextPassword.getText().toString()).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n\n if(!task.isSuccessful()){\n Toast.makeText(SignInActivity.this, \"Account creation failed!\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(SignInActivity.this, \"Account creation success!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "interface WithCreate\n extends DefinitionStages.WithLocation,\n DefinitionStages.WithTags,\n DefinitionStages.WithKind,\n DefinitionStages.WithSku,\n DefinitionStages.WithIdentity,\n DefinitionStages.WithProperties {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n Account create();\n\n /**\n * Executes the create request.\n *\n * @param context The context to associate with this operation.\n * @return the created resource.\n */\n Account create(Context context);\n }", "private static void onAccountCreated(Account newAccount, Context context) {\n MovieSyncAdapter.configurePeriodicSync(context, SYNC_INTERVAL, SYNC_FLEXTIME);\n\n /*\n * Without calling setSyncAutomatically, our periodic sync will not be enabled.\n */\n ContentResolver.setSyncAutomatically(newAccount, context.getString(R.string.content_authority), true);\n\n /*\n * Finally, let's do a sync to get things started\n */\n syncImmediately(context);\n }", "public static ATMAccount createAccount() {\r\n\t\tString userName;\r\n\t\tdouble userBalance;\r\n\t\tint digit = -1;\r\n\r\n\t\tSystem.out.println(\"Please enter a name for the account: \");\r\n\t\tuserInput.nextLine();\r\n\t\tuserName = userInput.nextLine();\r\n\r\n\t\t//Requests digits 1 by 1 for the pin number\r\n\t\tString accPin = \"\";\r\n\t\tfor (int i = 1; i < 5; i++) {\r\n\t\t\tdigit = -1;\r\n\t\t\tSystem.out.println(\"Please enter digit #\" + i + \" of\" + \"your pin.\");\r\n\t\t\tdo {\r\n\t\t\t\tdigit = userInput.nextInt();\r\n\t\t\t} while (digit < 0 || digit > 9);\r\n\t\t\taccPin += digit;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Please put the amount of money you would like to \" + \"initially deposit into the account: \");\r\n\t\tuserBalance = userInput.nextDouble();\r\n\t\tRandom accountIDGenerator = new Random();\r\n\t\tint userID = accountIDGenerator.nextInt(2147483647);\r\n\t\tATMAccount account = new ATMAccount(userID, userName, Integer.parseInt(accPin), userBalance);\r\n\t\tSystem.out.println(\"Acount Information: \\n\"+account.toString());\r\n\t\treturn account;\r\n\t}", "HttpStatus createUserAccount(final String realm, final String username, final String firstName,\n\t\t\tfinal String lastName, final String email, final String password);", "public LandingPage registerNewAccount(){\n\t\taction.WaitForWebElement(linkRegisterNewAccount)\n\t\t\t .Click(linkRegisterNewAccount);\n\t\treturn this;\n\t}", "private String newQi4jAccount()\n throws UnitOfWorkCompletionException\n {\n UnitOfWork work = unitOfWorkFactory.newUnitOfWork();\n EntityBuilder<AccountComposite> entityBuilder = work.newEntityBuilder( AccountComposite.class );\n AccountComposite accountComposite = entityBuilder.instance();\n accountComposite.name().set( ACCOUNT_NAME );\n accountComposite = entityBuilder.newInstance();\n String accoutnIdentity = accountComposite.identity().get();\n work.complete();\n\n return accoutnIdentity;\n }", "private Account createAccount(byte[] address) {\n return new Account(address);\n }", "private static void onAccountCreated(Account newAccount, Context context) {\n ScoreSyncAdapter.configurePeriodicSync(context);\n /*\n * Without calling setSyncAutomatically, our periodic sync will not be enabled.\n */\n ContentResolver.setSyncAutomatically(newAccount, context.getString(R.string.content_authority), true);\n\n /*\n * Finally, let's do a sync to get things started\n */\n syncImmediately(context);\n }", "@Override\r\n\tpublic boolean createAccount(Account account) throws Exception {\n\t\tboolean flag = false;\r\n\t\ttry {\r\n\t\t\tflag = this.dao.createAccount(account);\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow e;\r\n\t\t}finally {\r\n\t\t\tthis.dbc.close();\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "BankAccount(String accountType){\n\t\tSystem.out.println(\"NEW ACCOUNT: \" + accountType);\n\t\tthis.accountType = accountType; \n\t}", "private static void onAccountCreated(Account newAccount, Context context) {\n MovieSyncAdapter.configurePeriodicSync(context, SYNC_INTERVAL, SYNC_INTERVAL/2);\n ContentResolver.setSyncAutomatically(newAccount, context.getString(R.string.content_authority), true);\n syncNextPage(context, true);\n }", "public UserAuthToken createUser(CreateUserRequest request);", "public CreateInstanceAccountResponse CreateInstanceAccount(CreateInstanceAccountRequest req) throws TencentCloudSDKException{\n JsonResponseModel<CreateInstanceAccountResponse> rsp = null;\n try {\n Type type = new TypeToken<JsonResponseModel<CreateInstanceAccountResponse>>() {\n }.getType();\n rsp = gson.fromJson(this.internalRequest(req, \"CreateInstanceAccount\"), type);\n } catch (JsonSyntaxException e) {\n throw new TencentCloudSDKException(e.getMessage());\n }\n return rsp.response;\n }", "@Override\n public Item create(Context context, WorkspaceItem workspaceItem) throws SQLException, AuthorizeException\n {\n if(workspaceItem.getItem() != null)\n {\n throw new IllegalArgumentException(\"Attempting to create an item for a workspace item that already contains an item\");\n }\n\n Item item = createItem(context);\n workspaceItem.setItem(item);\n return item;\n }", "Context createContext();", "Context createContext();", "public void AddToAccountInfo();", "private static Context createContext(final Context context)\r\n throws EscidocException, InternalClientException, TransportException, MalformedURLException {\r\n \t\r\n \t// prepare client object\r\n \tAuthentication auth = new Authentication(new URL(Constants.DEFAULT_SERVICE_URL), Constants.USER_NAME_SYSADMIN, Constants.USER_PASSWORD_SYSADMIN);\r\n \tContextHandlerClient chc = new ContextHandlerClient(auth.getServiceAddress());\r\n \tchc.setHandle(auth.getHandle());\r\n\r\n Context createdContext = chc.create(context);\r\n\r\n return createdContext;\r\n }", "private void createAccount(String username, String passphrase, String email) {\n\tif (!AccountManager.getUniqueInstance().candidateUsernameExists(username)) {\n\t try {\n\t\tAccountManager.getUniqueInstance().createCandidateAccount(username, \n\t\t\t\t\t\t\t\t\t passphrase, \n\t\t\t\t\t\t\t\t\t email);\n\t } catch (Exception e) {\n\t\tthrow new RuntimeException(\"creation failed\");\n\t }\n\t} else {\n\t throw new RuntimeException(\"username already exists\");\n\t}\n }", "private void createEmailAndPasswordAccount(String email, String password){\n\n if(!checkForInvalidInput()) return;\n\n // Copied from Firebase documentation\n Log.d(\"CreateAccount\", \"In create method\");\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n FirebaseUser user = mAuth.getCurrentUser();\n\n if(user == null){\n Log.d(TAG, \"User is null?\");\n }\n\n else if(isStudent){\n createLocalStudentUserData(user);\n onCreateSuccessStudent();\n }\n\n else if(isTeacher){\n createLocalTeacherUserData(user);\n onCreateSuccessTeacher();\n }\n\n else{\n Log.d(TAG, \"A problem has occurred in choosing between creating a teacher or student\");\n }\n\n\n } else {\n Log.d(TAG, \"Creating the user account was not successful\");\n Toast.makeText(getApplicationContext(),\n \"Account creation unsuccessful. Perhaps one already exists with this email\",\n Toast.LENGTH_LONG).show();\n }\n\n }\n });\n\n }", "private void createPassenger() {\n account = new Account(\"driver\", \"password\", \"driver@uclive.ac.nz\",\n \"Dan\", \"20 Howard Street\", 1234567, 64278182123L);\n }", "public void openAccount(Account a) {}", "public void createUser(User user);", "@Override\n public boolean createAccount(String fullName, String username, String password, String email){\n // will change this if we make some errors.\n if(!usernameToPerson.containsKey(username)) { // check that there is not someone with that username\n Organizer og = new Organizer(fullName, username, password, email);\n updateUsernameToPerson(og.getUsername(), og); // see below\n idToPerson.put(og.getID(), og);\n return true;\n }\n\n return false;\n\n }", "public void createAccountOnClick(View v){\n\n String email = emailTextView.getText().toString();\n String password = passwordTextView.getText().toString();\n createEmailAndPasswordAccount(email, password);\n\n }", "CreateUserResult createUser(CreateUserRequest createUserRequest);", "Document createAccount(String username, String accountDisplayName,\n String accountFullName, double balance, double interestRate);", "public void addAccount(Person p, Account a);", "@PostMapping(\"/account/create\")\n @PreAuthorize(\"hasRole('USER') or hasRole('ADMIN')\")\n\tpublic ResponseEntity createAccount(\n\t \t @AuthenticationPrincipal UserDetailsImpl userDetail\n\t ){\n\t\t\tAccount account = new Account(userDetail.getId());\n\t\t\t// save the account to the database\n\t\t\tAccount createdAccount = accountRepository.save(account);\n\t \t // response\n\t return ResponseEntity.ok(\n\t \t\tcreatedAccount\n\t );\n\t }", "private void addAccount(Account account)\n\t {\n\t\t if(accountExists(account)) return;\n\t\t \n\t\t ContentValues values = new ContentValues();\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_USERNAME, account.getUsername());\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_BALANCE, account.getBalance());\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_AUTH_TOKEN, account.getAuthenticationToken());\n\t\t \n\t\t db.insert(DatabaseContract.AccountContract.TABLE_NAME,\n\t\t\t\t null,\n\t\t\t\t values);\n\t\t \n\t }", "private void CreateUserAccount(final String lname, String lemail, String lpassword, final String lphone, final String laddress, final String groupid, final String grouppass ){\n mAuth.createUserWithEmailAndPassword(lemail,lpassword).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n //account creation successful\n showMessage(\"Account Created\");\n //after user account created we need to update profile other information\n updateUserInfo(lname, pickedImgUri,lphone, laddress, groupid, grouppass, mAuth.getCurrentUser());\n }\n else{\n //account creation failed\n showMessage(\"Account creation failed\" + task.getException().getMessage());\n regBtn.setVisibility(View.VISIBLE);\n loadingProgress.setVisibility(View.INVISIBLE);\n\n }\n }\n });\n }", "@RequestMapping(value = \"/addAccount\", method = RequestMethod.POST)\n public AccountCredentials addAccount(@RequestBody AccountCredentials acc) {\n accDB.save(acc);\n\n return acc;\n }", "AccountModel add(AccountModel account) throws AccountException;", "public static Account getSyncAccount(Context context) {\n // Get an instance of the Android account manager\n AccountManager accountManager = (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE);\n\n // Create the account type and default account\n Account newAccount = new Account(context.getString(R.string.app_name), BuildConfig.ACCOUNT_TYPE);\n\n // If the password doesn't exist, the account doesn't exist\n if (null == accountManager.getPassword(newAccount)) {\n\n /*\n * Add the account and account type, no password or user data\n * If successful, return the Account object, otherwise report an error.\n */\n if (!accountManager.addAccountExplicitly(newAccount, \"\", null)) {\n return null;\n }\n /*\n * If you don't set android:syncable=\"true\" in\n * in your <provider> element in the manifest,\n * then call ContentResolver.setIsSyncable(account, AUTHORITY, 1)\n * here.\n */\n\n onAccountCreated(newAccount, context);\n }\n return newAccount;\n }", "@Test\n @Order(4)\n void create_account_2() {\n Account empty = service.createAccount(client.getId());\n Assertions.assertEquals(client.getId(), empty.getClientId());\n Assertions.assertNotEquals(-1, empty.getId());\n Assertions.assertEquals(0, empty.getAmount());\n client.addAccount(empty);\n }", "public void create(HandlerContext context, Management request, Management response) {\n\t\t// TODO Auto-generated method stub\n\n\t}", "public static void createAccount(String name, String address, String contactNum, String userId, String password, float initDeposit) {\n\t\tcustomerList.add(new Customer(name, address, contactNum, new SavingsAccount(userId, password, initDeposit)));\n\t}", "private Account createAccount8() {\n Account account = new Account(\"123456008\", \"Jean Sans Enfant\",\n new SimpleDate(4, 23, 1976).asDate(), \"jse@qui.fr\", true, false, new CreditCard(\"4320123412340008\"));\n\n return account;\n }", "public interface AccountFactory {\n Account create();\n}", "public CoinbaseAccount createCoinbaseAccount(String name) throws IOException {\n\n class Payload {\n @JsonProperty\n String name;\n Payload(String name) {\n this.name = name;\n }\n }\n \n Payload payload = new Payload(name);\n\n String path = \"/v2/accounts\";\n String apiKey = exchange.getExchangeSpecification().getApiKey();\n BigDecimal timestamp = coinbase.getTime(Coinbase.CB_VERSION_VALUE).getData().getEpoch();\n String body = new ObjectMapper().writeValueAsString(payload);\n String signature = getSignature(timestamp, HttpMethod.POST, path, body);\n showCurl(HttpMethod.POST, apiKey, timestamp, signature, path, body);\n \n return coinbase.createAccount(MediaType.APPLICATION_JSON, Coinbase.CB_VERSION_VALUE, apiKey, signature, timestamp, payload).getData();\n }", "CloudCredentialStatus create(@Nonnull AuthenticatedContext authenticatedContext);", "@RolesAllowed(\"bankAdmin\")\n public Long createAccount(\n AccountDetails details,\n Long customerId)\n throws IllegalAccountTypeException, CustomerNotFoundException,\n InvalidParameterException {\n // makes a new account and enters it into db,\n Account account = null;\n Customer customer = null;\n\n Debug.print(\"AccountControllerBean createAccount\");\n\n if (details.getType() == null) {\n throw new InvalidParameterException(\"null type\");\n } else if (details.getDescription() == null) {\n throw new InvalidParameterException(\"null description\");\n } else if (details.getBeginBalanceTimeStamp() == null) {\n throw new InvalidParameterException(\"null beginBalanceTimeStamp\");\n } else if (customerId == null) {\n throw new InvalidParameterException(\"null customerId\");\n }\n\n try {\n customer = em.find(\n Customer.class,\n new Long(customerId));\n\n if (customer == null) {\n throw new CustomerNotFoundException();\n }\n } catch (Exception ex) {\n throw new EJBException(ex);\n }\n\n try {\n account = new Account(\n details.getType(),\n details.getDescription(),\n details.getBalance(),\n details.getCreditLine(),\n details.getBeginBalance(),\n details.getBeginBalanceTimeStamp());\n em.persist(account);\n account.addCustomer(customer);\n } catch (Exception ex) {\n throw new EJBException(ex);\n }\n\n return account.getId();\n }", "private void createAccount(String email, String password) {\n if (!validateForm()) {\n return;\n }\n\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (!task.isSuccessful()) {\n Toast.makeText(MainActivity.this, \"Unable to creat Account\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "@Override\n\tpublic void createAccount(String username, Bank bank) {\n\t\ttry {\n\t\tAccount newAccount = new Account(username, bank.getBankID(), bank.getNumOfAccounts()+1);\n\t\tbank.setNumOfAccounts(bank.getNumOfAccounts()+1);\n\t\taddAccount(bank, newAccount);\n\t\t}catch(NullPointerException e) {\n\t\t\tSystem.out.println(\"Could not find bank\");\n\t\t}\n\t\t\n\t}", "public static Account getSyncAccount(Context context) {\n AccountManager accountManager =\n (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE);\n\n // Create the account type and default account\n Account newAccount = new Account(\n context.getString(R.string.app_name), context.getString(R.string.sync_account_type));\n\n // If the password doesn't exist, the account doesn't exist\n if (null == accountManager.getPassword(newAccount)) {\n\n /*\n * Add the account and account type, no password or user data\n * If successful, return the Account object, otherwise report an error.\n */\n if (!accountManager.addAccountExplicitly(newAccount, \"\", null)) {\n return null;\n }\n /*\n * If you don't set android:syncable=\"true\" in\n * in your <provider> element in the manifest,\n * then call ContentResolver.setIsSyncable(account, AUTHORITY, 1)\n * here.\n */\n\n onAccountCreated(newAccount, context);\n }\n\n return newAccount;\n }", "@Override\n public void onClick(View v) {\n CreateAccount();\n }", "public static Account getSyncAccount(Context context) {\n // Get an instance of the Android account manager\n AccountManager accountManager =\n (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE);\n\n // Create the account type and default account\n Account newAccount = new Account(\n context.getString(R.string.app_name), context.getString(R.string.sync_account_type));\n\n // If the password doesn't exist, the account doesn't exist\n if (null == accountManager.getPassword(newAccount)) {\n\n /*\n * Add the account and account type, no password or user data\n * If successful, return the Account object, otherwise report an error.\n */\n if (!accountManager.addAccountExplicitly(newAccount, \"\", null)) {\n return null;\n }\n /*\n * If you don't set android:syncable=\"true\" in\n * in your <provider> element in the manifest,\n * then call ContentResolver.setIsSyncable(account, AUTHORITY, 1)\n * here.\n */\n\n onAccountCreated(newAccount, context);\n }\n return newAccount;\n }", "public void addAccount(String user, String password);", "void addNewAccountToFile(Account newAccount);", "public String createAccount(Account account){\n try {\n List<Account> accounts = new ArrayList<>();\n\n if(!accountsFile.createNewFile()){\n accounts = mapper.readValue(accountsFile, new TypeReference<ArrayList<Account>>(){});\n }\n List<Account> customerAccounts = getAccountsForUSer(accounts, account.getCustomerName());\n if(!customerAccounts.stream().anyMatch(a -> a.getAccountName().equals(account.getAccountName()))){\n accounts.add(account);\n mapper.writerWithDefaultPrettyPrinter().writeValue(accountsFile, accounts);\n } else {\n return messageService.accountAlreadyExist(account.getCustomerName(), account.getAccountName());\n }\n } catch (Exception e) {\n return messageService.unexpectedError(e);\n }\n return messageService.accountCreated(account.getAccountName(), account.getCustomerName());\n }", "@Override\n public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType, String[] requiredFeatures, Bundle options) throws NetworkErrorException {\n Log.d(LOG_TAG, \"addAccount() for account type: \" + accountType + \", authToketType=\" + authTokenType + \", requiredFeatures: \" + requiredFeatures);\n\n final Intent intent = new Intent(mContext, AuthenticatorActivity.class);\n intent.putExtra(AuthenticatorActivity.ARG_ACCOUNT_TYPE, accountType);\n intent.putExtra(AuthenticatorActivity.ARG_AUTH_TYPE, authTokenType);\n intent.putExtra(AuthenticatorActivity.ARG_IS_ADDING_NEW_ACCOUNT, true);\n intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);\n\n final Bundle bundle = new Bundle();\n bundle.putParcelable(AccountManager.KEY_INTENT, intent);\n return bundle;\n }", "@Override\n\tpublic void createAccount(Account p) {\n\t\t\n\t\ttry {\n\t\t\tConnection con = conUtil.getConnection();\n\t\t\t//To use our functions/procedure we need to turn off autocommit\n\t\t\tcon.setAutoCommit(false);\n\t\t\t\n\t\t\tString deleteFromTable = \"DELETE FROM accounts WHERE owner_id='8'\";\n\t try (Connection conn = conUtil.getConnection();\n\t PreparedStatement pstmt = conn.prepareStatement(deleteFromTable)) {\n\n\t // set the corresponding param\n\t pstmt.setInt(1, p.getOwner_id());\n\t // execute the delete statement\n\t pstmt.executeUpdate();\n\n\t } catch (SQLException e) {\n\t System.out.println(e.getMessage());\n\t }\n\t\t\t\n\t\t\tString sql = \"insert into accounts( owner_id, balance ) values (?,?)\";\n\t\t\tCallableStatement cs = con.prepareCall(sql);\n\t\t\t\n\t\t\tcs.setInt(1, p.getOwner_id());\n\t\t\tcs.setDouble(2, p.getBalance());\n\t\t\t\n\t\t\tcs.execute();\n\t\t\t\n\t\t\tcon.setAutoCommit(true);\n\t\t\t\n\t\t} catch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "Account apply();", "@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n if (CREATE_USER_REQUEST_CODE == requestCode && RESULT_OK == resultCode){\n if (data != null) {\n String username = data.getStringExtra(UserCreationActivity.BUNDLE_NEW_USER_NAME);\n\n User user = new User(username, User.EMPTY_CASE, User.EMPTY_CASE);\n\n createUser(user);\n }\n }\n }", "public Account createAccount(String login, String name, String surname, String city, String street, int number) throws Exception {\r\n\t\tif (login==null || login.equals(\"\")) throw(new Exception(\"Nazwa konta nie moze byc pusta\"));\r\n\t\tif (findAccount(login)!=null) throw(new Exception(\"Konto juz istnieje\"));\r\n\t\tAccount newAccount = new Account(login, name, surname, city, street, number);\r\n\t\tlistOfAccounts.add( newAccount );\r\n\t\treturn newAccount;\r\n\t}" ]
[ "0.84921134", "0.73173654", "0.73173517", "0.7025672", "0.6866081", "0.68165004", "0.6775884", "0.6727009", "0.65657145", "0.65221524", "0.6503195", "0.649265", "0.64337707", "0.6424692", "0.63511366", "0.6351025", "0.6274128", "0.62732303", "0.62541246", "0.625186", "0.6233899", "0.6229065", "0.6207616", "0.6190746", "0.61568236", "0.61399645", "0.6123086", "0.60960907", "0.6089852", "0.6060737", "0.60536605", "0.60424775", "0.60344076", "0.60305035", "0.60127056", "0.5980809", "0.5944725", "0.59065086", "0.5898254", "0.5890574", "0.5868428", "0.58617604", "0.5842962", "0.58428377", "0.5828779", "0.58239245", "0.5822834", "0.5820287", "0.5819342", "0.5812066", "0.5801698", "0.57985544", "0.5763763", "0.57536525", "0.5748259", "0.5746172", "0.5741658", "0.5708671", "0.56967413", "0.56934226", "0.56934226", "0.569307", "0.5692193", "0.5686928", "0.5683207", "0.56796896", "0.5677022", "0.5670437", "0.5662048", "0.56527936", "0.56419843", "0.5634349", "0.5631136", "0.56269044", "0.5617087", "0.5612822", "0.5611624", "0.56108344", "0.5601929", "0.5596519", "0.5594993", "0.55927974", "0.5591915", "0.55877274", "0.5567374", "0.5559444", "0.5558876", "0.5556951", "0.5542605", "0.5538617", "0.5532282", "0.5530022", "0.5503896", "0.550382", "0.55026984", "0.55014277", "0.54967606", "0.5495873", "0.5480817", "0.5473751" ]
0.5852751
42
/updated createNewAccount helper which takes in the activity
private static Account createAndStoreAccount(String fileName, String GID, String name, Context activity) { Account newAccount = new Account(GID, name); Account.currentAccount = newAccount; try { //use buffering FileOutputStream fos = activity.openFileOutput(fileName, Context.MODE_PRIVATE); ObjectOutputStream oos = new ObjectOutputStream(fos); oos.writeObject(newAccount); try { oos.writeObject(newAccount); } finally { oos.close(); } } catch(IOException ex){ System.out.println("Cannot perform output."); } return newAccount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Account create(Context context);", "private void createAccount()\n {\n // check for blank or invalid inputs\n if (Utils.isEmpty(edtFullName))\n {\n edtFullName.setError(\"Please enter your full name.\");\n return;\n }\n\n if (Utils.isEmpty(edtEmail) || !Utils.isValidEmail(edtEmail.getText().toString()))\n {\n edtEmail.setError(\"Please enter a valid email.\");\n return;\n }\n\n if (Utils.isEmpty(edtPassword))\n {\n edtPassword.setError(\"Please enter a valid password.\");\n return;\n }\n\n // check for existing user\n AppDataBase database = AppDataBase.getAppDataBase(this);\n User user = database.userDao().findByEmail(edtEmail.getText().toString());\n\n if (user != null)\n {\n edtEmail.setError(\"Email already registered.\");\n return;\n }\n\n user = new User();\n user.setId(database.userDao().findMaxId() + 1);\n user.setFullName(edtFullName.getText().toString());\n user.setEmail(edtEmail.getText().toString());\n user.setPassword(edtPassword.getText().toString());\n\n database.userDao().insert(user);\n\n Intent intent = new Intent(this, LoginActivity.class);\n intent.putExtra(\"user\", user);\n startActivity(intent);\n }", "public void createUserAccount(UserAccount account);", "private void createNewAccount() {\n\n // if user has not provided valid data, do not create an account and return from method\n if (!validateData()) {\n return;\n }\n\n // If flag value is false, that means email provided by user doesn't exists in database\n // so initialize the loader to create a new account\n if (!mEmailExistsFlag) {\n getLoaderManager().initLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n } else {\n // If flag is true, that means email provided by user already exists in database\n // so restart the loader and allow user to enter new email address for account\n getLoaderManager().restartLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n }\n\n }", "public abstract void createAccount(JSONObject account);", "@Override\n public void onClick(View v) {\n CreateAccount();\n }", "public void openCreateAccount(){\n Intent intent = new Intent(this, createAccountActivity.class);\n startActivity(intent);\n }", "public void createAccount(View view) {\n Intent intent = new Intent(this, UserAccountCreateActivity.class);\n startActivity(intent);\n }", "public void createAccountOnClick(View v){\n\n String email = emailTextView.getText().toString();\n String password = passwordTextView.getText().toString();\n createEmailAndPasswordAccount(email, password);\n\n }", "public void createAccount(View v)\n {\n Intent intent=new Intent(LoginActivity.this,SignUpActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n Phone = RegisterPhone.getText().toString();\n Password = RegisterPassword.getText().toString();\n Name = RegisterName.getText().toString();\n\n\n CreateNewAccount(Phone,Password,Name);\n }", "private void createAccountActivity() {\n // everything is converted to string\n String userName = createUserName.getText().toString().trim();\n String phoneNumber = createPhoneNumber.getText().toString().trim();\n String email = createEmail.getText().toString().trim();\n String password = createPassword.getText().toString().trim();\n\n\n // Validate that the entry should not be empty\n if (userName.isEmpty()) {\n createUserName.setError(\"It should not be empty. \");\n createUserName.requestFocus();\n return;\n }\n if (phoneNumber.isEmpty()) {\n createPhoneNumber.setError(\"It should not be empty. \");\n createPhoneNumber.requestFocus();\n return;\n }\n if (email.isEmpty()) {\n createEmail.setError(\"It should not be empty. \");\n createEmail.requestFocus();\n return;\n } else if (!Patterns.EMAIL_ADDRESS.matcher(email).matches()) {\n createEmail.setError(\"Invalid email\");\n createEmail.requestFocus();\n return;\n }\n\n if (password.isEmpty()) {\n createPassword.setError(\"It should not be empty. \");\n createPassword.requestFocus();\n return;\n }\n\n // connect to the firebase\n auth.createUserWithEmailAndPassword(email, password).addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n String userID = FirebaseAuth.getInstance().getCurrentUser().getUid();\n User user = new User(userName, phoneNumber, email, password, userID);\n // We will send everything in user to the firebase database\n FirebaseDatabase.getInstance()\n .getReference(\"User\")\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n .setValue(user).addOnCompleteListener(task1 -> {\n if (task1.isSuccessful()) {\n Toast.makeText(RegisterUser.this, \"The account has been created successfully. \", Toast.LENGTH_LONG).show();\n finish(); //basically same as clicking back button\n } else {\n Toast.makeText(RegisterUser.this, \"The account creation failed!\", Toast.LENGTH_LONG).show();\n }\n });\n } else {\n Toast.makeText(RegisterUser.this, \"The account creation failed!\", Toast.LENGTH_LONG).show();\n }\n });\n }", "Account create();", "int createAccount(Account account);", "@Override\n public void createNewAccount(String accountType) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.create_container, new CreateAccount().newInstance(accountType)).commit();\n }", "@Override\n\tpublic String createAccount() {\n\t\treturn \"Created Saving Account Sucessfully\";\n\t}", "public void createAccount(){\n System.out.println(\"vi skal starte \");\n }", "public void createAccount() {\n\t\tSystem.out.print(\"Enter Name: \");\n\t\tString name = nameCheck(sc.next());\n\t\tSystem.out.print(\"Enter Mobile No.: \");\n\t\tlong mobNo = mobCheck(sc.nextLong());\n\t\tlong accNo = mobNo - 1234;\n\t\tSystem.out.print(\"Enter Balance: \"); \n\t\tfloat balance = amountCheck(sc.nextFloat());\n\t\tuserBean BeanObjCreateAccountObj = new userBean(accNo, name, mobNo, balance);\n\t\tSystem.out.println(\"Account created with Account Number: \" +accNo);\n\t\tServiceObj.bankAccountCreate(BeanObjCreateAccountObj);\n\t\t\n\t\n\t}", "public void CreateAccount(View view)\n {\n Toast.makeText(getApplicationContext(), \"Redirecting...\", \n Toast.LENGTH_SHORT).show();\n Intent i = new Intent(LoginView.this, Page_CreateAccount.class);\n startActivity(i);\n }", "public void createAccount() {\n System.out.println(\"Would you like to create a savings or checking account?\");\n String AccountRequest = input.next().toLowerCase().trim();\n createAccount(AccountRequest);\n\n }", "public void createActivity(Activity activity) {\n\t\t\n\t}", "NewAccountPage openNewAccountPage();", "private void createAccount() {\n mAuth.createUserWithEmailAndPassword(mTextEmail.getText().toString(), mTextPassword.getText().toString()).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n\n if(!task.isSuccessful()){\n Toast.makeText(SignInActivity.this, \"Account creation failed!\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(SignInActivity.this, \"Account creation success!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "private void CreateUserAccount(final String lname, String lemail, String lpassword, final String lphone, final String laddress, final String groupid, final String grouppass ){\n mAuth.createUserWithEmailAndPassword(lemail,lpassword).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n //account creation successful\n showMessage(\"Account Created\");\n //after user account created we need to update profile other information\n updateUserInfo(lname, pickedImgUri,lphone, laddress, groupid, grouppass, mAuth.getCurrentUser());\n }\n else{\n //account creation failed\n showMessage(\"Account creation failed\" + task.getException().getMessage());\n regBtn.setVisibility(View.VISIBLE);\n loadingProgress.setVisibility(View.INVISIBLE);\n\n }\n }\n });\n }", "protected void createAccount(JSONArray args, final CallbackContext callbackContext) {\n\t\tLog.d(TAG, \"CREATEACCOUNT\");\n\t\ttry {\n\t\t\tString email = args.getString(0);\n\t\t\tString password = args.getString(1);\n\t\t\tString userName = null;\n\t\t\tif (args.length() == 3) {\n\t\t\t\tuserName = args.optString(2);\n\t\t\t}\n\t\t\tNotificare.shared().createAccount(email, password, userName, new NotificareCallback<Boolean>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(Boolean result) {\n\t\t\t\t\tif (callbackContext == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tcallbackContext.success();\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onError(NotificareError error) {\n\t\t\t\t\tif (callbackContext == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tcallbackContext.error(error.getLocalizedMessage());\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (JSONException e) {\n\t\t\tcallbackContext.error(\"JSON parse error\");\n\t\t}\n\t}", "public void createAccount(View view) {\n String action = \"\";\n Intent dashboard = new Intent(this, RescueDashboard.class);\n\n //if the user is editing their profile, they do not have to replace their image.\n\n if (bitmap == null && !edit) {\n action = \"Please select a photo.\\n\";\n }\n\n\n name = nameView.getText().toString().trim();\n if (name.equals(\"\")) {\n action += \"Please enter your organization's name.\\n\";\n }\n street = streetView.getText().toString().trim();\n if (street.equals(\"\")) {\n action += \"Please enter the street address of your organization.\\n\";\n }\n city = cityView.getText().toString().trim();\n if (city.equals(\"\")) {\n action += \"Please enter the city in which your organization is located.\\n\";\n }\n zip = zipView.getText().toString().trim();\n\n state = stateView.getText().toString().trim();\n if (state.equals(\"\")) {\n action += \"Please enter the state in which your organization is located.\\n\";\n }\n email = emailView.getText().toString().trim();\n\n if (!isValid(email)) {\n action += \"The email address entered is not in a valid format.\\n\";\n }\n if (!zip.matches(\"[0-9]+\") | zip.length() < 5) {\n action += \"Zip code is invalid! Be sure to enter only numbers.\\n\";\n\n }\n username = usernameView.getText().toString().trim();\n if (username.equals(\"\")) {\n action += \"Please enter a username.\\n\";\n }\n\n password = passwordView.getText().toString().trim();\n confirmPassword = password2.getText().toString().trim();\n\n if (password.equals(\"\") && !edit) {\n action += \"Please enter a password\\n\";\n } else if (!password.equals(confirmPassword)) {\n action += \"Passwords do not match. Please enter them again.\\n\";\n passwordView.setText(\"\");\n password2.setText(\"\");\n }\n\n //if something was input incorrectly, display a toast with what it was\n\n if (!action.equals(\"\")) {\n Toast t = Toast.makeText(this, action.trim(),\n Toast.LENGTH_SHORT);\n t.setGravity(Gravity.TOP, Gravity.CENTER, 150);\n t.show();\n } else {\n //update the Adopter profile if the user is editing\n\n if (edit) {\n Rescue r = Rescue.currentRescue;\n if (uploadedPhoto) {\n r.setPhoto(bitmap);\n //picView.setImageBitmap(bitmap);\n }\n r.setOrganization(name);\n r.setState(state);\n r.setStreet(street);\n r.setZip(zip);\n r.setEmail(email);\n r.setCity(city);\n\n //DatabaseReference ref= FirebaseDatabase.getInstance().getReference().child(\"rescue\").child(r.getRescueID());\n\n Map<String, Object> updates = new HashMap<>();\n\n String path = addPhotoToFirebase();\n String newPath = r.getImage();\n if (path != null) {\n newPath = path;\n }\n\n\n updates.put(\"city\", city);\n updates.put(\"email\", email);\n updates.put(\"image\", newPath);\n updates.put(\"organization\", name);\n updates.put(\"state\", state);\n updates.put(\"street\", street);\n updates.put(\"zip\", zip);//etc\n\n MainActivity.firestore\n .collection(\"rescue\")\n .document(r.getRescueID())\n .update(updates);\n if (!Account.getMD5(password).equals(Account.currentAccount.getPassword()) && !password.equals(\"\") && password.equals(confirmPassword)) {\n MainActivity.firestore\n .collection(\"account\")\n .document(r.getUsername())\n .update(\"password\", Account.getMD5(password));\n }\n Toast t = Toast.makeText(this, \"Rescue profile updated!\",\n Toast.LENGTH_SHORT);\n\n t.setGravity(Gravity.TOP, Gravity.CENTER, 150);\n t.show();\n startActivity(dashboard);\n finish();\n\n\n // ref.updateChildren(updates);\n// if(!password.equals(\"\")) {\n// r.setPassword(password);\n// }\n }\n //create a new adopter profile\n\n else {\n\n MainActivity.firestore.collection(\"account\").whereEqualTo(\"username\", username).get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n if (task.isSuccessful()) {\n if (task.getResult().isEmpty()) {\n addAccount();\n Intent dashboard = new Intent(getApplicationContext(), RescueDashboard.class);\n startActivity(dashboard);\n finish();\n\n\n } else {\n showToast(true);\n\n }\n\n } else {\n showToast(false);\n }\n }\n\n\n });\n\n\n }\n\n\n }\n\n\n }", "public void AddToAccountInfo();", "public static Account createNewAccount(String GID, String name, Context activity) {\r\n\t\t\r\n\t\tString[] emailParts = GID.split(\"@\"); \r\n\t\t\r\n\t\t//Check if this Account is already stored\r\n\t\tString fileName = name + \"_\" + emailParts[0] + \"_\" + emailParts[1]; \r\n\t\t\r\n\t\tFile f = new File(activity.getFilesDir(), fileName);\r\n\t\t\r\n\t\tif(f.exists()) {\r\n\t\t try {\r\n\t\t //use buffering\r\n\t\t FileInputStream fis = activity.openFileInput(fileName);\r\n\t\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tAccount recoveredAccount = (Account) ois.readObject();\r\n\t\t\t\t\tcurrentAccount = recoveredAccount;\r\n\t\t\t return recoveredAccount;\r\n\t\t\t\t}\r\n\t\t finally {\r\n\t\t \tois.close();\r\n\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t catch(ClassNotFoundException ex){\r\n\t\t \tSystem.out.println(\"Cannot perform input. Class not found.\");\r\n\t\t \treturn createAndStoreAccount(fileName, GID, name);\r\n\t\t }\r\n\t\t catch(IOException ex){\r\n\t\t System.out.println(\"Cannot perform input.\");\r\n\t\t return createAndStoreAccount(fileName, GID, name);\r\n\t\t }\r\n\t\t \r\n\t\t} else {\r\n\t\t\treturn createAndStoreAccount(fileName, GID, name, activity);\r\n\t\t}\r\n\t}", "@Test\n\tpublic void createAccount() {\t\n\t\t\n\t\tRediffOR.setCreateAccoutLinkClick();\n\t\tRediffOR.getFullNameTextField().sendKeys(\"Kim Smith\");\n\t\tRediffOR.getEmailIDTextField().sendKeys(\"Kim Smith\");\n\t\t\t\t\t\n\t\t\n\t}", "public void onCreateAccountPressed(View view) {\n\n\n mUserName = mEditTextUsernameCreate.getText().toString();\n mUserEmail = mEditTextEmailCreate.getText().toString().toLowerCase();\n mPassword = mEditTextPasswordCreate.getText().toString();\n\n /**\n * Check that email and user name are okay\n */\n boolean validEmail = isEmailValid(mUserEmail);\n boolean validUserName = isUserNameValid(mUserName);\n boolean validPassword = isPasswordValid(mPassword);\n if (!validEmail || !validUserName || !validPassword) return;\n /**\n * If everything was valid show the progress dialog to indicate that\n * account creation has started\n */\n mAuthProgressDialog.show();\n\n\n // [START create_user_with_email]\n mAuth.createUserWithEmailAndPassword(mUserEmail, mPassword)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(LOG_TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n\n // If sign in fails, display a message to the user. If sign in succeeds\n // the auth state listener will be notified and logic to handle the\n // signed in user can be handled in the listener.\n if (!task.isSuccessful()) {\n Toast.makeText(CreateAccountActivity.this, R.string.auth_failed,\n Toast.LENGTH_SHORT).show();//error message\n //showErrorToast(\"createUserWithEmail : \"+task.isSuccessful());\n }\n\n // [START_EXCLUDE]\n mAuthProgressDialog.dismiss();\n Intent intent = new Intent(CreateAccountActivity.this, LoginActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n finish();\n // [END_EXCLUDE]\n //end\n }\n });\n // [END create_user_with_email]\n\n\n\n /**\n * Create new user with specified email and password\n */\n /*mFirebaseRef.createUser(mUserEmail, mPassword, new Firebase.ValueResultHandler<Map<String, Object>>() {\n @Override\n public void onSuccess(Map<String, Object> result) {\n Dismiss the progress dialog\n mAuthProgressDialog.dismiss();\n Log.i(LOG_TAG, getString(R.string.log_message_auth_successful));\n }\n\n @Override\n public void onError(FirebaseError firebaseError) {\n *//* Error occurred, log the error and dismiss the progress dialog *//*\n Log.d(LOG_TAG, getString(R.string.log_error_occurred) +\n firebaseError);\n mAuthProgressDialog.dismiss();\n *//* Display the appropriate error message *//*\n if (firebaseError.getCode() == FirebaseError.EMAIL_TAKEN) {\n mEditTextEmailCreate.setError(getString(R.string.error_email_taken));\n } else {\n showErrorToast(firebaseError.getMessage());\n }\n\n }\n });*/\n }", "String addAccount(UserInfo userInfo);", "public void goToCreate(View view) {\n Intent intent = new Intent(this, CreateAccountActivity.class);\n startActivity(intent);\n }", "public void openAccount(Account a) {}", "public void onClickcreateUserSignup(View view){\n\n String newName = ((EditText)findViewById(R.id.createUserUsername)).getText().toString();\n if(!newName.equals(\"\")) {\n Account.getInstance().setName(newName);\n\n SharedPreferences settings = getSharedPreferences(Utils.ACCOUNT_PREFS, 0);\n SharedPreferences.Editor editor = settings.edit();\n editor.putString(\"accountName\", newName);\n editor.commit();\n\n startActivity(new Intent(this, MainActivity.class));\n }\n }", "private void toCreateAcc() {\n Intent intent = new Intent(this, WelcomeActivity.class);\n startActivity(intent);\n }", "GenerateUserAccount () {\r\n }", "public void success() {\n Toast.makeText(ui.getApplicationContext(),\"Account successfully created!\",Toast.LENGTH_SHORT).show();\n }", "public void Create(View view) {\n disableButton = findViewById(R.id.newAccountButton);\n disableButton.setEnabled(false);\n username = ((EditText)findViewById(R.id.createName)).getText().toString();\n password = ((EditText)findViewById(R.id.createPassword)).getText().toString();\n String password2 = ((EditText)findViewById(R.id.recreatePassword)).getText().toString();\n if (username.length() == 0 || password.length() == 0) {\n Toast.makeText(this, \"Fill in all boxes\", Toast.LENGTH_SHORT).show();\n disableButton.setEnabled(true);\n } else if (!password.equals(password2)) {\n Toast.makeText(this, \"passwords must be the same\", Toast.LENGTH_SHORT).show();\n disableButton.setEnabled(true);\n } else {\n PostuserHelper helper = new PostuserHelper(username, password, getApplicationContext(),\n NewaccountActivity.this);\n }\n }", "public LandingPage registerNewAccount(){\n\t\taction.WaitForWebElement(linkRegisterNewAccount)\n\t\t\t .Click(linkRegisterNewAccount);\n\t\treturn this;\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n if (CREATE_USER_REQUEST_CODE == requestCode && RESULT_OK == resultCode){\n if (data != null) {\n String username = data.getStringExtra(UserCreationActivity.BUNDLE_NEW_USER_NAME);\n\n User user = new User(username, User.EMPTY_CASE, User.EMPTY_CASE);\n\n createUser(user);\n }\n }\n }", "@Override\r\n\tpublic boolean createAccount(Account account) {\n\t\treturn dao.createAccount(account);\r\n\t}", "void addAccount(Accounts account) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_NAME, account.getName());\n values.put(KEY_PASSWORD, account.getPassword());\n values.put(KEY_PH_NO, account.getPhoneNumber());\n values.put(KEY_EMAIL, account.getEmail());\n\n // Inserting Row\n db.insert(TABLE_ACCOUNTS, null, values);\n //2nd argument is String containing nullColumnHack\n db.close(); // Closing database connection\n }", "public void createAccount() {\n\t\t// Assigns variables based on user input\n\t\tString username = usernameField.getText();\n\t\tString firstName = firstNameField.getText();\n\t\tString lastName = lastNameField.getText();\n\t\tString address = addressField.getText();\n\t\tString postCode = postcodeField.getText();\n\t\tString phoneNumber = phoneNumberField.getText();\n\t\tlong phoneNumberLong;\n\t\tif (username.isEmpty() || firstName.isEmpty() || lastName.isEmpty() || address.isEmpty() || postCode.isEmpty()\n\t\t\t\t|| phoneNumber.isEmpty()) { // Checks if number is correct format\n\n\t\t\tAlert alert = new Alert(AlertType.ERROR); // Error message\n\t\t\talert.setTitle(\"Error\");\n\n\t\t\talert.setHeaderText(\"Could not create an user\");\n\t\t\talert.setContentText(\"Make sure you fill all fields and press button again\");\n\t\t\talert.showAndWait();\n\n\t\t\treturn;\n\t\t}\n\n\t\telse {\n\t\t\ttry {\n\t\t\t\tphoneNumberLong = Long.parseLong(phoneNumber);\n\t\t\t} catch (Exception e) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\n\t\t\t\talert.setHeaderText(\"Wrong format of phone number\");\n\t\t\t\talert.setContentText(\"Please enter correct phone number\");\n\t\t\t\talert.showAndWait();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif(FileReader.exists(username)) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\n\t\t\t\talert.setHeaderText(\"User with the username \"+ username +\" already exists. \");\n\t\t\t\talert.setContentText(\"Please choose another username\");\n\t\t\t\talert.showAndWait();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tString userdata = \"\";\n\t\t\tuserdata += \"\\n Username: \" + username;\n\t\t\tuserdata += \"\\n First name: \" + firstName;\n\t\t\tuserdata += \"\\n Last name: \" + lastName;\n\t\t\tuserdata += \"\\n Address: \" + address;\n\t\t\tuserdata += \"\\n Post code: \" + postCode;\n\t\t\tuserdata += \"\\n Phone number: \" + phoneNumberLong;\n\t\t\t\n\n\t\t\tif(custom) {\n\t\t\t\tavatarIndex = 101;\n\t\t\t\t// Gives users the custom avatar\n\t\t\t\tFile file1 = new File(\"artworkImages/\" + username);\n\t\t\t\tfile1.mkdir();\n\t\t\t\tPath path = Paths.get(\"customAvatars/\" + username + \".png\");\n\t\t\t\tString path1 = \"tmpImg.png\";\n\t\t\t\tFile file = new File(path1);\n\n\t\t\t\ttry {\n\t\t\t\t\tFiles.copy(file.toPath(), path, StandardCopyOption.REPLACE_EXISTING);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tUser user = new User(username, firstName, lastName, address, postCode, phoneNumberLong, avatarIndex);\n\t\t\tFileReader.addUser(user); // Creates user\n\n\t\t\ttry {\n\t\t\t\tWriter.writeUserFile(user); // Adds user to memory\n\t\t\t} catch (IOException e) {\n\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\n\t\t\tAlert alert = new Alert(AlertType.INFORMATION); // Success message\n\t\t\talert.setTitle(\"Success\");\n\n\t\t\talert.setHeaderText(\"The user has been created\");\n\t\t\talert.setContentText(\"Close this window to return to login screen\");\n\t\t\talert.showAndWait();\n\n\t\t\tcreateAccountButton.getScene().getWindow().hide();\n\t\t}\n\n\t}", "public Account createAccount(Account account){\n\t\t\n\t\taccount.createdDate = new Date();\n\t\taccount.isActive = true;\n\t\t\n\t\t\n\t\taccount.person = personService.createPerson(account.person);\n\t\taccount.person.personSettings = personalSettingsService.createSettings(account.person.personSettings);\n\t\t\n\t\t\n\t\treturn account;\n\t}", "@Override\r\n\tpublic boolean create(Account newAccount) {\n\t\treturn daoref.create(newAccount);\r\n\t}", "private void createNewUser() {\n ContentValues contentValues = new ContentValues();\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.GENDER, getSelectedGender());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.PIN, edtConfirmPin.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.LAST_NAME, edtLastName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.FIRST_NAME, edtFirstName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.STATUS, spnStatus.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.DATE_OF_BIRTH, edtDateOfBirth.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.BLOOD_GROUP, spnBloodGroup.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.IS_DELETED, \"N\");\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.MOBILE_NUMBER, edtMobileNumber.getText().toString());\n contentValues.put(DataBaseConstants.Constants_TBL_CATEGORIES.CREATE_DATE, Utils.getCurrentDateTime(Utils.DD_MM_YYYY));\n\n dataBaseHelper.saveToLocalTable(DataBaseConstants.TableNames.TBL_PATIENTS, contentValues);\n context.startActivity(new Intent(CreatePinActivity.this, LoginActivity.class));\n }", "@Override\n\tpublic String createUserAccountQuery(String username, String password, String firstName, String lastName,\n\t\t\tString dob, String accountType, String accountID, String creationDate, String requestDate,\n\t\t\tString phoneNumber, String email, boolean isApproved) {\n\t\treturn null;\n\t}", "public static void requestNewAccount(String uid){\n accountManager.requestNewAccount(uid);\n }", "@Override\n\tpublic Account createAccount(Account account) {\n\t\tif(account != null) {\n\t\t\taccountList.add(account);\n\t\t\treturn account;\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "@POST\r\n @Path(\"/create\")\r\n @Consumes(MediaType.APPLICATION_FORM_URLENCODED)\r\n @Produces(MediaType.APPLICATION_JSON)\r\n public NewAccount createNewCustomerAccount(@FormParam(\"accountNumber\") int accountNumber,\r\n @FormParam(\"accountType\") String accountType,\r\n @FormParam(\"accountBalance\") double accountBalance\r\n ){\r\n return newaccountservice.createNewAccount(accountNumber, accountType, accountBalance);\r\n }", "public abstract void createAccount(final GDataAccount account)\n throws ServiceException;", "public void addAccount(Account account,Person person);", "@Override\n public void onRegisterSuccessful(final int accountId) {\n mRegisterNowBtn.setEnabled(false);\n Toast.makeText(this, \"Registration Successful\", Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(this, LoaderActivity.class);\n intent.putExtra(IntentExtraKeys.ACCOUNT_ID, accountId);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n finish();\n }", "private static void onAccountCreated(Account newAccount, Context context) {\n MovieSyncAdapter.configurePeriodicSync(context, SYNC_INTERVAL, SYNC_INTERVAL/2);\n ContentResolver.setSyncAutomatically(newAccount, context.getString(R.string.content_authority), true);\n syncNextPage(context, true);\n }", "void createCustomerAccount(String mobileNumber) throws Exception;", "private void addAccount(Account account)\n\t {\n\t\t if(accountExists(account)) return;\n\t\t \n\t\t ContentValues values = new ContentValues();\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_USERNAME, account.getUsername());\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_BALANCE, account.getBalance());\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_AUTH_TOKEN, account.getAuthenticationToken());\n\t\t \n\t\t db.insert(DatabaseContract.AccountContract.TABLE_NAME,\n\t\t\t\t null,\n\t\t\t\t values);\n\t\t \n\t }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tgoToAddAccount = new Intent(SettingActivity.this,\n\t\t\t\t\t\tAddAccountActivity.class);\n\t\t\t\tSettingActivity.this.startActivity(goToAddAccount);\n\t\t\t\t\n\t\t\t}", "public void create(UserValidator account) {\n Account validated = new Account();\n validated.setUsername(account.getUsername());\n validated.setPassword(passwordEncoder.encode(account.getPassword()));\n validated.setFirstName(account.getFirstName());\n validated.setLastName(account.getLastName());\n validated.getAuthorities().add(\"USER\");\n\n this.accountRepository.save(validated);\n }", "public static Account CreateSyncAccount(Context context) {\n Account newAccount = new Account(\n ACCOUNT, ACCOUNT_TYPE);\n // Get an instance of the Android account manager\n AccountManager accountManager =\n (AccountManager) context.getSystemService(\n ACCOUNT_SERVICE);\n /*\n * Add the account and account type, no password or user data\n * If successful, return the Account object, otherwise report an error.\n */\n if (accountManager.addAccountExplicitly(newAccount, null, null)) {\n /*\n * If you don't set android:syncable=\"true\" in\n * in your <provider> element in the manifest,\n * then call context.setIsSyncable(account, AUTHORITY, 1)\n * here.\n */\n } else {\n /*\n * The account exists or some other error occurred. Log this, report it,\n * or handle it internally.\n */\n }\n\n return newAccount;\n }", "@Override\n\tpublic User createNewUser(Account account) {\n\t\treturn new User(account);\n\t\t\n\t}", "@Override\n public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType, String[] requiredFeatures, Bundle options) throws NetworkErrorException {\n Log.d(LOG_TAG, \"addAccount() for account type: \" + accountType + \", authToketType=\" + authTokenType + \", requiredFeatures: \" + requiredFeatures);\n\n final Intent intent = new Intent(mContext, AuthenticatorActivity.class);\n intent.putExtra(AuthenticatorActivity.ARG_ACCOUNT_TYPE, accountType);\n intent.putExtra(AuthenticatorActivity.ARG_AUTH_TYPE, authTokenType);\n intent.putExtra(AuthenticatorActivity.ARG_IS_ADDING_NEW_ACCOUNT, true);\n intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);\n\n final Bundle bundle = new Bundle();\n bundle.putParcelable(AccountManager.KEY_INTENT, intent);\n return bundle;\n }", "public static Account createSyncAccount(Context context) {\n Account newAccount = new Account(\n ACCOUNT, ACCOUNT_TYPE);\n // Get an instance of the Android account manager\n AccountManager accountManager =\n (AccountManager) context.getSystemService(\n ACCOUNT_SERVICE);\n /*\n * Add the account and account type, no password or user data\n * If successful, return the Account object, otherwise report an error.\n */\n if (accountManager.addAccountExplicitly(newAccount, null, null)) {\n /*\n * If you don't set android:syncable=\"true\" in\n * in your <provider> element in the manifest,\n * then call context.setIsSyncable(account, AUTHORITY, 1)\n * here.\n */\n } else {\n /*\n * The account exists or some other error occurred. Log this, report it,\n * or handle it internally.\n */\n }\n return newAccount;\n }", "private void createAccount(String email, String password) {\n if (!validateForm()) {\n return;\n }\n\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (!task.isSuccessful()) {\n Toast.makeText(MainActivity.this, \"Unable to creat Account\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "UserAccount createUserAccount(User user, double amount);", "private static void onAccountCreated(Account newAccount, Context context) {\n MovieSyncAdapter.configurePeriodicSync(context, SYNC_INTERVAL, SYNC_FLEXTIME);\n\n /*\n * Without calling setSyncAutomatically, our periodic sync will not be enabled.\n */\n ContentResolver.setSyncAutomatically(newAccount, context.getString(R.string.content_authority), true);\n\n /*\n * Finally, let's do a sync to get things started\n */\n syncImmediately(context);\n }", "public void saveAccount() {\n\n }", "public CreateInstanceAccountResponse CreateInstanceAccount(CreateInstanceAccountRequest req) throws TencentCloudSDKException{\n JsonResponseModel<CreateInstanceAccountResponse> rsp = null;\n try {\n Type type = new TypeToken<JsonResponseModel<CreateInstanceAccountResponse>>() {\n }.getType();\n rsp = gson.fromJson(this.internalRequest(req, \"CreateInstanceAccount\"), type);\n } catch (JsonSyntaxException e) {\n throw new TencentCloudSDKException(e.getMessage());\n }\n return rsp.response;\n }", "public AccountPresenter(AccountActivity activity) {\n\t\tsuper(activity);\n\t\tthis.activity = activity;\n\t}", "Account apply(Context context);", "@Test\n public void whenAccountCreationSucceeds() throws Exception {\n Mockito.when(view.getName()).thenReturn(USERNAME);\n Mockito.when(view.getEmail()).thenReturn(VALID_EMAIL);\n Mockito.when(view.getPassword()).thenReturn(VALID_PASSWORD);\n Mockito.when(view.getPasswordConfirmation()).thenReturn(VALID_PASSWORD);\n\n presenter.onCreateAccountClick();\n\n Mockito.verify(view).startProfilePageActivity();\n }", "@Override\n public void performNextStep(String type) {\n FirebaseUser mUser = FirebaseAuth.getInstance().getCurrentUser();\n\n // validate for null to make sure we are logged in\n if (mUser != null) {\n\n // depending on the type of account that was just created, perform the next step\n switch (type) {\n case \"tenant\":\n // send the new tenant to the verification screen to attach their UserID to their TenantID\n FragmentTransaction tenantVerification = getSupportFragmentManager().beginTransaction();\n tenantVerification.replace(R.id.create_container, new VerifyTenantFragment()).commit();\n break;\n case \"staff\":\n // send the new tenant to the verification screen to attach their UserID to their TenantID\n FragmentTransaction staffVerification = getSupportFragmentManager().beginTransaction();\n staffVerification.replace(R.id.create_container, new VerifyStaffFragment()).commit();\n break;\n case \"manager\":\n // send the new manager to the company creation screen\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.create_container, new NewCompanyCreation()).commit();\n break;\n }\n }\n }", "@Override\n public void onAccountCreationResponse(boolean success) {\n if (success){\n startMainActivity();\n finish();\n } else {\n Toast.makeText(LoginActivity.this, \"Parse Account Creation failed.\", Toast.LENGTH_LONG).show();\n }\n }", "public String createAccount(Account account){\n try {\n List<Account> accounts = new ArrayList<>();\n\n if(!accountsFile.createNewFile()){\n accounts = mapper.readValue(accountsFile, new TypeReference<ArrayList<Account>>(){});\n }\n List<Account> customerAccounts = getAccountsForUSer(accounts, account.getCustomerName());\n if(!customerAccounts.stream().anyMatch(a -> a.getAccountName().equals(account.getAccountName()))){\n accounts.add(account);\n mapper.writerWithDefaultPrettyPrinter().writeValue(accountsFile, accounts);\n } else {\n return messageService.accountAlreadyExist(account.getCustomerName(), account.getAccountName());\n }\n } catch (Exception e) {\n return messageService.unexpectedError(e);\n }\n return messageService.accountCreated(account.getAccountName(), account.getCustomerName());\n }", "private void createPassenger() {\n account = new Account(\"driver\", \"password\", \"driver@uclive.ac.nz\",\n \"Dan\", \"20 Howard Street\", 1234567, 64278182123L);\n }", "BankAccount(String accountType){\n\t\tSystem.out.println(\"NEW ACCOUNT: \" + accountType);\n\t\tthis.accountType = accountType; \n\t}", "private static void onAccountCreated(Account newAccount, Context context) {\n ScoreSyncAdapter.configurePeriodicSync(context);\n /*\n * Without calling setSyncAutomatically, our periodic sync will not be enabled.\n */\n ContentResolver.setSyncAutomatically(newAccount, context.getString(R.string.content_authority), true);\n\n /*\n * Finally, let's do a sync to get things started\n */\n syncImmediately(context);\n }", "@TargetApi(Build.VERSION_CODES.FROYO)\n public static void createSyncAccount(Context context) {\n boolean newAccount = false;\n boolean setupComplete = PreferenceManager\n .getDefaultSharedPreferences(context).getBoolean(PREF_SETUP_COMPLETE, false);\n\n // Create account, if it's missing. (Either first run, or user has deleted account.)\n Account account = acccountBuilder(context);\n AccountManager accountManager = (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE);\n if (accountManager.addAccountExplicitly(account, null, null)) {\n // Inform the system that this account supports sync\n ContentResolver.setIsSyncable(account, CONTENT_AUTHORITY, 1);\n // Inform the system that this account is eligible for auto sync when the network is up\n ContentResolver.setSyncAutomatically(account, CONTENT_AUTHORITY, true);\n // Recommend a schedule for automatic synchronization. The system may modify this based\n // on other scheduled syncs and network utilization.\n ContentResolver.addPeriodicSync(account, CONTENT_AUTHORITY, new Bundle(), SYNC_FREQUENCY);\n newAccount = true;\n }\n\n if (newAccount) {\n AccountUtils.setActiveAccount(context, account.name);\n }\n\n // Schedule an initial sync if we detect problems with either our account or our local\n // data has been deleted. (Note that it's possible to clear app data WITHOUT affecting\n // the account list, so wee need to check both.)\n if (newAccount || !setupComplete) {\n requestManualSync(account);\n PreferenceManager.getDefaultSharedPreferences(context).edit()\n .putBoolean(PREF_SETUP_COMPLETE, true).commit();\n }\n }", "public void onClick(DialogInterface dialog, int which) {\n\n Intent nextScreen2 = new Intent(getApplicationContext(), CreateAccount.class);\n System.out.println(\"IN ALRT\");\n System.out.println(login);\n nextScreen2.putExtra(\"login\", login);\n nextScreen2.putExtra(\"password1\", password);\n nextScreen2.putExtra(\"password2\", password2);\n nextScreen2.putExtra(\"email\", email);\n nextScreen2.putExtra(\"birth_date\", dob);\n\n\n startActivityForResult(nextScreen2, 0);\n\n }", "public static ATMAccount createAccount() {\r\n\t\tString userName;\r\n\t\tdouble userBalance;\r\n\t\tint digit = -1;\r\n\r\n\t\tSystem.out.println(\"Please enter a name for the account: \");\r\n\t\tuserInput.nextLine();\r\n\t\tuserName = userInput.nextLine();\r\n\r\n\t\t//Requests digits 1 by 1 for the pin number\r\n\t\tString accPin = \"\";\r\n\t\tfor (int i = 1; i < 5; i++) {\r\n\t\t\tdigit = -1;\r\n\t\t\tSystem.out.println(\"Please enter digit #\" + i + \" of\" + \"your pin.\");\r\n\t\t\tdo {\r\n\t\t\t\tdigit = userInput.nextInt();\r\n\t\t\t} while (digit < 0 || digit > 9);\r\n\t\t\taccPin += digit;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Please put the amount of money you would like to \" + \"initially deposit into the account: \");\r\n\t\tuserBalance = userInput.nextDouble();\r\n\t\tRandom accountIDGenerator = new Random();\r\n\t\tint userID = accountIDGenerator.nextInt(2147483647);\r\n\t\tATMAccount account = new ATMAccount(userID, userName, Integer.parseInt(accPin), userBalance);\r\n\t\tSystem.out.println(\"Acount Information: \\n\"+account.toString());\r\n\t\treturn account;\r\n\t}", "private void registerUser()\n {\n /*AuthService.createAccount takes a Consumer<Boolean> where the result will be true if the user successfully logged in, or false otherwise*/\n authService.createAccount(entryService.extractText(namedFields), result -> {\n if (result.isEmpty()) {\n startActivity(new Intent(this, DashboardActivity.class));\n } else {\n makeToast(result);\n formContainer.setAlpha(1f);\n progressContainer.setVisibility(View.GONE);\n progressContainer.setOnClickListener(null);\n }\n });\n }", "private void createAccount(String username, String passphrase, String email) {\n\tif (!AccountManager.getUniqueInstance().candidateUsernameExists(username)) {\n\t try {\n\t\tAccountManager.getUniqueInstance().createCandidateAccount(username, \n\t\t\t\t\t\t\t\t\t passphrase, \n\t\t\t\t\t\t\t\t\t email);\n\t } catch (Exception e) {\n\t\tthrow new RuntimeException(\"creation failed\");\n\t }\n\t} else {\n\t throw new RuntimeException(\"username already exists\");\n\t}\n }", "@POST\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.TEXT_PLAIN)\n public Response createAccount(\n AccountModel input, @Context HttpServletResponse response) {\n if (input.getEmail() == null || input.getEmail().equals(\"\") || input.getPassword() == null || input.getPassword().isEmpty()\n || input.getUserName() == null || input.getUserName().isEmpty()) {\n return Response.status(Response.Status.BAD_REQUEST).build();\n }\n Customer customer = new Customer();\n customer.setEmail(input.getEmail());\n customer.setPassword(input.getPassword());\n customer.setUserName(input.getUserName());\n String sendToken = TokenUtil.getToken(input.getEmail(), input.getPassword());\n customer.setToken(sendToken);\n Long id = customerRef.save(customer);\n if (id != null || id > 0) {\n response.setHeader(\"AuthHeader\", sendToken);\n return Response.status(Response.Status.CREATED).build();\n }\n return Response.status(Response.Status.NOT_IMPLEMENTED).build();\n\n }", "protected void finishLogin() {\n\t\tLog.i(TAG, \"finishLogin()\");\n\t\tfinal Account account = new Account(data.getmHost(), Constants.ACCOUNT_TYPE);\n\n\t\tif (data.ismRequestNewAccount()) {\n\t\t\tBundle userData = new Bundle();\n\t\t\tuserData.putString(Constants.PARAM_USERNAME, data.getmUsername());\n\t\t\tuserData.putString(Constants.PARAM_PORT, data.getmPort() + \"\");\n\t\t\tuserData.putString(Constants.PARAM_HOST, data.getmHost());\n\t\t\tuserData.putString(Constants.PARAM_ENCRYPTION, data.getmEncryption() + \"\");\n\t\t\tuserData.putString(Constants.PARAM_SEARCHFILTER, data.getmSearchFilter());\n\t\t\tuserData.putString(Constants.PARAM_BASEDN, data.getmBaseDN());\n\t\t\t// Mappings for LDAP data\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.FIRSTNAME, data.getmFirstName());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.LASTNAME, data.getmLastName());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.TELEPHONE, data.getmOfficePhone());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.MOBILE, data.getmCellPhone());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.HOMEPHONE, data.getmHomePhone());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.MAIL, data.getmEmail());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.PHOTO, data.getmImage());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.STREET, data.getmStreet());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.CITY, data.getmCity());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.ZIP, data.getmZip());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.STATE, data.getmState());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.COUNTRY, data.getmCountry());\n\t\t\tdata.getmAccountManager().addAccountExplicitly(account, data.getmPassword(), userData);\n\n\t\t\t// Set contacts sync for this account.\n\t\t\tContentResolver.setSyncAutomatically(account, ContactsContract.AUTHORITY, true);\n\t\t\tContactManager.makeGroupVisible(account.name, getContentResolver());\n\t\t} else {\n\t\t\tdata.getmAccountManager().setPassword(account, data.getmPassword());\n\t\t}\n\t\tfinal Intent intent = new Intent();\n\t\tdata.setmAuthtoken(data.getmPassword());\n\t\tintent.putExtra(AccountManager.KEY_ACCOUNT_NAME, account.name);\n\t\tintent.putExtra(AccountManager.KEY_ACCOUNT_TYPE, Constants.ACCOUNT_TYPE);\n\t\tif (data.getmAuthtokenType() != null && data.getmAuthtokenType().equals(Constants.AUTHTOKEN_TYPE)) {\n\t\t\tintent.putExtra(AccountManager.KEY_AUTHTOKEN, data.getmAuthtoken());\n\t\t}\n\t\tsetAccountAuthenticatorResult(intent.getExtras());\n\t\tsetResult(RESULT_OK, intent);\n\t\tfinish();\n\t}", "@Override\n public Bundle addAccount(AccountAuthenticatorResponse response, String accountType,\n String authTokenType, String[] requiredFeatures, Bundle options) {\n final Intent intent = new Intent(context, LoginActivity.class);\n intent.putExtra(AccountManager.KEY_ACCOUNT_TYPE, accountType);\n intent.putExtra(LoginActivity.ARG_AUTHTOKEN_TYPE, authTokenType);\n intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);\n final Bundle bundle = new Bundle();\n bundle.putParcelable(AccountManager.KEY_INTENT, intent);\n return bundle;\n }", "void openAccount(String name, String address, String cnic, int contact_no, int age, String email_address,\r\n int noOfAccounts, String incomeSource, String AccountType, String securityquestion) {\n\r\n if (bankPolicy.isEligibilityCriteriaFulfilled(age)) {// is customer eligible\r\n System.out.println(\"Criteria fulfilled\");\r\n\r\n boolean newCustomer = isItANewCustomer(cnic);\r\n\r\n if (newCustomer) {// is customer new\r\n Customer C = new Customer(Integer.toString(customers.size() + 1), cnic, name, address, contact_no,\r\n email_address, incomeSource, securityquestion);\r\n // Print and ASK FOR SECURITY QUESTION\r\n System.out.println(\"Its a new Customer\");\r\n System.out.println(\"Password: \" + C.credentials.password);\r\n // add customer to arraylist\r\n customers.add(C);\r\n // save new customer to database\r\n record.SaveCustomer(C);\r\n // save customer credentials to database\r\n record.SaveCredentials(C.credentials, C.customerID);\r\n\r\n }\r\n int index = -1;\r\n for (int i = 0; i < customers.size(); i++) {\r\n if (customers.get(i).CNIC.equals(cnic))\r\n index = i;\r\n }\r\n\r\n Account A = new Account(String.valueOf(accounts.size() + 1), getDateFormat(), AccountType,\r\n \"Pending\", customers.get(index).customerID);\r\n // add account to customer\r\n accounts.add(A);\r\n customers.get(index).customerAccount.add(A);\r\n // save account to database\r\n record.SaveAccount(A);\r\n }\r\n\r\n }", "@PostMapping(\"/createAccount\")\n public ModelAndView createNewAccount(AccountCreateDTO createDTO){\n ModelAndView modelAndView = new ModelAndView();\n\n accountService.createAccount(createDTO);\n modelAndView.addObject(\"successMessage\", \"Account has been created\");\n modelAndView.setViewName(\"accountPage\");\n\n return modelAndView;\n }", "@Given(\"^that I am a using a \\\"([^\\\"]*)\\\" account$\")\n public void thatIAmAUsingAAccount(String accountType) throws Throwable {\n if (accountType.equals(\"driver\")) {\n createDriver();\n } else {\n createPassenger();\n }\n }", "public void newuserclicked(View view) {\n Intent myuserIntent = new Intent(this, UserCreation.class);\n startActivity(myuserIntent);\n }", "private void createAccount(User user) throws IOException {\n File accounts = new File(\"accounts.txt\");\n if (!accounts.exists()) {\n accounts.createNewFile();\n }\n\n FileOutputStream fileOutputStream = new FileOutputStream(accounts, true);\n BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream));\n\n bufferedWriter.write(user.getUserName() + \":\" + user.getUserPass());\n bufferedWriter.newLine();\n bufferedWriter.flush();\n }", "private void CreateNewAccount(final String phone, final String password, final String name) {\n if (TextUtils.isEmpty(phone)){\n Toast.makeText(this,\"Please enter your phone number ...\",Toast.LENGTH_SHORT).show();\n }\n else if(TextUtils.isEmpty(password)){\n Toast.makeText(this,\"Please enter your phone password ...\",Toast.LENGTH_SHORT).show();\n }\n else if(TextUtils.isEmpty(name)){\n Toast.makeText(this,\"Please enter your phone name ...\",Toast.LENGTH_SHORT).show();\n }\n else{\n //start creating account\n LoadingBar.show();\n\n final DatabaseReference mRef;\n mRef = FirebaseDatabase.getInstance().getReference();\n mRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n if (!(snapshot.child(\"Users\").child(phone).exists())){\n //if user not exist then we create account in database\n HashMap<String,Object> userdata = new HashMap<>();\n userdata.put(\"phone\",phone);\n userdata.put(\"password\",password);\n userdata.put(\"name\",name);\n mRef.child(\"Users\").child(phone).updateChildren(userdata)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()){\n LoadingBar.dismiss();\n Toast.makeText(RegisterActivity.this,\"Registration Successful\",Toast.LENGTH_SHORT).show();\n }\n else{\n LoadingBar.dismiss();\n Toast.makeText(RegisterActivity.this,\"Please try again after sometime ....\",Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n else{\n LoadingBar.dismiss();\n Toast.makeText(RegisterActivity.this,\"User with this number already exist ....\",Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n\n }\n }", "@Override\n public void onClick(View v) {\n startActivity(new Intent(getContext(), AccountModifyActivity.class));\n //BAD HACK: Close this activity and recreate it later\n getActivity().finish();\n }", "void addNewAccountToFile(Account newAccount);", "public boolean\tnewAccount(String type, String name, float balance) throws IllegalArgumentException;", "public void onSignupSuccess(){\n Toast.makeText(this, \"YEPP\", Toast.LENGTH_SHORT).show();\r\n Intent changetomain = new Intent(RegisterActivity.this, MainAccount.class) ;\r\n startActivity(changetomain);\r\n }", "@Override\n public boolean createAccount(String fullName, String username, String password, String email){\n // will change this if we make some errors.\n if(!usernameToPerson.containsKey(username)) { // check that there is not someone with that username\n Organizer og = new Organizer(fullName, username, password, email);\n updateUsernameToPerson(og.getUsername(), og); // see below\n idToPerson.put(og.getID(), og);\n return true;\n }\n\n return false;\n\n }", "public void addAccount(Person p, Account a);", "@Override\n public void onClick(View v) {\n Intent account = new Intent(Welcome.this, MyAccount.class);\n startActivity(account);\n\n }", "AccountModel add(AccountModel account) throws AccountException;", "public void chooseAccount() {\n context.startActivityForResult(\n mCredential.newChooseAccountIntent(), REQUEST_ACCOUNT_PICKER);\n }", "public Account createAccount(String login, String name, String surname, String city, String street, int number) throws Exception {\r\n\t\tif (login==null || login.equals(\"\")) throw(new Exception(\"Nazwa konta nie moze byc pusta\"));\r\n\t\tif (findAccount(login)!=null) throw(new Exception(\"Konto juz istnieje\"));\r\n\t\tAccount newAccount = new Account(login, name, surname, city, street, number);\r\n\t\tlistOfAccounts.add( newAccount );\r\n\t\treturn newAccount;\r\n\t}" ]
[ "0.7543391", "0.72892696", "0.7188719", "0.718338", "0.71297747", "0.7086726", "0.7058955", "0.70583826", "0.6957165", "0.6955842", "0.69095856", "0.6873136", "0.68634236", "0.6849482", "0.67771274", "0.67478555", "0.6730445", "0.66421676", "0.6548847", "0.65166277", "0.64714146", "0.6443177", "0.64375097", "0.6407228", "0.64042276", "0.63957596", "0.6391695", "0.6365297", "0.63309634", "0.6326678", "0.63249826", "0.63105917", "0.6301591", "0.6290229", "0.6274566", "0.62596065", "0.6253841", "0.62353593", "0.6213292", "0.620407", "0.61993694", "0.61920935", "0.6171207", "0.61589265", "0.6151931", "0.61481154", "0.61148477", "0.6109017", "0.61067444", "0.6099987", "0.6095906", "0.60848194", "0.60619575", "0.6052953", "0.60501933", "0.6027145", "0.60227793", "0.601739", "0.59922105", "0.5977234", "0.5977218", "0.5962044", "0.59588504", "0.5956558", "0.5946214", "0.59378994", "0.59364086", "0.5919285", "0.5910099", "0.59084225", "0.5900213", "0.58944404", "0.5887923", "0.58842564", "0.58708006", "0.5864553", "0.5862783", "0.5855872", "0.5854952", "0.5849765", "0.58453447", "0.5839105", "0.5835549", "0.5826449", "0.5810218", "0.58028513", "0.5801167", "0.5793788", "0.5765148", "0.57548434", "0.57449925", "0.5734404", "0.57330674", "0.5732986", "0.5730459", "0.5717326", "0.57170993", "0.5715725", "0.57028925", "0.5699487" ]
0.5961154
62
//END CREATION COMMANDS//// //OTHER COMMANDS//// / updateAccount() should be called by the UI every time the account screen is displayed goes through each Event in the 'events' Collection and adds up the balances from them
public void updateAccount() { //update all totals totalYouOwe = 0.0; totalOwedToYou = 0.0; balance = 0.0; netBalance = 0.0; //totalYouOwe and totalOwedToYou for (Event e : events) { if (e.isParticipantByGID(GID)) { if (e.getParticipantByGID(GID).getBalance() > 0) { totalOwedToYou = totalOwedToYou + e.getParticipantByGID(GID).getBalance(); } else { totalYouOwe = totalYouOwe + (-e.getParticipantByGID(GID).getBalance()); } } } //netBalance/balance - the same in current implementation netBalance = totalOwedToYou - totalYouOwe; balance = totalOwedToYou - totalYouOwe; updatePastRelations(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Account test() {\r\n\t\tAccount newAccount = createNewAccount(\"address@email.com\", \"Test Account\");\r\n\t\t\r\n\t\t//Create participants - accounts first\r\n\t\tAccount partAccount1 = new Account(\"Manuel\");\r\n\t\tAccount partAccount2 = new Account(\"Tatenda\");\r\n\t\tAccount partAccount3 = new Account(\"Dan\");\r\n\t\tAccount partAccount4 = new Account(\"Kirill\");\r\n\t\t\r\n\t\t//Creates first event - Trip\r\n\t\tnewAccount.createEvent(\"Trip\", \"Short Term\");\r\n\t\t\r\n\t\t//Add participants\r\n\t\tnewAccount.events.get(0).addParticipant(new Participant(partAccount1));\r\n\t\tnewAccount.events.get(0).addParticipant(new Participant(partAccount2));\r\n\t\tnewAccount.events.get(0).addParticipant(new Participant(partAccount3));\r\n\t\tnewAccount.events.get(0).addParticipant(new Participant(partAccount4));\r\n\t\t\r\n\t\tEvent firstEvent = newAccount.events.get(0);\r\n\t\tArrayList<Participant> firstParts = (ArrayList<Participant>) firstEvent.getParticipants();\r\n\t\t\r\n\t\tArrayList<Item> items = new ArrayList<Item>();\r\n\t\titems.add(new Item(\"Bread1\", 10.0));\r\n\t\titems.add(new Item(\"Bread2\", 20.0));\r\n\t\titems.add(new Item(\"Bread3\", 30.0));\r\n\t\titems.add(new Item(\"Bread4\", 40.0));\r\n\t\t\r\n\t\t//Add activities\r\n\t\tfirstEvent.addBalanceChange(new Transaction(\"tmpname1\", firstParts, items));\r\n\t\tfirstEvent.addBalanceChange(new Transaction(\"tmpname2\", firstParts, items));\r\n\t\t//Could add more activities (transactions or payments here)\r\n\t\t\r\n\t\t//Creates second event - Household - and two three activities to it\r\n\t\tnewAccount.createEvent(\"Household\", \"Long Term\");\r\n\t\t\r\n\t\tArrayList<Item> items2 = new ArrayList<Item>();\r\n\t\titems2.add(new Item(\"Meat1\", 10.0));\r\n\t\titems2.add(new Item(\"Meat2\", 20.0));\r\n\t\titems2.add(new Item(\"Meat3\", 30.0));\r\n\t\titems2.add(new Item(\"Meat4\", 40.0));\t\t\r\n\t\t\r\n\t\t\r\n\t\t//Add participants\r\n\t\tnewAccount.events.get(1).addParticipant(new Participant(partAccount1));\r\n\t\tnewAccount.events.get(1).addParticipant(new Participant(partAccount2));\r\n\t\t\r\n\t\t\r\n\t\tEvent secondEvent = newAccount.events.get(1);\r\n\t\tArrayList<Participant> secondParts = (ArrayList<Participant>) secondEvent.getParticipants();\r\n\t\t\r\n\t\t//Add activities\r\n\t\tsecondEvent.addBalanceChange(new Transaction(\"tmpname3\", secondParts, items2));\r\n\t\tsecondEvent.addBalanceChange(new Transaction(\"tmpname4\", secondParts, items2));\r\n\t\t\r\n\t\tnewAccount.updatePastRelations();\r\n\t\t\r\n\t\treturn newAccount;\r\n\t}", "void updateAccount();", "@Subscribe\n public void onBalanceChangedEvent(final BalanceChangedEvent event) {\n\n log.trace(\"Saw an onBalanceChangedEvent: {}\", event);\n\n // Handle the update\n balanceDisplayMaV.getModel().setLocalAmount(event.getLocalBalance());\n balanceDisplayMaV.getModel().setCoinAmount(event.getCoinBalance());\n balanceDisplayMaV.getModel().setRateProvider(event.getRateProvider());\n if (event.getRateProvider().isPresent()) {\n balanceDisplayMaV.getModel().setLocalAmountVisible(true);\n }\n\n // Do not set the visibility here, use the ViewChangedEvent\n\n balanceDisplayMaV.getView().updateView(Configurations.currentConfiguration);\n }", "@EventHandler\n public void on(MoneyWithdrawnEvent event) {\n System.out.println(\"Received Event -> MoneyWithdrawnEvent\");\n }", "private void updateAccountStatus() {\n\r\n }", "public void showAccountBalance(){\n balance();\n\n }", "private void handleAccountUpdateOnPre() {\n }", "void updateAccount(Account account);", "private void updateTransaction() {\n LogUtils.logEnterFunction(Tag);\n\n String inputtedAmount = etAmount.getText().toString().trim().replaceAll(\",\", \"\");\n if (inputtedAmount.equals(\"\") || Double.parseDouble(inputtedAmount) == 0) {\n etAmount.setError(getResources().getString(R.string.Input_Error_Amount_Empty));\n return;\n }\n\n if (mAccount == null) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Account_Empty));\n return;\n }\n\n Double amount = Double.parseDouble(inputtedAmount);\n int categoryId = mCategory != null ? mCategory.getId() : 0;\n String description = tvDescription.getText().toString();\n int accountId = mAccount.getId();\n String strEvent = tvEvent.getText().toString();\n Event event = null;\n\n if (!strEvent.equals(\"\")) {\n event = mDbHelper.getEventByName(strEvent);\n if (event == null) {\n long eventId = mDbHelper.createEvent(new Event(0, strEvent, mCal, null));\n if (eventId != -1) {\n event = mDbHelper.getEvent(eventId);\n }\n }\n }\n\n // Less: Repayment, More: Lend\n if(mCategory.getDebtType() == Category.EnumDebt.LESS || mCategory.getDebtType() == Category.EnumDebt.MORE) {\n\n boolean isDebtValid = true;\n if(mCategory.getDebtType() == Category.EnumDebt.LESS) { // Income -> Debt Collecting\n List<Debt> debts = mDbHelper.getAllDebtByPeople(tvPeople.getText().toString());\n\n Double lend = 0.0, debtCollect = 0.0;\n for(Debt debt : debts) {\n if(mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) {\n lend += debt.getAmount();\n }\n\n if(!mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.LESS) {\n debtCollect += debt.getAmount();\n }\n }\n\n if(debtCollect + amount > lend) {\n isDebtValid = false;\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_debt_collect_invalid));\n }\n\n } // End DebtType() == Category.EnumDebt.LESS\n if(isDebtValid) {\n Transaction transaction = new Transaction(mTransaction.getId(),\n TransactionEnum.Income.getValue(),\n amount,\n categoryId,\n description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n int row = mDbHelper.updateTransaction(transaction);\n if (row == 1) { // Update transaction OK\n\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n Debt debt = mDbHelper.getDebtByTransactionId(mTransaction.getId());\n debt.setCategoryId(mCategory.getId());\n debt.setAmount(amount);\n debt.setPeople(tvPeople.getText().toString());\n\n int debtRow = mDbHelper.updateDebt(debt);\n if(debtRow == 1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_successful));\n cleanup();\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n } else {\n // Revert update\n mDbHelper.updateTransaction(mTransaction);\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_fail));\n }\n } else {\n Debt newDebt = new Debt();\n newDebt.setCategoryId(mCategory.getId());\n newDebt.setTransactionId((int) mTransaction.getId());\n newDebt.setAmount(amount);\n newDebt.setPeople(tvPeople.getText().toString());\n\n long debtId = mDbHelper.createDebt(newDebt);\n if(debtId != -1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_create_successful));\n cleanup();\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n } else {\n // Revert update\n mDbHelper.updateTransaction(mTransaction);\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_fail));\n }\n } // End create new Debt\n\n } // End Update transaction OK\n } // End isDebtValid\n\n } else { // CATEGORY NORMAL\n Transaction transaction = new Transaction(mTransaction.getId(),\n TransactionEnum.Income.getValue(),\n amount,\n categoryId,\n description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n int row = mDbHelper.updateTransaction(transaction);\n if (row == 1) { // Update transaction OK\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n mDbHelper.deleteDebt(mDbHelper.getDebtByTransactionId(mTransaction.getId()).getId());\n }\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n }\n }\n\n LogUtils.logLeaveFunction(Tag);\n }", "public void accountModified(AccountEvent accountEvent) {\n Account account = accountEvent.getAccount();\n /**\n * If this is the account then update the GUI display per the potential change in Permissions.\n */\n if (getContest().getClientId().equals(account.getClientId())) {\n // They modified us!!\n initializePermissions();\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n updateGUIperPermissions();\n }\n });\n\n }\n }", "private void transferToBankAccount() {\n ArrayList<Coin> selectedCoins;\n String collection;\n mGoldAmount = 0.0;\n mBankTransferTotal = 0;\n\n if (mRecyclerViewCol.getVisibility() == View.VISIBLE) {\n selectedCoins = getSelectedCoins(Data.COLLECTED);\n collection = Data.COLLECTED;\n // Impose 25 coin limit\n if (selectedCoins.size() > (25 - Data.getCollectedTransferred())) {\n displayToast(getString(R.string.msg_25_coin_limit));\n return;\n }\n } else {\n selectedCoins = getSelectedCoins(Data.RECEIVED);\n collection = Data.RECEIVED;\n }\n\n if (selectedCoins.size() == 0) {\n displayToast(getString(R.string.msg_please_select_coins));\n return;\n }\n\n // Transfer selected coins to bank account\n mBankTransferInProgress = true;\n mProgressBar.setVisibility(View.VISIBLE);\n Log.d(TAG, \"[transferToBankAccount] transfer in progress...\");\n\n for (Coin c : selectedCoins) {\n double value = c.getValue();\n String currency = c.getCurrency();\n double exchange = value * mExchangeRates.get(currency);\n mGoldAmount += exchange;\n Data.removeCoinFromCollection(c, collection, new OnEventListener<String>() {\n\n @Override\n public void onSuccess(String string) {\n mBankTransferTotal++;\n Log.d(TAG, \"[transferToBankAccount] number processed: \" + mBankTransferTotal);\n // If all coins have been processed\n if (mBankTransferTotal == selectedCoins.size()) {\n\n // Get current date\n LocalDateTime now = LocalDateTime.now();\n DateTimeFormatter format = DateTimeFormatter.ofPattern(\n \"yyyy/MM/dd\", Locale.ENGLISH);\n String date = format.format(now);\n\n // Add transaction to firebase\n Transaction transaction = new Transaction(mGoldAmount, date);\n Data.addTransaction(transaction, mBankTransferTotal, collection);\n\n // Clear transfer flag\n mBankTransferInProgress = false;\n\n // Update the view\n if (mRecyclerViewCol.getVisibility() == View.VISIBLE) {\n updateCollectedView();\n } else {\n updateReceivedView();\n }\n mProgressBar.setVisibility(View.INVISIBLE);\n Log.d(TAG, \"[transferToBankAccount] transfer complete\");\n displayToast(getString(R.string.msg_transfer_complete));\n }\n }\n\n @Override\n public void onFailure(Exception e) {\n mBankTransferTotal++;\n // If all coins have been processed\n if (mBankTransferTotal == selectedCoins.size()) {\n\n // Clear transfer flag\n mBankTransferInProgress = false;\n mProgressBar.setVisibility(View.INVISIBLE);\n Log.d(TAG, \"[transferToBankAccount] transfer failed\");\n\n // Update the view\n if (mRecyclerViewCol.getVisibility() == View.VISIBLE) {\n updateCollectedView();\n } else {\n updateReceivedView();\n }\n\n } else {\n displayToast(getString(R.string.msg_failed_to_transfer) + c.getCurrency()\n + \" worth \" + c.getValue());\n }\n Log.d(TAG, \"[sendCoins] failed to transfer coin: \" + c.getId());\n }\n });\n }\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n try {\n Account account = new Account(APPKEY, APPSECRET);\n accounts.add(account);\n int mc = JOptionPane.WARNING_MESSAGE;\n if (!accountDispName.getText().contains(account.screenName)) {\n accountDispName.setText(accountDispName.getText() + account.screenName + \"\\n\");\n accountDispName.setOpaque(true);\n statusDisplay.setText(statusDisplay.getText() + \"active\\n\");\n if (!accountDisplayNameHeader.isVisible())\n accountDisplayNameHeader.setVisible(true);\n if (!accountStatusHeader.isVisible())\n accountStatusHeader.setVisible(true);\n if (!accountDispName.isVisible())\n accountDispName.setVisible(true);\n if (!statusDisplay.isVisible())\n statusDisplay.setVisible(true);\n //f1.validate();\n account.persistAccount();\n JOptionPane.showMessageDialog(null, \"Account Added Successfully!!\", \"Success!!\", mc);\n nAccounts++;\n } else {\n JOptionPane.showMessageDialog(null, \"Account Already Exists\", \"Duplicate!!\", mc);\n }\n } catch (Exception e1) {\n int mc = JOptionPane.WARNING_MESSAGE;\n JOptionPane.showMessageDialog(null, \"Unable To Add Account!\", \"Error\", mc);\n e1.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n }", "public String myAfterBalanceAmount() {\r\n\t\tint count=0;\r\n\t\tList<SavingAccount> acc = null;\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"Before Repeat\");\r\n\t\t\tacc = getSavingAccountList();\r\n\r\n\t\t\tfor (SavingAccount savingAcc : acc) {\r\n\t\t\t\tif (!(\"0\".equals(savingAcc.getState()))) {\r\n\t\t\t\t\tif (savingAcc.getState().equals(\"active\")) {\r\n\t\t\t\t\t\tint maxRepeat = Integer.parseInt(savingAcc\r\n\t\t\t\t\t\t\t\t.getRepeatable());\r\n\r\n\t\t\t\t\t\tDate date = new Date();\r\n\t\t\t\t\t\tDate systemDate = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAccSer\r\n\t\t\t\t\t\t\t\t\t\t.convertDateToStringDDmmYYYY(date));\r\n\r\n\t\t\t\t\t\tDate dateEnd = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t.getDateEnd());\r\n\r\n\t\t\t\t\t\tif (systemDate.getTime() == dateEnd.getTime()) {\r\n\t\t\t\t\t\t\tDate newEndDate = DateUtils.addMonths(systemDate,\r\n\t\t\t\t\t\t\t\t\tsavingAcc.getInterestRateId().getMonth());\r\n\r\n\t\t\t\t\t\t\tfloat balance = savingAcc.getBalanceAmount();\r\n\t\t\t\t\t\t\tfloat interest = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getInterestRate();\r\n\r\n\t\t\t\t\t\t\tint month = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getMonth();\r\n\t\t\t\t\t\t\tint days = Days\r\n\t\t\t\t\t\t\t\t\t.daysBetween(\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateStart())),\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateEnd())))\r\n\t\t\t\t\t\t\t\t\t.getDays();\r\n\t\t\t\t\t\t\tfloat amountAll = balance\r\n\t\t\t\t\t\t\t\t\t+ (balance * ((interest / (100)) / 360) * days);\r\n\t\t\t\t\t\t\tsavingAcc.setDateStart(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(systemDate));\r\n\t\t\t\t\t\t\tsavingAcc.setDateEnd(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(newEndDate));\r\n\t\t\t\t\t\t\tsavingAcc.setBalanceAmount(amountAll);\r\n\t\t\t\t\t\t\tsavingAcc.setRepeatable(\"\" + (maxRepeat + 1));\r\n\t\t\t\t\t\t\tupdateSavingAccount(savingAcc);\r\n\t\t\t\t\t\t\tcount+=1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"Successfully!! \"+ count +\" Saving Account has been updated. Minh Map!!!\");\r\n\t\t\t\r\n\t\t\treturn \"success\";\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"Exception\");\r\n\r\n\t\t}\r\n\t\treturn \"Fail\";\r\n\t}", "@Override\n public void actionPerformed(ActionEvent e){\n int starNum = Integer.valueOf(JOptionPane.showInputDialog(\"Starting Balance?\"));\n \n String nam = JOptionPane.showInputDialog(\"Account Name?\");\n \n String type = JOptionPane.showInputDialog(\"Type Of Account?\");\n \n Account newAcc = null;\n \n if(type.equals(\"Checking\")) {\n \n newAcc = new CheckingAccount(nam, starNum);\n \n } else {\n \n newAcc = new SavingsAccount(nam, starNum);\n \n }\n \n bankSystem.addAcc(newAcc);\n \n current = newAcc;\n \n }", "@Override\n public void apply(Map<Integer, Account> accounts) {\n Account account = accounts.get(accountNumber);\n if (account == null) {\n throw new ViolatedConstraintException(\n \"Tried to withdraw from non-existent account \" + accountNumber\n );\n }\n\n // Make sure the account is enabled.\n if (!account.isEnabled()) {\n throw new ViolatedConstraintException(\n \"Tried to withdraw from disabled account \" + accountNumber\n );\n }\n\n // Check that the account belongs to accountHolder.\n if (!account.getAccountHolder().equals(accountHolder)) {\n throw new ViolatedConstraintException(\n \"User \\\"\" + accountHolder + \"\\\" tried to perform transaction \" +\n \"on account \" + accountNumber +\n \" which belongs to user \\\"\" + account.getAccountHolder() + \"\\\"\"\n );\n }\n\n // Compute fee based on whether it was admin initiated or not\n // and whether they are a student or not.\n int fee = (adminInitiated) ? 0 : (\n (account.isStudent()) ? Constants.STUDENT_FEE : Constants.NORMAL_FEE\n );\n\n // Check that the final balance of the account after removing the funds\n // and fee is greater than zero.\n int finalBalance = account.getBalance() - amount - fee;\n if (finalBalance < 0) {\n throw new ViolatedConstraintException(\n \"Final balance should be >= 0, got \" + finalBalance\n );\n }\n\n // If the transaction isn't admin initiated, check that the final\n // withdrawal total is less than the withdrawal limit.\n int finalWithdrawalTotal = 0;\n\n if (!adminInitiated) {\n finalWithdrawalTotal = account.getWithdrawalTotal() + amount;\n\n if (finalWithdrawalTotal > Constants.WITHDRAWAL_LIMIT) {\n throw new ViolatedConstraintException(\n \"Final withdrawal total should be <= \" + Constants.WITHDRAWAL_LIMIT +\n \", got \" + finalWithdrawalTotal\n );\n }\n }\n\n // Remove the funds and fee from the account.\n account.setBalance(finalBalance);\n\n // If the transaction isn't admin initiated update withdrawal total\n // and increment the transaction count.\n if (!adminInitiated) {\n account.setWithdrawalTotal(finalWithdrawalTotal);\n account.incrementTransactionCount();\n }\n }", "public void update(Account account) {\n\t\t\n\t}", "public static void main(String[] args) throws Exception {\n Scanner scanner = new Scanner(System.in);\n\n currentAccounts.put(\"Jennifer\", 100.00);\n currentAccounts.put(\"Ben\", 30.00);\n\n\n while (true) {\n\n System.out.println(\"\\nWelcome!\");\n System.out.println(\"Please enter your account name?\");\n\n String account = scanner.nextLine();\n\n\n if (!currentAccounts.containsKey(account)) {\n System.out.println(\"You do not currently have an account.\\n Would you like to create one? [y/n]\");\n String newAccount = scanner.nextLine();\n\n if (newAccount.equalsIgnoreCase(\"y\")) {\n currentAccounts.put(account, 0.00);\n System.out.println(\"Your account has been created. \" +\n \"Your current balance is $\" + currentAccounts.get(account));\n\n } else {\n System.out.println(\"Thank you\");\n continue;\n }\n } else {\n System.out.println(\"Hello \" + account + \"!\");\n\n }\n\n int session = 1;\n while (session == 1) {\n\n double balance = currentAccounts.get(account);\n\n System.out.println(\"\\nWhat would you like to do today?\\n\" +\n \"1. Check my balance\\n\" +\n \"2. Make a withdrawal\\n\" +\n \"3. Make a deposit\\n\" +\n \"4. Transfer funds\\n\" +\n \"5. Cancel my account\\n\" +\n \"6. Log out\");\n\n int activity = scanner.nextInt();\n\n switch (activity) {\n case 1:\n System.out.println(\"Your current balance is \" + balance);\n break;\n\n case 2:\n System.out.println(\"How much would you like to withdraw today?\");\n int withdrawAmount = scanner.nextInt(); // want to bring over from atm class, but cant figure out how to bring over balance\n\n if (withdrawAmount > balance) {\n System.out.println(\"You do not have enough money.\"); // changed this to error because exception can't continue the loop?\n break;\n } else if (withdrawAmount % 5 != 0) {\n System.out.println(\"Please enter in multiples of $5, $10 or $20\");\n break;\n } else {\n System.out.println(\"Please take your $\" + withdrawAmount);\n currentAccounts.put(account, currentAccounts.get(account) - withdrawAmount);\n System.out.println(\"Your current balance is $\" + (balance - withdrawAmount));\n break;\n }\n\n case 3:\n System.out.println(\"How much would you like to deposit today?\");\n int depositAmount = scanner.nextInt();\n\n System.out.println(\"You have deposited $\" + depositAmount);\n System.out.println(\"Your current balance is $\" + (balance + depositAmount));\n currentAccounts.put(account, currentAccounts.get(account) + depositAmount);\n break;\n\n case 4:\n scanner.nextLine(); // if i don't have this then it's taking inputs from before, this way it refreshes the input\n System.out.println(\"Enter the account name to which you wish to transfer funds.\");\n String accountTransfer = scanner.nextLine();\n\n System.out.println(\"Enter the amount you would like to transfer.\");\n double transferAmount = scanner.nextInt();\n\n // add or subtract transfer amount from hashmap\n currentAccounts.put(account, currentAccounts.get(account) - transferAmount);\n currentAccounts.put(accountTransfer, currentAccounts.get(accountTransfer) + transferAmount);\n\n System.out.println(\"Your current balance is now $\" + currentAccounts.get(account));\n break;\n\n case 5: //\n System.out.println(\"Are you sure you want to cancel your account today [y/n]?\");\n scanner.nextLine(); // if i don't have this then it's taking inputs from before. This way it input refreshes.\n String cancel = scanner.nextLine();\n\n if (cancel.equalsIgnoreCase(\"y\")) {\n currentAccounts.remove(account);\n System.out.println(\"We are sorry to see you go\");\n session = 0;\n } else {\n System.out.println(\"Great, you are a valued customer.\");\n }\n break;\n\n case 6:\n System.out.println(\"Thank you and please come again.\");\n session = 0;\n scanner.nextLine(); // if i don't have this then it's taking inputs from before, this way it refreshes the input\n break;\n }\n\n\n }\n\n\n }\n }", "abstract void updateRecurringTransactions(Ui ui) throws BankException;", "@EventHandler\n public void on(MoneyDepositedEvent event) {\n System.out.println(\"Received Event -> MoneyDepositedEvent\");\n }", "@Override\n public void actionPerformed(ActionEvent e){\n String nam = JOptionPane.showInputDialog(\"Account Name?\");\n \n String accn = bankSystem.getAccount(nam).name;\n \n String baln = Integer.toString(bankSystem.getAccount(nam).balance);\n \n textSpace.setText(\"\");\n \n textSpace.append(accn + \"\\n\" + baln + \"\\n\" );\n \n current = bankSystem.getAccount(nam);\n \n }", "Account.Update update();", "@FXML\n void depositFunds(ActionEvent event) {\n \ttry {\n \t\t\n \t\tProfile person = new Profile(fName_DepWith.getText(), lName_DepWith.getText());\n \t\tdouble inpBalance = Double.parseDouble(amount.getText());\n \t\tboolean deposited = false;\n \t\t\n \tif(inpBalance < 0) {\n \t\tthrow new IllegalArgumentException(\"No negative numbers, please enter a valid balance.\\n\");\n \t}\n \t\t\n \t\tString accType = ((RadioButton) tgDepositWithdraw.getSelectedToggle()).getText();\n \t\t\n \t\t//deposits funds in specified account by according to account type\n \t\tswitch(accType) {\n \t\tcase \"Checking\":\n \t\t\tAccount currCheckingAcc = new Checking(person);\n \t\t\tdeposited = db.deposit(currCheckingAcc, inpBalance);\n \t\t\tbreak;\n \t\tcase \"Savings\":\n \t\t\tAccount currSavingsAcc = new Savings(person);\n \t\t\tdeposited = db.deposit(currSavingsAcc, inpBalance);\n \t\t\tbreak;\n \t\tcase \"Money Market\":\n \t\t\tAccount currMoneyMarketAcc = new MoneyMarket(person);\n \t\t\tdeposited = db.deposit(currMoneyMarketAcc, inpBalance);\n \t\t\tbreak;\n \t\t}\n \t\t\n \t\t\n \t\tif (deposited) {\n \t\t\tmessageArea.appendText(String.format(\"%.2f\", inpBalance) + \" deposited to account.\\n\");\n \t\t}\n \t\telse {\n \t\t\tmessageArea.appendText(\"Account does not exist.\\n\");\n \t\t}\n \t\t\n \t\t\n \t}\n \tcatch(NumberFormatException e) {\n \t\tmessageArea.appendText(\"Number format exception, enter a valid amount to deposit.\\n\");\n \t}\n \tcatch(NullPointerException e) {\n \t\tmessageArea.appendText(\"Select a valid account type to deposit into.\\n\");\n \t}\n \tcatch (IllegalArgumentException e) {\n \t\tmessageArea.appendText(\"No negative numbers, please enter a valid balance.\\n\");\n \t}\n }", "@Override\n\t//handle the event\n\tpublic void actionPerformed(ActionEvent event) {\n\t\tif(event.getSource()==confirmButton){\n\t\t\tif(withdrawMoney.getText().isEmpty()){\n\t\t\t\tJOptionPane.showMessageDialog(null, \"You don't input any number\",null, JOptionPane.WARNING_MESSAGE); \n\t\t\t}\n\t\t\telse{\n\t\t\t\tBankControlSystem control = new BankControlSystem();\n\t\t\t\tAccount loadAccount = new Account();\n\t\t\t\tloadAccount = control.loadAccountFromFile(accNo, pinNo);\n\t\t\t\tSystem.out.print(loadAccount.getClass());\n\t\t\t\tif(!loadAccount.isSuspend){\n\t\t\t\t\tif(control.withdraw(loadAccount, Integer.parseInt(withdrawMoney.getText()))){\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Successful\",null, JOptionPane.INFORMATION_MESSAGE); \n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This account is not balance!\",null, JOptionPane.WARNING_MESSAGE); \n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This account has been suspended!\",null, JOptionPane.WARNING_MESSAGE); \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturnToGUI(withdrawFrame);\t\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\treturnToGUI(withdrawFrame);\n\t\t}\n\t}", "public void checkBalance()\n\t{\n\t\tList<Account> accounts = Main.aDao.getAllAccounts(this.loggedIn.getUserId());\n\t\tdouble accountsTotal = 0;\n\t\t\n\t\tfor(Account a : accounts)\n\t\t{\n\t\t\taccountsTotal += a.getBalance();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Total funds available across all accounts:\\n\" + accountsTotal);\n\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tint fromAccountId = Integer.parseInt(fromAccount.getSelectedItem().toString());\n\t\t\tint toAccountId = Integer.parseInt(toAccount.getSelectedItem().toString());\n\t\t\tfloat amountTransfer = Float.parseFloat(transferAmount.getText());\n\t\t\tFloat balance = ATMOptionUtility.getBalanceFromAccountId(fromAccountId);\n\n\t\t\tif (fromAccountId == toAccountId) {\n\t\t\t\tJOptionPane.showMessageDialog(frame, \"Illegal transfer. Cannot pick two same accounts.\");\n\t\t\t} else if (amountTransfer > 2000){\n\t\t\t\tJOptionPane.showMessageDialog(frame, \"Illegal transfer. Cannot transfer more than $2000.\");\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\tif (ATMOptionUtility.checkEnoughBalance(fromAccountId, amountTransfer)) {\n\t\t\t\t\t\tATMOptionUtility.subtractMoneyToAccountId(fromAccountId, amountTransfer);\n\t\t\t\t\t\tATMOptionUtility.addMoneyToAccountId(toAccountId, amountTransfer);\n\t\t\t\t\t\tATMOptionUtility.addToTransactionsTable(\"Transfer\", ssn, fromAccountId, toAccountId, amountTransfer);\n\t\t\t\t\t\tJOptionPane.showMessageDialog(frame, \"Transfer succeeded.\");\n\t\t\t\t\t\tif(balance - amountTransfer <= 0.01) {\n\t\t\t\t\t\t\tString closeAccount = \"UPDATE CR_ACCOUNTS SET ISCLOSED = 1 WHERE ACCOUNTID = \" + fromAccountId;\n\t\t\t\t\t\t\tint numRowsUpdated = Application.stmt.executeUpdate(closeAccount);\n\t\t\t\t\t\t\tassert(numRowsUpdated == 1);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tBankTellerUtility.showPopUpMessage(\"Since your account: \" + fromAccountId + \" balance was less than or \"\n\t\t\t\t\t\t\t\t\t+ \"equal to $0.01, your account was closed.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(frame, \"You don't have enough to make this transaction.\");\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void balanceMenu(){\n\t\tstate = ATM_State.BALANCE;\n\t\tdouble balance = Bank.getBalance(accountID); \n\t\tgui.setDisplay(\"Current balance: \\n$\" + balance);\t\n\t}", "public void addAccount() {\n\t\t\n\t\ttry {\n\t\t\tlog.log(Level.INFO, \"Please enter name\");\n String custName = scan.next();\n validate.checkName(custName);\n \t\tlog.log(Level.INFO, \"Select Account Type: \\n 1 for Savings \\n 2 for Current \\n 3 for FD \\n 4 for DEMAT\");\n\t\t\tint bankAccType = Integer.parseInt(scan.next());\n\t\t\tvalidate.checkAccType(bankAccType);\n\t\t\tlog.log(Level.INFO, \"Please Enter your Aadar Card Number\");\n\t\t\tString aadarNumber = scan.next();\n\t\t\tlog.log(Level.INFO, \"Please Enter Phone Number: \");\n\t\t\tString custMobileNo = scan.next();\n\t\t\tvalidate.checkPhoneNum(custMobileNo);\n\t\t\tlog.log(Level.INFO, \"Please Enter Customer Email Id: \");\n\t\t\tString custEmail = scan.next();\n\t\t\tvalidate.checkEmail(custEmail);\n\t\t\tbankop.add(accountNumber, custName, bankAccType, custMobileNo, custEmail, aadarNumber);\n\t\t\taccountNumber();\n\t\t\n\t\t} catch (AccountDetailsException message) {\n\t\t\tlog.log(Level.INFO, message.getMessage()); \n }\n\n\t}", "@FXML\n void withdrawFunds(ActionEvent event) {\n \ttry {\n \t\t\n \t\tProfile person = new Profile(fName_DepWith.getText(), lName_DepWith.getText());\n \t\tdouble inpBalance = Double.parseDouble(amount.getText());\n \t\tint withdrawn = 0;\n \t\t\n \tif(inpBalance < 0) {\n \t\tthrow new IllegalArgumentException(\"No negative numbers, please enter a valid balance.\\n\");\n \t}\n \t\t\n \t\tString accType = ((RadioButton) tgDepositWithdraw.getSelectedToggle()).getText();\n \t\t\n \t\t//withdraws funds according to specified account type\n \t\tswitch(accType) {\n \t\tcase \"Checking\":\n \t\t\tAccount currCheckingAcc = new Checking(person);\n \t\t\twithdrawn = db.withdrawal(currCheckingAcc, inpBalance);\n \t\t\tbreak;\n \t\tcase \"Savings\":\n \t\t\tAccount currSavingsAcc = new Savings(person);\n \t\t\twithdrawn = db.withdrawal(currSavingsAcc, inpBalance);\n \t\t\tbreak;\n \t\tcase \"Money Market\":\n \t\t\tAccount currMoneyMarketAcc = new MoneyMarket(person);\n \t\t\twithdrawn = db.withdrawal(currMoneyMarketAcc, inpBalance);\n \t\t\tbreak;\n \t\t}\n \t\t\n \t\t\n \t\tif (withdrawn == 0) {\n \t\t\tmessageArea.appendText(String.format(\"%.2f\", inpBalance) + \" withdrawn from account.\\n\");\n \t\t}\n \t\telse if (withdrawn == 1) {\n \t\t\tmessageArea.appendText(\"Insufficient funds.\\n\");\n \t\t}\n \t\telse {\n \t\t\tmessageArea.appendText(\"Account does not exist.\\n\");\n \t\t}\n \t\t\n \t}\n \tcatch(NumberFormatException e) {\n \t\tmessageArea.appendText(\"Number format exception, enter a valid amount to withdraw.\\n\");\n \t}\n \tcatch(NullPointerException e) {\n \t\tmessageArea.appendText(\"Select a valid account type to withdraw from.\\n\");\n \t}\n \tcatch (IllegalArgumentException e) {\n \t\tmessageArea.appendText(\"No negative numbers, please enter a valid balance.\\n\");\n \t}\n \t\n }", "private void processAccounts(){\r\n for (Account aAccount: theAccounts) {\r\n aAccount.runYear();\r\n }\r\n\r\n }", "public void AddToAccountInfo();", "@Test\n public void testUpdateAccount() {\n for (int i = 0; i < 10; i++) {\n presenter.onUpdateAccount();\n }\n Assert.assertEquals(10, view.getManageUpdateAccountClicks());\n }", "public void updateBalance(int account_id, int final_amount){\n dbUpdate(\"update ACCOUNTS set BALANCE = \"+ final_amount + \" where ACCOUNT_ID = \" + account_id);\n cache.add(new Account(account_id, final_amount));\n }", "int updateAccountInfo(Account account);", "public void onClick(View v){\n updateBalance();\n }", "public void actionPerformed(ActionEvent e){\n\t\t\t\tArrayList<Transaction> transactions = new ArrayList<Transaction>(currentAccount.getTransactionList());\n\t\t\t\tTransactionUI t = new TransactionUI(transactions); //create an interface of the user's selected account transactions\n\t\t\t}", "public void printVenueCharges (Event _event) {\n\t}", "private void updateDatabaseAccountBalance() {\n\t\tString sql = \"UPDATE account SET balance = \" + this.balance + \" \";\n\t\tsql += \"WHERE accountID = '\" + this.accountID + \"';\";\n\n\t\tDbUtilities db = new MySqlUtilities();\n\t\tdb.executeQuery(sql);\n\t}", "private void updateBalance(){\n Intent toUpdateBal = new Intent(this, UpdateAccount.class);\n startActivity(toUpdateBal);\n }", "private static void onAccountCreated(Account newAccount, Context context) {\n MovieSyncAdapter.configurePeriodicSync(context, SYNC_INTERVAL, SYNC_INTERVAL/2);\n ContentResolver.setSyncAutomatically(newAccount, context.getString(R.string.content_authority), true);\n syncNextPage(context, true);\n }", "private void listBalances() {\n\t\t\r\n\t}", "public void editBalance() {\n\t\tAccount account = getAccountForEditBalance();\n\n\t\tif (adminDao.editBalance(account))\n\t\t\tSystem.out.println(\"Balance edited!\");\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tObject source = e.getSource();\n\t\ttry {\n\t\t\tif (source == bP.withdraw) {\n\t\t\t\tbP.acc.withdraw(Double.parseDouble(bP.amount.getText()));\n\t\t\t} else if (source == bP.deposit) {\n\t\t\t\tbP.acc.deposit(Double.parseDouble(bP.amount.getText()));\n\t\t\t}\n\t\t\tbP.balanceLabel.setText(\"balance=\" + new Double(bP.acc.getBalance()).toString());\n\t\t} catch (NumberFormatException e1) {\n\t\t\tbP.balanceLabel.setText(\"balance=\" + new Double(bP.acc.getBalance()).toString() + \" - Error\");\n\t\t}\n\t}", "private void doDeposit() {\n while (true){\n try{\n Account userAccount = ui.readAccount(currentUser.getAccounts());\n int amountDeposited = ui.takeDepositEnvelope();\n userAccount.credit(amountDeposited);\n ui.deliverMoney(amountDeposited);\n ui.displayNewBalance(userAccount);\n break;\n\n } catch (Exception e){\n ui.displayError(\"Please enter a valid number.\");\n }\n }\n\n\n }", "@Override\n\tpublic void run(String... args) throws Exception {\n\t\taccountListRepository.deleteAll();\n\t\taccountTransactionRepository.deleteAll();\n\t\t\n\t\tAccountListDTO account1 = new AccountListDTO();\n\t\taccount1.setAccountNumber(585309209);\n\t\taccount1.setAccountName(\"SGSavings726\");\n\t\taccount1.setAccountType(\"Savings\");\n\t\taccount1.setBalanceDate(LocalDate.of(2018, 11, 8));\n\t\taccount1.setCurrency(\"SGD\");\n\t\taccount1.setOpeningAvailableBalance(84327.51);\n\t\taccountListRepository.save(AccountListDTO.prepareAccountListEntity(account1));\n\t\t\n\t\tAccountListDTO account2 = new AccountListDTO();\n\t\taccount2.setAccountNumber(791066619);\n\t\taccount2.setAccountName(\"AUSavings933\");\n\t\taccount2.setAccountType(\"Savings\");\n\t\taccount2.setBalanceDate(LocalDate.of(2018, 11, 8));\n\t\taccount2.setCurrency(\"AUD\");\n\t\taccount2.setOpeningAvailableBalance(88005.93);\n\t\taccountListRepository.save(AccountListDTO.prepareAccountListEntity(account2));\n\t\t\n\t\tAccountListDTO account3 = new AccountListDTO();\n\t\taccount3.setAccountNumber(347786244);\n\t\taccount3.setAccountName(\"AUCurrent433\");\n\t\taccount3.setAccountType(\"Current\");\n\t\taccount3.setBalanceDate(LocalDate.of(2018, 11, 8));\n\t\taccount3.setCurrency(\"AUD\");\n\t\taccount3.setOpeningAvailableBalance(38010.62);\n\t\taccountListRepository.save(AccountListDTO.prepareAccountListEntity(account3));\n\t\t\n\t\tAccountTransactionDTO transaction1 = new AccountTransactionDTO();\n\t\ttransaction1.setAccountNumber(1232223212);\n\t\ttransaction1.setAccountName(\"Current Account\");\n\t\ttransaction1.setValueDate(LocalDate.of(2012, 1, 12));\n\t\ttransaction1.setCurrency(\"SGD\");\n\t\ttransaction1.setCreditAmount(9540.98);\n\t\ttransaction1.setDebitOrCredit(\"Credit\");\n\t\taccountTransactionRepository.save(AccountTransactionDTO.prepareAccountTransactionEntity(transaction1));\n\t\t\n\t\tAccountTransactionDTO transaction2 = new AccountTransactionDTO();\n\t\ttransaction2.setAccountNumber(1232223212);\n\t\ttransaction2.setAccountName(\"Current Account\");\n\t\ttransaction2.setValueDate(LocalDate.of(2012, 1, 12));\n\t\ttransaction2.setCurrency(\"SGD\");\n\t\ttransaction2.setCreditAmount(7497.82);\n\t\ttransaction2.setDebitOrCredit(\"Credit\");\n\t\taccountTransactionRepository.save(AccountTransactionDTO.prepareAccountTransactionEntity(transaction2));\n\t\t\n\t\tAccountTransactionDTO transaction3 = new AccountTransactionDTO();\n\t\ttransaction3.setAccountNumber(1232223212);\n\t\ttransaction3.setAccountName(\"Current Account\");\n\t\ttransaction3.setValueDate(LocalDate.of(2012, 1, 12));\n\t\ttransaction3.setCurrency(\"SGD\");\n\t\ttransaction3.setCreditAmount(5564.79);\n\t\ttransaction3.setDebitOrCredit(\"Credit\");\n\t\taccountTransactionRepository.save(AccountTransactionDTO.prepareAccountTransactionEntity(transaction3));\n\t\t\n\t}", "@Override\n public void addMenuBalance() {\n mMenuBalanceRepository.addMenuBalance(new Callback<MenuBalance>() {\n @Override\n public void onSuccess(MenuBalance data) {\n mView.addMenuBalanceSuccess(data);\n }\n\n @Override\n public void onFailed(String errorMsg) {\n mView.addMenuBalanceFailure(errorMsg);\n }\n });\n }", "public void execute() {\n\t\t// get references to bank database and screen\n\t\tatmg.BankDatabase bankDatabase = getBankDatabase();\n\n\t\t// get the available balance for the account involved\n\t\tdouble availableBalance = bankDatabase.getAvailableBalance(getAccountNumber());\n\n\t\t// get the total balance for the account involved\n\t\tdouble totalBalance = bankDatabase.getTotalBalance(getAccountNumber());\n\n\t\t// display the balance information on the screen\n\t\tint input = JOptionPane.showOptionDialog(null,\n\t\t\t\t\"\\nBalance Information:\" + \"\\n\" + \" - Available balance: \" + availableBalance + \"\\n - Total balance:\"\n\t\t\t\t\t\t+ totalBalance + \"\\n\\n\",\n\t\t\t\tnull, JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null,\n\t\t\t\tnew String[] { \"OK\"}, \"default\");\n\t\tif (input == JOptionPane.OK_OPTION) {\n\t\t\t\n\n\t\t} else {\n\t\t\t//windowT.disable();\n\t\t}\n\n\t}", "@Override\npublic void update(Account account) {\n\taccountdao.update(account);\n}", "@Override\n public long totalBalances() {\n long total = 0;\n for(Account account : accounts.values()){\n total += account.balance();\n }\n return total;\n }", "void updateBalance(int amount){ \n\t\tbalance = amount;\n\t}", "@Override\n public int execute() throws InterruptedOperationException, CancelOperationException {\n Logger logger = Log4j.getLogger();\n int success = 0;\n try {\n String accountNumber = null;\n BigDecimal amount = BigDecimal.ONE;\n Transaction transaction;\n LocalDateTime now;\n String userId = BankApp.getCurrentUser().getUserId();\n List<String> accountNumbers = accountDao.getAccountNumbers(userId);\n ConsoleHelper.println(\"\");\n ConsoleHelper.displayMenuBanner();\n ConsoleHelper.printlnWithTab(\"[DEPOSIT]\");\n ConsoleHelper.printAccountList();\n\n boolean isValidInput = false;\n do {\n ConsoleHelper.printWithTab(\"Into: \");\n String input = ConsoleHelper.readString();\n for (int i = 1; i <= accountNumbers.size(); i++) {\n if (input.equals(String.valueOf(i))) {\n accountNumber = accountNumbers.get(i - 1);\n isValidInput = true;\n break;\n }\n }\n\n } while (!isValidInput);\n\n isValidInput = false;\n do {\n ConsoleHelper.printWithTab(\"Amount: \");\n String input = ConsoleHelper.readString();\n try {\n double inputValue = Double.parseDouble(input);\n amount = BigDecimal.valueOf(inputValue);\n int decimalPlaces = ConsoleHelper.getNumberOfDecimalPlaces(amount);\n if (decimalPlaces == 0 && amount.compareTo(BigDecimal.valueOf(0)) > 0) {\n isValidInput = true;\n } else {\n ConsoleHelper.printlnWithTab(\"Invalid amount, we only accept whole number deposit.\");\n }\n } catch (NumberFormatException e) {\n // the amount format is not valid\n }\n } while (!isValidInput);\n\n int countAccount = accountDao.deposit(accountNumber, amount);\n now = LocalDateTime.now();\n Account account = accountDao.getAccount(accountNumber);\n transaction = new Transaction(TransactionType.DEPOSIT, userId, now, amount, account);\n int countTransaction = transactionDao.addTransaction(transaction);\n success = countAccount == 1 && countTransaction == 1 ? 1 : 0;\n if (success == 1) {\n ConsoleHelper.printlnWithTab(\"Deposit completed.\");\n ConsoleHelper.println(\"\");\n } else {\n ConsoleHelper.printlnWithTab(\"System failure, deposit cancelled. Please try later.\");\n }\n try {\n Thread.sleep(1500);\n } catch (InterruptedException e) {\n logger.error(\"Interrupted Exception when thread sleep\", e);\n }\n } catch (CancelOperationException e) {\n // do nothing, allow user to return to main menu\n }\n return success;\n }", "public void editAccount() {\n try {\n editAccountEndpointLocal.editAccount(accountDTO);\n ResourceBundles.emitMessageWithFlash(null,\"page.edit.account.message\");\n } catch (AppOptimisticLockException ex) {\n log.severe(ex.getMessage() + \", \" + LocalDateTime.now());\n ResourceBundles.emitErrorMessageWithFlash(null, \"error.account.optimisticlock\");\n } catch (ExceededTransactionRetriesException ex) {\n log.severe(ex.getMessage() + \", \" + LocalDateTime.now());\n ResourceBundles.emitErrorMessageWithFlash(null, ex.getMessage());\n } catch (DatabaseQueryException ex) {\n log.severe(ex.getMessage() + \", \" + LocalDateTime.now());\n ResourceBundles.emitErrorMessageWithFlash(null, ex.getMessage());\n } catch (DatabaseConnectionException ex){\n log.severe(ex.getMessage() + \", \" + LocalDateTime.now());\n ResourceBundles.emitErrorMessageWithFlash(null, ex.getMessage());\n } catch (ValidationException e) {\n log.severe(e.getMessage() + \", \" + LocalDateTime.now());\n ResourceBundles.emitErrorMessageByPlainText(null, e.getMessage());\n } catch (AppBaseException e) {\n log.severe(e.getMessage() + \", \" + LocalDateTime.now());\n ResourceBundles.emitErrorMessageWithFlash(null, e.getMessage());\n }\n }", "private void updateUserAccount() {\n final UserDetails details = new UserDetails(HomeActivity.this);\n //Get Stored User Account\n final Account user_account = details.getUserAccount();\n //Read Updates from Firebase\n final Database database = new Database(HomeActivity.this);\n DatabaseReference user_ref = database.getUserReference().child(user_account.getUser().getUser_id());\n user_ref.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n //Read Account Balance\n String account_balance = dataSnapshot.child(Database.USER_ACC_BALANCE).getValue().toString();\n //Read Expire date\n String expire_date = dataSnapshot.child(Database.USER_ACC_SUB_EXP_DATE).getValue().toString();\n //Read Bundle Type\n String bundle_type = dataSnapshot.child(Database.USER_BUNDLE_TYPE).getValue().toString();\n //Attach new Values to the Account Object\n user_account.setBalance(Double.parseDouble(account_balance));\n //Attach Expire date\n user_account.setExpire_date(expire_date);\n //Attach Bundle Type\n user_account.setBundle_type(bundle_type);\n //Update Local User Account\n details.updateUserAccount(user_account);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n //No Implementation\n }\n });\n }", "private void outputAccounts(){\r\n float total = 0;\r\n Collections.sort(theAccounts);\r\n for(Account aAccount:theAccounts){\r\n System.out.println(aAccount.toString());\r\n total += aAccount.getPremiumBonds();\r\n }\r\n\r\n System.out.println(\"Mediem\");\r\n calculateMediem();\r\n\r\n System.out.println(\"Mean:\");\r\n calculateMean(total);\r\n\r\n System.out.println(\"Mode:\");\r\n calculateMode();\r\n\r\n System.out.println(\"Range\");\r\n calculateRange();\r\n }", "public void balance(){\n\t\tnamesTree.balance();\n\t\taccountNumbersTree.balance();\n\t}", "void addBalance(double amount) {\n\t\tbalance += amount;\n\t}", "public void changeBalance (int amount){\n balance += amount;\n }", "public void update() {\n\t\n\tif(getBalance() > 0) {\n\t\tcanWithdraw = true;\n\t}else {canWithdraw = false;}//end else statement\n}", "public void updateAccounts(String sourceAccountNumber, BigDecimal transferedAmount, String destinationAccount ) throws TransferServiceException {\n\t\t\n\t\tList<Account> accountList = new ArrayList<>();\n\t\t\n\t\taccountList.add(debitAmount(sourceAccountNumber,transferedAmount));\n\t\taccountList.add(creditAmount(destinationAccount, transferedAmount));\n\t\trepository.saveAll(accountList);\n\t\n\t}", "@FXML\r\n void createAccount(MouseEvent event) throws SQLException {\r\n ta_employeeAccount.clear();\r\n account();\r\n\r\n }", "public void testAutoBalanceTransactions(){\n\t\tsetDoubleEntryEnabled(false);\n\t\tmTransactionsDbAdapter.deleteAllRecords();\n\n\t\tassertThat(mTransactionsDbAdapter.getRecordsCount()).isEqualTo(0);\n\t\tString imbalanceAcctUID = mAccountsDbAdapter.getImbalanceAccountUID(Currency.getInstance(CURRENCY_CODE));\n\t\tassertThat(imbalanceAcctUID).isNull();\n\n\t\tvalidateTransactionListDisplayed();\n\t\tonView(withId(R.id.fab_create_transaction)).perform(click());\n\t\tonView(withId(R.id.fragment_transaction_form)).check(matches(isDisplayed()));\n\n\t\tonView(withId(R.id.input_transaction_name)).perform(typeText(\"Autobalance\"));\n\t\tonView(withId(R.id.input_transaction_amount)).perform(typeText(\"499\"));\n\n\t\t//no double entry so no split editor\n\t\t//TODO: check that the split drawable is not displayed\n\t\tonView(withId(R.id.menu_save)).perform(click());\n\n\t\tassertThat(mTransactionsDbAdapter.getRecordsCount()).isEqualTo(1);\n\t\tTransaction transaction = mTransactionsDbAdapter.getAllTransactions().get(0);\n\t\tassertThat(transaction.getSplits()).hasSize(2);\n\t\timbalanceAcctUID = mAccountsDbAdapter.getImbalanceAccountUID(Currency.getInstance(CURRENCY_CODE));\n\t\tassertThat(imbalanceAcctUID).isNotNull();\n\t\tassertThat(imbalanceAcctUID).isNotEmpty();\n\t\tassertTrue(mAccountsDbAdapter.isHiddenAccount(imbalanceAcctUID)); //imbalance account should be hidden in single entry mode\n\n\t\tassertThat(transaction.getSplits()).extracting(\"mAccountUID\").contains(imbalanceAcctUID);\n\n\t}", "void updateAccount(int id, double accountBalance, String account) {\n // Update only the required keys\n sql = \"UPDATE CashiiDB2 \" + \"SET \" + account + \" ='\" + accountBalance + \"' WHERE AccountNum in ('\" + id + \"')\";\n try {\n st.executeUpdate(sql);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "private void createTransaction() {\n\n String inputtedAmount = etAmount.getText().toString().trim().replaceAll(\",\", \"\");\n\n if (inputtedAmount.equals(\"\") || Double.parseDouble(inputtedAmount) == 0) {\n etAmount.setError(getResources().getString(R.string.Input_Error_Amount_Empty));\n return;\n }\n\n if (mAccount == null) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Account_Empty));\n return;\n }\n\n if(mCategory == null) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Category_Income_Empty));\n return;\n }\n\n Double amount = Double.parseDouble(etAmount.getText().toString().replaceAll(\",\", \"\"));\n if(amount < 0) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Amount_Invalid));\n return;\n }\n\n int CategoryId = mCategory != null ? mCategory.getId() : 0;\n String Description = tvDescription.getText().toString();\n int accountId = mAccount.getId();\n String strEvent = tvEvent.getText().toString();\n Event event = null;\n\n if (!strEvent.equals(\"\")) {\n event = mDbHelper.getEventByName(strEvent);\n if (event == null) {\n long eventId = mDbHelper.createEvent(new Event(0, strEvent, mCal, null));\n if (eventId != -1) {\n event = mDbHelper.getEvent(eventId);\n }\n }\n }\n\n boolean isDebtValid = true;\n // Less: DebtCollect, More: Borrow\n if(mCategory.getDebtType() == Category.EnumDebt.LESS) { // Income -> Debt Collecting\n List<Debt> debts = mDbHelper.getAllDebtByPeople(tvPeople.getText().toString());\n\n Double lend = 0.0, debtCollect = 0.0;\n for(Debt debt : debts) {\n if(mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) {\n lend += debt.getAmount();\n }\n\n if(!mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.LESS) {\n debtCollect += debt.getAmount();\n }\n }\n\n if(debtCollect + amount > lend) {\n isDebtValid = false;\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_debt_collect_invalid));\n }\n }\n\n if(isDebtValid) {\n Transaction transaction = new Transaction(0,\n TransactionEnum.Income.getValue(),\n amount,\n CategoryId,\n Description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n long newTransactionId = mDbHelper.createTransaction(transaction);\n\n if (newTransactionId != -1) {\n\n if(mCategory.getDebtType() == Category.EnumDebt.LESS || mCategory.getDebtType() == Category.EnumDebt.MORE) {\n Debt newDebt = new Debt();\n newDebt.setCategoryId(mCategory.getId());\n newDebt.setTransactionId((int) newTransactionId);\n newDebt.setAmount(amount);\n newDebt.setPeople(tvPeople.getText().toString());\n\n long debtId = mDbHelper.createDebt(newDebt);\n if(debtId != -1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_create_successful));\n cleanup();\n\n if(getFragmentManager().getBackStackEntryCount() > 0) {\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n }\n } else {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_transaction_create_fail));\n mDbHelper.deleteTransaction(newTransactionId);\n }\n } else {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_create_successful));\n cleanup();\n\n if(getFragmentManager().getBackStackEntryCount() > 0) {\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n }\n }\n\n } else {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_transaction_create_fail));\n }\n }\n\n }", "private void updateSingleAccount(double amount, String account_name) {\n if (account_name.equals(\"bankomat\")){\n status_disp.transfer_resources(\"karta konto 1\", \"gotowka\", (float) amount); // TODO: remove hardcoded account names...crashes if names dont match\n }\n else {\n status_disp.reduce_wealth(account_name, (float) amount);\n Log.e(TAG, account_name + \" \" + amount);\n }\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t\tif(arg0.getSource()==buttonAddInterest)\r\n\t\t\tthis.addmonthlyInterest();\r\n\t\telse if(arg0.getSource()==buttonDeductFee)\r\n\t\t\tthis.deductAccountMaintenanceFee();\r\n\t\telse\r\n\t\t\tthis.closeAccount();\r\n\t\tlabel.setText(String.format(\"Balance: %.2f\", this.getBalance()));\r\n\t\t\t\r\n\t\t\r\n\r\n\t}", "public void payEconomical() {\n if (this.balance >= 2.50) {\n this.balance -= 2.50;\n }\n }", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "private void doWithdrawal() {\n while(true){\n try{\n Account userAccount = ui.readAccount(currentUser.getAccounts());\n int amountWithdrawn = ui.readWithdrawalAmount();\n\n if(userAccount.debit(amountWithdrawn)){\n ui.displayNewBalance(userAccount);\n break;\n\n } else {\n ui.displayError(\"You do not have enough money in this account to withdraw \" + amountWithdrawn);\n }\n }catch(Exception e){\n ui.displayError(\"Please enter a valid number.\");\n }\n }\n\n }", "void update(Account... accounts);", "@Override\n\tpublic void updateStockAccountInfo(StockAccount account) {\n\t\t\n\t}", "public void addBalance(long balance) {\r\n this.balance += balance;\r\n }", "public void showBalance(){\n for(Player player: players){\n System.out.println(player + \"'s balance: \" + player.getWallet());\n }\n System.out.println();\n dealer.showProfit();\n System.out.println();\n }", "public void addAccount(BankAccount newAccount) { \n accounts.add(newAccount); // Insere no final do vetor.\n }", "public void Deposit(double ammount){\n abal = ammount + abal;\n UpdateDB();\n }", "private static void onAccountCreated(Account newAccount, Context context) {\n ScoreSyncAdapter.configurePeriodicSync(context);\n /*\n * Without calling setSyncAutomatically, our periodic sync will not be enabled.\n */\n ContentResolver.setSyncAutomatically(newAccount, context.getString(R.string.content_authority), true);\n\n /*\n * Finally, let's do a sync to get things started\n */\n syncImmediately(context);\n }", "void deposit(int value)//To deposit money from the account\n {\n balance += value;\n }", "public void addAccount(String accountNumber, String owner, BigDecimal startBalance) throws SQLException {\r\n\r\n\t\ttry (Connection connection = dbAdministration.getConnection();\r\n\t\t\t\tPreparedStatement preparedStatement = connection\r\n\t\t\t\t\t\t.prepareStatement(\"INSERT INTO account VALUES (?,?,?)\")) {\r\n\t\t\tint id = dbAdministration.getEntryCount(\"account\") + 1;\r\n\t\t\tpreparedStatement.setInt(1, id);\r\n\t\t\tpreparedStatement.setString(2, owner);\r\n\t\t\tpreparedStatement.setString(3, accountNumber);\r\n\t\t\t// Datensatz in die Datenbanktabelle schreiben\r\n\t\t\tpreparedStatement.execute();\r\n\t\t\tlogger.info(\"SQL-Statement ausgeführt: \" + \"INSERT INTO account VALUES (\" + id + \", \" + owner + \", \"\r\n\t\t\t\t\t+ accountNumber + \")\");\r\n\t\t\tlogger.info(\"Neues Konto angelegt. Besitzer: \" + owner + \", Kontonr.: \" + accountNumber + \", Startkapital: \"\r\n\t\t\t\t\t+ startBalance);\r\n\t\t\tif (startBalance.compareTo(BigDecimal.ZERO) == 1) {\r\n\t\t\t\t// Wenn das angeforderte Startguthaben > 0 ist, wird es dem\r\n\t\t\t\t// Konto überwiesen\r\n\t\t\t\tdaTransaction.addTransaction(\"0000\", accountNumber, startBalance, \"STARTGUTHABEN\");\r\n\t\t\t}\r\n\t\t\t// Die reservierte Nummer gehört jetzt zu einem Konto, daher\r\n\t\t\t// kann die Reservierung aufgehoben werden\r\n\t\t\treservedNumbers.remove(accountNumber);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(e);\r\n\t\t}\r\n\t}", "public static String oamAdjustBalance(DataBaseUtil dataBaseUtil, String oneAccountId, int adjustAmount, RESTActions actions) {\n\t\tString uid = UUID.randomUUID().toString();\n\t\tString unregisteredEmail = \"\";\n\t\tString deviceId = NISGlobals.NIS_DEVICE_ID;\n\t\tString clientRefId = deviceId + \":\" + BackOfficeUtils.generateRandomString(BackOfficeGlobals.BACKOFFICE_CLIENT_REF_ID_LENGTH - deviceId.length() - 1);\n\t\tList<WSAdjustProductLineItem> productLineItems = null;\n\t\tWSAdjustProductLineItem productLineItem = null;\n\t\tWSAdjustProduct product = null;\n\t\tString notes = BackOfficeGlobals.BACKOFFICE_OAM_ADJUST_NOTES_TEXT;\n\t\tString purseId = \"\";\n\t\tint financiallyResponsibleOperatorId = BackOfficeGlobals.BACKOFFICE_DEFAULT_OAM_OPERATOR_ID;\n\t\tOAMAccount accountObj = null;\n\t\tCSOrderAdjustmentResp respObj = null;\n\t\t\n\t\tLOG.info(\"##### Adjusting Balance to: \" + adjustAmount + \", for OneAccount ID: \" + oneAccountId + \"\\n\");\n\t\t\n\t\t// Get all values needed for the request\n\t\tpurseId = OAMUtils.oamGetPurseId(dataBaseUtil, oneAccountId);\n\t\taccountObj = OAMUtils.oamGetAccount(dataBaseUtil, oneAccountId);\n\t\tproduct = new WSAdjustOneAccountValue(adjustAmount, BackOfficeGlobals.BACKOFFICE_ADJUST_PRODUCT_TYPE_OAM_VALUE, oneAccountId, purseId);\n\t\t\n\t\tproductLineItem = new WSAdjustProductLineItem(product);\n\t\tproductLineItems = Arrays.asList(productLineItem);\n\t\t\n\t\trespObj = CSOrderAdjustmentPOST.sendReq(accountObj.getCustomerId(), unregisteredEmail, clientRefId, productLineItems, uid, notes, financiallyResponsibleOperatorId, actions);\n\t\tLOG.info(\"Returning Response Code: \" + respObj.getResponseCode() + \"\\n\");\n\t\t\n\t\treturn respObj.getResponseCode();\n\t}", "public void addAccount(Account acct){\n int i = numberOfAccounts++; // Each time we addAccount..\n accounts[i] = acct; //..we store it to the account array.\n \n }", "@Override\n\tpublic void processTransaction(Transaction transactionObject) {\n\t\t\n\t\ttrasactionList.addLast(transactionObject);\n\t\t\n\t\tif ( transactionObject.getTransactionType() == 'C'){\n\t\t\t\n\t\t\tbalance -= transactionObject.getTransactionAmount(); \n\t\t\t\n\t\t}\n\t\t\n\t\telse if ( transactionObject.getTransactionType() == 'D'){\n\t\t\t\n\t\t\tbalance += transactionObject.getTransactionAmount(); \n\t\t}\n\t}", "private void addToBalance(double aBalance) {\n balance += aBalance;\n String out = String.format(\"<html><b>Balance</b><br>$%.2f</html>\", balance);\n balanceLabel.setText(out);\n }", "private void updateCurrentBalance(final String earnedOrSpent, String clientId, final String amountGiven) {\n final DatabaseReference ref = FirebaseDatabase.getInstance().getReference(\"Clients/\" + clientId);\n\n try{\n final String[] currentValue = new String[1];\n ref.child(\"currentBalance\").get().addOnCompleteListener(new OnCompleteListener<DataSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DataSnapshot> task) {\n if(task.isSuccessful()){\n currentValue[0] = String.valueOf(task.getResult().getValue());\n Double newValue = 0.0;\n if(earnedOrSpent.equalsIgnoreCase(\"spent\")){\n newValue = Double.parseDouble(currentValue[0]) - Double.parseDouble(amountGiven);\n }else{\n newValue = Double.parseDouble(currentValue[0]) + Double.parseDouble(amountGiven);\n }\n\n updateBalanceInDatabase(ref, String.valueOf(newValue));\n Log.d(\"Firebase\", currentValue[0]);\n }\n }\n });\n }catch(Exception e){\n Log.d(\"NewTransactionActivity\", e.toString());\n }\n\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) \n\t{\n\t\tBankAccountListener listen = new BankAccountListener(this);\n\t\tlisten.actionPerformed(e);\n\n\t}", "@Override\r\n\t@SuppressWarnings(\"deprecation\")\r\n\tpublic void raiseEvent(Event e) {\r\n\t\tPlayer p = ((PlayerInteractEvent) e).getPlayer();\r\n\t\tPlayerStats stats = plugin.getStats(p);\r\n\t\tif (stats.subtractmoney(cost)) {\r\n\t\t\tif (!items.isEmpty()) {\r\n\t\t\t\tLinkedList<ItemStack> givenItems = new LinkedList<ItemStack>();\r\n\t\t\t\tfor (ItemStack item : items.getItemStacks()) {\r\n\t\t\t\t\tgivenItems.add(item);\r\n\t\t\t\t\tHashMap<Integer, ItemStack> failed = p.getInventory().addItem(item);\r\n\r\n\t\t\t\t\tif (failed != null && failed.size() > 0) {\r\n\t\t\t\t\t\t// the inventory may be full\r\n\t\t\t\t\t\tTribu.messagePlayer(p, (plugin.getLocale(\"Message.UnableToGiveYouThatItem\")),ChatColor.RED);\r\n\t\t\t\t\t\tstats.addMoney(cost);\r\n\t\t\t\t\t\tfor (ItemStack i : givenItems)\r\n\t\t\t\t\t\t\tp.getInventory().remove(i);\r\n\t\t\t\t\t\tgivenItems = null;\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\tp.updateInventory();\r\n\t\t\t\t// Alright\r\n\t\t\t\tTribu.messagePlayer(p,String.format(plugin.getLocale(\"Message.PurchaseSuccessfulMoney\"), String.valueOf(stats.getMoney())),ChatColor.GREEN);\r\n\t\t\t} else {\r\n\t\t\t\tTribu.messagePlayer(p,plugin.getLocale(\"Message.UnknownItem\"),ChatColor.RED);\r\n\t\t\t\tstats.addMoney(cost);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tTribu.messagePlayer(p,plugin.getLocale(\"Message.YouDontHaveEnoughMoney\"),ChatColor.RED);\r\n\t\t}\r\n\r\n\t}", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n for(DataSnapshot d : dataSnapshot.getChildren()) {\n\n //get the name, and status as linked under the name child.\n String name = d.child(\"Name\").getValue().toString();\n String status = d.child(\"Status\").getValue().toString();\n\n //if the user is a librarian, we don't need to add their checkout data.\n if (status.equals(\"Librarian\")) continue;\n\n //only if the user has books checked out, get the value otherwise initialize it to 0.\n int booksCheckedOut = 0;\n if(d.hasChild(\"BooksCheckedOut\")) { //prevents a crash.\n booksCheckedOut = (int) d.child(\"BooksCheckedOut\").getChildrenCount();\n }\n\n //only if the user has books on hold, get the value otherwise initialize it to 0.\n int booksOnHold = 0;\n if(d.hasChild(\"BooksOnHold\")) { //prevents a crash.\n booksOnHold = (int) d.child(\"BooksOnHold\").getChildrenCount();\n }\n\n //only if the user has overdue books, get the value otherwise initialize it to 0.\n int overdueBookCount = 0;\n for(DataSnapshot books : d.child(\"BooksCheckedOut\").getChildren()) {\n\n //compute the (potential) overdue time a book has been out for.\n long days = TimeUnit.MILLISECONDS.toDays(System.currentTimeMillis() - books.getValue(Long.class));\n\n //if days is more than 1 for a teacher then it is overdue.\n //if days is more than 1 for a student then it is overdue.\n if(days > 1) {\n //increment overdueBookCount only if the book has been due for over 1 day.\n overdueBookCount++;\n }\n }\n\n //add the new account information to the database.\n accounts.add(new AccountManagerItem(name, status, booksCheckedOut, booksOnHold, overdueBookCount));\n\n }\n\n //notify the adapter that we have new data so we can update the UI.\n adapter.notifyDataSetChanged();\n listView.setAdapter(adapter);\n }", "public void onTrade(Trade event) {\n tradeCount++;\n }", "@Test\n\tpublic void updateAccount() throws Exception {\n\n\t\tFacebookAdaccountBuilder fbAccount = SocialEntity\n\t\t\t\t.facebookAccount(accessToken);\n\t\tfbAccount.addAccount(\"New Test AdAccount\", \"USD\", 1);\n\t\t// fbAccount.create();\n\n\t\tfbAccount.updateAccountName(\"275668082617836\",\n\t\t\t\t\"Update Test New AdAccount\");\n\t\tfbAccount.updateAccountName(\"1419302888335966\",\n\t\t\t\t\"Batch AdAccount Name Update\");\n\t\tSystem.out.println(fbAccount.update());\n\t}", "public void deposit(double amount) {\n balance += amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo='\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n }", "public void withdraw(double amount) throws InsufficientFundsException {\n if (amount <= balance) {\n balance -= amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo= '\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n } //end if\n else {\n throw new InsufficientFundsException(amount);\n } //end else\n }", "public void transferMoney(int customerAccountId, int accountId) throws SQLException {\n // check if the customer has this account\n boolean customerOwnsAccount = false;\n for (int i = 0; i < this.currentCustomer.getAccounts().size(); i++) {\n if (customerAccountId == this.currentCustomer.getAccounts().get(i).getId()) {\n customerOwnsAccount = true;\n break;\n }\n }\n // it is safe to proceed since the customer accounts have been authenticated\n if (customerOwnsAccount) {\n Account customerAccount = DatabaseSelectHelper.getAccountDetails(customerAccountId);\n // try and catch for valid input (int) expected\n try {\n System.out.println(\"Enter amount you wish to transfer:\");\n // take user input as a big decimal\n BigDecimal bigAmount = new BigDecimal(br.readLine());\n if (bigAmount.compareTo(customerAccount.getBalance()) <= 0) {\n // try to update accounts\n try {\n // update the account which received money in database\n DatabaseUpdateHelper.updateAccountBalance(\n bigAmount.add(DatabaseSelectHelper.getBalance(accountId)), accountId);\n // update account which transfered money in database\n DatabaseUpdateHelper.updateAccountBalance(\n customerAccount.getBalance().subtract(bigAmount), customerAccountId);\n // update the customer object for printing reasons for other options\n this.currentCustomer.updateAccounts();\n // Explicitly tell user money is transfered\n System.out.println(\"you have successfully transfered money to account \" + accountId);\n \n } catch (Exception e) {\n System.out.println(\"The account ID you wish to transfer money to does not exist\");\n }\n // error printing\n } else {\n System.out.println(\"This account does not have enough money to send this amount\");\n }\n \n } catch (Exception e) {\n System.out.println(\"Invalid amount\");\n }\n // error printing\n } else {\n System.out.println(\"You do not have access to this account\");\n }\n \n }", "public void execute() {\r\n int depositAmount = this.promptDepositAmount(); // amount in cents\r\n if (depositAmount != CANCELED) {\r\n screen.displayMessage(\"\\nPlease insert a deposit envelope containing: \");\r\n screen.displayDollarAmount(depositAmount / 100);\r\n screen.displayMessageLine(\".\");\r\n\r\n if (depositSlot.isEnvelopeReceived()) {\r\n screen.displayMessageLine(\"\\nYour envelope has been received.\");\r\n screen.displayMessageLine(\"The money just deposited will not be available until we verify \" +\r\n \"the amount of any enclosed cash and your checks clear.\");\r\n bankDatabase.credit(this.accountNumber, depositAmount / 100);\r\n } else {\r\n screen.displayMessageLine (\"\\nYou did not insert an envelope. The ATM has canceled your transaction.\");\r\n }\r\n } else {\r\n screen.displayMessageLine( \"\\nCanceling transaction...\");\r\n }\r\n }", "public void recordPurchase(double amount)\n {\n balance = balance - amount;\n // your code here\n \n }", "@Test(priority = 5)\n public void viewAccountBalance() throws IOException, InterruptedException {\n WebElement viewbalanceBtn = driver.findElement(By.xpath(Utility.fetchLocator(\"viewBalanceBtn_XPATH\")));\n viewbalanceBtn.click();\n Thread.sleep(3000);\n //Print out balance\n WebElement availableBalance = driver.findElement(By.xpath(Utility.fetchLocator(\"availableBalance_XPATH\")));\n String balanceText = availableBalance.getText();\n System.out.println(\"The balance is \" + balanceText);\n //Close modal for balance info\n WebElement balanceModal = driver.findElement(By.className(Utility.fetchLocator(\"closeModalBalance_CLASS\")));\n balanceModal.click();\n Thread.sleep(3000);\n }", "void checkBalance() {\n\t\tSystem.out.println(\"Account balance: \" + balance);\n\t}", "public void gameUI(String username, BigDecimal balance){\n\n System.out.println(ANSI_RESET + username + \", balance: \" + ANSI_YELLOW + balance + \"\\n\" +\n ANSI_PURPLE + \"Command:\");\n }", "public void addBalance()\n\t\t{\n\t\t\tthis.setBalance_acc2(this.getBalance_acc2() + this.getTemp_d_acc2());\n\t\t}", "public Account getAccountForEditBalance() {\n\t\tAccount account = getInputOfUsersAccount();\n\t\tSystem.out.println(\"Account: \" + account.getAccountNumber() + \" Balance: \" + account.getBalance());\n\n\t\tdouble balance = Inputs.getUserDoubleInput(\"Enter new balance:\");\n\t\taccount.setBalance(balance);\n\t\treturn account;\n\t}", "private static void onAccountCreated(Account newAccount, Context context) {\n MovieSyncAdapter.configurePeriodicSync(context, SYNC_INTERVAL, SYNC_FLEXTIME);\n\n /*\n * Without calling setSyncAutomatically, our periodic sync will not be enabled.\n */\n ContentResolver.setSyncAutomatically(newAccount, context.getString(R.string.content_authority), true);\n\n /*\n * Finally, let's do a sync to get things started\n */\n syncImmediately(context);\n }", "Account apply();", "@Override\n public void onEvent(@Nullable DocumentSnapshot documentSnapshot, @Nullable FirebaseFirestoreException e) {\n //Actual user who is updating the data\n String ActualUser = documentSnapshot.getString(\"FullRankAndName\");\n //Actual date for the user who is updating\n String ActualDate = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(Calendar.getInstance().getTime());\n\n DisplayReportedByCOS.setText(UpdateReportedBy);\n DisplayOverallStrCOS.setText(UpdateOverallStr + \"\\n\\nUpdated By: \" + ActualUser + \" \" + \"on \" + ActualDate);\n DisplayDateCOS.setText(UpdateDate);\n DisplayAmPmStatusCOS.setText(UpdateAMPMstatus);\n\n }", "InsufficientFunds(Account a) {\n balance = a.currentBalance();\n }" ]
[ "0.62175393", "0.60509014", "0.6037499", "0.5940729", "0.590166", "0.5866948", "0.5847337", "0.58359456", "0.57992214", "0.5794029", "0.5724418", "0.57090086", "0.5699671", "0.5670312", "0.55863804", "0.55498374", "0.55439496", "0.553388", "0.55133384", "0.5510357", "0.5496436", "0.5495037", "0.54899466", "0.5457174", "0.54484564", "0.5443537", "0.5430777", "0.5429304", "0.5416374", "0.5404713", "0.53961754", "0.5392653", "0.5388924", "0.53507596", "0.53289425", "0.5325687", "0.53222215", "0.5314648", "0.5312871", "0.5311853", "0.531116", "0.531032", "0.5301083", "0.52976984", "0.529218", "0.5288509", "0.52793336", "0.5264374", "0.5260509", "0.52527374", "0.5246373", "0.5241051", "0.52374256", "0.5236754", "0.52342343", "0.52262694", "0.5216034", "0.52141994", "0.5209213", "0.52070844", "0.51878685", "0.5184847", "0.51761", "0.5164874", "0.5160814", "0.51601017", "0.51508695", "0.514927", "0.514582", "0.5141214", "0.51368326", "0.51225245", "0.51194984", "0.5111679", "0.510693", "0.5105728", "0.5102363", "0.5102157", "0.50980496", "0.50910485", "0.5090203", "0.5083858", "0.507241", "0.50691134", "0.50671625", "0.5063839", "0.5051492", "0.50500125", "0.5048416", "0.50295883", "0.5021584", "0.5021047", "0.50166565", "0.5014533", "0.5012139", "0.5008115", "0.5004557", "0.4994529", "0.49892366", "0.4986557" ]
0.7363305
0
/ ensure Account.currentAccount == account
public static void setCurrentAccount(Account currentAccount) { Account.currentAccount = currentAccount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Account getCurrentAccount() {\r\n\t\treturn currentAccount;\r\n\t}", "public Account getAccount() {\n return account;\n }", "public Account getAccount() {\n return account;\n }", "public\n void\n setAccount(Account account)\n {\n itsAccount = account;\n }", "Account getAccount();", "public void setAccount(Account account) {\n this.account = account;\n }", "public Account getAccount() {\r\n\t\treturn account;\r\n\t}", "void updateAccount(Account account);", "public String getAccount() {\r\n return account;\r\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public\n Account\n getAccount()\n {\n return itsAccount;\n }", "public String getAccount() {\r\n\t\treturn account;\r\n\t}", "void setAccount(final Account account);", "void updateAccount();", "public void setAccount(String account) {\n this.account = account;\n }", "public void setAccount(String account) {\n this.account = account;\n }", "public void setAccount(String account) {\n this.account = account;\n }", "public void setAccount(String account) {\n this.account = account;\n }", "public String getAccount(){\n\t\treturn account;\n\t}", "public String getCurrentUserAccount();", "java.lang.String getAccount();", "public CloudStackAccount getCurrentAccount() throws Exception {\n if (currentAccount != null) {\n // verify this is the same account!!!\n for (CloudStackUser user : currentAccount.getUser()) {\n if (user.getSecretkey() != null && user.getSecretkey().equalsIgnoreCase(UserContext.current().getSecretKey())) {\n return currentAccount;\n }\n }\n }\n // otherwise let's find this user/account\n List<CloudStackAccount> accounts = getApi().listAccounts(null, null, null, null, null, null, null, null);\n for (CloudStackAccount account : accounts) {\n CloudStackUser[] users = account.getUser();\n for (CloudStackUser user : users) {\n String userSecretKey = user.getSecretkey();\n if (userSecretKey != null && userSecretKey.equalsIgnoreCase(UserContext.current().getSecretKey())) {\n currentAccount = account;\n return account;\n }\n }\n }\n // if we get here, there is something wrong...\n return null;\n }", "public void openAccount(Account a) {}", "int updateAccountInfo(Account account);", "@Override\n public BigDecimal getCurrentBalance(Account account) {\n return null;\n }", "public void setAccount(String account) {\r\n\t\tthis.account = account;\r\n\t}", "public\n boolean\n hasAccount()\n {\n return getAccount() != null;\n }", "@Override\n public void onAccountLoaded(@Nullable IAccount activeAccount) {\n mAccount = activeAccount;\n updateUI();\n }", "public void setCurrentUserAccount(String currentUserAccount);", "@Test\n @Order(14)\n void update_account_2() {\n Account first = client.getAccounts().iterator().next();\n\n // mismatch is a copy, but with different client Id\n // we use client2 because it's valid in the database\n Account mismatch = new Account(first.getId(), first.getAmount()+200, client2.getId());\n Account nullCheck = service.updateAccount(mismatch);\n Assertions.assertNull(nullCheck);\n\n // get the account with the id we used to check, should not have changed\n Account check = service.getAccount(client.getId(), mismatch.getId());\n Assertions.assertEquals(first.getAmount(), check.getAmount(), 0.1);\n }", "public boolean privateCurrentAccount()\n {\n if(accountInfo == null)\n {\n System.out.println(\"You need to generate an account before getting the details.\");\n return false;\n }\n return accountInfo.privateAccount();\n }", "private void loadAccount() {\n if (mSingleAccountApp == null) {\n return;\n }\n\n mSingleAccountApp.getCurrentAccountAsync(new ISingleAccountPublicClientApplication.CurrentAccountCallback() {\n @Override\n public void onAccountLoaded(@Nullable IAccount activeAccount) {\n // You can use the account data to update your UI or your app database.\n mAccount = activeAccount;\n updateUI();\n }\n\n @Override\n public void onAccountChanged(@Nullable IAccount priorAccount, @Nullable IAccount currentAccount) {\n if (currentAccount == null) {\n // Perform a cleanup task as the signed-in account changed.\n showToastOnSignOut();\n }\n }\n\n @Override\n public void onError(@NonNull MsalException exception) {\n displayError(exception);\n }\n });\n }", "private void updateAccountStatus() {\n\r\n }", "@Override\n\tpublic Account getSingleAccount() {\n\t\treturn null;\n\t}", "protected final Account getAccount() {\n\t\treturn getRegisterView().getAccount();\n\t}", "UserAccount getUserAccountById(long id);", "GlAccount getGlAccount();", "boolean hasAccount();", "boolean hasAccount();", "boolean hasAccount();", "public LocalAccount\t\tgetAccount();", "private boolean accountChecks(Account account){\n // ie. if the account has to be personal for the round-up service to apply\n account.getName(); // check personal\n return true;\n }", "public boolean getHasAccount() {\n return hasAccount_;\n }", "Account getAccount(Integer accountNumber);", "public AccountInfo getAccountInfo() {\n return accountInfo;\n }", "public BankAccount getCheckingAccount() {\n return checkingAccount;\n }", "public AccountInfo getAccount()\n {\n if(accountInfo == null)\n {\n System.out.println(\"You need to generate an account before getting the details.\");\n return null;\n }\n return accountInfo;\n }", "Account apply();", "Account refresh();", "public Account getExistingAccount(String accountId) {\n return this.currentBlock.getAccount(accountId);\n }", "private Account borrowAccount(AccountHolder holder) {\n\t\twhile (true) {\n\t\t\tAccount account = holder.account.get();\n\t\t\tif (account != null && holder.account.compareAndSet(account, null)) {\n\t\t\t\treturn account;\n\t\t\t}\n\t\t}\n\t}", "public boolean getHasAccount() {\n return hasAccount_;\n }", "boolean hasHasAccount();", "BillingAccount getBillingAccount();", "public void AddToAccountInfo();", "public Long getAccountID() {\n return accountID;\n }", "public Long getAccountID() {\n return accountID;\n }", "void setAccountId(Long accountId);", "Account getAccount(int id);", "@Override public Account provideAccount(String accountJson) {\n return null;\n }", "public void setAccountId(String s) { accountId = s;}", "private Account getAccount( int accountNumber )\n {\n for( Account currentAccount : accounts )\n {\n if( currentAccount.getAccountNumber() == accountNumber )\n {\n return currentAccount;\n }\n \n }\n return null;\n }", "public boolean isSameAccount(BankAccount account1, BankAccount account2){\n return account1.accountName == account2.accountName;\n }", "public boolean favouriteCurrentAccount()\n {\n if(accountInfo == null)\n {\n System.out.println(\"You need to generate an account before getting the details.\");\n return false;\n }\n return accountInfo.favouriteAccount();\n }", "public static Account getSyncAccount(Context context) {\n // Get an instance of the Android account manager\n AccountManager accountManager = (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE);\n\n // Create the account type and default account\n Account newAccount = new Account(context.getString(R.string.app_name), BuildConfig.ACCOUNT_TYPE);\n\n // If the password doesn't exist, the account doesn't exist\n if (null == accountManager.getPassword(newAccount)) {\n\n /*\n * Add the account and account type, no password or user data\n * If successful, return the Account object, otherwise report an error.\n */\n if (!accountManager.addAccountExplicitly(newAccount, \"\", null)) {\n return null;\n }\n /*\n * If you don't set android:syncable=\"true\" in\n * in your <provider> element in the manifest,\n * then call ContentResolver.setIsSyncable(account, AUTHORITY, 1)\n * here.\n */\n\n onAccountCreated(newAccount, context);\n }\n return newAccount;\n }", "public void setAccount(Account associatedAccount){\r\n\t\tthis.associatedAccount = associatedAccount;\r\n\t}", "@Override\npublic boolean isAccountNonLocked() {\n\treturn true;\n}", "public long getAccountId()\r\n/* 115: */ {\r\n/* 116:121 */ return this.accountId;\r\n/* 117: */ }", "public int getAccountNumber() {\n return accountNumber;\n }", "public void linkAccount() {}", "public void SetCurrent(Account a)\n\t{\n\t\tif(current != null)\n\t\t\tcurrent.SetStatus(AccountStatus.LOGOFF);\n\t\t//log in current\n\t\tcurrent = a;\n\t\tcurrent.SetStatus(AccountStatus.LOGIN);\n\t}", "public Long getAccountID() {\n return accountID;\n }", "public Long getAccountID() {\n return accountID;\n }", "public void update(Account account) {\n\t\t\n\t}", "public BankAccount findAccountById(int currentBankID) throws SQLException;", "public interface Account extends LrsObject {\n /**\n * The canonical home page for the system the account is on. This is based on FOAF's accountServiceHomePage.\n */\n InternationalizedResourceLocator getHomePage();\n\n /**\n * The unique id or name used to log in to this account. This is based on FOAF's accountName.\n */\n String getName();\n}", "@Override\r\n\tpublic boolean isAccountExist(Account account) {\n\t\treturn false;\r\n\t}", "boolean hasAccountId();", "boolean hasAccountId();", "boolean hasAccountId();", "boolean hasAccountId();", "boolean hasAccountId();", "boolean hasAccountId();", "boolean hasAccountId();", "@Override\n public boolean isAccountNonLocked() {\n return true;\n }", "public int getAccountID() {\n return accountID;\n }", "public void setAccountId(UUID accountId) {\n this.accountId = accountId;\n }", "Account apply(Context context);", "@AfterPermissionGranted(REQUEST_PERMISSION_GET_ACCOUNTS)\n private void chooseAccount() {\n if (EasyPermissions.hasPermissions(\n this, Manifest.permission.GET_ACCOUNTS)) {\n String accountName = getPreferences(Context.MODE_PRIVATE)\n .getString(PREF_ACCOUNT_NAME, null);\n if (accountName != null) {\n mCredential.setSelectedAccountName(accountName);\n getResultsFromApi(this);\n } else {\n // Start a dialog from which the user can choose an account\n startActivityForResult(\n mCredential.newChooseAccountIntent(),\n REQUEST_ACCOUNT_PICKER);\n }\n } else {\n // Request the GET_ACCOUNTS permission via a user dialog\n EasyPermissions.requestPermissions(this, getString(R.string.str_needs_account),\n REQUEST_PERMISSION_GET_ACCOUNTS, Manifest.permission.GET_ACCOUNTS);\n }\n }", "public void setAccountId(String accountId) {\n this.accountId = accountId;\n }", "@Override\npublic boolean isAccountNonExpired() {\n\treturn true;\n}" ]
[ "0.7193933", "0.7038298", "0.7038298", "0.6971525", "0.69500273", "0.68885183", "0.68735003", "0.6804937", "0.67610025", "0.67169493", "0.67169493", "0.67169493", "0.67169493", "0.67169493", "0.67169493", "0.67169493", "0.67169493", "0.67169493", "0.67169493", "0.67003053", "0.66639197", "0.6652875", "0.6616978", "0.65523463", "0.65523463", "0.65523463", "0.65523463", "0.654436", "0.65177506", "0.64941454", "0.6490005", "0.6484016", "0.6456476", "0.64283234", "0.640124", "0.64004344", "0.6379628", "0.6315622", "0.62985027", "0.6294645", "0.62843555", "0.6283676", "0.62793916", "0.6274107", "0.62539935", "0.6234194", "0.6226898", "0.6226898", "0.6226898", "0.6188497", "0.61734664", "0.616722", "0.6166523", "0.6165621", "0.61559486", "0.6133633", "0.61306113", "0.612721", "0.61001456", "0.6088798", "0.60735226", "0.60667753", "0.6049181", "0.6048369", "0.60455704", "0.60455704", "0.6040236", "0.60367966", "0.60340905", "0.6023722", "0.59986067", "0.59937483", "0.5981547", "0.59810334", "0.59766155", "0.5973545", "0.5971411", "0.597123", "0.5967986", "0.59647435", "0.59546775", "0.59546775", "0.59442663", "0.5943032", "0.5942455", "0.594016", "0.5930928", "0.5930928", "0.5930928", "0.5930928", "0.5930928", "0.5930928", "0.5930928", "0.59282947", "0.5926586", "0.59233123", "0.59230727", "0.59205073", "0.59190834", "0.5917605" ]
0.6892725
5
/ ensure Account.name == name
public void setName(String name) { String[] emailParts = GID.split("@"); //Recover the original file name String fileName = this.name + "_" + emailParts[0] + "_" + emailParts[1]; File f = new File(fileName); if (f.exists()) { f.delete(); } this.name = name; saveAccount(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic Account findByName(String name) {\n\t\treturn null;\r\n\t}", "void setAccountName(String newName) {\n this.accountName = newName;\n }", "@Override\r\n public boolean equals(Account account) {\r\n \tif (account instanceof Savings) {\r\n \t\t \tif (super.stringEquals(super.getName(), account.getName()) == true) {\r\n \t\t \t\treturn true;\r\n \t\t \t}\r\n \t \t}\r\n \t \treturn false;\r\n }", "@Test\n public void testGetAccountByName() {\n\tassertEquals(1, 1);\n }", "public boolean isSameAccount(BankAccount account1, BankAccount account2){\n return account1.accountName == account2.accountName;\n }", "boolean validateAccount(String Account) {\n\t\treturn true;\n\n\t}", "public CoupleAccount(String name) {\r\n\t\tthis.name = name;\r\n\t}", "private boolean accountChecks(Account account){\n // ie. if the account has to be personal for the round-up service to apply\n account.getName(); // check personal\n return true;\n }", "@Test\n public void testSetName() {\n System.out.println(\"setName\");\n String name = \"Yina\";\n Account instance = new Account(\"Piper\", 10.0);\n instance.setName(name);\n String expResult = \"Yina\";\n String result = instance.getName();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "Account(String name, double balance)\r\n\t{\r\n\t\t\r\n\t\tthis.name = name; //assign name to the instance variable name \r\n\t\t\r\n\t\t// validate that the balance is greater that 0.0; if it is not,\r\n\t\t// instance variable balance keeps its default value 0.0\r\n\t\tif(balance > 0.0) // if balance is valid\r\n\t\t\tthis.balance = balance; // assign balance to the instance variable balance\t\t\t\t\t\r\n\t}", "public boolean isNameEquals(String name) {\n\n return (_name.equalsIgnoreCase(name));//Checks not case sensitive\n }", "public boolean\tcloseAccount(String name);", "public void setAccountName(String accountName){\n if(checkAccountClosed()){\n System.out.println(\"This transaction could not be processed. Please check your account status.\");\n }\n this.accountName = accountName;\n }", "@Test\n public void testGetName() {\n System.out.println(\"getName\");\n Account instance = new Account(\"Piper\", 10.0);\n String expResult = \"Piper\";\n String result = instance.getName();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "public Account(String accountName) throws AccountException{\n\n\t\t\tif (accountName.length() < 5)\n\t\t\t\tthrow new AccountException (AccountException.NAME_TOO_SHORT, accountName);\n\t\t\tboolean valid = true;\n\t\t\tchar[] a = accountName.toCharArray();\n\t\t\tfor (char c: a) {\n\t\t\t\tvalid = ((c >= 'a') && (c <= 'z')) ||\n\t\t\t\t\t\t((c >= 'A') && (c <= 'Z')) ||\n\t\t\t\t\t\t((c >= '0') && (c <= '9'));\n\t\t\t\tif (!valid) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!valid) throw new AccountException (AccountException.NAME_TOO_SIMPLE, accountName);\n\t\t\tthis.name = accountName;\n\t}", "@Test\n public void usernameTestTrue (){\n Accounts test = null;\n test.createAccounts();\n test = Accounts.getByUsername(\"bob\");\n assertNotNull(test);\n }", "public Account(String name, double balance){\n\n this.name = name;\n\n if (balance > 0.0 )\n this.balance = balance;\n }", "@Override\r\n\tpublic boolean modifyBankAccount(String oldName, String newName) {\n\t\t if(oldName.length()!=10){\r\n\t\t\t return false;\r\n\t\t }\r\n\t\t if(newName.length()!=10){\r\n\t\t\t return false;\r\n\t\t }\r\n\t\t return true;\r\n\t}", "@Test\n\tpublic void testUpdateAdminAccountWithEmptyName() {\n\t\tassertEquals(2, adminAccountService.getAllAdminAccounts().size());\n\n\t\tString newName = \"\";\n\n\t\tString error = null;\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.updateAdminAccount(USERNAME1, PASSWORD1, newName);\n\t\t} catch (InvalidInputException e) {\n\t\t\terror = e.getMessage();\n\t\t}\n\n\t\tassertNull(user);\n\t\t// check error\n\t\tassertEquals(\"Name cannot be empty.\", error);\n\t}", "public Account(String name, String email) {\n this.name = name;\n this.email = email;\n }", "@Test\n @Order(14)\n void update_account_2() {\n Account first = client.getAccounts().iterator().next();\n\n // mismatch is a copy, but with different client Id\n // we use client2 because it's valid in the database\n Account mismatch = new Account(first.getId(), first.getAmount()+200, client2.getId());\n Account nullCheck = service.updateAccount(mismatch);\n Assertions.assertNull(nullCheck);\n\n // get the account with the id we used to check, should not have changed\n Account check = service.getAccount(client.getId(), mismatch.getId());\n Assertions.assertEquals(first.getAmount(), check.getAmount(), 0.1);\n }", "public BankAccount lookUp(String name){\n\t\t// create an Entry with the given name, a \"dummy\" accountNumber (1) and zero balance\n\t\t// This \"dummy\" accountNumber will be ignored when executing getData\n\t\tBankAccount lookFor = new BankAccount(name, 1, 0);\n\t\treturn (BankAccount)namesTree.findData(lookFor);\n\t}", "private void updateSingleAccount(double amount, String account_name) {\n if (account_name.equals(\"bankomat\")){\n status_disp.transfer_resources(\"karta konto 1\", \"gotowka\", (float) amount); // TODO: remove hardcoded account names...crashes if names dont match\n }\n else {\n status_disp.reduce_wealth(account_name, (float) amount);\n Log.e(TAG, account_name + \" \" + amount);\n }\n }", "@Override\n\tpublic boolean mergeAccountChanges(Account account, String oldName) {\n\t\tfinal boolean isPersistentAccount = map.containsKey(oldName);\n\t\tif (!isPersistentAccount) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfinal String newName = account.getName();\n\t\tif (!newName.equals(oldName)) {\n\t\t\t// the account was renamed\n\t\t\tmap.remove(oldName);\n\t\t\tmapNoCase.remove(oldName);\n\t\t\tmap.put(newName, account);\n\t\t\tmapNoCase.put(newName, account);\n\t\t}\n\n\t\treturn true;\n\t}", "void updateAccount(Account account);", "public Account(String name, Double balance, String accNum){\n\t\tthis.name = name;\n\t\taccountNumber = accNum;\n\t\tthis.balance = balance;\n\t}", "public String getAccountName() {\r\n return accountName;\r\n }", "@Test\n public void usernameTestFalse () {\n Accounts test = null;\n test.createAccounts();\n test = Accounts.getByUsername(\"john\");\n assertNull(test);\n\n }", "public Account getAccount(String name) {\n\t\tPlayer p = Bukkit.getPlayer(name);\n\t\tif (p == null)\n\t\t\treturn null;\n\t\treturn getAccount(p);\n\t}", "public boolean\tnewAccount(String type, String name, float balance) throws IllegalArgumentException;", "java.lang.String getAccount();", "public String getAccountName() {\n return accountName;\n }", "public String getAccountName() {\n return accountName;\n }", "public String getAccountName() {\n return accountName;\n }", "public boolean checkName(String name)\n {\n return true;\n }", "public void setAccountName(String accountName) {\r\n this.accountName = accountName == null ? null : accountName.trim();\r\n }", "private Account findAccount(String name, String email) throws AccountNotFoundException {\n for (Account current: accounts) {\n if (name.equals(current.getName()) && email.equals(current.getEmail())) {\n return current;\n }\n }\n throw new AccountNotFoundException();\n }", "protected void setAccountName(final String account) {\n this.account = account;\n }", "int updateAccountInfo(Account account);", "public String getAccountName() {\n return this.accountName;\n }", "void updateAccount();", "public\n void\n setAccount(Account account)\n {\n itsAccount = account;\n }", "public void firstNameCheck() {\n\t\t\tif (getNameOfTheCard().equalsIgnoreCase(getCustomerFullName())) {\n\t\t\t\tsetColAuthorizedby(null);\n\t\t\t\tsetColpassword(null);\n\t\t\t\tsetBooAuthozed(false);\n\t\t\t} else {\n\n\n\t\t\t\tList<DebitAutendicationView> localEmpllist = iPersonalRemittanceService.getdebitAutendicationList();\n\t\t\t\tsetEmpllist(localEmpllist);\n\n\t\t\t\tsetColAuthorizedby(null);\n\t\t\t\tsetColpassword(null);\n\t\t\t\tsetBooAuthozed(true);\n\t\t\t\t// populate alert msg if customer name not match\n\t\t\t\tsetExceptionMessage(Constants.NameCheckAlertMsg);\n\t\t\t\tRequestContext.getCurrentInstance().execute(\"alertmsg.show();\");\n\t\t\t}\n\t\t}", "public Account getAccountByOwnerAndName(String user,String accountName);", "public CheckingAccount(String n) {\n super(n);\n balance = 0;\n }", "@Test\n public void testGetName() {\n System.out.println(\"getName\");\n BankAccount instance = new BankAccount(\"Kelly\", 99.99);\n String expResult = \"Kelly\";\n String result = instance.getName();\n assertEquals(expResult, result);\n \n }", "public void setAccountName(String accountName) {\n this.accountName = accountName == null ? null : accountName.trim();\n }", "public void setAccountName(String accountName) {\n this.accountName = accountName == null ? null : accountName.trim();\n }", "@Test\n public void SameTokenNameCloseNoAccount() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(0);\n InitExchangeBeforeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"abc\";\n long firstTokenQuant = 100000000L;\n String secondTokenId = \"def\";\n long secondTokenQuant = 200000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n Map<String, Long> assetMap = accountCapsule.getAssetMap();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(null, assetMap.get(firstTokenId));\n Assert.assertEquals(null, assetMap.get(secondTokenId));\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_NOACCOUNT, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail(\"account[+OWNER_ADDRESS_NOACCOUNT+] not exists\");\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"account[\" + OWNER_ADDRESS_NOACCOUNT + \"] not exists\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "public final void testDifferentNameEquals() {\n assertFalse(testTransaction1.equals(testTransaction2)); // pmd doesn't\n // like either\n // way\n }", "public void setAccountName(String accountName) {\n if (accountName != null) {\n this.accountName = accountName;\n }\n }", "abstract int checkBalance(String accountno) throws RemoteException;", "public final void testDifferentClassEquals() {\n final Account test = new Account(\"Test\");\n assertFalse(testTransaction1.equals(test));\n // pmd doesn't like either way\n }", "public String checkUsername() {\n String username = \"\"; // Create username\n boolean isOK = true; // Condition loop\n\n while (isOK) {\n username = checkEmpty(\"Account\"); // Call method to check input of username\n boolean isExist = false; // Check exist username\n for (Account acc : accounts) {\n // If username is exist, print out error\n if (username.equals(acc.getUsername())) {\n System.out.println(\"This account has already existed\");\n System.out.print(\"Try another account: \");\n isExist = true;\n }\n }\n // If username not exist then return username\n if (!isExist) {\n return username;\n }\n }\n return username; // Return username\n }", "public final AfAccount reloadAccount(String account_name) {\n if ( account_name == null || account_name == \"\") {\n LOGGER.warn(\"The account_name is empty for reloadAccount.\");\n return null;\n }\n DBUtil.select(\n \"select id, created, account_name, account_pass, account_email from \"\n + ConfigUtil.getAntiFraudDatabaseSchema()\n + \".af_account where account_name = ?\",\n new ResultSetProcessor() {\n @Override\n public void process(ResultSet resultSet) throws SQLException {\n if (resultSet.next()) {\n createAccountFromResultSet(resultSet);\n }\n }\n }, account_name);\n return null;\n }", "public boolean isNotNullAccountName() {\n return genClient.cacheValueIsNotNull(CacheKey.accountName);\n }", "@Test\n public void SameTokenNameOpenNoAccount() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"123\";\n long firstTokenQuant = 100000000L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 200000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n Map<String, Long> assetV2Map = accountCapsule.getAssetMapV2();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(null, assetV2Map.get(firstTokenId));\n Assert.assertEquals(null, assetV2Map.get(secondTokenId));\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_NOACCOUNT, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail(\"account[+OWNER_ADDRESS_NOACCOUNT+] not exists\");\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"account[\" + OWNER_ADDRESS_NOACCOUNT + \"] not exists\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Override\r\n\tpublic boolean isAccountExist(Account account) {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean addBankAccount(String name, String balance) {\n\t\treturn false;\r\n\t}", "@Test\n public void testValidateDuplicateAccountsDifferentAccount() {\n // Same account\n Long accountId = 123l;\n BankAccount bankAccountRequest = new BankAccountImpl();\n bankAccountRequest.setAccountId(accountId);\n Locale locale = Locale.getDefault();\n ErrorMessageResponse errorMessageResponse = new ErrorMessageResponse();\n List<BankAccount> bankAccountList = new ArrayList<>();\n\n // ACCOUNT HELD BY DIFFERENT CUSTOMER\n BankAccount bankAccount = new BankAccountImpl();\n bankAccount.setAccountId(accountId);\n bankAccount.setActivatedDate(new Date());\n bankAccountList.add(bankAccount);\n\n // Older activation means it will not be first in the list\n bankAccount = new BankAccountImpl();\n bankAccount.setAccountId(12345l);\n bankAccount.setActivatedDate(new Date(new Date().getTime() - 1000));\n bankAccountList.add(bankAccount);\n\n BankHelper\n .validateDuplicateAccounts(bankAccountRequest, locale, errorMessageResponse, bankAccountList, account);\n assertTrue(errorMessageResponse.hasErrors());\n }", "public boolean delete(String name){\n\t\t// this first line is given in the assignment file\n\t\tBankAccount toRemove = lookUp(name);\n\t\t// complete this:\n\t\tif(toRemove == null)\t// Verifying the account name exists in names tree, returns false if not\n\t\t\treturn false;\n\n\t\tint numberToRemove = toRemove.getAccountNumber();\n\t\tif(lookUp(numberToRemove) == null)\t// Verifying the account number exists in account numbers tree, returns false if not\n\t\t\treturn false;\n\n\t\t// Removing the account from both trees:\n\t\tnamesTree.remove(toRemove);\n\t\taccountNumbersTree.remove(toRemove);\n\t\treturn true;\n\t}", "protected void verifyDatabaseNameBeforeTransaction( String databaseName )\n {\n }", "public Account(int id, String name, double balance){\n this(id, balance);\n this.name = name;\n }", "@Override\r\n\tpublic void deleteBankAccount(String name) {\n\t\t\r\n\t}", "public void setAccountId(String s) { accountId = s;}", "public void guessName()\n\t{\n\t\tSystem.out.println(\"Who do you think it is?\");\n\t\tguessName = scan.nextLine();\n\t\tif(guessName.equals(name))\n\t\t{\n\t\t\tSystem.out.println(\"Congratulations, you are correct!\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"You are incorrect\");\n\t\t\tSystem.out.println(\"The correct answer was \" + name);\n\t\t}\n\t}", "void setAccount(final Account account);", "public boolean hasAccountName() {\n return genClient.cacheHasKey(CacheKey.accountName);\n }", "public void setAccount(String account) {\n this.account = account;\n }", "public void setAccount(String account) {\n this.account = account;\n }", "public void setAccount(String account) {\n this.account = account;\n }", "public void setAccount(String account) {\n this.account = account;\n }", "@Test\n\tvoid shouldFindUserWithIncorrectUsername() throws Exception {\n\t\tUser user = this.userService.findUserByUsername(\"antonio98\");\n\t\tAssertions.assertThat(user.getUsername()).isNotEqualTo(\"fernando98\");\n\t}", "@Test\n\tpublic void testCreateAdminAccountWithTakenUsername() {\n\n\t\tString error = null;\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.createAdminAccount(USERNAME1, PASSWORD1, NAME1);\n\t\t} catch (InvalidInputException e) {\n\t\t\terror = e.getMessage();\n\t\t}\n\n\t\tassertNull(user);\n\t\t// check error\n\t\tassertEquals(\"This username is not available.\", error);\n\t}", "private String createAccount(String name, double amount) {\n\t\tString accountNumber = \"\";\n\t\tAccount account = new Account();\n\t\taccount.setName(name);\n\t\taccount.setAmount(amount);\n\t\t\n\t\tString requestBody = gson.toJson(account);\n\n\t\tRequestSpecification request = RestAssured.given();\n\t\trequest.body(requestBody);\n\t\tResponse response = request.post(\"/account\");\n\t\tif (response.asString() != null && response.asString().contains(\":\")) {\n\t\t\tString responseArr[] = response.asString().split(\":\");\n\t\t\taccountNumber = responseArr[1].trim();\n\t\t}\n\t\treturn accountNumber;\n\t}", "@Test\n public void SameTokenNameCloseAccountIsNotCreator() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(0);\n InitExchangeBeforeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"abc\";\n long firstTokenQuant = 200000000L;\n String secondTokenId = \"def\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_SECOND);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n accountCapsule.addAssetAmount(firstTokenId.getBytes(), firstTokenQuant);\n accountCapsule.addAssetAmount(secondTokenId.getBytes(), secondTokenQuant);\n accountCapsule.setBalance(10000_000000L);\n dbManager.getAccountStore().put(ownerAddress, accountCapsule);\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_SECOND, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"account[a0548794500882809695a8a687866e76d4271a1abc]\"\n + \" is not creator\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "public boolean makeNewAccount(String name, BigDecimal balance, int type)\n throws SQLException, ConnectionFailedException, DatabaseInsertException {\n if (currentCustomerAuthenticated && currentUserAuthenticated) {\n int id = DatabaseInsertHelper.insertAccount(name, balance, type);\n EnumMapRolesAndAccounts map = new EnumMapRolesAndAccounts();\n map.createEnumMap();\n // find out what account type the account is and create and add that account to the customer\n if (type == map.accountTypes.get(AccountTypes.CHEQUING)) {\n ChequingAccount chequing = new ChequingAccountImpl(id, name, balance);\n currentCustomer.addAccount(chequing);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n } else if (type == map.accountTypes.get(AccountTypes.SAVINGS)) {\n SavingsAccount savings = new SavingsAccountImpl(id, name, balance);\n currentCustomer.addAccount(savings);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n } else if (type == map.accountTypes.get(AccountTypes.TFSA)) {\n TFSA tfsa = new TFSAImpl(id, name, balance);\n currentCustomer.addAccount(tfsa);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n } else if (type == map.accountTypes.get(AccountTypes.RESTRICTEDSAVING)) {\n RestrictedSavingsAccount rsavings = new RestrictedSavingsAccountImpl(id, name, balance);\n currentCustomer.addAccount(rsavings);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n }\n return false;\n }\n System.out.println(\"reached here\");\n throw new ConnectionFailedException();\n }", "public void openAccount(Account a) {}", "@Override\n\tpublic String checkAccount(int idc) {\n\t\treturn null;\n\t}", "private boolean checkName(String name) {\n if (!name.equals(\"\")) {\n //Check si le nom est déjà utilisé\n return myDbA.checkName(name);\n }\n return false;\n }", "public Gateway setAccountName(java.lang.String accountName) {\n return genClient.setOther(accountName, CacheKey.accountName);\n }", "@Test\n\tpublic void testCreateAdminAccountWithEmptyName() {\n\t\tString name = \"\";\n\t\tString username = \"Catherine\";\n\t\tString error = null;\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.createAdminAccount(username, PASSWORD1, name);\n\t\t} catch (InvalidInputException e) {\n\t\t\terror = e.getMessage();\n\t\t}\n\n\t\tassertNull(user);\n\t\t// check error\n\t\tassertEquals(\"Name cannot be empty.\", error);\n\t}", "public void setAccount(Account account) {\n this.account = account;\n }", "void checkRename(Object oldId, Object newId) throws UPAException;", "public String reviseBankName(String name) \n {\n return null; \n }", "int createAccount(Account account);", "Account getAccount();", "public boolean equals(Account a, Account b) {\n if ((a.getFirstName().equals(b.getFirstName())) && (a.getLastName().equals(b.getLastName())) && (a.getStreetAddress().equals(b.getStreetAddress())) && (a.getZipcode().equals(b.getZipcode())))\n return true;\n else\n return false;\n }", "public String nameCheck(String name) {\n\t\twhile(true) {\n\t\t\tif(Pattern.matches(\"[A-Z][a-z]{3,10}\", name)){\n\t\t\t\treturn name;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Name should have first capital alphabet and rest small alphabets.\");\n\t\t\t\tSystem.out.println(\"Enter again: \");\n\t\t\t\tname = sc.next();\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void AddAccountInvalid1()\n {\n acc_db.addAccount(acc2);\n\n acc3 = new Account(2,\"Jacob&Leon3\",4000);\n\n Assert.assertEquals(false,acc_db.addAccount(acc3));\n }", "@Override\n\tpublic List<Account> getAccountsByName(String name) {\n\t\treturn jdbcTemplate.query(\"select * from account where locate(?, name)>0 \", new Object[]{name}, new BeanPropertyRowMapper(Account.class));\n\t}", "public void setAccount(String account) {\r\n\t\tthis.account = account;\r\n\t}", "public void testUpdateAccount(){\n\t\tint id = 10 ;\n\t\tAccount acc = this.bean.findAccountById(id ) ;\n\t\tacc.setDatetime(CommUtil.getNowDate()) ;\n\t\tint r = this.bean.updateAccount(acc) ;\n\t\tAssert.assertEquals(r, 1) ;\n\t}", "@Test\n\tpublic void testGetAdminAccountsByName() {\n\n\t\tList<AdminAccount> users = adminAccountService.getAdminAccountsByName(NAME1);\n\t\tassertNotNull(users);\n\t\tassertEquals(users.get(0).getUsername(), USERNAME1);\n\t}", "@Ignore(\"Test is not done yet\")\n @Test\n public void testChangingUsernameToExisting() {\n final UserRequest request = new UserRequest();\n // We're currently logged in as Austria, so we're trying to change the\n // username to Germany.\n request.setNewUsername(\"germany@iaeste.de\");\n final Response response = administration.controlUserAccount(token, request);\n assertThat(response.getError(), is(IWSErrors.FATAL));\n }", "boolean hasAccount();", "boolean hasAccount();", "boolean hasAccount();", "public boolean saveAccount(Account account)\n {\n PreparedStatement preparedStatement = null;\n try\n {\n preparedStatement = connection.prepareStatement(\n String.format(\"UPDATE %s.accounts SET balance=? WHERE id = ?;\",\n simpleEconomy.getConfig().getString(\"db.database\")));\n preparedStatement.setDouble(1, account.getBalance());\n preparedStatement.setInt(2, account.getId());\n preparedStatement.execute();\n return true;\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n }\n return false;\n }", "private static void lookupAccount(String email) {\n\t\t\n\t}", "public boolean checkEmployeePayrollListSyncWithDB(String name) throws CustomPayrollException {\n\t\tList<Contact> empPayrollDataList = normalisedDBServiceObj.getEmployeePayrollData(name);\n\t\treturn empPayrollDataList.get(0).name.equalsIgnoreCase(getEmployeePayrollData(name).name);\n\t}" ]
[ "0.6666923", "0.63702387", "0.62858546", "0.62740815", "0.6168656", "0.61066246", "0.6051872", "0.6031719", "0.5950661", "0.59395295", "0.5891614", "0.58687145", "0.58619964", "0.58615243", "0.58495194", "0.58141816", "0.581054", "0.57678723", "0.573515", "0.5725296", "0.5724522", "0.5717847", "0.57087725", "0.5707983", "0.5690406", "0.5645296", "0.56173444", "0.5614618", "0.5609977", "0.55850726", "0.55726945", "0.55615765", "0.55615765", "0.55615765", "0.5557229", "0.5556568", "0.55478203", "0.5536479", "0.55267507", "0.5525222", "0.55203897", "0.5518044", "0.5502773", "0.5502516", "0.55007654", "0.5493946", "0.54935676", "0.54935676", "0.5492305", "0.54710406", "0.5456705", "0.5449109", "0.5446083", "0.544131", "0.5428045", "0.54266894", "0.5421535", "0.54150695", "0.5413755", "0.5413271", "0.5408434", "0.5404248", "0.5397687", "0.53734136", "0.53639334", "0.53471917", "0.5342082", "0.5340747", "0.5340147", "0.5340147", "0.5340147", "0.5340147", "0.5328937", "0.5328901", "0.5326005", "0.5321485", "0.53193086", "0.53173435", "0.53014594", "0.5300945", "0.5291145", "0.5287832", "0.5284128", "0.52812356", "0.5279404", "0.52781546", "0.5261971", "0.5259498", "0.52520615", "0.5243739", "0.52410656", "0.5240096", "0.52367586", "0.52350783", "0.5229402", "0.5226228", "0.5226228", "0.5226228", "0.5217321", "0.5206653", "0.5200577" ]
0.0
-1
/ ensure Account.GID == GID
public void setGID(String GID) { String[] emailParts = this.GID.split("@"); //Recover the original file name String fileName = this.name + "_" + emailParts[0] + "_" + emailParts[1]; File f = new File(fileName); if (f.exists()) { f.delete(); } this.GID = GID; saveAccount(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int gid() { return gid; }", "@Test\n\tpublic void testG(){\n\t\tSystem.out.println(\"Test G\");\n\t\tUUID aliceSecret = secretService.storeSecret(\"Alice\", new Secret());\n\t\tsecretService.shareSecret(\"Alice\", aliceSecret, \"Bob\");\n\t\tsecretService.shareSecret(\"Bob\", aliceSecret, \"Carl\");\n\t\tsecretService.unshareSecret(\"Bob\", aliceSecret, \"Carl\");\n\t\tsecretService.readSecret(\"Carl\", aliceSecret);\n\t}", "@Override\n\tpublic String checkAccount(int idc) {\n\t\treturn null;\n\t}", "public Integer getGid() {\r\n return gid;\r\n }", "public Integer getGid() {\n return gid;\n }", "public void setGid(Integer gid) {\r\n this.gid = gid;\r\n }", "GlAccount getGlAccount();", "public void setGid(Integer gid) {\n this.gid = gid;\n }", "private String CheckGcmID() {\n\n\t\tLocalData data = new LocalData(this);\n\t\ttry {\n\n\t\t\tif (data.GetS(\"gcmId\").length() == 0) {\n\n\t\t\t\treturn \"\";\n\t\t\t}\n\n\t\t\tint currentversion = getAppVersion(SplashActivity.this);\n\n\t\t\tif (currentversion != data.GetI(\"app_version\")) {\n\t\t\t\treturn \"\";\n\t\t\t}\n\n\t\t} catch (Exception exp) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\treturn data.GetS(\"gcmId\");\n\t}", "String getAccountID();", "String getAccountID();", "public static Account createNewAccount(String GID, String name, Context activity) {\r\n\t\t\r\n\t\tString[] emailParts = GID.split(\"@\"); \r\n\t\t\r\n\t\t//Check if this Account is already stored\r\n\t\tString fileName = name + \"_\" + emailParts[0] + \"_\" + emailParts[1]; \r\n\t\t\r\n\t\tFile f = new File(activity.getFilesDir(), fileName);\r\n\t\t\r\n\t\tif(f.exists()) {\r\n\t\t try {\r\n\t\t //use buffering\r\n\t\t FileInputStream fis = activity.openFileInput(fileName);\r\n\t\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tAccount recoveredAccount = (Account) ois.readObject();\r\n\t\t\t\t\tcurrentAccount = recoveredAccount;\r\n\t\t\t return recoveredAccount;\r\n\t\t\t\t}\r\n\t\t finally {\r\n\t\t \tois.close();\r\n\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t catch(ClassNotFoundException ex){\r\n\t\t \tSystem.out.println(\"Cannot perform input. Class not found.\");\r\n\t\t \treturn createAndStoreAccount(fileName, GID, name);\r\n\t\t }\r\n\t\t catch(IOException ex){\r\n\t\t System.out.println(\"Cannot perform input.\");\r\n\t\t return createAndStoreAccount(fileName, GID, name);\r\n\t\t }\r\n\t\t \r\n\t\t} else {\r\n\t\t\treturn createAndStoreAccount(fileName, GID, name, activity);\r\n\t\t}\r\n\t}", "public static Account createNewAccount(String GID, String name) {\r\n\t\t\r\n\t\tString[] emailParts = GID.split(\"@\"); \r\n\t\t\r\n\t\t//Check if this Account is already stored\r\n\t\tString fileName = name + \"_\" + emailParts[0] + \"_\" + emailParts[1]; \r\n\t\t\r\n\t\tFile f = new File(fileName);\r\n\t\t\r\n\t\tif(f.exists()) {\r\n\t\t try {\r\n\t\t //use buffering\r\n\t\t InputStream file = new FileInputStream(fileName);\r\n\t\t InputStream buffer = new BufferedInputStream(file);\r\n\t\t ObjectInput input = new ObjectInputStream(buffer);\r\n\t\t \r\n\t\t try {\r\n\t\t\t //deserialize the Account object\r\n\t\t\t Account recoveredAccount = (Account)input.readObject();\r\n\t\t\t currentAccount = recoveredAccount;\r\n\t\t\t return recoveredAccount;\r\n\t\t }\r\n\t\t \r\n\t\t finally {\r\n\t\t \tinput.close();\r\n\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t catch(ClassNotFoundException ex){\r\n\t\t \tSystem.out.println(\"Cannot perform input. Class not found.\");\r\n\t\t \treturn createAndStoreAccount(fileName, GID, name);\r\n\t\t }\r\n\t\t catch(IOException ex){\r\n\t\t System.out.println(\"Cannot perform input.\");\r\n\t\t return createAndStoreAccount(fileName, GID, name);\r\n\t\t }\r\n\t\t \r\n\t\t} else {\r\n\t\t\treturn createAndStoreAccount(fileName, GID, name);\r\n\t\t}\r\n\t}", "public long getAccountId()\r\n/* 115: */ {\r\n/* 116:121 */ return this.accountId;\r\n/* 117: */ }", "void check(Permission permission, Surrogate surrogate) throws T2DBException;", "public abstract boolean isValidID(long ID);", "@Override\r\n\tpublic boolean checkingAccount(Long accountNumber) throws QGSException {\n\t\treturn dao.checkingAccount(accountNumber);\r\n\t}", "@Test\n void getAllClientIdWithAccess_throwingGroupCheck_stillWorks() {\n when(groupsConnection.isMemberOfGroup(any(), any())).thenThrow(new RuntimeException(\"blah\"));\n AuthenticatedRegistrarAccessor registrarAccessor =\n new AuthenticatedRegistrarAccessor(\n USER, ADMIN_CLIENT_ID, SUPPORT_GROUP, lazyGroupsConnection);\n\n verify(groupsConnection).isMemberOfGroup(\"user@gmail.com\", SUPPORT_GROUP.get());\n assertThat(registrarAccessor.getAllClientIdWithRoles())\n .containsExactly(CLIENT_ID_WITH_CONTACT, OWNER);\n verify(lazyGroupsConnection).get();\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Boardgplusaccount)) {\n return false;\n }\n Boardgplusaccount other = (Boardgplusaccount) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n Toast.makeText(this, getResources().getString(R.string.autenticandoseGoogle) + \" \" + acct.getId(), Toast.LENGTH_SHORT).show();\n\n showProgressDialog();\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(), getResources().getString(R.string.autenticadoGoogle), Toast.LENGTH_SHORT).show();\n FirebaseUser user = mAuth.getCurrentUser();\n updateUI(user);\n finish();\n } else {\n Toast.makeText(getApplicationContext(), getResources().getString(R.string.autenticacionFallida), Toast.LENGTH_SHORT).show();\n updateUI(null);\n }\n hideProgressDialog();\n\n\n }\n });\n }", "private static long getRandAccount() {\n int bid = rand.nextInt(noOfBranches);\n return getRandAccountFromBranch(bid);\n }", "public Account(String GID, String name) {\r\n\t\r\n\t\tthis.GID = GID;\r\n\t\tthis.name = name;\r\n\t\tevents = new ArrayList<Event>();\r\n\t\tpastRelations = new ArrayList<Account>();\r\n\t\tsettings = new ArrayList<String>();\r\n\t}", "public double garanty(int id);", "boolean hasAccountId();", "boolean hasAccountId();", "boolean hasAccountId();", "boolean hasAccountId();", "boolean hasAccountId();", "boolean hasAccountId();", "boolean hasAccountId();", "public static long getNewAccountNo(int branchID){\n while(true){\n long accNo = getRandomAccountNo(branchID);\n if(!uniqueAccounts.get(branchID).contains(accNo)) {\n uniqueAccounts.get(branchID).add(accNo);\n accounts.get(branchID).add(accNo);\n return accNo;\n }\n }\n }", "private void FirebaseGoogleAuth(GoogleSignInAccount acct) {\n if (acct != null) {\n AuthCredential authCredential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(authCredential).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Toast.makeText(MainActivity.this, \"Successful\", Toast.LENGTH_SHORT).show();\n FirebaseUser user = mAuth.getCurrentUser();\n\n updateUI(user);\n\n } else {\n Toast.makeText(MainActivity.this, \"Failed\", Toast.LENGTH_SHORT).show();\n updateUI(null);\n }\n }\n });\n }\n else{\n Toast.makeText(MainActivity.this, \"acc failed\", Toast.LENGTH_SHORT).show();\n }\n }", "final protected boolean verifySecretID(Object ID) {\n\t\t\tif(this.SecretID == null) return true;\n\t\t\treturn UObject.equal(this .SecretID, ID); \n\t\t}", "private static long getRandAccountD() {\n int bid = rand.nextInt(noOfBranches);\n return getRandAccountFromBranchD(bid);\n }", "public boolean regRamAccount(Long ramId, Long emailId) throws Exception;", "private static GoogleIdToken verifyGoogleIdToken(String token) {\n\n GoogleIdToken idToken = null;\n\n if(token == null)\n return null;\n\n GoogleIdTokenVerifier verifier = new GoogleIdTokenVerifier.Builder(new NetHttpTransport(), new JacksonFactory())\n .setAudience(Arrays.asList(SecurityConstants.CLIENT_ID))\n .setIssuer(SecurityConstants.ISSUER)\n .build();\n\n try {\n idToken = verifier.verify(token);\n } catch (GeneralSecurityException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return idToken;\n }", "@Test\n\tpublic void test() {\n\t\tString r1 = CGroup.createRandomId();\n\t\tassertTrue(r1.matches(\"[0-9]+\"));\n\t\t\n\t\tString r2 = CGroup.createRandomId();\n\t\tassertFalse(r1.equals(r2));\n\t}", "@Test\n @Order(14)\n void update_account_2() {\n Account first = client.getAccounts().iterator().next();\n\n // mismatch is a copy, but with different client Id\n // we use client2 because it's valid in the database\n Account mismatch = new Account(first.getId(), first.getAmount()+200, client2.getId());\n Account nullCheck = service.updateAccount(mismatch);\n Assertions.assertNull(nullCheck);\n\n // get the account with the id we used to check, should not have changed\n Account check = service.getAccount(client.getId(), mismatch.getId());\n Assertions.assertEquals(first.getAmount(), check.getAmount(), 0.1);\n }", "boolean hasAccount();", "boolean hasAccount();", "boolean hasAccount();", "private int nextValidID() {\n return nextId++;\n }", "boolean isAccountLocked(String domainAwareUsername, String tenantDomain) throws AccountLockServiceException;", "final protected boolean verifySecretID(Object ID) {\n\t\tif(this.SecretID == null) return true;\n\t\treturn UObject.equal(this .SecretID, ID); \n\t}", "@Override\r\n\tpublic int generateAccountId() {\n\t\tint AccountId = (int) (Math.random()*10000);\r\n\t\treturn 0;\r\n\t}", "private void getGCM_ID() {\n if (regIDValue.length() <= 0)\n regIDValue = DriverApplication.getGCMRegistrationId(ctx);\n Log.d(\"GCM_REG_ID \", regIDValue);\n }", "boolean refillUserAccount(User user, double delta);", "@Override\npublic boolean isAccountNonLocked() {\n\treturn true;\n}", "boolean check(Permission permission, Surrogate surrogate, boolean permissionRequired) throws T2DBException;", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnSuccessListener(this, authResult -> {\n FirebaseUser user = mAuth.getCurrentUser();\n googleSignIn = 1;\n startActivity(new Intent(LoginActivity.this, HomeMainActivity.class));\n finish();\n })\n .addOnFailureListener(this, e -> Toast.makeText(LoginActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show());\n }", "boolean hasHasAccount();", "@Test\n public void accountSidTest() {\n // TODO: test accountSid\n }", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n //Log.d(TAG, \"signInWithCredential:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n mGoogleSignInClient.signOut();\n updateUI(user);\n } else {\n // If sign in fails, display a message to the user.\n //Log.w(TAG, \"signInWithCredential:failure\", task.getException());\n //Snackbar.make(findViewById(R.id.main_layout), \"Authentication Failed.\", Snackbar.LENGTH_SHORT).show();\n updateUI(null);\n }\n\n // ...\n }\n });\n }", "private boolean validateGLCode(final Transaxtion txn, final DataCollection dc) throws TaskFailedException {\n\t\tif (LOGGER.isInfoEnabled())\n\t\t\tLOGGER.info(\"Inside the ValidateGLCode2\");\n\t\tfinal HashMap hm = getGlAccountCodes();\n\t\t// if(LOGGER.isInfoEnabled()) LOGGER.info(\"HashMap value is :\"+hm);\n\t\tif (hm == null) {\n\t\t\tLOGGER.error(\"Account Codes not initialized\");\n\t\t\tdc.addMessage(\"Account Codes not initialized\", txn.getGlCode() + \" For \" + txn.getGlName());\n\t\t\treturn false;\n\t\t}\n\n\t\tif (hm.get(txn.getGlCode()) == null) {\n\t\t\tif (LOGGER.isDebugEnabled())\n\t\t\t\tLOGGER.debug(\"looking for:\" + txn.getGlCode() + \":\");\n\t\t\tfinal Iterator itr = hm.keySet().iterator();\n\t\t\twhile (itr.hasNext())\n\t\t\t\tif (LOGGER.isDebugEnabled())\n\t\t\t\t\tLOGGER.debug(\"GLCode:\" + (String) itr.next() + \":\");\n\n\t\t}\n\t\tfinal Object obj = hm.get(txn.getGlCode());\n\t\tif (LOGGER.isInfoEnabled())\n\t\t\tLOGGER.info(\"Class Name:\" + obj.getClass());\n\t\tfinal GLAccount glAcc = (GLAccount) hm.get(txn.getGlCode());\n\t\tif (glAcc == null) {\n\t\t\tdc.addMessage(\"exilInvalidCode\", txn.getGlCode() + \" For \" + txn.getGlName());\n\t\t\treturn false;\n\t\t}\n\t\ttxn.setGlName(glAcc.getName());\n\t\tif (LOGGER.isInfoEnabled())\n\t\t\tLOGGER.info(txn.getGlCode() + \" is activefor posting :\" + glAcc.isActiveForPosting());\n\t\tif (!glAcc.isActiveForPosting()) {\n\t\t\tdc.addMessage(\"exilInActiveAccount\", txn.getGlCode() + \" For \" + txn.glName);\n\t\t\treturn false;\n\t\t}\n\t\t// this can be avoided\n\t\tif (LOGGER.isInfoEnabled())\n\t\t\tLOGGER.info(\"Classification....in :\" + glAcc.getClassification());\n\t\tif (glAcc.getClassification() != 4) {\n\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\tLOGGER.info(\"classification is not detailed code\");\n\t\t\tdc.addMessage(\"exilNotDetailAccount\", txn.getGlCode());\n\t\t\treturn false;\n\t\t}\n\n\t\tif (Double.parseDouble(txn.getDrAmount()) > 0 && Double.parseDouble(txn.getCrAmount()) > 0) {\n\t\t\tdc.addMessage(\"exilInvalidTrxn\");\n\t\t\treturn false;\n\t\t}\n\t\tif (!isRequiredPresent(txn, glAcc, dc))\n\t\t\t// dc.addMessage(\"exilDataInsufficient\");\n\t\t\treturn false;\n\t\t// return checkAllMasters(dc,con);\n\t\treturn true;\n\t}", "public void testGroupDoesNotImplySameRequiredGroup() {\n User user = RoleFactory.createUser(\"foo\");\n \n Group group = RoleFactory.createGroup(\"bar\");\n group.addRequiredMember(group);\n group.addMember(user);\n \n assertFalse(m_roleChecker.isImpliedBy(group, group));\n }", "boolean validateAccount(String Account) {\n\t\treturn true;\n\n\t}", "GameState checkState(String guid, String username) throws GameStateException;", "@Test\n\tpublic void test() {\n\t\tlong firstID = UIDGen.getInstance().getNextId();\n\t\tint n = 100;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tUIDGen.getInstance().getNextId();\n\t\t}\n\t\tlong currentID = UIDGen.getInstance().getNextId();\n\t\tassertEquals(currentID, firstID + n + 1);\n\n\t\t// expect a IDInvalidException exception for using and\n\t\t// external id that has already been used\n\t\tlong exteranlId = currentID;\n\t\tThrowable caught = null;\n\t\ttry {\n\t\t\tUIDGen.getInstance().considerExternalId(exteranlId);\n\t\t} catch (Throwable t) {\n\t\t\tcaught = t;\n\t\t}\n\t\tassertNotNull(caught);\n\t\tassertSame(IDInvalidException.class, caught.getClass());\n\n\t\t// push an external id that is not used and expect no exception\n\t\texteranlId = currentID + 2;\n\t\ttry {\n\t\t\tUIDGen.getInstance().considerExternalId(exteranlId);\n\t\t} catch (Throwable t) {\n\t\t\tfail();\n\t\t}\n\n\t\t// expect an exception as we put the same id again\n\t\texteranlId = currentID;\n\t\tcaught = null;\n\t\ttry {\n\t\t\tUIDGen.getInstance().considerExternalId(exteranlId);\n\t\t} catch (Throwable t) {\n\t\t\tcaught = t;\n\t\t}\n\t\tassertNotNull(caught);\n\t\tassertSame(IDInvalidException.class, caught.getClass());\n\n\t\t// must skip currentID + 2 as it was defined as an external id\n\t\tassertEquals(UIDGen.getInstance().getNextId(), currentID + 1);\n\t\tassertEquals(UIDGen.getInstance().getNextId(), currentID + 3);\n\t}", "public void setZGID(java.lang.String param) {\r\n localZGIDTracker = param != null;\r\n\r\n this.localZGID = param;\r\n }", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n Log.d(TAG, \"firebaseAuthWithGoogle:\" + acct.getId());\n // [START_EXCLUDE silent]\n// showProgressDialog();\n // [END_EXCLUDE]\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(TAG, \"signInWithCredential:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n Toast.makeText(current,\"Sign \"+user.getEmail(),Toast.LENGTH_LONG).show();\n\n updateUI(user);\n updateCurrentUser(user);\n } else {\n // If sign in fails, display a message to the user.\n Log.w(TAG, \"signInWithCredential:failure\", task.getException());\n Toast.makeText(current,\"Failed\"+task.getException().toString(),Toast.LENGTH_LONG).show();\n updateUI(null);\n }\n\n // [START_EXCLUDE]\n// hideProgressDialog();\n // [END_EXCLUDE]\n }\n });\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Groups)) {\n return false;\n }\n Groups other = (Groups) object;\n if ((this.gid == null && other.gid != null) || (this.gid != null && !this.gid.equals(other.gid))) {\n return false;\n }\n return true;\n }", "void check(Permission permission, DBObject dBObject) throws T2DBException;", "public byte isA() { return GPObject.USERVARIABLESID; }", "public boolean assignGrader(int groupID, String grader) {\n // Replace this return statement with an implementation of this method!\n \n\t\tboolean retVal = false;\n\t\n\n\t\tString queryString;\n\t\tPreparedStatement pStatement;\n\t\tResultSet rs;\n\t\ttry{\n\n\t\t\tqueryString = \"select * from markus.assignmentgroup where group_id = \\'\" + groupID + \"\\'\"+ ';';\n\t\t\tSystem.out.println(\"Query: \" + queryString);\n\t\t\tpStatement = connection.prepareStatement(queryString);\n\t\t\trs = pStatement.executeQuery();\n\n\t\t\tif(!rs.next()){\n\t\t\t\t//no data\n\t\t\t\t//Returns false if the groupID does not exist in the AssignmentGroup table\n\t\t\t\tretVal = false;\n\t\t\t\tSystem.out.println(\"group id does not exist in assignmentgroup table\");\n\t\t\t}else{\n\n\t\t\t\tint g = rs.getInt(\"group_id\");\n\t\t\t\tqueryString = \"select * from markus.grader where group_id = \\'\" + groupID + \"\\'\"+ ';';\n\t\t\t\tSystem.out.println(\"Query: \" + queryString);\n\t\t\t\tpStatement = connection.prepareStatement(queryString);\n\t\t\t\trs = pStatement.executeQuery();\n\n\t\t\t\tif(rs.next()){\n\t\t\t\t\t//Returns false if someone has already been assigned to the group\n\t\t\t\t\tretVal = false;\n\t\t\t\t\tSystem.out.println(\"someone has already been assigned to the group\");\n\t\t\t\t}else{\n\n\t\t\t\t\tqueryString = \" insert into markus.grader values(\" + groupID + \",\\'\" + grader + \"\\');\";\n\t\t\t\t\tSystem.out.println(\"Query: \" + queryString);\n\t\t\t\t\tpStatement = connection.prepareStatement(queryString);\n\t\t\t\t\tpStatement.executeUpdate();\n\t\t\t\t\tretVal = true;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}catch(Exception se){\n\t\t\t\tSystem.err.println(\"SQL Exception.\" +\n\t\t\t\t\t\t\t\"<Message>: \" + se.getMessage());\n\t\t}\n\n\t\treturn retVal;\n }", "@Test\n @Order(16)\n void delete_account_2() {\n Account protect = client.getAccounts().iterator().next();\n boolean isDeleted = service.deleteAccount(client2.getId(), protect.getId());\n Assertions.assertFalse(isDeleted);\n }", "public void testGroupDoesNotImplySameGroup() {\n User user = RoleFactory.createUser(\"foo\");\n \n Group group = RoleFactory.createGroup(\"bar\");\n group.addMember(group);\n group.addMember(user);\n \n assertFalse(m_roleChecker.isImpliedBy(group, group));\n }", "private boolean checkIdentity(Order otherOrder) {\n\t\treturn getId() != otherOrder.getId();\n\t}", "private int getUniqueAccountNumber () {\n\n int minInt = 100000;\n int maxInt = 999999;\n int candidateNumber = -1;\n Set<Integer> listOfCurrentAccountNumbers =\n hashMapOfAllAccts.keySet();\n boolean numberIsUnique = false;\n while ( !numberIsUnique ) {\n\n candidateNumber = rng.nextInt(maxInt+1);\n // assume unique for a moment\n numberIsUnique = true;\n // verify uniqueness assumption\n for ( int acctNum : listOfCurrentAccountNumbers) {\n if (candidateNumber == acctNum) {\n numberIsUnique = false;\n break;\n }\n } // end for() loop\n\n } // end while() loop\n\n return candidateNumber;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Garantia)) {\n return false;\n }\n Garantia other = (Garantia) object;\n if ((this.idGarantia == null && other.idGarantia != null) || (this.idGarantia != null && !this.idGarantia.equals(other.idGarantia))) {\n return false;\n }\n return true;\n }", "public java.lang.Integer getGrse_id();", "public void setAccountID(Long value) {\n this.accountID = value;\n }", "public void setAccountID(Long value) {\n this.accountID = value;\n }", "@Override\n public boolean isAccountNonLocked() {\n return true;\n }", "public static long getRandAccountFromBranchD(int branchID){\n int noa = uniqueAccounts.get(branchID).size();\n int index = rand.nextInt(noa);\n long accNo = accounts.get(branchID).get(index);\n removeAccNo(branchID, index);\n return accNo;\n\n }", "public int getAccountID() {\n return accountID;\n }", "public void referToGP(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "@Override\r\n public boolean isAccountNonLocked() {\r\n return true;\r\n }", "public\n boolean\n hasAccount()\n {\n return getAccount() != null;\n }", "boolean isAccountNonLocked();", "boolean isAccountNonLocked();", "@Test\n @Order(10)\n void get_account_3() {\n client2 = service.createClient(new Client(\"Test 2\"));\n int sumOfIds = 0;\n HashSet<Client> allClients = service.getAllClients();\n for(Client c : allClients) {\n sumOfIds += c.getId();\n }\n // want to give a valid account\n Account needle = client.getAccounts().iterator().next();\n\n Account check = service.getAccount(sumOfIds, needle.getId());\n Assertions.assertNull(check);\n\n // also want to return null in the event both are valid but there is a mismatch\n // client2 is a valid user and needle is a valid account but client2 doesn't own\n // needle, so should return null\n check = service.getAccount(client2.getId(), needle.getId());\n Assertions.assertNull(check);\n }", "public boolean isValidGrantType(String applId, StringBuffer gn) throws GreensheetBaseException{\r\n\t\treturn greensheetFormDAO.isValidGrantType(applId, gn);\r\n\t}", "public String getGID(long id) {\n Log.d(TAG, \"getGID(): Start\");\n final Cursor c = mDb.getReadableDatabase().rawQuery(\n \"select \" + RundenZielTbl.GID +\n \" from \" + RundenZielTbl.TABLE_NAME +\n \" where \" + RundenZielTbl.ID + \"=\" + String.valueOf(id) +\n \";\",\n null);\n if (!c.moveToFirst()) {\n Log.d(TAG, \"getGID(): Kein Parcour gespeichert\");\n return null;\n }\n Log.d(TAG, \"getGID(): Anzahl gespeicherten Parcours - \" + c.getCount());\n String getGID = c.getString(0);\n c.close();\n return getGID;\n }", "public EmailVendor getGmailAccount() {\r\n return GmailAccount;\r\n }", "abstract int checkBalance(String accountno) throws RemoteException;", "private void firebaseAuthWithGoogle(String idToken) {\n AuthCredential credential = GoogleAuthProvider.getCredential(idToken, null);\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n FirebaseUser user = mAuth.getCurrentUser();\n assert user != null;\n Toast.makeText(SignUpActivity.this, \"Signed in as: \" + user.getDisplayName(), Toast.LENGTH_SHORT).show();\n progressDialog.dismiss();\n UpdateUI();\n }\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n e.printStackTrace();\n Toast.makeText(SignUpActivity.this, e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }", "private Long whenGuardoUnIngrediente(Ingrediente ing) {\n\t\tsession().save(ing);\n\t\treturn ing.getId();\n\t\t\n\t}", "@Test\n public void shouldSaveAndFindByChargingId() throws Exception {\n final Account expectedAccount = anAccount();\n final ChargingId expectedChargingId = expectedAccount.getChargingId();\n final Account savedAccount = repository.save(expectedAccount);\n\n assertThat(expectedAccount).isEqualToComparingFieldByField(savedAccount);\n final Account account = repository.findByChargingId(expectedChargingId);\n assertThat(account).isEqualToComparingFieldByFieldRecursively(expectedAccount);\n }", "long getLockOwnersID(String uuid) throws DatabaseException;", "public void setGroup (int g) throws PPException{\n\t\t// this test is required because it is not tested in Unit_SetGroup(...)\n\t\tif (g < 0)\n\t\t\tthrow new PPException (\"setGroup -> invalid group, must be upper 0\");\n\t\telse\n\t\t\tif (PPNative.Unit_SetGroup (id, g) == -1)\n\t\t\t\tthrow new PPException (\"setGroup -> \"+PPNative.GetError());\n\t}", "private void manageRegID(boolean force) {\n String appVer = dataSource.getPubVar(\"appVer\");\n int currAppVer = CommonStuff.getAppVersion(getApplicationContext());\n\n String regID = dataSource.getPubVar(\"regID\");\n\n // clearing this will force re-reg\n if (force)\n regID = \"\"; // clear this so we force registration to execute\n\n // Time to register for new regID with Google Play Services\n if (!String.valueOf(currAppVer).equals(appVer) || regID.equals(\"\")) {\n\n GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(this);\n String newRegID = null;\n try {\n newRegID = gcm.register(GCM_SENDER_ID);\n }\n catch (IOException e) {\n Log.e(TAG, \"manageRegID(), GCM Registration IOException: \" + e.getMessage());\n\n // If we failed we don't do anything. We will try later when we\n // re-connect to Server\n return;\n }\n\n // If we actually succeeded...\n if (newRegID != null && !newRegID.equals(\"\")) {\n dataSource.savePubVar(\"appVer\", String.valueOf(currAppVer));\n dataSource.savePubVar(\"regID\", newRegID);\n\n Log.i(TAG, \"GCM Registered, new regID: \" + newRegID);\n\n // Send regID to Server\n CtrlMessage msg = new CtrlMessage();\n msg.setIsNotification(true);\n msg.setIsSystemMessage(true);\n\n JSONObject data = new JSONObject();\n try {\n data.put(\"type\", \"ext_android_gcm_myregid\");\n data.put(\"regid\", newRegID);\n }\n catch (JSONException e) {\n e.printStackTrace();\n }\n msg.setData(data);\n\n // send to socket\n sendSocket(msg.buildMessage());\n }\n }\n }", "@Override\n public int compareTo(CheckingAccount otherAccount) { // M2 HOMEWORK COMPARETO\n int accountId1 = Integer.parseInt(this.getAccountId());\n int accountId2 = Integer.parseInt(otherAccount.getAccountId());\n\n return Integer.compare(accountId1, accountId2);\n }", "public abstract boolean isValidLock(String oid, String lockKey);", "public int getID() {\n return gID;\n }", "private void checkIDPUniqueness(UserMultiID eppnKey, String otherIDP) throws Exception {\n User eppnUser = newUser();\n eppnUser.setUserMultiKey(eppnKey);\n getUserStore().save(eppnUser);\n eppnUser.setIdP(otherIDP);\n getUserStore().save(eppnUser);\n try {\n getDBSClient().getUser(eppnKey, otherIDP);\n assert true;\n } catch (Throwable t) {\n assert false : \"Error: multiple IDP values are supported.\";\n }\n }", "@Override\npublic boolean isAccountNonExpired() {\n\treturn true;\n}", "public static boolean testGuset() {\n // Reset the guest index\n Guest.resetNextGuestIndex();\n // Create two new guests, one is with a dietary restriction\n Guest shihan = new Guest();\n Guest cheng = new Guest(\"no milk\");\n\n // Check the guest's information\n if (!shihan.toString().equals(\"#1\")) {\n System.out.println(\"Return value is \" + shihan.toString());\n return false;\n }\n // Check if the dietary restriction implement\n if (cheng.hasDietaryRestriction() != true) {\n return false;\n }\n if (!cheng.toString().equals(\"#2(no milk)\")) {\n System.out.println(\"Return value is \" + cheng.toString());\n return false;\n }\n // Reset the guest index again\n Guest.resetNextGuestIndex();\n // Create two new guests again, the index should be 1 and 2\n Guest ruoxi = new Guest();\n Guest shen = new Guest(\"no cookie\");\n // Check the new guests' information with new indices\n if (!ruoxi.toString().equals(\"#1\")) {\n System.out.println(\"Return value is \" + ruoxi.toString());\n return false;\n }\n if (!shen.toString().equals(\"#2(no cookie)\")) {\n System.out.println(\"Return value is \" + shen.toString());\n return false;\n }\n // Reset the guest index for next time or other classes' call\n Guest.resetNextGuestIndex();\n // No bug, return true\n return true;\n }", "public boolean isNotNullGroupId() {\n return genClient.cacheValueIsNotNull(CacheKey.groupId);\n }", "public abstract GDataAccount getAccount(String account) throws ServiceException;", "private void startGoogleGamesSignIn () {\n\t\tfinal GPPSignIn s = GPPSignIn.sharedInstance();\n\t\tGPGManager m = GPGManager.sharedInstance();\n\n\t\tgamesAuthBlock = new GPGReAuthenticationBlock() {\n\t\t\t@Override\n\t\t\tpublic void invoke (boolean requiresKeychainWipe, NSError error) {\n\t\t\t\t// If you hit this, auth has failed and you need to authenticate.\n\t\t\t\t// Most likely you can refresh behind the scenes\n\t\t\t\tif (requiresKeychainWipe) {\n\t\t\t\t\ts.signOut();\n\t\t\t\t}\n\t\t\t\ts.authenticate();\n\t\t\t}\n\t\t};\n\n\t\t// pass the GPPSignIn to the GPGManager.\n\t\tm.signIn(s, gamesAuthBlock);\n\t}" ]
[ "0.55560845", "0.5498423", "0.5451726", "0.54259", "0.5393402", "0.53741795", "0.53474784", "0.53332645", "0.5126319", "0.5120365", "0.5120365", "0.51076335", "0.50911814", "0.507549", "0.5034175", "0.5017843", "0.5002769", "0.49929386", "0.49845344", "0.4974223", "0.4968671", "0.49623019", "0.494264", "0.4941517", "0.4941517", "0.4941517", "0.4941517", "0.4941517", "0.4941517", "0.4941517", "0.4932375", "0.493061", "0.4908417", "0.48971817", "0.48893374", "0.4886905", "0.4885359", "0.4877565", "0.48632455", "0.48632455", "0.48632455", "0.48629397", "0.4862067", "0.48478478", "0.48409092", "0.48307034", "0.48192164", "0.4800708", "0.47998425", "0.4798525", "0.4790251", "0.47882316", "0.47804937", "0.4775726", "0.4772216", "0.47612953", "0.4760998", "0.47494024", "0.47412294", "0.47369817", "0.47357592", "0.472724", "0.4711401", "0.47018895", "0.46990505", "0.4687121", "0.46805745", "0.46769935", "0.46748206", "0.46715724", "0.4667306", "0.4667306", "0.4666869", "0.466145", "0.46586326", "0.46566778", "0.46566537", "0.46564752", "0.46514747", "0.46514747", "0.46497303", "0.46491438", "0.46491316", "0.46412164", "0.463634", "0.46362832", "0.46297815", "0.4625698", "0.46142474", "0.46123272", "0.461215", "0.46107608", "0.46099046", "0.46095645", "0.46092856", "0.4609249", "0.46086162", "0.46069607", "0.46037874", "0.46019438" ]
0.59966725
0
/ Store the changes into the file TODO Add to contracts
public void saveAccount() { String[] emailParts = GID.split("@"); //Recover the file name String fileName = name + "_" + emailParts[0] + "_" + emailParts[1]; try { //use buffering OutputStream file = new FileOutputStream( fileName ); OutputStream buffer = new BufferedOutputStream( file ); ObjectOutput output = new ObjectOutputStream( buffer ); try { output.writeObject(this); } finally { output.close(); } } catch(IOException ex){ System.out.println("Cannot perform output."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void commitChanges(){\r\n try{\r\n //Record the state of unfinished set in unfinished.dat\r\n unfinishedFileOutputStream = new FileOutputStream(UNFINISHED_FILE_PATH);\r\n unfinishedSetOutputStream = new ObjectOutputStream(unfinishedFileOutputStream);\r\n unfinishedSetOutputStream.writeObject(unfinished);\r\n unfinishedSetOutputStream.close();\r\n unfinishedFileOutputStream.close();\r\n\r\n //Record the state of finished list in finished.dat\r\n finishedFileOutputStream = new FileOutputStream(FINISHED_FILE_PATH);\r\n finishedListOutputStream = new ObjectOutputStream(finishedFileOutputStream);\r\n finishedListOutputStream.writeObject(finished);\r\n finishedListOutputStream.close();\r\n finishedFileOutputStream.close();\r\n\r\n //Record the state of activities list in activities.dat\r\n activitiesFileOutputStream = new FileOutputStream(ACTIVITIES_FILE_PATH);\r\n activitiesListOutputStream = new ObjectOutputStream(activitiesFileOutputStream);\r\n activitiesListOutputStream.writeObject(activities);\r\n activitiesListOutputStream.close();\r\n activitiesFileOutputStream.close();\r\n }\r\n catch(Exception e){\r\n System.out.println(\"Stress in commiting changes: \" + e.getMessage());\r\n e.printStackTrace();\r\n }\r\n }", "private static void saveChanges() throws IOException{\n\t\twriteToStudentsFile(); //copy all the StudentDetails objects in ALL_STUDENTS and write them to the students.txt file\n\t\twriteToBooksFile(); //copy all the BookDetails objects in ALL_BOOKS and write them to the books.txt file\n\t\tSystem.out.println(\"All Changes Successfully Saved!\");\n\t\tSystem.out.println(\"Thanks for using the Library Management System\");\n\t}", "public void save(Contract contract){\n\t\tcontractRepository.saveAndFlush(contract);\n\t}", "@Override\n public void notify(String newFileContent) {\n Repository.getRepositoryInstance().updateStockOrders(newFileContent);\n//end of modifiable zone..................E/a170c128-ca49-4fc4-abdd-43b714481007\n }", "public void commitChanges()\n {\n }", "private void updateFile() {\n try {\n this.taskStorage.save(this.taskList);\n this.aliasStorage.save(this.parser);\n } catch (IOException e) {\n System.out.println(\"Master i am unable to save the file!\");\n }\n }", "public void persist() {\n\t\ttry {\n\t\t\tFileOutputStream fos = this._context.openFileOutput(\n\t\t\t\t\tConstants.CATALOG_XML_FILE_NAME, Context.MODE_PRIVATE);\n\t\t\tfos.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" ?>\\n\".getBytes());\n\t\t\tfos.write(\"<orders>\\n\".getBytes());\n\t\t\tfor (int i = 0; i < getOrderEntryCount(); i++) {\n\t\t\t\tOrderEntry oe = getOrderEntry(i);\n\t\t\t\tfos.write(oe.toXMLString().getBytes());\n\t\t\t}\n\t\t\tfos.write(\"</orders>\\n\".getBytes());\n\t\t\tfos.flush();\n\t\t\tfos.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tLog.d(Constants.LOGTAG, \" \" + OrderList.CLASSTAG\n\t\t\t\t\t+ \"Failed to write out file?\" + e.getMessage());\n\t\t}\n\t}", "void saveContract(Contract contract) throws DataAccessException, CpmBusinessException;", "public void createContract() {\n\r\n\t}", "public void commit() {\n\t\tif (commit) {\n\t\t\t// Récupérer le path du JSON\n\t\t\tSystem.out.println(ClassLoader.getSystemResource(jsonFile));\n\t\t\tURL url = ClassLoader.getSystemResource(jsonFile);\n\t\t\t// On ouvre un flux d'écriture vers le fichier JSON\n\t\t\ttry (OutputStream ops = new FileOutputStream(Paths.get(url.toURI()).toFile())) {\n\t\t\t\t// Ecriture du fichier JSON avec formatage\n\t\t\t\t// (WithDefaultPrettyPrinter)\n\t\t\t\tobjectMapper.writerWithDefaultPrettyPrinter().writeValue(ops, database);\n\t\t\t\tlogger.info(\"OK - fichier JSON mis à jour \" + jsonFile);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tlogger.info(\"KO - FILE_NOT_FOUND\" + jsonFile);\n\t\t\t\tthrow new DataRepositoryException(\"KO - FILE_NOT_FOUND\", e);\n\t\t\t} catch (IOException e) {\n\t\t\t\tlogger.info(\"KO - I/O ERROR\" + jsonFile);\n\t\t\t\tthrow new DataRepositoryException(\"KO - I/O ERROR\", e);\n\t\t\t} catch (URISyntaxException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void save() {\r\n try {\r\n FileOutputStream fos = new FileOutputStream(REPO_STATE_FILE_NAME);\r\n fos.write(CodecUtils.toJson(this).getBytes());\r\n fos.close();\r\n } catch (Exception e) {\r\n Logging.logError(e);\r\n }\r\n }", "public abstract void saveChanges() throws SOAPException;", "public void commitChanges(){\n\t\tskipRulesView.updateSkipRule();\n\t\tvalidationRulesView.updateValidationRule();\n\t\tdynamicListsView.updateDynamicLists();\n\t}", "private synchronized void saveData() throws RuntimeException {\r\n // if too much, serialize\r\n FileReader fr = null;\r\n BufferedReader br = null;\r\n // write out to the other file\r\n FileWriter fw = null;\r\n BufferedWriter bw = null;\r\n try {\r\n // read from the current toggle file\r\n fr = new FileReader(getToggleFile());\r\n br = new BufferedReader(fr);\r\n // change files\r\n toggle = !toggle;\r\n fw = new FileWriter(getToggleFile());\r\n bw = new BufferedWriter(fw);\r\n // sort the items\r\n ProjectFilePart[] pfps = (ProjectFilePart[]) buf.toArray(new ProjectFilePart[0]);\r\n Arrays.sort(pfps);\r\n int pfpsIndex = 0;\r\n // read/copy the lines\r\n for (String line = br.readLine(); line != null; line = br.readLine()) {\r\n // if it is empty, skip\r\n if (line.trim().equals(\"\")) {\r\n continue;\r\n // load the project file part\r\n }\r\n ProjectFilePart pfp = convertToProjectFilePart(line);\r\n // check which is less\r\n if (pfpsIndex >= pfps.length || pfp.compareTo(pfps[pfpsIndex]) <= 0) {\r\n bw.write(convertToStringLine(pfp));\r\n } else if (pfp.compareTo(pfps[pfpsIndex]) > 0) {\r\n // write all of the ones that are less\r\n while (pfpsIndex < pfps.length && pfp.compareTo(pfps[pfpsIndex]) > 0) {\r\n bw.write(convertToStringLine(pfps[pfpsIndex]));\r\n pfpsIndex++;\r\n }\r\n // write out the current entry\r\n bw.write(convertToStringLine(pfp));\r\n } else {\r\n System.out.println(\"Skipping \" + pfp.getRelativeName());\r\n }\r\n }\r\n // write the rest\r\n for (; pfpsIndex < pfps.length; pfpsIndex++) {\r\n bw.write(convertToStringLine(pfps[pfpsIndex]));\r\n }\r\n // clear the buffer\r\n buf.clear();\r\n } catch (Exception e) {\r\n throw new RuntimeException(e);\r\n } finally {\r\n // close the input\r\n IOUtil.safeClose(br);\r\n IOUtil.safeClose(fr);\r\n // flush the output\r\n try {\r\n bw.flush();\r\n } catch (Exception e) {\r\n }\r\n try {\r\n fw.flush();\r\n } catch (Exception e) {\r\n }\r\n // close the output\r\n IOUtil.safeClose(bw);\r\n IOUtil.safeClose(fw);\r\n }\r\n }", "void addNewAccountToFile(Account newAccount);", "public void commit() {\n\t\tcommitted = true;\n\t\tbackUp();\n\t\t//back up the current board info at the meanwhile\n\t}", "void commit() {\n }", "@Override\n\tpublic void saveData()\n\t{\n ssaMain.d1.pin = ssaMain.tmp_pin1;\n ssaMain.d1.balance = ssaMain.tmp_balance1;\n System.out.println(\"Your account has been established successfully.\");\n\t}", "public synchronized void writeCheckpoint() {\n\t\tflush();\n\t\tpw.println(\"CHECKPOINT \" \n\t\t\t\t\t+ TransactionManager.instance().transactionList());\n\t\tflush();\n\t}", "@Override\n public void commit() throws IOException {\n if (!committed && currentFile != null) {\n long pos = currentFile.getLineReadPos();\n currentFile.setPos(pos);\n currentFile.setLastUpdated(updateTime);\n committed = true;\n }\n }", "public void writeHolders() {\n File tmp = new File(store_dir + \"/\" + repository_dir, repository_name + \".tmp\");\n File bak = new File(store_dir + \"/\" + repository_dir, repository_name + \".bak\");\n File orig = new File(store_dir + \"/\" + repository_dir, repository_name);\n try {\n this.writer = new BufferedWriter(new FileWriter(tmp));\n } catch (Exception ex) {\n ex.printStackTrace();\n throw new RuntimeException(\"Unable to open temp rep for write\");\n }\n try {\n serializer.writeResources(holders, writer);\n } catch (Exception ex) {\n ex.printStackTrace();\n throw new RuntimeException(\"Unable to write repository\");\n }\n if (!orig.renameTo(bak)) {\n System.out.println(\"unable to rename \" + orig + \" to \" + bak);\n } else {\n if (!tmp.renameTo(orig)) {\n bak.renameTo(orig);\n System.out.println(\"unable to rename \" + tmp + \" to \" + orig);\n } else {\n }\n }\n }", "public static void save() {\r\n\t\ttry {\r\n\t\t\tFile csv = new File(\"src/transaction.csv\");\r\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(csv, false));\r\n\t\t\tbw.write(\"type,account number,amount,year,month,date,cleared\");\r\n\t\t\tbw.newLine();\r\n\t\t\tfor (int i = 0; i < transList.size(); i++) {\r\n\t\t\t\tbw.write(transList.get(i).toFile());\r\n\t\t\t\tbw.newLine();\r\n\t\t\t}\r\n\t\t\tbw.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void testChanges(String filePath) {\n Object[] fileObjectArray = fetchTextFile(filePath);\n String newFile = prepareText(fileObjectArray);\n System.out.println(newFile);\n }", "R commit(C change);", "public static void applyChangesToWriteModel(AdditionsAndRetractions changes, OntModel queryModel, OntModel writeModel, String editorUri) {\n Lock lock = null;\n try{\n lock = writeModel.getLock();\n lock.enterCriticalSection(Lock.WRITE);\n writeModel.getBaseModel().notifyEvent(new EditEvent(editorUri,true)); \n writeModel.add( changes.getAdditions() );\n writeModel.remove( changes.getRetractions() );\n }catch(Throwable t){\n log.error(\"error adding edit change n3required model to in memory model \\n\"+ t.getMessage() );\n }finally{\n writeModel.getBaseModel().notifyEvent(new EditEvent(editorUri,false));\n lock.leaveCriticalSection();\n } \n }", "private void actuallyWriteData() {\r\n\t\t// Get rid of old data. Getting rid of trips, trip patterns, and blocks\r\n\t\t// is a bit complicated. Need to delete them in proper order because\r\n\t\t// of the foreign keys. Because appear to need to use plain SQL\r\n\t\t// to do so successfully (without reading in objects and then\r\n\t\t// deleting them, which takes too much time and memory). Therefore\r\n\t\t// deleting of this data is done here before writing the data.\r\n\t\tlogger.info(\"Deleting old blocks and associated trips from database...\");\r\n\t\tBlock.deleteFromSandboxRev(session);\r\n\r\n\t\tlogger.info(\"Deleting old trips from database...\");\r\n\t\tTrip.deleteFromSandboxRev(session);\r\n\r\n\t\tlogger.info(\"Deleting old trip patterns from database...\");\r\n\t\tTripPattern.deleteFromSandboxRev(session);\r\n\t\t\r\n\t\t// Now write the data to the database.\r\n\t\t// First write the Blocks. This will also write the Trips, TripPatterns,\r\n\t\t// Paths, and TravelTimes since those all have been configured to be\r\n\t\t// cascade=CascadeType.ALL .\r\n\t\tlogger.info(\"Saving {} blocks (plus associated trips) to database...\", \r\n\t\t\t\tgtfsData.getBlocks().size());\r\n\t\tint c = 0;\r\n\t\tfor (Block block : gtfsData.getBlocks()) {\r\n\t\t\tlogger.debug(\"Saving block #{} with blockId={} serviceId={} blockId={}\",\r\n\t\t\t\t\t++c, block.getId(), block.getServiceId(), block.getId());\r\n\t\t\twriteObject(block);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving routes to database...\");\r\n\t\tRoute.deleteFromSandboxRev(session);\r\n\t\tfor (Route route : gtfsData.getRoutes()) {\r\n\t\t\twriteObject(route);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving stops to database...\");\r\n\t\tStop.deleteFromSandboxRev(session);\r\n\t\tfor (Stop stop : gtfsData.getStops()) {\r\n\t\t\twriteObject(stop);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving agencies to database...\");\r\n\t\tAgency.deleteFromSandboxRev(session);\r\n\t\tfor (Agency agency : gtfsData.getAgencies()) {\r\n\t\t\twriteObject(agency);\r\n\t\t}\r\n\r\n\t\tlogger.info(\"Saving calendars to database...\");\r\n\t\tCalendar.deleteFromSandboxRev(session);\r\n\t\tfor (Calendar calendar : gtfsData.getCalendars()) {\r\n\t\t\twriteObject(calendar);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving calendar dates to database...\");\r\n\t\tCalendarDate.deleteFromSandboxRev(session);\r\n\t\tfor (CalendarDate calendarDate : gtfsData.getCalendarDates()) {\r\n\t\t\twriteObject(calendarDate);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving fare rules to database...\");\r\n\t\tFareRule.deleteFromSandboxRev(session);\r\n\t\tfor (FareRule fareRule : gtfsData.getFareRules()) {\r\n\t\t\twriteObject(fareRule);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving fare attributes to database...\");\r\n\t\tFareAttribute.deleteFromSandboxRev(session);\r\n\t\tfor (FareAttribute fareAttribute : gtfsData.getFareAttributes()) {\r\n\t\t\twriteObject(fareAttribute);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving frequencies to database...\");\r\n\t\tFrequency.deleteFromSandboxRev(session);\r\n\t\tfor (Frequency frequency : gtfsData.getFrequencies()) {\r\n\t\t\twriteObject(frequency);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving transfers to database...\");\r\n\t\tTransfer.deleteFromSandboxRev(session);\r\n\t\tfor (Transfer transfer : gtfsData.getTransfers()) {\r\n\t\t\twriteObject(transfer);\r\n\t\t}\r\n\t}", "public void saveInformation(){\n market.saveInformationOfMarket();\n deckProductionCardOneBlu.saveInformationOfProductionDeck();\n deckProductionCardOneGreen.saveInformationOfProductionDeck();\n deckProductionCardOneViolet.saveInformationOfProductionDeck();\n deckProductionCardOneYellow.saveInformationOfProductionDeck();\n deckProductionCardThreeBlu.saveInformationOfProductionDeck();\n deckProductionCardThreeGreen.saveInformationOfProductionDeck();\n deckProductionCardThreeYellow.saveInformationOfProductionDeck();\n deckProductionCardThreeViolet.saveInformationOfProductionDeck();\n deckProductionCardTwoBlu.saveInformationOfProductionDeck();\n deckProductionCardTwoGreen.saveInformationOfProductionDeck();\n deckProductionCardTwoViolet.saveInformationOfProductionDeck();\n deckProductionCardTwoYellow.saveInformationOfProductionDeck();\n\n\n }", "public static void commit(Context context) {\n HashMap<String, Object> pending = new HashMap<>();\r\n synchronized(Cacher.class) {\r\n pending.putAll(Cacher.pending);\r\n Cacher.pending.clear();\r\n }\r\n Log.d(TAG, \"Starting commit of \" + pending.size() + \" changes\");\r\n // Prepare root dir\r\n File rootDir = new File(context.getCacheDir(), CACHE_NAME);\r\n if(!rootDir.exists())\r\n rootDir.mkdirs();\r\n // Write all\r\n for(Map.Entry<String, Object> e : pending.entrySet()) {\r\n String name = e.getKey();\r\n Object value = e.getValue();\r\n NamedLock lock = lock(name);\r\n File file = new File(context.getCacheDir(), CACHE_PREFIX + Integer.toHexString(name.hashCode()));\r\n try {\r\n HashMap<String, String> map;\r\n try {\r\n if(!file.exists())\r\n map = new HashMap<>();\r\n else {\r\n String data = readFile(file);\r\n if(data.length() == 0 || ((map = gson.fromJson(data, HashMap.class)) == null))\r\n map = new HashMap<>(); // new cache\r\n }\r\n } catch (Throwable t) {\r\n Log.e(TAG, \"Unable to open cache for writing: \" + file.getPath(), t);\r\n map = new HashMap<>(); // create empty cache\r\n }\r\n if (value == null) {\r\n if(map.remove(name) == null)\r\n return; // nothing was removed, no changes\r\n if (map.size() == 0) {\r\n if(lastCacheSize != -1)\r\n lastCacheSize -= file.length();\r\n file.delete(); // no more data here\r\n }\r\n } else {\r\n if(lastCacheSize != -1)\r\n lastCacheSize -= file.length();\r\n map.put(name, gson.toJson(value));\r\n writeFile(file, gson.toJson(map));\r\n file.setLastModified(System.currentTimeMillis());\r\n if(lastCacheSize != -1)\r\n lastCacheSize += file.length();\r\n }\r\n } catch (Throwable t) {\r\n Log.e(TAG, \"Unable to write cache \" + file.getPath() + \" for \" + name, t);\r\n // ignore\r\n } finally {\r\n lock.unlock();\r\n }\r\n }\r\n // Next cleanup cache\r\n if(lastCacheSize != -1 && lastCacheSize < CACHE_SIZE)\r\n return; // no need to cleanup cache\r\n lastCacheSize = 0; // reset\r\n File[] files = rootDir.listFiles();\r\n long[] timestamps = new long[files.length];\r\n long[] size = new long[files.length];\r\n // Collect all data\r\n for (int c = 0; c < files.length; c++) {\r\n File file = files[c];\r\n if (file.isDirectory()) {\r\n files[c] = null;\r\n timestamps[c] = Long.MAX_VALUE;\r\n size[c] = 0;\r\n } else {\r\n timestamps[c] = file.lastModified();\r\n size[c] = file.length();\r\n }\r\n lastCacheSize += size[c];\r\n }\r\n // Keep trimming as needed\r\n while (lastCacheSize > CACHE_SIZE) {\r\n // Select oldest file\r\n int oldest = -1;\r\n long oldestTimestamp = Long.MAX_VALUE;\r\n for (int c = 0; c < files.length; c++) {\r\n if (timestamps[c] < oldestTimestamp) {\r\n oldest = c;\r\n oldestTimestamp = timestamps[c];\r\n }\r\n }\r\n // Delete this file\r\n lastCacheSize -= size[oldest];\r\n files[oldest].delete();\r\n timestamps[oldest] = Long.MAX_VALUE;\r\n }\r\n Log.d(TAG, \"Trimmed cache to \" + lastCacheSize + \" bytes\");\r\n // Done\r\n }", "@Override\n\tpublic void commitInmate(InmateData inmate) {\n\t\t\n\t}", "public void commit() throws IOException {\n\t\t\tif (hasErrors) {\n\t\t\t\tcompleteEdit(this, false);\n\t\t\t\tremove(entry.key); // the previous entry is stale\n\t\t\t} else {\n\t\t\t\tcompleteEdit(this, true);\n\t\t\t}\n\t\t}", "public static synchronized void save() {\n\n String team_fil = config.Server.serverdata_file_location + \"/teams.ser\";\n String team_backup = config.Server.serverdata_file_location + \"/teams\";\n\n Calendar dato = new GregorianCalendar();\n\n team_backup += dato.get(Calendar.YEAR) + \"-\" + dato.get(Calendar.DAY_OF_MONTH) + \"-\" + dato.get(Calendar.MONTH) + \"-\";\n team_backup += dato.get(Calendar.HOUR) + \"-\" + dato.get(Calendar.MINUTE) + \".ser\";\n\n admin.logging.globalserverMsg(\"Saving team data to file.\");\n\n try {\n FileOutputStream fil = new FileOutputStream(team_fil);\n FileOutputStream fil_backup = new FileOutputStream(team_backup);\n\n //Skriv til teams.txt\n ObjectOutputStream out = new ObjectOutputStream(fil);\n out.writeObject(team_list);\n out.flush();\n out.close();\n fil.close();\n\n //Skriv til backup fil.\n out = new ObjectOutputStream(fil_backup);\n out.writeObject(team_list);\n out.flush();\n out.close();\n fil.close();\n } catch (Exception e) {\n e.printStackTrace();\n admin.logging.globalserverMsg(\"Error saving team data to file.\");\n }\n }", "private void saveData() {\n }", "void save() {\n File file = new File(main.myPath + \"state.xml\");\n Framework.backup(main.myPath + \"state.xml\");\n Framework.transform(stateDoc, new StreamResult(file), null);\n setDirty(false);\n }", "public void commit() {\n\t\tcommitted = true;\n\t}", "private void persist() {\n \t\ttry {\n \t\t\tproblemFile = File.createTempFile(\"p2Encoding\", \".opb\"); //$NON-NLS-1$//$NON-NLS-2$\n \t\t\tBufferedWriter w = new BufferedWriter(new FileWriter(problemFile));\n \t\t\tint clauseCount = tautologies.size() + dependencies.size() + constraints.size();\n \n \t\t\tint variableCount = variables.size();\n \t\t\tw.write(\"* #variable= \" + variableCount + \" #constraint= \" + clauseCount + \" \"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n \t\t\tw.newLine();\n \t\t\tw.write(\"*\"); //$NON-NLS-1$\n \t\t\tw.newLine();\n \n \t\t\tif (variableCount == 0 && clauseCount == 0) {\n \t\t\t\tw.close();\n \t\t\t\treturn;\n \t\t\t}\n \t\t\tw.write(objective);\n \t\t\tw.newLine();\n \t\t\tw.newLine();\n \n \t\t\tw.write(explanation + \" ;\"); //$NON-NLS-1$\n \t\t\tw.newLine();\n \t\t\tw.newLine();\n \n \t\t\tfor (Iterator iterator = dependencies.iterator(); iterator.hasNext();) {\n \t\t\t\tw.write((String) iterator.next());\n \t\t\t\tw.newLine();\n \t\t\t}\n \t\t\tfor (Iterator iterator = constraints.iterator(); iterator.hasNext();) {\n \t\t\t\tw.write((String) iterator.next());\n \t\t\t\tw.newLine();\n \t\t\t}\n \t\t\tfor (Iterator iterator = tautologies.iterator(); iterator.hasNext();) {\n \t\t\t\tw.write((String) iterator.next());\n \t\t\t\tw.newLine();\n \t\t\t}\n \t\t\tw.close();\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}", "private void updateDatFile() {\n\t\tIOService<?> ioManager = new IOService<Entity>();\n\t\ttry {\n\t\t\tioManager.writeToFile(FileDataWrapper.productMap.values(), new Product());\n\t\t\tioManager = null;\n\t\t} catch (Exception ex) {\n\t\t\tDisplayUtil.displayValidationError(buttonPanel, StoreConstants.ERROR + \" saving new product\");\n\t\t\tioManager = null;\n\t\t}\n\t}", "@Override\n\tpublic void commit() {\n\n\t}", "public void commit() {\n doCommit();\n }", "static void writeFile(){\n try{\n Path contactsListPath = Paths.get(\"contacts\",\"contacts.txt\");\n Files.write(contactsListPath, contactList);\n } catch(IOException ioe){\n ioe.printStackTrace();\n }\n //refreshes list of Contact objs\n fileToContactObjs();\n }", "void createOrUpdateContracts(List<PsdContract> wrapContracts);", "public void save () {\n // Make sure the workspace folder exist\n createFolder(this.pathToWorkspaceFolder);\n\n // Write the serialized Flow object\n System.out.println(\"Saving\");\n try (FileWriter file = new FileWriter(this.pathToWorkspaceFolder.toString() + \"/\" + FLOW_FILE_NAME)) {\n file.write(flow.serialize());\n System.out.println(\"Successfully Copied Flow \" + flow.getId() + \" to File :)\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tprotected void save() throws Exception {\n\t\t//turn the list of data into a unique list of tickets\n\t\tMap<String, ExtTicketVO> tickets= new HashMap<>(data.size());\n\t\tfor (SOHDRFileVO dataVo : data) {\n\t\t\t//035 are harvests and all we care about\n\t\t\tif (\"035\".equals(dataVo.getSoType())) {\n\t\t\t\tExtTicketVO vo = transposeTicketData(dataVo, new ExtTicketVO());\n\t\t\t\ttickets.put(vo.getTicketId(), vo);\n\t\t\t}\n\t\t}\n\n\t\tpopulateTicketDBData(tickets);\n\n\t\ttickets = removeGhostRecords(tickets);\n\n\t\t//don't bother with the rest of this class if we have no tickets\n\t\tif (tickets.isEmpty()) return;\n\n\t\tdecomissionUnits(tickets.keySet()); //ticket\n\n\t\tpurgePartShipments(tickets.keySet()); //calls purgeShipments to cascade deletion\n\n\t\tsetDispositionCode(tickets); //ticket_data attr_dispositionCode\tNONREPAIRABLE\n\n\t\tcorrectLedgerEntries(tickets);\n\t}", "protected abstract boolean onSave(CommitBuilder commit)\n throws IOException, ConfigInvalidException;", "@Override\n abstract public void commitPendingXmlChanges();", "private void saveData() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Insert the book only if mBookId matches DEFAULT_BOOK_ID\n // Otherwise update it\n // call finish in any case\n if (mBookId == DEFAULT_BOOK_ID) {\n mDb.bookDao().insertBook(bookEntry);\n } else {\n //update book\n bookEntry.setId(mBookId);\n mDb.bookDao().updateBook(bookEntry);\n }\n finish();\n }\n });\n }", "void saveContracts(List<Contract> contractList) \n throws DataAccessException, CpmBusinessException;", "public void commit() {\n }", "public void commit();", "public void save(List<Task> changed){\n\n try {\n FileWriter fw = new FileWriter(path);\n for (int i = 0; i < changed.size(); i++) {\n\n String temp = (i+1) + \".\" + changed.get(i).list() + System.lineSeparator();\n fw.write(temp);\n }\n fw.close();\n }catch(IOException e){\n e.printStackTrace();\n }\n }", "@Override\n public void commit() {\n }", "public static void contractors(){\n NewProject.contract_name = getInput(\"Please enter the NEW name of the contractor:\");\r\n\r\n NewProject.contract_tel = getInput(\"Please enter the NEW telephone number of the contractor:\");\r\n\r\n NewProject.contract_email = getInput(\"Please enter the NEW email of the contractor:\");\r\n\r\n NewProject.contract_address = getInput(\"Please enter the NEW email of the contractor:\");\r\n\r\n UpdateData.updateContractor();\r\n updateMenu();\t//Return back to previous menu.\r\n }", "public boolean modifyContract(Contract contract) {\n\t\treturn contractdao.modifyContract(contract);\n\t}", "public void save() {\n DataBuffer.saveDataLocally();\n\n //TODO save to db must be done properly\n DataBuffer.save(session);\n\n //TODO recording saved confirmation\n }", "public void update() throws IOException{\r\n\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(\"agenda.txt\", false));\r\n\t\toos.writeObject(artists);\r\n\t\toos.writeObject(stages);\r\n\t\toos.writeObject(performances);\r\n\t\tartists.clear();\r\n\t\tstages.clear();\r\n\t\tperformances.clear();\r\n\t\toos.close();\r\n\t}", "void save() {\n gameModelPoDao.saveToFile(file.getAbsolutePath(), gameModelPo);\n }", "private void commitRepChanges() {\r\n\t\t\r\n\t\t// get repository info\r\n\t\tString repURL = repURLFld.getText();\r\n\t\tString boURI = repBaseOntFld.getText();\r\n\t\tthis.repositoryAuthor = repAuthorFld.getText();\r\n\t\tthis.reposityCreatedDate = repDateFld.getText();\r\n\t\t\r\n\t\tString status = \"Status: [ACTION - Commit to Repository]...\";\r\n\t\ttry {\r\n\t\t\tthis.repositoryURI = new URI(repURL);\r\n\t\t\tthis.baseOntologyURI = new URI(boURI);\r\n\t\t}\r\n\t\tcatch (URISyntaxException ex) {\r\n\t\t\tstatusBar.setText(status+\"Invalid Repository URL and/or Base Ontology URI\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// check if repository already exists\r\n\t\t\tboolean repExists = this.loadRepositoryHeader();\r\n\t\t\t\r\n\t\t\tif (!repExists) {\r\n\t\t\t\t// creating new repository\r\n\t\t\t\t// form repository header\r\n\t\t\t\tURI[] headerURI = new URI[1];\r\n\t\t\t\theaderURI[0] = new URI(this.repositoryURI+\"#header\");\r\n\t\t\t\t\r\n\t\t\t\tif (this.repositoryAuthor.equals(\"\") || this.reposityCreatedDate.equals(\"\")) {\r\n\t\t\t\t\tint opt = JOptionPane.showConfirmDialog(null, \"Repository Author and/or Date not specified. Continue?\", \"Creating Repository\", JOptionPane.YES_NO_OPTION);\r\n\t\t\t\t\tif (opt == JOptionPane.NO_OPTION) return;\r\n\t\t\t\t}\r\n\t\t\t\t// create annotea description for header\r\n\t\t\t\tDescription header = new Description();\r\n\t\t\t\theader.setAnnotates(headerURI);\r\n\t\t\t\theader.setAuthor(this.repositoryAuthor);\r\n\t\t\t\theader.setCreated(this.reposityCreatedDate);\r\n\t\t\t\theader.setAnnotatedEntityDefinition(this.baseOntologyURI.toString());\r\n\t\t\t\tthis.headVersionNumber = 0;\r\n\t\t\t\theader.setBody(String.valueOf(this.headVersionNumber));\r\n\t\t\t\theader.setBodyType(\"text/html\");\r\n\t\t\t\theader.setAnnotationType(this.annotType);\r\n\t\t\t\tclient.post(header);\r\n\t\t\t\tstatusBar.setText(status+\"Ontology Repository Header posted at \"+headerURI[0]);\r\n\t\t\t\ttoggleRepOptions(false);\r\n\t\t\t\tversionDescriptions[0] = header;\r\n\t\t\t\tswoopModel.updateVersionRepository(repositoryURI, versionDescriptions);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// test changes\r\n\t\t\tboolean success = this.testChanges(true);\r\n\t\t\tif (success){\r\n\t\t\t\t// prompt user for comment on commit\r\n\t\t\t\tString commitComment = JOptionPane.showInputDialog(this, \"COMMIT New Version (Details):\");\r\n\t\t\t\t\r\n\t\t\t\tif (commitComment==null) {\r\n\t\t\t\t\tstatusBar.setText(status+\"CANCELLED\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// transform SwoopChange list to Description list (to save author, date, uris etc)\r\n\t\t\t\tList descList = transformChangeList(repChanges);\r\n\t\t\t\t// serialize each description into RDF/XML\r\n\t\t\t\t// and make it one large string with separator (\"[SWOOP-ANNOTATED-CHANGE-SET]\") in the middle\r\n\t\t\t\tString largeChangeSetString = \"\";\r\n\t\t\t\tfor (Iterator iter = descList.iterator(); iter.hasNext();) {\r\n\t\t\t\t\tDescription desc = (Description) iter.next();\r\n\t\t\t\t\tString descStr = desc.serializeIntoString(swoopModel);\t\t\t\t\t\r\n\t\t\t\t\tlargeChangeSetString += descStr + separator;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// ENCODE CDATA\r\n\t\t\t\tlargeChangeSetString = largeChangeSetString.replaceAll(\"CDATA\", \"ENCODED-CDATA\");\r\n\t\t\t\tlargeChangeSetString = largeChangeSetString.replaceAll(\"]]>\", \"]ENCODED]>\");\r\n\t\t\t\t\r\n\t\t\t\t// finally commit a single annotation with the entire changeset string in the body\r\n\t\t\t\t// also allow author to make annotation on commit\r\n\t\t\t\tDescription commit = new Description();\r\n\t\t\t\tcommit.setAuthor(swoopModel.getUserName());\r\n\t\t\t\tcommit.setCreated(swoopModel.getTimeStamp());\r\n\t\t\t\tcommit.setBody(largeChangeSetString);\r\n\t\t\t\tcommit.setBodyType(\"text/html\");\r\n\t\t\t\tcommit.setAnnotatedEntityDefinition(commitComment);\r\n\t\t\t\tcommit.setAnnotationType(this.annotType);\r\n\t\t\t\t\r\n\t\t\t\t// increment headVersionNum and write new commit\r\n\t\t\t\t// at repURL+\"#\"+headVersionNum\r\n\t\t\t\tthis.headVersionNumber++;\r\n\t\t\t\tURI[] annotates = new URI[1];\r\n\t\t\t\tannotates[0] = new URI(repositoryURI.toString()+\"#\"+String.valueOf(this.headVersionNumber));\r\n\t\t\t\tcommit.setAnnotates(annotates);\r\n\t\t\t\t// COMMIT!\r\n\t\t\t\tclient.post(commit);\r\n\t\t\t\t\r\n\t\t\t\t// post-process:\r\n\t\t\t\t// 1. rewrite rep header added newly incremented headVersionNumber \r\n\t\t\t\tthis.rewriteRepHeader();\r\n\t\t\t\t// 2. set newCommitNode params to current commit\r\n\t\t\t\tnewCommitNode.swoopChange.setAuthor(commit.getAuthor());\r\n\t\t\t\tnewCommitNode.swoopChange.setTimeStamp(commit.getCreated());\r\n\t\t\t\tnewCommitNode.swoopChange.setDescription(commit.getAnnotatedEntityDefinition());\r\n\t\t\t\t// 3. save newCommitNode in versionCommits array and Description in versionDescriptions array\r\n\t\t\t\tversionNodes[this.headVersionNumber] = newCommitNode;\r\n\t\t\t\tversionDescriptions[this.headVersionNumber] = commit;\r\n\t\t\t\tswoopModel.updateVersionRepository(repositoryURI, versionDescriptions);\r\n\t\t\t\t// 4. for each child of newCommitNode, set its swoopChange.onRepository value to true\r\n\t\t\t\tfor (Iterator iter3=newCommitNode.children.iterator(); iter3.hasNext();) {\r\n\t\t\t\t\tTreeTableNode child = (TreeTableNode) iter3.next();\r\n\t\t\t\t\tchild.swoopChange.isOnRepository = true;\r\n\t\t\t\t}\r\n\t\t\t\t// 5. create newCommitNode and add to root at the end\r\n\t\t\t\tnewCommitNode = new TreeTableNode(new SwoopChange(swoopModel.getUserName(), null, null, swoopModel.getTimeStamp(), \"New Version Commit\", true, false));\r\n\t\t\t\tnewCommitNode.swoopChange.isTopNode = true;\r\n\t\t\t\trepRoot.addChild(newCommitNode);\r\n\t\t\t\trepChanges = new ArrayList(); // also clear this\r\n\t\t\t\tstatusBar.setText(status+\"Committed New Version \"+this.headVersionNumber);\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\tcatch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\tstatusBar.setText(status+\"FAILED\");\r\n\t\t}\r\n\t\tthis.refreshRepTreeTable(false);\r\n\t}", "private void writeMetadataChangeMarkerFile() {\n try {\n //noinspection ResultOfMethodCallIgnored\n new File(pathsProvider.getLocalProgramTempDir(), \"dbchangemarker.txt\").createNewFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void updateCoins() {\r\n\t\tFile file = new File(\".coinSave\");\r\n\r\n\t\tPrintWriter pw;\r\n\t\ttry {\r\n\t\t\tpw = new PrintWriter(file);\r\n\t\t\tpw.close();\r\n\r\n\t\t\tFileWriter fw = new FileWriter(file);\r\n\t\t\tBufferedWriter bw = new BufferedWriter(fw);\r\n\r\n\t\t\tbw.write(_hiddenCoins + \"\\n\");\r\n\t\t\tbw.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "void commit();", "void commit();", "@Override\n public void save() {\n \n }", "public void addCommit(Commit commit) throws IOException {\n String fileName = commit.getShaCode();\n File actualFile = new File(Main.ALL_COMMITS, fileName);\n if (!actualFile.exists()) {\n actualFile.createNewFile();\n }\n Utils.writeObject(actualFile, commit);\n }", "private void updrec() {\n\t\tsavedata();\n\t\tcontractDetail.retrieve(stateVariable.getXwordn(), stateVariable.getXwabcd());\n\t\tnmfkpinds.setPgmInd36(! lastIO.isFound());\n\t\tnmfkpinds.setPgmInd66(isLastError());\n\t\t// BR00011 Product found on Contract_Detail and NOT ERROR(CONDET)\n\t\tif (! nmfkpinds.pgmInd36() && ! nmfkpinds.pgmInd66()) {\n\t\t\trestoredata();\n\t\t\tcontractDetail.update();\n\t\t\tnmfkpinds.setPgmInd99(isLastError());\n\t\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\t\tmsgObjIdx = setMsgObj(\"Y2U0007\", \"\", msgObjIdx, messages);\n\t\t\t\tstateVariable.setZmsage(subString(errmsg, 1, 78));\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tstateVariable.setZmsage(subString(errmsg, 1, 78));\n\t\t}\n\t}", "private void storeProperties() {\n Path path = getSamplePropertiesPath();\n LOG.info(\"Storing Properties to {}\", path.toString());\n try {\n final FileOutputStream fos = new FileOutputStream(path.toFile());\n final Properties properties = new Properties();\n String privateKey = this.credentials.getEcKeyPair().getPrivateKey().toString(16);\n properties.setProperty(PRIVATE_KEY, privateKey);\n properties.setProperty(CONTRACT1_ADDRESS, this.contract1Address);\n properties.setProperty(CONTRACT2_ADDRESS, this.contract2Address);\n properties.setProperty(CONTRACT3_ADDRESS, this.contract3Address);\n properties.setProperty(CONTRACT4_ADDRESS, this.contract4Address);\n properties.setProperty(CONTRACT5_ADDRESS, this.contract5Address);\n properties.setProperty(CONTRACT6_ADDRESS, this.contract6Address);\n properties.store(fos, \"Sample code properties file\");\n\n } catch (IOException ioEx) {\n // By the time we have reached the loadProperties method, we should be sure the file\n // exists. As such, just throw an exception to stop.\n throw new RuntimeException(ioEx);\n }\n }", "public void updateContract(Contract contract) {\r\n\r\n\t\ttry {\r\n\t\t\tthis.em.merge(contract);\r\n\t\t} catch (PersistenceException e) {\r\n\t\t\tthrow new TechnicalException(\r\n\t\t\t\t\t\"Technical Exception in updateContract()\", e);\r\n\t\t}\t\t\r\n\r\n\t}", "public void saveBeforeCompile() { }", "public void saveBeforeCompile() { }", "public void updateTransaction(){\n\n System.out.println(\"Update transaction with ID: \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n Transaction newTransaction = this.ctrl.getTransactions().findOne(id).get();\n System.out.println(\"Choose an action: \\n 1.Change the client details. \\n\" +\n \"2.Add a new item to the same transaction. \\n 3.Update the date.\");\n\n String option = bufferRead.readLine();\n\n switch (option) {\n case \"1\":\n System.out.println(\"New client? \");\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n Long clientId = ((Client) this.ctrl.getAllClients().toArray()[clientOption - 1]).getId();\n System.out.println(\"Enter new characteristics: \");\n System.out.println(\"Name: \");\n String newName = bufferRead.readLine();\n System.out.println(\"Age: \");\n int newAge = Integer.parseInt(bufferRead.readLine());\n System.out.println(\"Membership type: \");\n String newMembershipType = bufferRead.readLine();\n\n c = new Client(newName, newAge, newMembershipType);\n c.setId(clientId);\n ctrl.updateClient(c);\n }\n newTransaction.setClient(c);\n ctrl.updateTransaction(newTransaction);\n break;\n case \"2\":\n System.out.println(\"Choose the item you would like to add: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int itemOption = 0;\n\n itemOption = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[itemOption - 1];\n newTransaction.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Choose another item(or stop if you have finished adding): \");\n sOption = bufferRead.readLine();\n }\n ctrl.updateTransaction(newTransaction);\n break;\n case \"3\":\n System.out.println(\"Enter a new date(dd/mm/yyyy): \");\n String newDate = bufferRead.readLine();\n newTransaction.setDate(newDate);\n ctrl.updateTransaction(newTransaction);\n break;\n default:\n break;\n\n }\n\n\n\n this.ctrl.updateTransaction(newTransaction);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n }", "public void saveFormData() throws edu.mit.coeus.exception.CoeusException {\r\n //Modified for COEUSDEV-413 : Subcontract Custom data bug - Data getting wiped out - Start\r\n// if( isDataChanged() ){\r\n\t\tif( isDataChanged() || getFunctionType() == NEW_ENTRY_SUBCONTRACT || getFunctionType() == NEW_SUBCONTRACT) { //COEUSDEV-413 : End\r\n Vector genericColumnValues = customElementsForm.getOtherColumnElementData();\r\n\t\t\tif( genericColumnValues != null && genericColumnValues.size() > 0 ){\r\n\t\t\t\tCustomElementsInfoBean genericCustElementsBean = null;\r\n\t\t\t\tint dataSize = genericColumnValues.size();\r\n\t\t\t\tfor( int indx = 0; indx < dataSize; indx++ ) {\r\n\t\t\t\t\tgenericCustElementsBean = (CustomElementsInfoBean)genericColumnValues.get(indx);\r\n\t\t\t\t\tSubContractCustomDataBean subContractCustomDataBean\r\n\t\t\t\t\t= new SubContractCustomDataBean(genericCustElementsBean);\r\n SubContractCustomDataBean oldSubContractCustomDataBean = (SubContractCustomDataBean)genericColumnValues.get(indx);\r\n\t\t\t\t\tif(getFunctionType() == NEW_ENTRY_SUBCONTRACT) {\r\n\t\t\t\t\t\tsubContractCustomDataBean.setAcType(\"I\");\r\n//\t\t\t\t\t\tsubContractCustomDataBean.setSubContractCode(this.subContractBean.getSubContractCode());\r\n//\t\t\t\t\t\tsubContractCustomDataBean.setSequenceNumber(this.subContractBean.getSequenceNumber());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif( INSERT_RECORD.equals(subContractCustomDataBean.getAcType()) ) {\r\n\t\t\t\t\t\tsubContractCustomDataBean.setSubContractCode(this.subContractBean.getSubContractCode());\r\n\t\t\t\t\t\tsubContractCustomDataBean.setSequenceNumber(this.subContractBean.getSequenceNumber());\r\n \r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif( genericCustElementsBean instanceof SubContractCustomDataBean ) {\r\n//\t\t\t\t\t\t\tSubContractCustomDataBean oldSubContractCustomDataBean =\r\n//\t\t\t\t\t\t\t(SubContractCustomDataBean)genericCustElementsBean;\r\n\t\t\t\t\t\t\tsubContractCustomDataBean.setAcType(genericCustElementsBean.getAcType());\r\n\t\t\t\t\t\t\tsubContractCustomDataBean.setSubContractCode(oldSubContractCustomDataBean.getSubContractCode());\r\n\t\t\t\t\t\t\tsubContractCustomDataBean.setSequenceNumber(oldSubContractCustomDataBean.getSequenceNumber());\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tString custAcType = subContractCustomDataBean.getAcType();\r\n\t\t\t\t\t\tif( UPDATE_RECORD.equals(custAcType) ){\r\n//\t\t\t\t\t\t\tsubContractCustomDataBean.setSubContractCode(this.subContractBean.getSubContractCode());\r\n//\t\t\t\t\t\t\tsubContractCustomDataBean.setSequenceNumber(this.subContractBean.getSequenceNumber());\r\n\t\t\t\t\t\t\tqueryEngine.update(queryKey, subContractCustomDataBean);\r\n\t\t\t\t\t\t}else if( INSERT_RECORD.equals(custAcType)){\r\n\t\t\t\t\t\t\tsubContractCustomDataBean.setSubContractCode(this.subContractBean.getSubContractCode());\r\n\t\t\t\t\t\t\tsubContractCustomDataBean.setSequenceNumber(this.subContractBean.getSequenceNumber());\r\n\t\t\t\t\t\t\tqueryEngine.insert(queryKey, subContractCustomDataBean);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}catch ( CoeusException ce ) {\r\n\t\t\t\t\t\tce.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcustomElementsForm.setSaveRequired(false);\r\n\t\t}\r\n\t}", "public static void saveReceipt()\r\n\t{\r\n\t\tPrintWriter listWriter = null;\r\n\t\tPrintWriter contentWriter = null;\r\n\t\tnewReceipt = getTimeStamp();\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tlistWriter = new PrintWriter(new FileOutputStream(RECEIPT_LIST_FILE, true));\r\n\t\t\tcontentWriter = new PrintWriter(RECEIPT_PATH + newReceipt);\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(null,\"File Not Found\");\r\n\t\t}\r\n\t\t\r\n\t\tlistWriter.println(newReceipt);\r\n\t\tfor(int count=0; count < listModel.getSize(); count++)\r\n\t\t\tcontentWriter.println(listModel.elementAt(count));\r\n\t\t\r\n\t\tlistWriter.close();\r\n\t\tcontentWriter.close();\r\n\t\tclearReceipt();\r\n\t}", "public void save() {\t\n\t\n\t\n\t}", "@Override\n public void save()\n {\n \n }", "public void save() {\n JAXB.marshal(this, new File(fileName));\n }", "public interface RequestContract {\n\n public void save_request(String note);\n\n public void save_request();\n}", "public static void saveStudRecsToFile(File file) {\r\n\t\ttry {\r\n\t\t\tJAXBContext context = JAXBContext\r\n\t\t\t\t\t.newInstance(StudRecsWrapper.class);\r\n\t\t\tMarshaller m = context.createMarshaller();\r\n\t\t\tm.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);\r\n\t\t\t\r\n\t\t\tStudRecsWrapper wrapper = new StudRecsWrapper();\r\n\t\t\twrapper.setStudRecs(studRecs);\r\n\t\t\t\r\n\t\t\tm.marshal(wrapper, file);\r\n\t\t\tSystem.out.println(\"File saved!\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Cannot save file, check write permissions!\");\r\n\t\t}\r\n\t}", "private void updateFiles() {\n\t}", "public static void store() {\r\n//\t\tSystem.out.println(\"mar\"+readMAR().getStr());\r\n\t\tString mar = new String(readMAR().getStr());\r\n\t\tTraceINF.write(\"Write memory \"+mar);\r\n\t\tFormatstr content = new Formatstr();\r\n\t\t\r\n\t\tcontent = readMBR();\r\n\t\tgetBank(mar)[Integer.parseInt(mar.substring(0, mar.length() - 2), 2)] = content.getStr();\r\n\t\tTraceINF.write(\"Write finished.\");\r\n\t}", "public void saveData() {\n\t\t//place to save notes e.g to file\n\t}", "private void saveAndExit() {\n if (yesNoQuestion(\"Would you like to save the current active courses to the saved list before saving?\")) {\n addActiveCourseListToCourseList();\n }\n try {\n JsonWriter writer = new JsonWriter(\"./data/ScheduleList.json\",\n \"./data/CourseList.json\");\n writer.open(true);\n writer.writeScheduleList(scheduleList);\n writer.close(true);\n\n writer.open(false);\n writer.writeCourseList(courseList);\n writer.close(false);\n } catch (IOException ioe) {\n System.out.println(\"File Not Found, failed to save\");\n } catch (Exception e) {\n System.out.println(\"Unexpected Error, failed to save\");\n }\n\n }", "private void verifyChanges() {\n System.out.println(\"Verify changes\"); \n }", "@Override\n public void Save() {\n\t \n }", "@Override\n\tpublic void save() {\n\t\t\n\t}", "@Override\n\tpublic void save() {\n\t\t\n\t}", "public void save() {\n CSVWriter csvWriter = new CSVWriter();\n csvWriter.writeToTalks(\"phase1/src/Resources/Talks.csv\", this.getTalkManager()); //Not implemented yet\n }", "public void save()\n\t{\n\t\ttry\n\t\t{\n\t\t\tgetConnection().commit();\n\t\t\tgetPreparedStatement(\"SET FILES SCRIPT FORMAT COMPRESSED\").execute();\n\t\t\t// causes a checkpoint automatically.\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tm_logger.error(\"Couldn't cleanly save.\", e);\n\t\t}\n\t}", "private Boolean saveChanges() {\n int rowId = ticketGui.getSelectedRowId();\n\n // getting all the text fields for any possible changes\n String clientName = clientNameTextField.getText().strip();\n String starID = starIdTextField.getText().strip();\n String email = emailTextField.getText().strip();\n String phoneNumber = phoneNumberTextField.getText().strip();\n String machineModel = deviceModelTextField.getText().strip();\n String description = descriptionTextArea.getText().strip();\n String memberName = clubMemberNameTextField.getText().strip();\n String resolution = resolutionTextArea.getText().strip();\n\n // making sure all the required fields are still filled out\n boolean valid = ticketGui.fieldValidation(clientName,starID,email,phoneNumber,machineModel,description,\n memberName,resolution);\n\n if (valid){\n if (JOptionPane.showConfirmDialog(this, \"Are you sure you want to save these changes?\",\n \"Save\", JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION) {\n\n // adding all of this to a new ticket and passing it to the tiketstore to update the ticket\n Ticket ticket = new Ticket(clientName, starID, email, phoneNumber, machineModel, description, memberName, resolution);\n ticket.setTicketId(rowId);\n\n controller.updateTicket(ticket);\n ticketGui.showAllTickets();\n return true;\n }\n }\n return false;\n }", "private void setDirty() {\n\t}", "public abstract void commit();", "public void storeToFile() throws IOException {\n\t\t\n\t\tDLProgramStorer storer = new DLProgramStorerImpl();\n\t\t\n\t\t//String datalogFile = inputCKR.getGlobalOntologyFilename() + \".dlv\";\n\t\t//String datalogFile = \"./testcase/output.dlv\";\n\t\t//System.out.println(datalogGlobal.getStatements().size());\n\t\t\n\t\tFileWriter writer = new FileWriter(outputFilePath);\n\t\tstorer.store(datalogCKR, writer);\n\t\t//writer.flush();\n\t\twriter.close();\n\t\t\n\t\t//System.out.println(\"CKR program saved in: \" + outputFilePath);\n\t}", "public void addContract(Contract contract)\n\t{\n\t\tsomethingChanged = true;\n\t\tif (!contracts.contains(contract))\n\t\t{\n\t\t\tcontract.setOwner(this);\n\t\t\tcontracts.add(contract);\n\t\t}\n\t}", "protected void trunkStore() {\n LOG.info(\"Trunking state filestore: {}\", fileStore);\n FileOutputStream fos = null;\n try {\n fos = new FileOutputStream(fileStore);\n for (Map.Entry<String, String> entry : cache.entrySet()) {\n fos.write(entry.getKey().getBytes());\n fos.write(KEY_VALUE_DELIMITER.getBytes());\n fos.write(entry.getValue().getBytes());\n fos.write(STORE_DELIMITER.getBytes());\n }\n } catch (IOException e) {\n throw RuntimeCamelException.wrapRuntimeCamelException(e);\n } finally {\n IOHelper.close(fos, \"Trunking file state repository\", LOG);\n }\n }", "public void writeCommitDataToYAMLFile(CommitAnalyzerInfo commitMetaData, ArrayList<PackageInfo> packagesInfo,\n HashMap<String, Integer> classesChangedWithLOCchanges,\n ArrayList<String> classesRemoved,\n Vector<PackageDependencyInfo> packageDependencies,\n Vector<ClassDependencyInfo> classDependencies) {\n try {\n\n // Create new PrintWriter to write to output YAML file\n writer = new PrintWriter(new BufferedWriter(new FileWriter(outputFilePath, true)));\n\n // Writes commit metadata - commit ID, author\n if(commitMetaData != null) {\n writeCommitNumAndAuthor(commitMetaData);\n } else {\n writeNullCommitMetaData();\n }\n\n // Writes all the changed classes with their LOC changes to output YAML file\n writesModifiedClasses(classesChangedWithLOCchanges);\n\n // Writes all the removed classes to output YAML file\n writesRemovedClasses(classesRemoved);\n\n /* Writes present classes and packages key */\n writePresentFilesKey();\n writePackagesKey();\n\n if(packagesInfo != null) {\n /* Iterate through all packages in commit */\n for(PackageInfo pkg : packagesInfo) {\n\n String packageName = pkg.getPackageName();\n\n // Write package name and LOC for a package to output file\n writePackageInfo(packageName, pkg.getLinesOfCode());\n\n // Write package dependencies key to output file\n writePackageDependenciesKey();\n\n\n if(packageDependencies != null) {\n /*\n Iterate through list of package dependencies for all packages until the dependencies\n for the current package are found\n */\n for(PackageDependencyInfo pkgDependencyInfo : packageDependencies) {\n\n /* When found, write the dependencies to output file */\n if(packageName.equalsIgnoreCase(pkgDependencyInfo.getPackageName())) {\n writePackageDependencies(pkgDependencyInfo);\n break;\n }\n }\n }\n\n // Write classes key to output file\n writeClassesKey();\n\n /* Iterate through all classes for a package and write out info to output file */\n for(ClassInfo classInfo : pkg.getListOfClasses()) {\n\n String className = classInfo.getPackageName() + \".\" + classInfo.getClassName();\n\n // Write the class info to output file\n writeClassInfo(classInfo);\n\n // Write key for class dependencies to output file\n writeClassDependenciesKey();\n\n if(classDependencies != null) {\n /*\n Iterate through list of class dependencies for all classes until the dependencies\n for the current class are found\n */\n for(ClassDependencyInfo classDependencyInfo : classDependencies) {\n\n /* When found, write the dependencies to output file */\n if(className.equalsIgnoreCase(classDependencyInfo.getClassName())) {\n writeClassDependencies(classDependencyInfo);\n break;\n }\n }\n }\n }\n }\n\n }\n } catch(IOException e) {\n e.printStackTrace();\n } finally {\n writer.close();\n }\n }", "public void saveCart() throws IOException {\n String fileName = userid + \"cart.txt\";\n File file=new File(fileName);\n if(file.exists())\n {\n FileOutputStream fos = new FileOutputStream(fileName);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n oos.writeObject(this.cartContents);\n oos.flush();\n oos.close();\n fos.close();\n }\n else{\n file.createNewFile();\n }\n }", "stockFilePT102.StockFileDocument.StockFile addNewStockFile();", "public static void doSavechanges ( RunData data)\n\t{\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());\n\t\tParameterParser params = data.getParameters ();\n\n\t\tString flow = params.getString(\"flow\").trim();\n\n\t\tif(flow == null || \"cancel\".equals(flow))\n\t\t{\n\t\t\tdoCancel(data);\n\t\t\treturn;\n\t\t}\n\n\t\t// get values from form and update STATE_STACK_EDIT_ITEM attribute in state\n\t\tcaptureValues(state, params);\n\n\t\tMap current_stack_frame = peekAtStack(state);\n\n\t\tEditItem item = (EditItem) current_stack_frame.get(STATE_STACK_EDIT_ITEM);\n\n\t\tif(flow.equals(\"showMetadata\"))\n\t\t{\n\t\t\tdoShow_metadata(data);\n\t\t\treturn;\n\t\t}\n\t\telse if(flow.equals(\"hideMetadata\"))\n\t\t{\n\t\t\tdoHide_metadata(data);\n\t\t\treturn;\n\t\t}\n\t\telse if(flow.equals(\"intentChanged\"))\n\t\t{\n\t\t\tdoToggle_intent(data);\n\t\t\treturn;\n\t\t}\n\t\telse if(flow.equals(\"addInstance\"))\n\t\t{\n\t\t\tString field = params.getString(\"field\");\n\t\t\taddInstance(field, item.getProperties());\n\t\t\tResourcesMetadata form = item.getForm();\n\t\t\tList flatList = form.getFlatList();\n\t\t\titem.setProperties(flatList);\n\t\t\treturn;\n\t\t}\n\t\telse if(flow.equals(\"linkResource\"))\n\t\t{\n\t\t\t// captureMultipleValues(state, params, false);\n\t\t\tcreateLink(data, state);\n\t\t\t//Map new_stack_frame = pushOnStack(state);\n\t\t\t//new_stack_frame.put(ResourcesAction.STATE_RESOURCES_HELPER_MODE, ResourcesAction.MODE_ATTACHMENT_SELECT);\n\t\t\tstate.setAttribute(ResourcesAction.STATE_RESOURCES_HELPER_MODE, ResourcesAction.MODE_ATTACHMENT_SELECT);\n\n\t\t\treturn;\n\t\t}\n\n\n\t\tSet alerts = (Set) state.getAttribute(STATE_EDIT_ALERTS);\n\n//\t\tif(item.isStructuredArtifact())\n//\t\t{\n//\t\t\tSchemaBean bean = (SchemaBean) current_stack_frame.get(STATE_STACK_STRUCT_OBJ_SCHEMA);\n//\t\t\tSaveArtifactAttempt attempt = new SaveArtifactAttempt(item, bean.getSchema());\n//\t\t\tvalidateStructuredArtifact(attempt);\n//\n//\t\t\tIterator errorIt = attempt.getErrors().iterator();\n//\t\t\twhile(errorIt.hasNext())\n//\t\t\t{\n//\t\t\t\tValidationError error = (ValidationError) errorIt.next();\n//\t\t\t\talerts.add(error.getDefaultMessage());\n//\t\t\t}\n//\t\t}\n\n\t\tif(alerts.isEmpty())\n\t\t{\n\t\t\t// populate the property list\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// get an edit\n\t\t\t\tContentCollectionEdit cedit = null;\n\t\t\t\tContentResourceEdit redit = null;\n\t\t\t\tGroupAwareEdit gedit = null;\n\t\t\t\tResourcePropertiesEdit pedit = null;\n\n\t\t\t\tif(item.isFolder())\n\t\t\t\t{\n\t\t\t\t\tcedit = ContentHostingService.editCollection(item.getId());\n\t\t\t\t\tgedit = cedit;\n\t\t\t\t\tpedit = cedit.getPropertiesEdit();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tredit = ContentHostingService.editResource(item.getId());\n\t\t\t\t\tgedit = redit;\n\t\t\t\t\tpedit = redit.getPropertiesEdit();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tBoolean preventPublicDisplay = (Boolean) state.getAttribute(STATE_PREVENT_PUBLIC_DISPLAY);\n\t\t\t\t\tif(preventPublicDisplay == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tpreventPublicDisplay = Boolean.FALSE;\n\t\t\t\t\t\tstate.setAttribute(STATE_PREVENT_PUBLIC_DISPLAY, preventPublicDisplay);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(! preventPublicDisplay.booleanValue())\n\t\t\t\t\t{\n\t\t\t\t\t\tContentHostingService.setPubView(gedit.getId(), item.isPubview());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(! AccessMode.GROUPED.toString().equals(item.getAccess()) && AccessMode.GROUPED == gedit.getAccess())\n\t\t\t\t\t{\n\t\t\t\t\t\tgedit.clearGroupAccess();\n\t\t\t\t\t}\n\t\t\t\t\telse if(AccessMode.GROUPED.toString().equals(item.getAccess()) && ! item.getEntityGroupRefs().isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tgedit.setGroupAccess(item.getEntityGroupRefs());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tgedit.clearGroupAccess();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(InconsistentException e)\n\t\t\t\t{\n\t\t\t\t\t// TODO: Should this be reported to user??\n\t\t\t\t\tlogger.debug(\"ResourcesAction.doSavechanges ***** InconsistentException changing groups ***** \" + e.getMessage());\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\tif(ContentHostingService.isAvailabilityEnabled())\n\t\t\t\t{\n\t\t\t\t\tTime releaseDate = null;\n\t\t\t\t\tTime retractDate = null;\n\t\t\t\t\t\n\t\t\t\t\tboolean hidden = item.isHidden();\n\t\t\t\t\t\n\t\t\t\t\tif(item.useReleaseDate())\n\t\t\t\t\t{\n\t\t\t\t\t\treleaseDate = item.getReleaseDate();\n\t\t\t\t\t}\n\t\t\t\t\tif(item.useRetractDate())\n\t\t\t\t\t{\n\t\t\t\t\t\tretractDate = item.getRetractDate();\n\t\t\t\t\t}\n\t\t\t\t\tgedit.setAvailability(hidden, releaseDate, retractDate);\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\tif(item.isFolder())\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(item.isUrl())\n\t\t\t\t\t{\n\t\t\t\t\t\tredit.setContent(item.getFilename().getBytes());\n\t\t\t\t\t}\n\t\t\t\t\telse if(item.isStructuredArtifact())\n\t\t\t\t\t{\n\t\t\t\t\t\tredit.setContentType(item.getMimeType());\n\t\t\t\t\t\tredit.setContent(item.getContent());\n\t\t\t\t\t}\n\t\t\t\t\telse if(item.contentHasChanged())\n\t\t\t\t\t{\n\t\t\t\t\t\tredit.setContentType(item.getMimeType());\n\t\t\t\t\t\tredit.setContent(item.getContent());\n\t\t\t\t\t}\n\t\t\t\t\telse if(item.contentTypeHasChanged())\n\t\t\t\t\t{\n\t\t\t\t\t\tredit.setContentType(item.getMimeType());\n\t\t\t\t\t}\n\n\t\t\t\t\tBasicRightsAssignment rightsObj = item.getRights();\n\t\t\t\t\trightsObj.addResourceProperties(pedit);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tString copyright = StringUtil.trimToNull(params.getString (\"copyright\"));\n\t\t\t\t\tString newcopyright = StringUtil.trimToNull(params.getCleanString (NEW_COPYRIGHT));\n\t\t\t\t\tString copyrightAlert = StringUtil.trimToNull(params.getString(\"copyrightAlert\"));\n\t\t\t\t\tif (copyright != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (state.getAttribute(COPYRIGHT_NEW_COPYRIGHT) != null && copyright.equals(state.getAttribute(COPYRIGHT_NEW_COPYRIGHT)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (newcopyright != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpedit.addProperty (ResourceProperties.PROP_COPYRIGHT, newcopyright);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\talerts.add(rb.getString(\"specifycp2\"));\n\t\t\t\t\t\t\t\t// addAlert(state, rb.getString(\"specifycp2\"));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (state.getAttribute(COPYRIGHT_SELF_COPYRIGHT) != null && copyright.equals (state.getAttribute(COPYRIGHT_SELF_COPYRIGHT)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString mycopyright = (String) state.getAttribute (STATE_MY_COPYRIGHT);\n\t\t\t\t\t\t\tpedit.addProperty (ResourceProperties.PROP_COPYRIGHT, mycopyright);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpedit.addProperty(ResourceProperties.PROP_COPYRIGHT_CHOICE, copyright);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (copyrightAlert != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tpedit.addProperty (ResourceProperties.PROP_COPYRIGHT_ALERT, copyrightAlert);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tpedit.removeProperty (ResourceProperties.PROP_COPYRIGHT_ALERT);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!(item.isFolder() && (item.getId().equals ((String) state.getAttribute (STATE_HOME_COLLECTION_ID)))))\n\t\t\t\t{\n\t\t\t\t\tpedit.addProperty (ResourceProperties.PROP_DISPLAY_NAME, item.getName());\n\t\t\t\t}\t// the home collection's title is not modificable\n\n\t\t\t\tpedit.addProperty (ResourceProperties.PROP_DESCRIPTION, item.getDescription());\n\t\t\t\t// deal with quota (collections only)\n\t\t\t\tif ((cedit != null) && item.canSetQuota())\n\t\t\t\t{\n\t\t\t\t\tif (item.hasQuota())\n\t\t\t\t\t{\n\t\t\t\t\t\t// set the quota\n\t\t\t\t\t\tpedit.addProperty(ResourceProperties.PROP_COLLECTION_BODY_QUOTA, item.getQuota());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// clear the quota\n\t\t\t\t\t\tpedit.removeProperty(ResourceProperties.PROP_COLLECTION_BODY_QUOTA);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tList metadataGroups = (List) state.getAttribute(STATE_METADATA_GROUPS);\n\n\t\t\t\tstate.setAttribute(STATE_EDIT_ALERTS, alerts);\n\t\t\t\tsaveMetadata(pedit, metadataGroups, item);\n\t\t\t\talerts = (Set) state.getAttribute(STATE_EDIT_ALERTS);\n\n\t\t\t\t// commit the change\n\t\t\t\tif (cedit != null)\n\t\t\t\t{\n\t\t\t\t\tContentHostingService.commitCollection(cedit);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tContentHostingService.commitResource(redit, item.getNotification());\n\t\t\t\t}\n\n\t\t\t\tcurrent_stack_frame.put(STATE_STACK_EDIT_INTENT, INTENT_REVISE_FILE);\n\n\t\t\t\tBoolean preventPublicDisplay = (Boolean) state.getAttribute(STATE_PREVENT_PUBLIC_DISPLAY);\n\t\t\t\tif(preventPublicDisplay == null)\n\t\t\t\t{\n\t\t\t\t\tpreventPublicDisplay = Boolean.FALSE;\n\t\t\t\t\tstate.setAttribute(STATE_PREVENT_PUBLIC_DISPLAY, preventPublicDisplay);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (TypeException e)\n\t\t\t{\n\t\t\t\talerts.add(rb.getString(\"typeex\") + \" \" + item.getId());\n\t\t\t\t// addAlert(state,\" \" + rb.getString(\"typeex\") + \" \" + item.getId());\n\t\t\t}\n\t\t\tcatch (IdUnusedException e)\n\t\t\t{\n\t\t\t\talerts.add(RESOURCE_NOT_EXIST_STRING);\n\t\t\t\t// addAlert(state,RESOURCE_NOT_EXIST_STRING);\n\t\t\t}\n\t\t\tcatch (PermissionException e)\n\t\t\t{\n\t\t\t\talerts.add(rb.getString(\"notpermis10\") + \" \" + item.getId());\n\t\t\t\t// addAlert(state, rb.getString(\"notpermis10\") + \" \" + item.getId() + \". \" );\n\t\t\t}\n\t\t\tcatch (InUseException e)\n\t\t\t{\n\t\t\t\talerts.add(rb.getString(\"someone\") + \" \" + item.getId());\n\t\t\t\t// addAlert(state, rb.getString(\"someone\") + \" \" + item.getId() + \". \");\n\t\t\t}\n\t\t\tcatch (ServerOverloadException e)\n\t\t\t{\n\t\t\t\talerts.add(rb.getString(\"failed\"));\n\t\t\t}\n\t\t\tcatch (OverQuotaException e)\n\t\t\t{\n\t\t\t\talerts.add(rb.getString(\"changing1\") + \" \" + item.getId() + \" \" + rb.getString(\"changing2\"));\n\t\t\t\t// addAlert(state, rb.getString(\"changing1\") + \" \" + item.getId() + \" \" + rb.getString(\"changing2\"));\n\t\t\t}\n\t\t\tcatch(RuntimeException e)\n\t\t\t{\n\t\t\t\tlogger.debug(\"ResourcesAction.doSavechanges ***** Unknown Exception ***** \" + e.getMessage());\n\t\t\t\tlogger.debug(\"ResourcesAction.doSavechanges ***** Unknown Exception ***** \", e);\n\t\t\t\talerts.add(rb.getString(\"failed\"));\n\t\t\t}\n\t\t}\t// if - else\n\n\t\tif(alerts.isEmpty())\n\t\t{\n\t\t\t// modify properties sucessful\n\t\t\tString mode = (String) state.getAttribute(STATE_MODE);\n\t\t\tpopFromStack(state);\n\t\t\tresetCurrentMode(state);\n\t\t}\t//if-else\n\t\telse\n\t\t{\n\t\t\tIterator alertIt = alerts.iterator();\n\t\t\twhile(alertIt.hasNext())\n\t\t\t{\n\t\t\t\tString alert = (String) alertIt.next();\n\t\t\t\taddAlert(state, alert);\n\t\t\t}\n\t\t\talerts.clear();\n\t\t\tstate.setAttribute(STATE_EDIT_ALERTS, alerts);\n\t\t\t// state.setAttribute(STATE_CREATE_MISSING_ITEM, missing);\n\t\t}\n\n\t}", "public void setContractcopy(String contractcopy) {\r\n this.contractcopy = contractcopy;\r\n }", "@Override\n\tpublic int commit() {\n\t\treturn 0;\n\t}", "@Override\n public void save() {\n\n }", "@Override\r\n\tpublic void save() {\n\r\n\t}", "@Override\r\n\tpublic void save() {\n\r\n\t}", "public void updatePersistence() {\n\t\tFile file = new File(\"data.txt\");\n\t\tserializeToFile(file);\n\t\tupdatePersistentSettings();\n\t}" ]
[ "0.6353582", "0.62561226", "0.61890024", "0.61341476", "0.589557", "0.5849396", "0.576164", "0.56982887", "0.568545", "0.56777865", "0.5616894", "0.56028396", "0.5589511", "0.55832267", "0.55821157", "0.5539198", "0.55336237", "0.55164474", "0.547498", "0.545026", "0.5437488", "0.54356796", "0.5434647", "0.5426459", "0.54223454", "0.5414789", "0.5413347", "0.5403242", "0.5396213", "0.5393111", "0.5389118", "0.5375272", "0.5374609", "0.537119", "0.53603876", "0.5355702", "0.53530854", "0.5333628", "0.5330356", "0.5325809", "0.5323409", "0.53220195", "0.5318743", "0.5316752", "0.5311698", "0.52980024", "0.5291806", "0.5270115", "0.5269585", "0.5268938", "0.52686155", "0.52676576", "0.5263765", "0.5263447", "0.5257378", "0.52549314", "0.5253944", "0.52506846", "0.5244124", "0.5244124", "0.5243444", "0.5243271", "0.52381366", "0.5235992", "0.5235452", "0.5227842", "0.5227842", "0.52276963", "0.5222819", "0.5221424", "0.52202594", "0.5214411", "0.5206678", "0.51957446", "0.5190034", "0.51869524", "0.51804125", "0.5179395", "0.51779574", "0.516094", "0.51554877", "0.5155371", "0.5155371", "0.5139404", "0.513533", "0.512886", "0.51277244", "0.5117289", "0.51147825", "0.5113252", "0.5110308", "0.5106831", "0.51048845", "0.51015127", "0.51005983", "0.51002836", "0.509448", "0.5085264", "0.5082957", "0.5082957", "0.50813085" ]
0.0
-1
//END OTHER COMMANDS//// //TEST CODE//// / Test method returns account. Account.currentAccount is set to the account returned; two test events are created with some activities
public static Account test() { Account newAccount = createNewAccount("address@email.com", "Test Account"); //Create participants - accounts first Account partAccount1 = new Account("Manuel"); Account partAccount2 = new Account("Tatenda"); Account partAccount3 = new Account("Dan"); Account partAccount4 = new Account("Kirill"); //Creates first event - Trip newAccount.createEvent("Trip", "Short Term"); //Add participants newAccount.events.get(0).addParticipant(new Participant(partAccount1)); newAccount.events.get(0).addParticipant(new Participant(partAccount2)); newAccount.events.get(0).addParticipant(new Participant(partAccount3)); newAccount.events.get(0).addParticipant(new Participant(partAccount4)); Event firstEvent = newAccount.events.get(0); ArrayList<Participant> firstParts = (ArrayList<Participant>) firstEvent.getParticipants(); ArrayList<Item> items = new ArrayList<Item>(); items.add(new Item("Bread1", 10.0)); items.add(new Item("Bread2", 20.0)); items.add(new Item("Bread3", 30.0)); items.add(new Item("Bread4", 40.0)); //Add activities firstEvent.addBalanceChange(new Transaction("tmpname1", firstParts, items)); firstEvent.addBalanceChange(new Transaction("tmpname2", firstParts, items)); //Could add more activities (transactions or payments here) //Creates second event - Household - and two three activities to it newAccount.createEvent("Household", "Long Term"); ArrayList<Item> items2 = new ArrayList<Item>(); items2.add(new Item("Meat1", 10.0)); items2.add(new Item("Meat2", 20.0)); items2.add(new Item("Meat3", 30.0)); items2.add(new Item("Meat4", 40.0)); //Add participants newAccount.events.get(1).addParticipant(new Participant(partAccount1)); newAccount.events.get(1).addParticipant(new Participant(partAccount2)); Event secondEvent = newAccount.events.get(1); ArrayList<Participant> secondParts = (ArrayList<Participant>) secondEvent.getParticipants(); //Add activities secondEvent.addBalanceChange(new Transaction("tmpname3", secondParts, items2)); secondEvent.addBalanceChange(new Transaction("tmpname4", secondParts, items2)); newAccount.updatePastRelations(); return newAccount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGiveAccount() {\n System.out.println(\"giveAccount\");\n String name = \"Gert Hansen\";\n String address = \"Grønnegade 12\";\n String phone = \"98352010\";\n CustomerCtr instance = new CustomerCtr();\n int customerID = instance.createCustomer(name, address, phone);\n String type = \"Visa\";\n int regNo = 39292492;\n int cardNo = 457153253;\n instance.giveAccount(customerID, type, regNo, cardNo);\n Account result = instance.getCustomer(customerID).getAccount();\n assertNotNull(result);\n assertEquals(\"Visa\", result.getType());\n assertEquals(39292492, result.getRegNr());\n assertEquals(457153253, result.getCardNr());\n // TODO review the generated test code and remove the default call to fail.\n// fail(\"The test case is a prototype.\");\n }", "@Test(groups = \"Transactions Tests\", description = \"Delete account with Transaction\")\n\tpublic void deleteAccountWithTransaction() {\n\t\tMainScreen.clickAddAccountBtn();\n\t\tNewAccountScreen.typeAccountName(\"Freelance jobs\");\n\t\tNewAccountScreen.clickAccountColor();\n\t\tNewAccountScreen.clickColorOption();\n\t\tNewAccountScreen.typeAccountDescription(\"Account to control my freelance jobs money\");\n\t\tNewAccountScreen.clickPlaceholderAccountOption();\n\t\tNewAccountScreen.clickSaveBtn();\n\t\tMainScreen.accountItem(\"Freelance jobs\").shouldBe(visible);\n\t\ttest.log(Status.PASS, \"Account created successfully\");\n\n\t\t//Creating a new sub-account, testing if it's visible and logging the result to the report\n\t\tMainScreen.clickAccountItem(\"Freelance jobs\");\n\t\tSubAccountScreen.clickAddSubAccountBtn();\n\t\tNewAccountScreen.typeAccountName(\"Test Automation jobs\");\n\t\tNewAccountScreen.clickAccountColor();\n\t\tNewAccountScreen.clickColorOption();\n\t\tNewAccountScreen.typeAccountDescription(\"Sub-account to control meu Test Automation freelance jobs\");\n\t\tNewAccountScreen.clickSaveBtn();\n\t\tSubAccountScreen.subAccountItem(\"Test Automation jobs\").shouldBe(visible);\n\t\ttest.log(Status.PASS, \"Sub-account created successfully\");\n\n\t\t//Creating a new transaction, testing if it's visible, if the value is correct and logging the result to the report\n\t\tSubAccountScreen.clickSubAccountItem(\"Test Automation jobs\");\n\t\tTransactionsScreen.clickAddTransactionBtn();\n\t\tTransactionsScreen.typeTransactionDescription(\"N26 Home Task\");\n\t\tTransactionsScreen.typeTransactionAmount(\"250\");\n\t\tTransactionsScreen.clickSaveBtn();\n\t\tTransactionsScreen.transactionItem(\"N26 Home Task\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$250\"));\n\t\ttest.log(Status.PASS, \"Transaction created and the value is correct\");\n\n\t\t//Testing if the transaction was created in the 'Double Entry' account and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.transactionItem(\"N26 Home Task\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$250\"));\n\t\ttest.log(Status.PASS, \"Transaction in the 'Double Entry' account created and the value is correct\");\n\n\t\t//Deleting the account with the transaction, testing if it's not listed and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickOptionsBtnFromAccountItem(\"Freelance jobs\");\n\t\tMainScreen.clickDeleteAccountOption();\n\t\tMainScreen.clickDeleteTransactionRadioOption();\n\t\tMainScreen.clickDeleteBtn();\n\t\tMainScreen.accountItem(\"Freelance jobs\").shouldNotBe(visible);\n\t\ttest.log(Status.PASS, \"Account and Transaction deleted successfully\");\n\n\t\t//Testing if the transaction were deleted from the 'Double Entry' account and logging the result to the report\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.transactionItem(\"N26 Home Task\").shouldNotBe(visible);\n\t\ttest.log(Status.PASS, \"Transaction deleted successfully from the 'Double Entry' account\");\n\n\t}", "@Test\n\tpublic void Account_test() { Using HamCrest \t\t\n\t\t// Exercise code to run and test\n\t\t//\n\t\tmiCuenta.setHolder(this.arg1);\n\t\tString resHolder = miCuenta.getHolder(); \n\t\t//\n\t\tmiCuenta.setBalance(this.arg2);\n\t\tint resBalance = miCuenta.getBalance(); \n\t\t//\n\t\tmiCuenta.setZone(this.arg3);\n\t\tint resZone = miCuenta.getZone(); \n\t\t\t\t\t\t\n\t\t// Verify\n\t\tassertThat(this.arg1, is(resHolder));\n\t\tassertThat(this.arg2, is(resBalance)); \n\t\tassertThat(this.arg3, is(resZone)); \n\t}", "@Test(enabled = false)\n\tpublic void viewTravelHistoryRegistredCustomerOneAccount() throws Exception {\n\n\t\t// create travel history via soap call\n\t\tSOAPClientSAAJ sClient = new SOAPClientSAAJ();\n\t\tCreditCardNumberGenerator ccGenerator = new CreditCardNumberGenerator();\n\t\tString validCCNumber = ccGenerator.generate(\"4\", 16);\n\t\tString accountID = sClient.travelHistorySOAPCall(validCCNumber);\n\t\tLog.info(\"cc number being used is \" + validCCNumber);\n\t\tLog.info(\"account id being returned is \" + accountID);\n\t\tLog.info(\"waiting for ABP to get updated\");\n\t\tUtils.waitTime(180000);\n\n\t\t\n\t\t// create account and link it to cc\n\t\tcoreTest.signIn(driver);\n\t\tcoreTest.createCustomer(driver);\n\t\tBasePage bPage = new BasePage(driver);\n\t\tbPage.clickLinkAccount(driver);\n\t\tLinkAccountPage lPage = new LinkAccountPage(driver);\n\t\n\t\t// use cc number from soap call to link account\n\t\tlPage.enterBankAccount(driver, validCCNumber);\n\t\tlPage.selectExpMonth(driver);\n\t\tlPage.selectExpYear(driver, 2);\n\t\tlPage.clickSearchToken(driver);\n\t\tlPage.enterNickName(driver, \"adam\");\n\t\tlPage.clickLinkAccount(driver);\n\t\n\t\t// do another tap after linking the account\n\t\t// verify that travel history shows up on one account now\n\t\tString postTab = sClient.travelHistoryPostTab(validCCNumber);\n\t\tLog.info(\"second tab was \" + postTab);\n\t\t\n\t\t// takes around 6 minutes for travel history to show on cmc\n Utils.waitTime(360000);\n\n\t\tbPage.clickTravelHistory(driver);\n\t\t\t// do assertions on oneaccount travel history\n\n\t\tLog.info(\"viewTravelHistoryRegistredCustomerOneAccount Completed\");\n\t\tdriver.close();\n\t}", "@Test\n public void onSignInWithExistingAccount() throws InterruptedException {\n Intent intent = new Intent();\n Instrumentation.ActivityResult intentResult = new Instrumentation.ActivityResult(Activity.RESULT_OK,intent);\n\n intending(isInternal()).respondWith(intentResult);\n\n onView(withId(R.id.email)).perform(typeText(\"testairgeadaccount@marklordan.com\"));\n onView(withId(R.id.password)).perform(typeText(\"testpassword\"), closeSoftKeyboard());\n\n Thread.sleep(500);\n\n onView(withId(R.id.email_sign_in_button)).perform(click());\n\n intended(allOf(hasComponent(MainActivity.class.getName())));\n\n }", "@Test\n public void accountsTest() {\n // TODO: test accounts\n }", "@Test\n\tpublic void createAccount() {\t\n\t\t\n\t\tRediffOR.setCreateAccoutLinkClick();\n\t\tRediffOR.getFullNameTextField().sendKeys(\"Kim Smith\");\n\t\tRediffOR.getEmailIDTextField().sendKeys(\"Kim Smith\");\n\t\t\t\t\t\n\t\t\n\t}", "@Test\n public void testGetAccountByName() {\n\tassertEquals(1, 1);\n }", "@Test\n public void testCreateStudentAccount() {\n // For this test, we also need the Access Client\n //final AccessClient accessClient = new AccessClient();\n\n // Create the new User Request Object\n final String username = \"student@gamma.net\";\n final String password = \"myPassword\";\n final CreateUserRequest createUserRequest = new CreateUserRequest(username, password, \"Student\", \"Graduate\");\n createUserRequest.setStudentAccount(true);\n\n final Students students = new StudentClient();\n final FetchStudentsRequest fetchStudentsRequest = new FetchStudentsRequest();\n final FetchStudentsResponse beforeStudentsResponse = students.fetchStudents(token, fetchStudentsRequest);\n\n // Now, perform the actual test - create the Account, and verify that\n // the response is ok, and that a Notification was sent\n final Response result = administration.createUser(token, createUserRequest);\n assertThat(result.isOk(), is(true));\n assertThat(spy.size(), is(0));\n\n //TODO Pavel 2014-04-15: students are not supposed to receive activation email now so the following test should not work\n // since no notification is generated. Once the emails are sent, following lines have to be uncommented\n// assertThat(spy.size(), is(1));\n// final String activationCode = spy.getNext().getFields().get(NotificationField.CODE);\n// assertThat(activationCode, is(not(nullValue())));\n\n // Attempt to login using the new User Account. It should not yet work,\n // since the account is not activated\n// final AuthenticationRequest request = new AuthenticationRequest(username, password);\n// final AuthenticationResponse response1 = accessClient.generateSession(request);\n// assertThat(response1.isOk(), is(false));\n// assertThat(response1.getError(), is(IWSErrors.AUTHENTICATION_ERROR));\n\n // Verify that the Students exists\n final FetchStudentsResponse afterFetchStudentsResponse = students.fetchStudents(token, fetchStudentsRequest);\n assertThat(afterFetchStudentsResponse.isOk(), is(true));\n assertThat(afterFetchStudentsResponse.getStudents().size(), is(beforeStudentsResponse.getStudents().size() + 1));\n\n // Activate the Account\n// final Fallible acticationResult = administration.activateUser(activationCode);\n// assertThat(acticationResult.isOk(), is(true));\n\n // Now, attempt to login again\n// final AuthenticationResponse response2 = accessClient.generateSession(request);\n// assertThat(response2.isOk(), is(true));\n// assertThat(response2.getToken(), is(not(nullValue())));\n\n //// Now, read the Permissions that the student has, basically, there is\n //// only 1 permission - which is applying for Open Offers\n //final FetchPermissionResponse permissionResponse = accessClient.fetchPermissions(response2.getToken());\n //assertThat(permissionResponse.isOk(), is(true));\n //// The following fails, since the order of the UserGroup Object in the\n //// Authorization Object is undefined, for this reason, the code is\n //// commented out\n //assertThat(permissionResponse.getAuthorizations().get(0).getUserGroup().getRole().getPermissions().contains(Permission.APPLY_FOR_OPEN_OFFER), is(true));\n\n // Deprecate the Students Session, the test is over :-)\n// final Fallible deprecateSessionResult = accessClient.deprecateSession(response2.getToken());\n// assertThat(deprecateSessionResult.isOk(), is(true));\n }", "@Test\n @Order(10)\n void get_account_3() {\n client2 = service.createClient(new Client(\"Test 2\"));\n int sumOfIds = 0;\n HashSet<Client> allClients = service.getAllClients();\n for(Client c : allClients) {\n sumOfIds += c.getId();\n }\n // want to give a valid account\n Account needle = client.getAccounts().iterator().next();\n\n Account check = service.getAccount(sumOfIds, needle.getId());\n Assertions.assertNull(check);\n\n // also want to return null in the event both are valid but there is a mismatch\n // client2 is a valid user and needle is a valid account but client2 doesn't own\n // needle, so should return null\n check = service.getAccount(client2.getId(), needle.getId());\n Assertions.assertNull(check);\n }", "@Test\n\tpublic void Accounts_23214_execute() throws Exception {\n\t\tVoodooUtils.voodoo.log.info(\"Running \" + testName + \"...\");\n\t\t\n\t\tDataSource ds = testData.get(testName);\n\t\tmyAccount.navToRecord();\n\t\tStandardSubpanel accSub = sugar().accounts.recordView.subpanels.get(\"Accounts\");\n\t\taccSub.addRecord();\t\t\n\t\tsugar().accounts.createDrawer.showMore();\n\t\tsugar().accounts.createDrawer.getEditField(\"name\").set(ds.get(0).get(\"name\"));\n\t\tsugar().accounts.createDrawer.getEditField(\"billingAddressCity\").set(ds.get(0).get(\"billingAddressCity\"));\n\t\tsugar().accounts.createDrawer.getEditField(\"workPhone\").set(ds.get(0).get(\"workPhone\"));\n\t\tsugar().contacts.createDrawer.save();\n\t\tVoodooUtils.waitForAlertExpiration();\n\t\t//VOOD-609\n\t\tnew VoodooControl(\"span\", \"css\", \"div.filtered.layout_Accounts tbody span.fld_name.list\").assertEquals(ds.get(0).get(\"name\"), true);\n\t\tnew VoodooControl(\"span\", \"css\", \"div.filtered.layout_Accounts tbody span.fld_billing_address_city.list\").assertEquals(ds.get(0).get(\"billingAddressCity\"), true);\n\t\tnew VoodooControl(\"span\", \"css\", \"div.filtered.layout_Accounts tbody span.fld_phone_office.list\").assertEquals(ds.get(0).get(\"workPhone\"), true);\n\t\tVoodooUtils.voodoo.log.info(testName + \" complete.\");\n\t}", "public void testGetAccount_fixture16_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture16();\n\n\t\tAccount result = fixture.getAccount();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getPerson());\n\t}", "public void testGetAccount_fixture17_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture17();\n\n\t\tAccount result = fixture.getAccount();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getPerson());\n\t}", "public void TestAccount1() {\n\n AccountCreator account = new AccountCreator();\n account.setFirstName(\"Bob\");\n account.setLastName(\"Smith\");\n account.setAddress(\"5 Rain Road\");\n account.setPIN();\n account.setTestBalance(300);\n accountList.add(account);\n\n }", "@Test(enabled = true)\n\tpublic void viewTravelHistoryRegistredCustomerSubAccount() throws Exception {\n\n\t\t// create travel history via soap call\n\t\tSOAPClientSAAJ sClient = new SOAPClientSAAJ();\n\t\tCreditCardNumberGenerator ccGenerator = new CreditCardNumberGenerator();\n\t\tString validCCNumber = ccGenerator.generate(\"4\", 16);\n\t\tString accountID = sClient.travelHistorySOAPCall(validCCNumber);\n\t\tSystem.out.println(\"cc number being used is \" + validCCNumber);\n\t\tSystem.out.println(\"account id being returned is \" + accountID);\n\n\t\t// takes around 6 minutes for travel history to show on cmc\n\t\tUtils.waitTime(360000);\n\n\t\t// create account and link it to cc\n\t\tcoreTest.signIn(driver);\n\t\tcoreTest.createCustomer(driver);\n\t\tBasePage bPage = new BasePage(driver);\n\t\tbPage.clickLinkAccount(driver);\n\t\tLinkAccountPage lPage = new LinkAccountPage(driver);\n\n\t\t// use cc number from soap call to link account\n\t\tlPage.enterBankAccount(driver, validCCNumber);\n\t\tlPage.selectExpMonth(driver);\n\t\tlPage.selectExpYear(driver, 2);\n\t\tlPage.clickSearchToken(driver);\n\t\tlPage.enterNickName(driver, \"adam\");\n\t\tlPage.clickLinkAccount(driver);\n\n\t\t// checking travel history under subaccount page\n\t\tbPage.clickLinkedAccount(driver);\n\t\tTokenSearchSubSystemPage ssPage = new TokenSearchSubSystemPage(driver);\n\t\tssPage.clickTravelHistory(driver);\n\t\n\t\tAssert.assertEquals(ssPage.getLocation(driver), LOCATION);\n\t\tAssert.assertEquals(ssPage.getTravelMode(driver), TRAVEL_MODE);\n\t\tAssert.assertEquals(ssPage.getToken(driver), TOKEN);\n\t\tAssert.assertEquals(ssPage.getFare(driver), FARE);\n\t\tAssert.assertEquals(ssPage.getUnpaidFare(driver), UNPAID_FARE);\n\n\t\tssPage.clickTravelHistoryRow(driver);\n\t\tTravelHistoryDetailPage tdPage = new TravelHistoryDetailPage(driver);\n\n\t\tAssert.assertEquals(tdPage.getLocation(driver), LOCATION);\n\t\tAssert.assertEquals(tdPage.getOperator(driver), OPERATOR);\n\t\tAssert.assertEquals(tdPage.getTransactionStatus(driver), TRANSACTION_STATUS);\n\n\t\tLog.info(\"viewTravelHistoryRegistredCustomerSubAccount Completed\");\n\t\tdriver.close();\n\t}", "@Test(groups ={Slingshot,Regression,CsaAgent})\t\n\t\t\t\tpublic void verifyAuditTrailSearch() throws Exception {\n\t\t\t\t\tReport.createTestLogHeader(\"CSA Journey\", \"To verify the Password Reset functionality\");\n\t\t\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"PSABroker\");\n\t\t\t\t\t//deregisterinBgbonline(userProfile); \n\t\t\t\t\t//Register a user \n\t\t\t\t\t/*new PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.clickRegisteraUser(userProfile);\n\t\t\t\t\tnew RegistrationAction()\n\t\t\t\t\t.openEncryptURL(userProfile)\n\t\t\t\t\t.fillRegistrationDetails(userProfile)\n\t\t\t\t\t.verifyThankYouPage()\n\t\t\t\t\t.clickLoginLink()\n\t\t\t\t\t.verifyAuditEntry(userProfile)\n\t\t\t\t\t.verifyEmailIdInDb(userProfile);*/\n\t\t\t\t\tnew PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.verifyAuditTrail(userProfile);\n\t\t\t\t \n\t\t\t\t}", "public void testGetAccount_fixture25_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture25();\n\n\t\tAccount result = fixture.getAccount();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getPerson());\n\t}", "@Test\n public void processTestA()\n {\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n //pass transaction\n trans = new Transaction(acc_db,acc.get_Account_Number(),acc2.get_Account_Number(),300);\n\n Assert.assertEquals(true,trans.process());\n }", "@Test\n\tpublic void createAccountOtherInvestmentTest() {\n\t\tsetChequingRadioDefaultOff();\n\t\trdbtnOtherInvestments.setSelected(true);\n\t\tdata.setRdbtnOtherInvestments(rdbtnOtherInvestments);\n\t\tAccount account = data.createNewAccount();\n\t\taccountTest = new Account(TEST_ACCOUNT_NAME, bankTest,\n\t\t\t\tAccount.Types.OTHER_INVESTMENTS.getAccountType());\n\t\tassertEquals(accountTest, account);\n\t}", "public void testGetAccount_fixture26_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture26();\n\n\t\tAccount result = fixture.getAccount();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getPerson());\n\t}", "Account getAccount();", "public Account getAccount() {\n return account;\n }", "public Account getAccount() {\n return account;\n }", "public Account getAccount() {\r\n\t\treturn account;\r\n\t}", "public void testGetAccount_fixture28_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture28();\n\n\t\tAccount result = fixture.getAccount();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getPerson());\n\t}", "public void testGetAccount_fixture12_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture12();\n\n\t\tAccount result = fixture.getAccount();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getPerson());\n\t}", "public void testGetAccount_fixture8_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture8();\n\n\t\tAccount result = fixture.getAccount();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getPerson());\n\t}", "@Test\n public void checkingAccount2() {\n Bank bank = new Bank();\n Customer bill = new Customer(\"Bill\");\n Account checkingAccount = new CheckingAccount(bill, Account.CHECKING);\n bank.addCustomer(new Customer(\"Bill\").openAccount(checkingAccount));\n Transaction t = new CreditTransaction(1000.0);\n t.setTransactionDate(getTestDate(-5));\n checkingAccount.addTransaction(t);\n\n assertEquals(Math.pow(1 + 0.001 / 365.0, 5) * 1000 - 1000, bank.totalInterestPaid(), DOUBLE_DELTA);\n }", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyStdusespecificacctsbackandcancel() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the link navigations of account view list of Add new user page \"); \t \t \t \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\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.StandardUser_Creation()\t\t\t\t\t \t \t \t\t\t\t\t\t \t \t \t\n\t\t.BackandCancelNavigation()\n\t\t.AddNewUserNavigationVerifications();\n\t}", "public void openAccount(Account a) {}", "public void testGetAccount_fixture24_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture24();\n\n\t\tAccount result = fixture.getAccount();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getPerson());\n\t}", "java.lang.String getAccount();", "public String getAccount() {\r\n return account;\r\n }", "public void testGetAccount_fixture11_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture11();\n\n\t\tAccount result = fixture.getAccount();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getPerson());\n\t}", "public void testGetAccount_fixture18_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture18();\n\n\t\tAccount result = fixture.getAccount();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getPerson());\n\t}", "@Given(\"I have account\")\r\n\tpublic void i_have_account() {\n\t\tSystem.out.println(\"code for account\");\r\n\t}", "public void testGetAccount_fixture15_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture15();\n\n\t\tAccount result = fixture.getAccount();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getPerson());\n\t}", "public void testGetAccount_fixture13_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture13();\n\n\t\tAccount result = fixture.getAccount();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getPerson());\n\t}", "public void testGetAccount_fixture14_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture14();\n\n\t\tAccount result = fixture.getAccount();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getPerson());\n\t}", "@Test\n public void testSelectByAccount() throws Exception {\n }", "public String getAccount() {\r\n\t\treturn account;\r\n\t}", "@Test\n public void processTestC()\n {\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n //failed transaction\n trans = new Transaction(acc_db,acc.get_Account_Number(),5,10);\n\n Assert.assertEquals(false,trans.process());\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public void testGetAccount_fixture22_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture22();\n\n\t\tAccount result = fixture.getAccount();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getPerson());\n\t}", "@Test\n\tpublic void getAccountTestSuccess() {\n\n\t\tString accountNumber = createAccount(\"viaks\",1000);\n\t\tMap<String, String> parametersMap = new HashMap<>();\n\t\tparametersMap.put(\"accountNumber\", accountNumber);\n\n\t\tRestAssured.given().when().parameters(parametersMap).get(\"/account\").then().assertThat().statusCode(200);\n\t}", "public\n Account\n getAccount()\n {\n return itsAccount;\n }", "@Test(priority = 2)\n\tpublic void accountPlan() throws InterruptedException {\n\t\t// log.info(\"Landed on Give Recog page\");\n\t\tselectAccountPlanSideNavbar();\n\t\tThread.sleep(1000L);\n\t\tvalidateBillingPageAssertion();\n\t\tlog.info(\"Testcase-1 passed since application landed on Manage page and Assertion passed\");\n\t}", "public void testGetAccount_fixture27_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture27();\n\n\t\tAccount result = fixture.getAccount();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getPerson());\n\t}", "public void testGetAccount_fixture23_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture23();\n\n\t\tAccount result = fixture.getAccount();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getPerson());\n\t}", "@Test(groups = \"Transactions Tests\", description = \"Transaction Calculation\")\n\tpublic void transactionCalculation() {\n\t\tMainScreen.clickAccountItem(\"Income\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Salary\");\n\t\tTransactionsScreen.clickAddTransactionBtn();\n\t\tTransactionsScreen.typeTransactionDescription(\"Extra income\");\n\t\tTransactionsScreen.typeTransactionAmount(\"100\");\n\t\tTransactionsScreen.clickTransactionType();\n\t\tTransactionsScreen.clickSaveBtn();\n\t\tTransactionsScreen.transactionItem(\"Extra income\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$100\"));\n\t\ttest.log(Status.PASS, \"Transaction created successfully and the value is correct\");\n\n\t\t//Creating another transaction, testing if its visible, if the value is correct and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Expenses\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Books\");\n\t\tTransactionsScreen.clickAddTransactionBtn();\n\t\tTransactionsScreen.typeTransactionDescription(\"How to become a good QA Engineer book\");\n\t\tTransactionsScreen.typeTransactionAmount(\"50\");\n\t\tTransactionsScreen.clickSaveBtn();\n\t\tTransactionsScreen.transactionItem(\"How to become a good QA Engineer book\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$50\"));\n\t\ttest.log(Status.PASS, \"Second transaction created successfully and the value is correct\");\n\n\t\t//Testing if the calculation is correct and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.transactionAmoutFromSubAccountItem(\"Cash in Wallet\").shouldHave(text(\"$50\"));\n\t\ttest.log(Status.PASS, \"Calculation is correct\");\n\n\t\t//Deleting both transactions for app cleanup and logging the result to the report\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.clickOptionsBtnFromTransactionItem(\"Extra income\");\n\t\tTransactionsScreen.clickDeleteTransactionOption();\n\t\tTransactionsScreen.clickOptionsBtnFromTransactionItem(\"How to become a good QA Engineer book\");\n\t\tTransactionsScreen.clickDeleteTransactionOption();\n\t\ttest.log(Status.PASS, \"Transactions deleted successfully\");\n\t\t\n\t\t//Testing if both transactions were deleted from the 'Double Entry' account and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.transactionAmoutFromSubAccountItem(\"Cash in Wallet\").shouldHave(text(\"$0\"));\n\t\ttest.log(Status.PASS, \"Transactions from the 'Double Entry' account deleted successfully\");\n\n\t}", "private static void onAccountCreated(Account newAccount, Context context) {\n MovieSyncAdapter.configurePeriodicSync(context, SYNC_INTERVAL, SYNC_INTERVAL/2);\n ContentResolver.setSyncAutomatically(newAccount, context.getString(R.string.content_authority), true);\n syncNextPage(context, true);\n }", "@Test\npublic void testOpenAccount(){\n String pin = \"1234\";\n AppUser user = new AppUser();\n double amount = 100;\n Account expectedAccount = new Account(amount,-1,pin);\n\n Account actualAccount = null;\n when(mockAccountDAO.accountExists(anyInt())).thenReturn(true);\n when(mockAccountDAO.accountOpen(anyInt())).thenReturn(true);\n\n actualAccount = sut.openAccount(user,pin,amount);\n\n assertEquals(expectedAccount.getAccountId(),actualAccount.getAccountId());\n\n\n}", "@Test\n public void sTest(){\n List<Account> accounts = as.findAllAccount ();\n for (Account account : accounts) {\n System.out.println (account);\n }\n }", "@Test\n @Order(4)\n void create_account_2() {\n Account empty = service.createAccount(client.getId());\n Assertions.assertEquals(client.getId(), empty.getClientId());\n Assertions.assertNotEquals(-1, empty.getId());\n Assertions.assertEquals(0, empty.getAmount());\n client.addAccount(empty);\n }", "public void AddAccount(String subtab){\r\n\t\t//String username = getValue(Email);\r\n\t//\tString password = getValue(Password);\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account should be clicked and user should get logged in\");\r\n\t\ttry{\r\n\t\t\tsleep(3000);\r\n\t\t\tclick(locator_split(\"Maintenencetab\"));\r\n\t\t\tsleep(3000);\r\n\t\t\tswitchframe(\"PegaGadget1Ifr\");\r\n\t\t\tsleep(2000);\r\n\t\t\tclick(locator_split(subtab));\r\n\t\t\tsleep(3000);\r\n\t\t\tsendKeys(locator_split(\"txtAccountName\"), getValue(\"Accountname\"));\r\n\t\t\t//selectList(locator_split(\"LstLineofBusiness\"),1);\r\n\t\t\tselectListValue(locator_split(\"LstLineofBusiness\"), \"ENERGY AND ENGINEERED RISK\");\r\n\t\t\tsleep(3000);\r\n\t\t\tsendKeys(locator_split(\"lstOccupancyType\"), getValue(\"Occupancytype\"));\r\n\t\t\tsendKeys(locator_split(\"txtlocationselect\"), getValue(\"BusinessAs\"));\r\n\t\t\tsendKeys(locator_split(\"LstaccountunderWriter\"), getValue(\"Underwriter\"));\r\n\t\t\tsleep(2000);\r\n\t\t\tsendKeys(locator_split(\"LstunderwriterRegion\"), getValue(\"UnderwriterRegion\"));\r\n\t\t\tsleep(2000);\r\n\r\n\t\t\tsendKeys(locator_split(\"LstUnderWriterCountry\"), getValue(\"UnderWriterCountry\"));\r\n\t\t\tsleep(2000);\r\n\r\n\t\t\tsendKeys(locator_split(\"LstUnderWriterBranch\"), getValue(\"UnderWriterBranch\"));\r\n\t\t\tsleep(2000);\r\n\r\n\t\t\tsendKeys(locator_split(\"LstAccountEngineerId\"), getValue(\"AccountEngineer\"));\r\n\t\t\tsleep(2000);\r\n\r\n\t\t\tclearWebEdit(locator_split(\"LstAccountCurrency\"));\r\n\t\t\tsleep(2000);\r\n\t\t\tsendKeys(locator_split(\"LstAccountCurrency\"), getValue(\"Accountcurrency\"));\r\n\t\t\t\r\n\t\t\tsleep(2000);\r\n\t\t\tsendKeys(locator_split(\"txtPolicyInceptionDate\"), getValue(\"PolicyInceptiondate\"));\r\n\t\t\tsleep(2000);\r\n\t\t\tsendKeys(locator_split(\"txtpolicyExpirationDate\"), getValue(\"PolicyExpirydate\"));\r\n\t\t\tsendKeys(locator_split(\"txtAccountPD\"), getValue(\"AccountPD\"));\r\n\t\t\tsleep(3000);\r\n\t\t\tsendKeys(locator_split(\"txtAccountBI\"), getValue(\"AccountBI\"));\r\n\t\t\tsleep(3000);\r\n\t\t\tsendKeys(locator_split(\"txtAccBI\"), getValue(\"AccountBI\"));\r\n\t\t\tsleep(5000);\r\n\t\t\tsendKeys(locator_split(\"txtpolicyLimit\"), getValue(\"PolicyLimit\"));\r\n\t\t\tsleep(5000);\r\n\t\t\tsendKeys(locator_split(\"txtPolicyNumber\"), getValue(\"PolicyNumber\"));\r\n\t\t\tsleep(2000);\r\n\t\t\tsendKeys(locator_split(\"txtpolicyLimit\"), getValue(\"PolicyLimit\"));\r\n\t\t\tsleep(5000);\r\n\t\t\tsendKeys(locator_split(\"LstPolicyStatus\"), getValue(\"Policystatus\"));\r\n\t\t\t//click(locator_split(\"txtlocationselect\"));\r\n\t\t\tsleep(2000);\r\n\t\t\t//click(locator_split(\"Lstlocationselect\"));\r\n\t\t\t\r\n\t\t\tclick(locator_split(\"btnAddAccount\"));\r\n\t\t\tsleep(3000);\r\n\t\t//\tclick(locator_split(\"btnAddLocations\"));\r\n\t\t/*\tclearWebEdit(locator_split(\"txtLoginNamegrasp\"));\r\n\t\t\t//sendKeys(locator_split(\"txtLoginNamegrasp\"), username);\r\n\t\t\t//sendKeys(locator_split(\"txtpasswordgrasp\"), password);\r\n\t\t\t\r\n\t\t\tsleep(3000);\r\n\t\t\tclick(locator_split(\"btn_privacyok\"));*/\r\n\t\t\tsleep(5000);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(getText(locator_split(\"txtAccountID\")));\r\n\t\t\tsleep(5000);\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Report tab is clicked and user is logged in\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Report tab is not clicked in\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "public String getAccount(){\n\t\treturn account;\n\t}", "private void consumeAccountInfo() {\n Account[] accounts = mAccountManager.getAccountsByType(ACCOUNT_TYPE);\n Account account;\n if (accounts != null && accounts.length > 0) {\n account = accounts[0];\n } else {\n account = new Account(\"\", ACCOUNT_TYPE);\n }\n mAccountManager.getAuthToken(account, AUTH_TOKEN_TYPE, null, true, authTokenCallback, null);\n }", "public void ClickMyAccount( ){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account Link clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"LoginLogout\"));\r\n\t\t\tclick(locator_split(\"LoginLogout\"));\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- My Account Link clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- My Account Link is not clicked \"+elementProperties.getProperty(\"LoginLogout\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}", "public void testGetAccount_fixture4_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture4();\n\n\t\tAccount result = fixture.getAccount();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getPerson());\n\t}", "public AccountInfo getAccount()\n {\n if(accountInfo == null)\n {\n System.out.println(\"You need to generate an account before getting the details.\");\n return null;\n }\n return accountInfo;\n }", "@Test\n\tpublic void AccountDetail() {\n\t\tWebElement SignIn = driver.findElement(By.xpath(\"//a[@id='nav-link-accountList']\"));\n\t\tSignIn.click();\n\n\t\t// Enter the Emailid \n\t\tWebElement EmailId = driver.findElement(By.id(\"ap_email\"));\n\t\tEmailId.sendKeys(\"test@gmail.com\");\n\n\t\t// To click the continue next button \n\t\tWebElement ContinueTOClick = driver.findElement(By.id(\"continue\"));\n\t\tContinueTOClick.click();\n\n\t\t// fill the password\n\t\tWebElement Password = driver.findElement(By.id(\"ap_password\"));\n\t\tPassword.sendKeys(\"abc121\");\n\n\t\t// click on sign in submit button\n\t\tWebElement submit = driver.findElement(By.id(\"signInSubmit\"));\n\t\tsubmit.click();\n\t\t\n\t\t\n\t\ttry {\n\t\t\tWebElement AlertMessage = driver.findElement(By.xpath(\"//h4[@class='a-alert-heading']\"));\n\t\t\tSystem.out.println(AlertMessage.getText());\n\t\t} catch (Exception e) {\n\t\t\t\n\t\t\tWebElement AlertMessage = driver.findElement(By.xpath(\"//h4[@class='a-alert-heading']\"));\n\t\t\t\n\t\t\tSystem.out.println(AlertMessage.getText());\n\t\t}\n\t\t\n\t\t\n\t\t\n\n\t}", "@Test\n public void serviceAccountNameTest() {\n // TODO: test serviceAccountName\n }", "@Test(groups = \"Transactions Tests\", description = \"Create new transaction\")\n\tpublic void createNewTransaction() {\n\t\tMainScreen.clickAccountItem(\"Income\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Salary\");\n\t\tTransactionsScreen.clickAddTransactionBtn();\n\t\tTransactionsScreen.typeTransactionDescription(\"Extra income\");\n\t\tTransactionsScreen.typeTransactionAmount(\"300\");\n\t\tTransactionsScreen.clickTransactionType();\n\t\tTransactionsScreen.typeTransactionNote(\"Extra income from this month\");\n\t\tTransactionsScreen.clickSaveBtn();\n\t\tTransactionsScreen.transactionItem(\"Extra income\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$300\"));\n\t\ttest.log(Status.PASS, \"Sub-account created successfully and the value is correct\");\n\n\t\t//Testing if the transaction was created in the 'Double Entry' account, if the value is correct and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.transactionItem(\"Extra income\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$300\"));\n\t\ttest.log(Status.PASS, \"'Double Entry' account also have the transaction and the value is correct\");\n\n\t}", "public void testGetAccount_fixture1_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture1();\n\n\t\tAccount result = fixture.getAccount();\n\n\t\t// add additional test code here\n\t\tassertEquals(null, result);\n\t}", "public void goTestActivity()\n\t {\n\t }", "private GetAccount()\r\n/* 19: */ {\r\n/* 20:18 */ super(new APITag[] { APITag.ACCOUNTS }, new String[] { \"account\" });\r\n/* 21: */ }", "public void testGetAccount_fixture20_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture20();\n\n\t\tAccount result = fixture.getAccount();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getPerson());\n\t}", "@Test\n public void testUpdateAccount() {\n for (int i = 0; i < 10; i++) {\n presenter.onUpdateAccount();\n }\n Assert.assertEquals(10, view.getManageUpdateAccountClicks());\n }", "@Override\r\n\tpublic void onAccountMatch(int result, String userId)\r\n\t{\n\r\n\t}", "@Test\n\tpublic void createAccountRRSPInvestmentTest() {\n\t\tsetChequingRadioDefaultOff();\n\t\trdbtnRrspInvestments.setSelected(true);\n\t\tdata.setRdbtnRrspInvestments(rdbtnRrspInvestments);\n\t\tAccount account = data.createNewAccount();\n\t\taccountTest = new Account(TEST_ACCOUNT_NAME, bankTest,\n\t\t\t\tAccount.Types.RRSP_INVESTMENTS.getAccountType());\n\t\tassertEquals(accountTest, account);\n\t}", "@Test\n\tpublic void Leads_30187_execute() throws Exception {\n\t\tVoodooUtils.voodoo.log.info(\"Running \" + testName + \"...\");\n\n\t\tFieldSet customData = testData.get(testName).get(0);\n\t\t\n\t\t// Convert the Lead\n\t\t// TODO: VOOD-585 - Need to have method (library support) to define Convert function in Leads\n\t\tsugar().leads.navToListView();\n\t\tsugar().leads.listView.clickRecord(1);\n\t\tsugar().leads.recordView.openPrimaryButtonDropdown();\n\t\tnew VoodooControl(\"a\", \"css\", \".fld_lead_convert_button.detail a\").click();\n\t\tVoodooUtils.waitForReady();\n\t\t\n\t\t// Clicking Contacts panel 'Reset' button\n\t\tnew VoodooControl(\"a\", \"css\", \"[data-module='Contacts'] .fld_reset_button a\").click();\n\t\tVoodooUtils.waitForReady();\n\t\t\n\t\tVoodooControl contactLastName = new VoodooControl(\"input\", \"css\", \"[name='last_name']\");\n\t\t\n\t\t// Editing the Last name in Contacts\n\t\tcontactLastName.set(testName);\n\t\t\n\t\tVoodooControl createContactBtn = new VoodooControl(\"a\", \"css\", \"[data-module='Contacts'] [name='associate_button']\");\n\t\t\n\t\t// Clicking 'Create Contact' button\n\t\tcreateContactBtn.click();\n\t\tVoodooUtils.waitForReady();\n\t\t\n\t\tVoodooControl accountName = new VoodooControl(\"input\", \"css\", \"[name='name']\");\n\t\t\n\t\t// Editing the name in Accounts\n\t\taccountName.set(testName);\n\t\t\t\t\n\t\tVoodooControl accountCreateBtn = new VoodooControl(\"a\", \"css\", \"[data-module='Accounts'] [name='associate_button']\");\n\t\t\n\t\t// Clicking 'Create Account' button\n\t\taccountCreateBtn.click();\n\t\tVoodooUtils.waitForReady();\n\n\t\tVoodooControl oppNameInput = new VoodooControl(\"input\", \"css\", \"[aria-label='Opportunity Name']\");\n\t\tVoodooControl oppCloseDate = new VoodooControl(\"input\", \"css\", \"[name='date_closed']\");\n\t\tVoodooControl oppLikelyAmount = new VoodooControl(\"input\", \"css\", \"[name='amount']\");\n\t\t\n\t\t// Putting in the 'Name' in Opportunity\n\t\toppNameInput.set(testName);\n\t\t\n\t\t// Putting in the 'Close Date' in Opportunity\n\t\toppCloseDate.click();\n\t\tnew VoodooControl(\"td\", \"css\", \".day.active\").click();\n\t\t\n\t\tString likelyAmt = sugar().opportunities.defaultData.get(\"likelyCase\");\n\t\t\n\t\t// Putting in the 'Likely Amount' in Opportunity\n\t\toppLikelyAmount.set(likelyAmt);\n\t\t\n\t\tVoodooControl createOppBtn = new VoodooControl(\"a\", \"css\", \"[data-module='Opportunities'] [name='associate_button']\");\n\t\t\n\t\t// Clicking 'Create Opportunity' button\n\t\tcreateOppBtn.click();\n\t\tVoodooUtils.waitForReady();\n\t\t\n\t\t// Reopen Contact panel\n\t\tnew VoodooControl(\"a\", \"css\", \"[data-module='Contacts'] .fld_reset_button a\").click();\n\t\tVoodooUtils.waitForReady();\n\t\t\n\t\t// Remove required data i.e contact's 'last name' from the Contact panel\n\t\tcontactLastName.set(\"\");\n\t\t\n\t\t// Clicking 'Create Contact' button\n\t\tcreateContactBtn.click();\n\t\tVoodooUtils.waitForReady();\n\t\t\n\t\t// Verify that error message: \"Error Please resolve any errors before proceeding.\" is displayed\n\t\tsugar().alerts.getError().assertContains(customData.get(\"errorMessage\"), true);\n\t\tsugar().alerts.getAlert().closeAlert();\n\t\t\n\t\t// Changing the Contact record entries from the entries used before\n\t\tnew VoodooControl(\"span\", \"css\", \".fld_salutation span\").click();\n\t\tnew VoodooControl(\"div\", \"css\", \".select2-results li:nth-child(5) div\").click(); \n\t\tnew VoodooControl(\"input\", \"css\", \"[name='first_name']\").set(testName);\n\t\tString contactLastNameValue = sugar().contacts.defaultData.get(\"lastName\");\n\t\tcontactLastName.set(contactLastNameValue);\n\t\t\n\t\t// Clicking 'Create Contact' button\n\t\tcreateContactBtn.click();\n\t\tVoodooUtils.waitForReady();\n\t\t\n\t\tString newContactName = customData.get(\"changedSalutation\") + \" \" + testName + \" \" + contactLastNameValue;\n\t\t\n\t\t// Verify that the changed Contact name is displayed as panel title\n\t\tnew VoodooControl(\"span\", \"css\", \"[data-module='Contacts'] .title\").assertContains(newContactName , true);\n\t\t\n\t\t// Reopen Accounts panel\n\t\tnew VoodooControl(\"a\", \"css\", \"[data-module='Accounts'] .fld_reset_button a\").click();\n\t\t\n\t\t// Remove required data i.e account's 'name' from the Account panel\n\t\taccountName.set(\"\");\n\t\t\n\t\t// Clicking 'Create Account' button\n\t\taccountCreateBtn.click();\n\t\tVoodooUtils.waitForReady();\n\t\t\n\t\t// Verify that error message: \"Error Please resolve any errors before proceeding.\" is displayed\n\t\tsugar().alerts.getError().assertContains(customData.get(\"errorMessage\"), true);\n\t\tsugar().alerts.getAlert().closeAlert();\n\t\t\n\t\tString newAccountName = sugar().accounts.moduleNameSingular + \" \" + testName;\n\t\t\n\t\t// Changing the Account record entries from the entries used before\n\t\taccountName.set(newAccountName);\n\t\t\t\t\n\t\t// Clicking 'Create Account' button\n\t\taccountCreateBtn.click();\n\t\tVoodooUtils.waitForReady();\n\t\t\n\t\t// Verify that the changed Account name is displayed as panel title\n\t\tnew VoodooControl(\"span\", \"css\", \"[data-module='Accounts'] .title\").assertContains(newAccountName , true);\n\t\t\n\t\t// Remove required data i.e opportunity's 'name', 'close date' and 'likely' amount from the Opportunity panel\n\t\toppNameInput.set(\"\");\n\t\toppCloseDate.set(\"\");\n\t\toppLikelyAmount.set(\"\");\n\t\t\n\t\t// Clicking 'Create Opportunity' button\n\t\tcreateOppBtn.click();\n\t\t\n\t\t// Verify that error message: \"Error Please resolve any errors before proceeding.\" is displayed\n\t\tsugar().alerts.getError().assertContains(customData.get(\"errorMessage\"), true);\n\t\tsugar().alerts.getAlert().closeAlert();\n\t\t\n\t\tString newOppName = sugar().opportunities.moduleNameSingular + \" \" + testName;\n\t\t\n\t\t// Re-inputting the required Opportunity entries\n\t\toppNameInput.set(newOppName);\n\t\toppCloseDate.set(VoodooUtils.getCurrentTimeStamp(\"MM/dd/yyyy\"));\n\t\toppCloseDate.click();\n\t\toppLikelyAmount.set(likelyAmt);\n\t\t\n\t\t// Clicking 'Create Opportunity' button\n\t\tcreateOppBtn.click();\n\t\tVoodooUtils.waitForReady();\n\t\t\n\t\t// Clicking the 'Save and Convert' button\n\t\tnew VoodooControl(\"a\", \"css\", \".fld_save_button.convert-headerpane a\").click();\n\t\tVoodooUtils.waitForReady();\n\n\t\tsugar().accounts.navToListView();\n\t\t\n\t\t// Verify that an account with the changed name (as created above) is displayed\n\t\tsugar().accounts.listView.verifyField(1, \"name\", newAccountName);\n\t\t\n\t\tsugar().contacts.navToListView();\n\n\t\t// Verify that an account with the changed name (as created above) is displayed\n\t\tsugar().contacts.listView.verifyField(1, \"fullName\", newContactName);\n\n\t\tsugar().opportunities.navToListView();\n\n\t\t// Verify that an account with the changed name (as created above) is displayed\n\t\tsugar().opportunities.listView.verifyField(1, \"name\", newOppName);\n\t\t\n\t\tVoodooUtils.voodoo.log.info(testName + \" complete.\");\n\t}", "@Test\n\tpublic void testSettleCreditDifference() {\n\t\tint creditEstimate = 50;\n\t\tLong originalAccBalance = 150l;\n\n\t\tSmsAccount smsAccount = new SmsAccount();\n\t\tsmsAccount.setSakaiUserId(\"3\");\n\t\tsmsAccount.setSakaiSiteId(\"3\");\n\t\tsmsAccount.setMessageTypeCode(\"3\");\n\t\tsmsAccount.setOverdraftLimit(1000L);\n\t\tsmsAccount.setCredits(originalAccBalance);\n\t\tsmsAccount.setAccountName(\"accountname\");\n\t\tsmsAccount.setAccountEnabled(true);\n\t\thibernateLogicLocator.getSmsAccountLogic()\n\t\t\t\t.persistSmsAccount(smsAccount);\n\n\t\tSmsTask smsTask = new SmsTask();\n\t\tsmsTask.setSakaiSiteId(SmsConstants.SMS_DEV_DEFAULT_SAKAI_SITE_ID);\n\t\tsmsTask.setSenderUserName(\"sakaiUserId\");\n\t\tsmsTask.setSmsAccountId(smsAccount.getId());\n\t\tsmsTask.setDateCreated(new Timestamp(System.currentTimeMillis()));\n\t\tsmsTask.setDateToSend(new Timestamp(System.currentTimeMillis()));\n\t\tsmsTask.setStatusCode(SmsConst_DeliveryStatus.STATUS_PENDING);\n\t\tsmsTask.setAttemptCount(2);\n\t\tsmsTask.setMessageBody(SmsConstants.SMS_DEV_DEFAULT_SMS_MESSAGE_BODY);\n\t\tsmsTask.setSenderUserName(\"senderUserName\");\n\t\tsmsTask.setMaxTimeToLive(1);\n\t\tsmsTask.setCreditEstimate(creditEstimate);\n\t\tsmsTask.setGroupSizeActual(0);\n\t\tsmsTask.setMessageTypeId(SmsConstants.MESSAGE_TYPE_SYSTEM_ORIGINATING);\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(smsTask.getDateToSend());\n\t\tcal.add(Calendar.SECOND, smsTask.getMaxTimeToLive());\n\t\tsmsTask.setDateToExpire(cal.getTime());\n\t\thibernateLogicLocator.getSmsTaskLogic().persistSmsTask(smsTask);\n\n\t\tsmsBillingImpl.reserveCredits(smsTask);\n\n\t\tsmsAccount = hibernateLogicLocator.getSmsAccountLogic().getSmsAccount(\n\t\t\t\tsmsAccount.getId());\n\t\tAssert.assertNotNull(smsAccount);\n\n\t\t// Account was credited\n\t\tAssert.assertTrue(smsAccount.getCredits() < originalAccBalance);\n\n\t\tsmsBillingImpl.settleCreditDifference(smsTask, smsTask.getCreditEstimate(), smsTask.getCreditsActual());\n\n\t\tsmsAccount = hibernateLogicLocator.getSmsAccountLogic().getSmsAccount(\n\t\t\t\tsmsAccount.getId());\n\n\t\t// Account balance was returnd to origional state since the actual\n\t\t// groups size on the task was zero\n\t\tAssert.assertTrue(smsAccount.getCredits() == originalAccBalance);\n\n\t}", "@Test\n public void savings_account2() {\n Bank bank = new Bank();\n Customer bill = new Customer(\"Bill\");\n Account savingsAccount = new SavingsAccount(bill, Account.SAVINGS);\n bank.addCustomer(new Customer(\"Bill\").openAccount(savingsAccount));\n Transaction t = new CreditTransaction(500.0);\n t.setTransactionDate(getTestDate(-15));\n savingsAccount.addTransaction(t);\n\n assertEquals(Math.pow(1 + 0.001 / 365, 15) * 500.0 - 500, bank.totalInterestPaid(), DOUBLE_DELTA);\n }", "public void testGetAccount_fixture5_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture5();\n\n\t\tAccount result = fixture.getAccount();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getPerson());\n\t}", "public void testGetAccount_fixture7_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture7();\n\n\t\tAccount result = fixture.getAccount();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getPerson());\n\t}", "public UserModel getUserWithEventsById(String account);", "public void testGetAccount_fixture6_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture6();\n\n\t\tAccount result = fixture.getAccount();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getPerson());\n\t}", "public void testGetAccount_fixture10_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture10();\n\n\t\tAccount result = fixture.getAccount();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getPerson());\n\t}", "public static Account getCurrentAccount() {\r\n\t\treturn currentAccount;\r\n\t}", "@Test(priority=3)\n\tpublic void campaign_user_with_valid_access_token() throws URISyntaxException, ClientProtocolException, IOException, ParseException{\n\t\ttest = extent.startTest(\"campaign_user_with_valid_access_token\", \"To validate whether user is able to get campaign through campaign/user api with valid token\");\n\t\ttest.assignCategory(\"CFA GET /campaign/user API\");\n\t\tList<NameValuePair> list = new ArrayList<NameValuePair>();\n\t\tCloseableHttpResponse response = HelperClass.make_get_request(\"/v2/campaign/user\", access_token, list);\n\t\tAssert.assertTrue(!(response.getStatusLine().getStatusCode() == 500 || response.getStatusLine().getStatusCode() == 401), \"Invalid status code is displayed. \"+ \"Returned Status: \"+response.getStatusLine().getStatusCode()+\" \"+response.getStatusLine().getReasonPhrase());\n\t\ttest.log(LogStatus.INFO, \"Execute campaign/user api method with valid parameter\");\n\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));\n\t\tString line = \"\";\n\t\twhile ((line = rd.readLine()) != null) {\n\t\t // Convert response to JSON object\t\n\t\t JSONParser parser = new JSONParser();\n\t\t JSONObject json = (JSONObject) parser.parse(line);\n\t\t JSONArray array = (JSONArray)json.get(\"data\");\n\t\t // Get the first campaign from the campaign user\n\t\t JSONObject first_campaign = (JSONObject)array.get(0);\n\n\t\t // Check whether campaign user returns 100 record by default\t\n\t\t Assert.assertTrue(array.size()<=100, \"Campaign user returning more than 100 records\");\n\t\t test.log(LogStatus.PASS, \"Check whether campaign user returns 100 record by default\");\n\t\t // Check response contains the fields\n\t\t Assert.assertTrue(first_campaign.containsKey(\"campaign_modified\"),\"campaign/user api does not contain campaign_modified field.\");\n\t\t test.log(LogStatus.PASS, \"Check whether campaign_modified field is present in response\");\n\t\t Assert.assertTrue(first_campaign.containsKey(\"campaign_created\"),\"campaign/user api does not contain campaign_created field.\");\n\t\t test.log(LogStatus.PASS, \"Check whether campaign_created field is present in response\");\n\t\t Assert.assertTrue(first_campaign.containsKey(\"campaign_owner_user_id\"),\"campaign/user api does not contain campaign_owner_user_id field.\");\n\t\t test.log(LogStatus.PASS, \"Check whether campaign_owner_user_id field is present in response\");\n\t\t Assert.assertTrue(first_campaign.containsKey(\"group_id\"),\"campaign/user api does not contain group_id field.\");\n\t\t test.log(LogStatus.PASS, \"Check whether group_id field is present in response\");\n\t\t Assert.assertTrue(first_campaign.containsKey(\"campaign_ext_id\"),\"campaign/user api does not contain campaign_ext_id field.\");\n\t\t test.log(LogStatus.PASS, \"Check whether campaign_ext_id field is present in response\");\n\t\t Assert.assertTrue(first_campaign.containsKey(\"campaign_name\"),\"campaign/user api does not contain campaign_name field.\");\n\t\t test.log(LogStatus.PASS, \"Check whether campaign_name field is present in response\");\n\t\t Assert.assertTrue(first_campaign.containsKey(\"campaign_end_date\"),\"campaign/user api does not contain campaign_end_date field.\");\n\t\t test.log(LogStatus.PASS, \"Check whether campaign_end_date field is present in response\");\n\t\t Assert.assertTrue(first_campaign.containsKey(\"campaign_id\"),\"campaign/user api does not contain campaign_id field.\");\n\t\t test.log(LogStatus.PASS, \"Check whether campaign_id field is present in response\");\n\t\t Assert.assertTrue(first_campaign.containsKey(\"campaign_start_date\"),\"campaign/user api does not contain campaign_start_date field.\");\n\t\t test.log(LogStatus.PASS, \"Check whether campaign_start_date field is present in response\");\n\t\t Assert.assertTrue(first_campaign.containsKey(\"campaign_status\"),\"campaign/user api does not contain campaign_status field.\");\n\t\t test.log(LogStatus.PASS, \"Check whether campaign_status field is present in response\");\n\t\t // Check data type of fields\n\t\t Assert.assertTrue(first_campaign.get(\"campaign_created\").getClass().getName().equals(\"java.lang.String\"),\"\");\n\t\t Assert.assertTrue(first_campaign.get(\"campaign_owner_user_id\").getClass().getName().equals(\"java.lang.Long\"));\n\t\t Assert.assertTrue(first_campaign.get(\"group_id\").getClass().getName().equals(\"java.lang.Long\"));\n\t\t Assert.assertTrue(first_campaign.get(\"campaign_name\").getClass().getName().equals(\"java.lang.String\"));\n\t\t Assert.assertTrue(first_campaign.get(\"campaign_id\").getClass().getName().equals(\"java.lang.Long\"));\n\t\t Assert.assertTrue(first_campaign.get(\"campaign_start_date\").getClass().getName().equals(\"java.lang.String\"));\n\t\t Assert.assertTrue(first_campaign.get(\"campaign_status\").getClass().getName().equals(\"java.lang.String\"));\n\t\t test.log(LogStatus.PASS, \"Check the data type of all fields of campaign/user api response\");\n\t\t \n\t\t // Check campaign fields are not null\n\t\t HelperClass.multiple_assertnotEquals(first_campaign.get(\"campaign_created\"), \"campaigm_created\");\n\t\t test.log(LogStatus.PASS, \"Check campaign_created date is not null or blank in response.\");\n\t\t HelperClass.multiple_assertnotEquals(first_campaign.get(\"campaign_owner_user_id\"), \"campaign_owner_user_id\");\n\t\t test.log(LogStatus.PASS, \"Check campaign_owner_user_id date is not null or blank in response.\");\n\t\t HelperClass.multiple_assertnotEquals(first_campaign.get(\"group_id\"), \"group_id\");\n\t\t test.log(LogStatus.PASS, \"Check group_id date is not null or blank in response.\");\n\t\t HelperClass.multiple_assertnotEquals(first_campaign.get(\"campaign_name\"), \"campaign_name\");\n\t\t test.log(LogStatus.PASS, \"Check campaign_name date is not null or blank in response.\");\n\t\t HelperClass.multiple_assertnotEquals(first_campaign.get(\"campaign_id\"), \"campaign_id\");\n\t\t test.log(LogStatus.PASS, \"Check campaign_id date is not null or blank in response.\");\n\t\t HelperClass.multiple_assertnotEquals(first_campaign.get(\"campaign_start_date\"), \"campaign_start_date\");\n\t\t test.log(LogStatus.PASS, \"Check campaign_start_date date is not null or blank in response.\");\n\t\t HelperClass.multiple_assertnotEquals(first_campaign.get(\"campaign_status\"), \"campaign_status\");\n\t\t test.log(LogStatus.PASS, \"Check campaign_status date is not null or blank in response.\");\t\t \n\t\t \n\t\t JSONArray users_data = (JSONArray) first_campaign.get(\"users\");\n\t\t Assert.assertTrue(users_data.size()>0, \"Users field does not contains any data\");\n\t\t test.log(LogStatus.INFO, \"Check Users field in response contains data\");\n\t\t JSONObject first_user_data = (JSONObject)users_data.get(0);\n\t\t Assert.assertTrue(first_user_data.containsKey(\"first_name\"), \"first_name field is not present in campaign/user api response\");\n\t\t test.log(LogStatus.PASS, \"Verify first_name field is present in campaign/user api response\");\n\t\t Assert.assertTrue(first_user_data.containsKey(\"role_id\"), \"role_id field is not present in campaign/user api response\");\n\t\t test.log(LogStatus.PASS, \"Verify role_id field is present in campaign/user api response\");\n\t\t Assert.assertTrue(first_user_data.containsKey(\"ct_user_id\"), \"ct_user_id field is not present in campaign/user api response\");\n\t\t test.log(LogStatus.PASS, \"Verify ct_user_id field is present in campaign/user api response\");\n\t\t Assert.assertTrue(first_user_data.containsKey(\"group_id\"), \"group_id field is not present in campaign/user api response\");\n\t\t test.log(LogStatus.PASS, \"Verify group_id field is present in campaign/user api response\");\n\t\t Assert.assertTrue(first_user_data.containsKey(\"last_name\"), \"last_name field is not present in campaign/user api response\");\n\t\t test.log(LogStatus.PASS, \"Verify last_name field is present in campaign/user api response\");\n\t\t Assert.assertTrue(first_user_data.containsKey(\"user_status\"), \"user_status field is not present in campaign/user api response\");\n\t\t test.log(LogStatus.PASS, \"Verify user_status field is present in campaign/user api response\");\n\t\t Assert.assertTrue(first_user_data.containsKey(\"user_email\"), \"user_email field is not present in campaign/user api response\");\n\t\t test.log(LogStatus.PASS, \"Verify user_email field is present in campaign/user api response\");\n\t\t Assert.assertTrue(first_user_data.containsKey(\"password\"), \"password field is not present in campaign/user api response\");\n\t\t test.log(LogStatus.PASS, \"Verify password field is present in campaign/user api response\");\n\t\t Assert.assertTrue(first_user_data.containsKey(\"user_ext_id\"), \"user_ext_id field is not present in campaign/user api response\");\n\t\t test.log(LogStatus.PASS, \"Verify user_ext_id field is present in campaign/user api response\");\n\t\t Assert.assertTrue(first_user_data.containsKey(\"user_title\"), \"user_title field is not present in campaign/user api response\");\n\t\t test.log(LogStatus.PASS, \"Verify user_title field is present in campaign/user api response\");\n\t\t \n\t\t // Check users fields are not null\n\t\t HelperClass.multiple_assertnotEquals(first_user_data.get(\"first_name\"), \"first_name\");\n\t\t test.log(LogStatus.PASS, \"Check first_name date is not null or blank in response.\");\n\t\t HelperClass.multiple_assertnotEquals(first_user_data.get(\"role_id\"), \"role_id\");\n\t\t test.log(LogStatus.PASS, \"Check role_id date is not null or blank in response.\");\n\t\t HelperClass.multiple_assertnotEquals(first_user_data.get(\"ct_user_id\"), \"ct_user_id\");\n\t\t test.log(LogStatus.PASS, \"Check ct_user_id date is not null or blank in response.\");\n\t\t HelperClass.multiple_assertnotEquals(first_user_data.get(\"group_id\"), \"group_id\");\n\t\t test.log(LogStatus.PASS, \"Check group_id date is not null or blank in response.\");\n\t\t HelperClass.multiple_assertnotEquals(first_user_data.get(\"last_name\"), \"last_name\");\n\t\t test.log(LogStatus.PASS, \"Check last_name date is not null or blank in response.\");\n\t\t HelperClass.multiple_assertnotEquals(first_user_data.get(\"user_status\"), \"user_status\");\n\t\t test.log(LogStatus.PASS, \"Check user_status date is not null or blank in response.\");\n\t\t HelperClass.multiple_assertnotEquals(first_user_data.get(\"user_email\"), \"user_email\");\n\t\t test.log(LogStatus.PASS, \"Check user_email date is not null or blank in response.\");\n\t\t HelperClass.multiple_assertnotEquals(first_user_data.get(\"password\"), \"password\");\n\t\t test.log(LogStatus.PASS, \"Check password date is not null or blank in response.\");\n\t\t \n\t\t // Get the nth campaign from the campaign user\n\t\t for(int i=0; i<array.size(); i++){\n\t\t\t // Check duplicate user is not present in associated users in campaigns\n\t\t\t JSONObject nth_campaign = (JSONObject)array.get(i);\n\t\t\t JSONArray cam_users = (JSONArray) nth_campaign.get(\"users\");\n\t\t\t ArrayList<String> camp_user_ids = new ArrayList<String>();\n\t\t\t Boolean duplicate_user_presence_in_camp = false;\n\t\t\t for(int j=0; j<cam_users.size(); j++){\n\t\t\t\t JSONObject cam_user = (JSONObject) cam_users.get(j);\n\t\t\t\t camp_user_ids.add(cam_user.get(\"ct_user_id\").toString());\n\t\t\t }\n\t\t\t Set<String> set = new HashSet<String>(camp_user_ids);\n\t\t\t if(set.size() < camp_user_ids.size()){\n\t\t\t\t duplicate_user_presence_in_camp = true; \n\t\t\t }\n\t\t\t Assert.assertFalse(duplicate_user_presence_in_camp, \"Duplicate user is present in associated user in campaign\");\n\t\t }\n\t\t test.log(LogStatus.PASS, \"Duplicate user is not present in associated user in campaign\");\n\t\t}\n\t}", "@SmallTest\n public void testForActivity() {\n solo.assertCurrentActivity(\"Wrong activity\", WelcomeActivity.class);\n }", "public void testGetAccount_fixture2_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture2();\n\n\t\tAccount result = fixture.getAccount();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getPerson());\n\t}", "@Test\n\tpublic void createAccountDebtsTest() {\n\t\tsetChequingRadioDefaultOff();\n\t\trdbtnDebt.setSelected(true);\n\t\tdata.setRdbtnDebt(rdbtnDebt);\n\t\tAccount account = data.createNewAccount();\n\t\taccountTest = new Account(TEST_ACCOUNT_NAME, bankTest,\n\t\t\t\tAccount.Types.DEBITS.getAccountType());\n\t\tassertEquals(accountTest, account);\n\t}", "public void testStartAddAccountSession() throws\n OperationCanceledException, AuthenticatorException, IOException, RemoteException {\n String accountName = Fixtures.PREFIX_NAME_SUCCESS + \"@\" + Fixtures.SUFFIX_NAME_FIXTURE;\n Bundle options = createOptionsWithAccountName(accountName);\n\n AccountManagerFuture<Bundle> future = mAccountManager.startAddAccountSession(\n Fixtures.TYPE_STANDARD_UNAFFILIATED,\n null /* authTokenType */,\n null /* requiredFeatures */,\n options,\n null /* activity */,\n null /* callback */,\n null /* handler */);\n\n Bundle result = future.getResult();\n assertTrue(future.isDone());\n assertNotNull(result);\n\n validateStartAddAccountSessionParameters(options);\n\n // Validate that auth token was stripped from result.\n assertNull(result.get(AccountManager.KEY_AUTHTOKEN));\n\n // Validate returned data\n validateSessionBundleAndPasswordAndStatusTokenResult(result);\n }", "private static void onAccountCreated(Account newAccount, Context context) {\n MovieSyncAdapter.configurePeriodicSync(context, SYNC_INTERVAL, SYNC_FLEXTIME);\n\n /*\n * Without calling setSyncAutomatically, our periodic sync will not be enabled.\n */\n ContentResolver.setSyncAutomatically(newAccount, context.getString(R.string.content_authority), true);\n\n /*\n * Finally, let's do a sync to get things started\n */\n syncImmediately(context);\n }", "int createAccount(Account account);", "@Test(enabled = true)\n\tpublic void viewTravelHistoryUnregistredCustomer() throws Exception {\n\n\t\t// create travel history via soap call\n\t\tSOAPClientSAAJ sClient = new SOAPClientSAAJ();\n\t\tCreditCardNumberGenerator ccGenerator = new CreditCardNumberGenerator();\n\t\tString validCCNumber = ccGenerator.generate(\"4\", 16);\n\t\tString accountID = sClient.travelHistorySOAPCall(validCCNumber);\n\t\tSystem.out.println(\"cc number being used is \" + validCCNumber);\n\t\tSystem.out.println(\"account id being returned is \" + accountID);\n\n\t\t// check cmc for travel history based on cc\n\t\t// takes around 6 minutes for travel history to show on cmc\n\t\tUtils.waitTime(360000);\n\n\t\tcoreTest.signIn(driver);\n\t\tTokenSearchPage tPage = getTokenSearchPage();\n\t\ttPage.selectTokenType(driver, TOKEN_TYPE);\n\t\ttPage.selectSubsystem(driver, SUBSYSTEM);\n\t\ttPage.enterBankNumber(driver, validCCNumber);\n\t\ttPage.selectExpMonth(driver);\n\t\ttPage.selectExpYear(driver);\n\t\ttPage.clickSearchToken(driver);\n\t\ttPage.clickViewDetails(driver);\n\t\ttPage.clickTravelHistory(driver);\n\n\t\tTravelHistoryPage tvPage = new TravelHistoryPage(driver);\n\t\tAssert.assertEquals(tvPage.getLocation(driver), LOCATION_UC);\n\t\tAssert.assertEquals(tvPage.getTravelMode(driver), TRAVEL_MODE);\n\t\tAssert.assertEquals(tvPage.getToken(driver), TOKEN);\n\t\tAssert.assertEquals(tvPage.getFare(driver), FARE);\n\t\tAssert.assertEquals(tvPage.getUnpaidFare(driver), UNPAID_FARE);\n\n\t\t// check travel history details\n\t\ttvPage.clickTiming(driver);\n\t\tTravelHistoryDetailPage tvdPage = new TravelHistoryDetailPage(driver);\n\t\tAssert.assertEquals(tvdPage.getLocation(driver), LOCATION_UC);\n\t\tAssert.assertEquals(tvdPage.getDevice(driver), DEVICE);\n\t\tAssert.assertEquals(tvdPage.getOperator(driver), OPERATOR);\n\t\tAssert.assertEquals(tvdPage.getTransactionStatus(driver), TRANSACTION_STATUS);\n\t\tAssert.assertEquals(tvdPage.getFare(driver), FARE);\n\t\tAssert.assertEquals(tvdPage.getSource(driver), SOURCE_UC);\n\t\ttvdPage.clickClose(driver);\n\n\t\tLog.info(\"viewTravelHistoryUnregistredCustomer\");\n\t\tdriver.close();\n\n\t}", "@Test \n\tpublic void test1() {\n\t\taccount.withdraw(1000);\n\t\t//Sample (Expected) Output\n\t\tassertEquals(1000, account.getAmount(),0.01);\n\t}", "@Test\n void checkTheManagerGetAlertAfterOwnerChangeTheBid() {\n String guest= tradingSystem.ConnectSystem().returnConnID();\n tradingSystem.Register(guest, \"Manager2\", \"123\");\n Response res= tradingSystem.Login(guest, \"Manager2\", \"123\");\n tradingSystem.AddNewManager(EuserId,EconnID,storeID,res.returnUserID());\n tradingSystem.subscriberBidding(NofetID,NconnID,storeID,4,20,2);\n store.changeSubmissionBid(EuserId,NofetID,4,30,1);\n }", "@Test\n public void customerCanPerformTransferBetweenAccounts() {\n String ownerId = \"ownerId\";\n Account accountFrom = AccountFactory.createAccount(AccountFactory.AccountType.SAVINGS, ownerId);\n Account accountTo = AccountFactory.createAccount(AccountFactory.AccountType.SAVINGS, ownerId);\n\n // Put some money in the from account\n Transaction transaction = new Transaction.Builder().setDescription(\"Test\").setAmount(DollarAmount.fromInt(100)).setType(Transaction.Type.DEPOSIT).build();\n accountFrom.applyTransaction(transaction);\n assertEquals(accountFrom.getAccountBalance(), DollarAmount.fromInt(100));\n\n // Attempt transfer\n Account.transfer(accountFrom, accountTo, DollarAmount.fromInt(30));\n\n // Assert transfer was successful\n assertEquals(DollarAmount.fromInt(70), accountFrom.getAccountBalance());\n assertEquals(DollarAmount.fromInt(30), accountTo.getAccountBalance());\n }", "public void AddToAccountInfo();" ]
[ "0.639583", "0.62535214", "0.61153", "0.5990348", "0.5986581", "0.5927275", "0.58443826", "0.58365995", "0.58145595", "0.5805917", "0.57861483", "0.5763327", "0.5761711", "0.57597834", "0.57581586", "0.5733112", "0.5725495", "0.5718283", "0.5712751", "0.57027256", "0.5695312", "0.5678991", "0.5678991", "0.5664067", "0.56503755", "0.563842", "0.56370455", "0.5635017", "0.5633821", "0.5619023", "0.5617179", "0.561407", "0.5612493", "0.55994475", "0.5594324", "0.5592855", "0.5588939", "0.55776894", "0.5573982", "0.5560743", "0.5552874", "0.55413175", "0.5528566", "0.5528566", "0.5528566", "0.5528566", "0.5528566", "0.5528566", "0.5528566", "0.5528566", "0.5528566", "0.5528566", "0.55249774", "0.5517237", "0.55102414", "0.5496462", "0.5493029", "0.54826504", "0.5478181", "0.5477273", "0.54745674", "0.5456459", "0.5451318", "0.5448358", "0.5448237", "0.5440548", "0.54310256", "0.54287356", "0.5415672", "0.5414016", "0.5403295", "0.53951997", "0.5387888", "0.53833574", "0.5372716", "0.53704005", "0.53692186", "0.5368366", "0.5367845", "0.53662884", "0.5364033", "0.5361355", "0.53602827", "0.53587466", "0.53562546", "0.53538954", "0.53506386", "0.5346704", "0.53463113", "0.5342062", "0.53386676", "0.5335315", "0.5332012", "0.53280777", "0.5324662", "0.5320829", "0.53132427", "0.5306318", "0.53025556", "0.52995735" ]
0.7670989
0
//END TEST CODE//// /Update Helper Methods
Collection<Account> listParticipants() { updatePastRelations(); return pastRelations; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void update() {\n }", "@Test\r\n public void testUpdate() {\r\n }", "@Test\n public void testUpdate() {\n\n }", "public void testCmdUpdate() {\n\t\ttestCmdUpdate_taskID_field();\n\t\ttestCmdUpdate_taskName_field();\n\t\ttestCmdUpdate_time_field();\n\t\ttestCmdUpdate_priority_field();\n\t}", "Update createUpdate();", "@Test\n void updateSuccess () {\n TestEntity testEntity = buildEntity();\n Api2 instance = new Api2();\n Long result = instance.save(testEntity);\n\n String name = \"Edited name\";\n boolean check = false;\n String description = \"edited description\";\n\n if (result != null) {\n testEntity.setName(name);\n testEntity.setCheck(check);\n testEntity.setDescription(description);\n instance.update(testEntity);\n\n Optional<TestEntity> optionalTestEntity = instance.getById(TestEntity.class, testEntity.getId());\n assertTrue(optionalTestEntity.isPresent());\n\n if (optionalTestEntity.isPresent()) {\n TestEntity entity = optionalTestEntity.get();\n\n assertEquals(entity.getName(), name);\n assertEquals(entity.getDescription(), description);\n assertEquals(entity.isCheck(), check);\n } else {\n fail();\n }\n } else {\n fail();\n }\n }", "@Test\n /* testUpdateRecord\n * testing update exist record in Save.Json\n * */\n public void testUpdateRecord() {\n testAddRecord();\n\n score = 300;\n level = 3;\n name = \"test1\";\n\n saveReader.updateRecord(indexOfReturned, \"name\", name);\n assertEquals(\"True : name field updated successfully\", name, saveReader.LoadsList.get(indexOfReturned).name);\n\n saveReader.updateRecord(indexOfReturned, \"score\", score);\n assertEquals(\"True : score field updated successfully\", score, saveReader.LoadsList.get(indexOfReturned).score);\n\n saveReader.updateRecord(indexOfReturned, \"level\", level);\n assertEquals(\"True : level field updated successfully\", level, saveReader.LoadsList.get(indexOfReturned).level);\n }", "@Test\r\n\tpublic void testUpdate() {\r\n\t\tList<E> entities = dao.findAll();\r\n\t\tE updated = supplyUpdated(entities.get(0));\r\n\t\tdao.update(entities.get(0));\r\n\t\tentities = dao.findAll();\r\n\t\tassertEquals(updated, entities.get(0));\r\n\t}", "@Test @Ignore\n\tpublic void testUpdate() {\n\t\tlog.info(\"*** testUpdate ***\");\n\t}", "@Test\n public void lastUpdateTest() {\n // TODO: test lastUpdate\n }", "@Test\n public void updateDecline() throws Exception {\n }", "@Test\n\tpublic void testUpdateTicketOk() {\n\t}", "@Test\n void updateSuccess() {\n String newDescription = \"December X-Large T-Shirt\";\n Order orderToUpdate = dao.getById(3);\n orderToUpdate.setDescription(newDescription);\n dao.saveOrUpdate(orderToUpdate);\n Order retrievedOrder = dao.getById(3);\n assertEquals(newDescription, retrievedOrder.getDescription());\n\n String resetDescription = \"February Small Long-Sleeve\";\n Order orderToReset = dao.getById(3);\n orderToUpdate.setDescription(resetDescription);\n dao.saveOrUpdate(orderToReset);\n }", "@Test\n @Ignore\n public void testUpdate() {\n System.out.println(\"update\");\n Index entity = null;\n IndexDaoImpl instance = null;\n Index expResult = null;\n Index result = instance.update(entity);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "private static void testupdate() {\n\t\ttry {\n\t\t\tRoleModel model = new RoleModel();\n\t\t\tRoleBean bean = new RoleBean();\n\t\t\tbean = model.findByPK(7L);\n\t\t\tbean.setName(\"Finance\");\n\t\t\tbean.setDescription(\"Finance Dept\");\n\t\t\tbean.setCreatedBy(\"CCD MYSORE\");\n\t\t\tbean.setModifiedBy(\"CCD MYSORE\");\n\t\t\tbean.setCreatedDatetime(new Timestamp(new Date().getTime()));\n\t\t\tbean.setModifiedDatetime(new Timestamp(new Date().getTime()));\n\t\t\tmodel.update(bean);\n\t\t\tRoleBean updateBean = model.findByPK(1);\n\t\t\tif (\"12\".equals(updateBean.getName())) {\n\t\t\t\tSystem.out.println(\"UPDATE RECORD FAILED\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"RECORD UPDATED SUCCESSFULLY\");\n\t\t\t}\n\t\t} catch (ApplicationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (DuplicateRecordException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Test\r\n public void testUpdate() {\r\n assertTrue(false);\r\n }", "@Test\n void testUpdateGoalie() {\n\n }", "@Test\r\n public void testUpdate() {\r\n System.out.println(\"update\");\r\n String doc = \"\";\r\n String xml = \"\";\r\n IwRepoDAOMarkLogicImplStud instance = new IwRepoDAOMarkLogicImplStud();\r\n boolean expResult = false;\r\n boolean result = instance.update(doc, xml);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Test \n\tpublic void testUpdateSetting() throws Exception\n\t{\n\t}", "@Test\n public void updateContact() {\n }", "@Test\r\n public void testUpdate() {\r\n System.out.println(\"update\");\r\n Title t = new Title();\r\n t.setIsbn(\"test\");\r\n t.setTitle(\"aaaaaaaaaaaaaaaaaa\");\r\n t.setAuthor(\"kkkkkkkkkkkkkk\");\r\n t.setType(\"E\");\r\n int expResult = 1;\r\n int result = TitleDao.update(t);\r\n assertEquals(expResult, result);\r\n }", "@Test\n\tpublic void testUpdateTask() {\n\t}", "Test update(TestData testData, Test test);", "@Test\r\n public void testUpdate() {\r\n System.out.println(\"update\");\r\n Festivity object = new Festivity();\r\n object.setStart(Calendar.getInstance().getTime());\r\n object.setEnd(Calendar.getInstance().getTime());\r\n object.setName(\"Test Fest 2\");\r\n object.setPlace(\"Howards\");\r\n boolean expResult = true;\r\n boolean result = Database.update(object);\r\n assertEquals(expResult, result);\r\n \r\n }", "@Test\n public void updateTest14() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBeach_volley(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isBeach_volley() ,\"Should return true if update Servizio\");\n }", "@Test\n public void testUpdateItem() throws Exception {\n\n Tracker tracker = new Tracker();\n\n String action = \"0\";\n String yes = \"y\";\n String no = \"n\";\n\n // add first item\n\n String name1 = \"task1\";\n String desc1 = \"desc1\";\n String create1 = \"3724\";\n\n Input input1 = new StubInput(new String[]{action, name1, desc1, create1, yes});\n new StartUI(input1).init(tracker);\n\n // add second item\n\n String name2 = \"task2\";\n String desc2 = \"desc2\";\n String create2 = \"97689\";\n\n Input input2 = new StubInput(new String[]{action, name2, desc2, create2, yes});\n new StartUI(input2).init(tracker);\n\n // get first item id\n\n String id = \"\";\n\n Filter filter = new FilterByName(name1);\n Item[] result = tracker.findBy(filter);\n for (Item item : result) {\n if(item != null && item.getName().equals(name1)) {\n id = item.getId();\n break;\n }\n }\n\n // update first item\n\n String action2 = \"1\";\n\n String name3 = \"updated task\";\n String desc3 = \"updated desc\";\n String create3 = \"46754\";\n\n Input input3 = new StubInput(new String[]{action2, id, name3, desc3, create3, yes});\n new StartUI(input3).init(tracker);\n\n Item foundedItem = tracker.findById(id);\n\n Assert.assertEquals(name3, foundedItem.getName());\n\n }", "@Test\n public void testUpdateLocation() {\n\n Location loc1 = new Location();\n loc1.setLocationName(\"Mommas House\");\n loc1.setDescription(\"Like it says\");\n loc1.setAddress(\"123 nunya Ave\");\n loc1.setCity(\"Hometown\");\n loc1.setLatitude(123.456);\n loc1.setLongitude(123.456);\n\n locDao.addLocation(loc1);\n\n loc1.setLocationName(\"Poppas House\");\n\n locDao.updateLocation(loc1);\n\n Location testLoc = locDao.getLocationById(loc1.getLocationId());\n\n assertEquals(loc1, testLoc);\n\n }", "@Test\n public void updateTest6() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBeach_volley(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isBeach_volley() ,\"Should return true if update Servizio\");\n }", "@Test\n\t@Override\n\tpublic void testUpdateObjectOKXml() throws Exception {\n\t}", "@Test\n\t@Override\n\tpublic void testUpdateObjectOKJson() throws Exception {\n\t}", "@Test\n public void updateTest10() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBar(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isBar() ,\"Should return true if update Servizio\");\n }", "@Test\n\tpublic void updateTestPaperQuestion() throws Exception {\n\t}", "@Test\n\tpublic void updateProductTest2() throws Exception {\n Attribute attr1 = ProductAttributeGenerator.generate(Generator.randomString(6, Generator.AlphaChars), \"Date\", \"AdminEntered\", \"Datetime\", false, false, true);\n Attribute createdAttr = AttributeFactory.addAttribute(apiContext, attr1, HttpStatus.SC_CREATED);\n \n\t\t\n\t //update product type\n ProductType myPT = ProductTypeGenerator.generate(createdAttr, Generator.randomString(5, Generator.AlphaChars));\n ProductType createdPT = ProductTypeFactory.addProductType(apiContext, DataViewMode.Live, myPT, HttpStatus.SC_CREATED);\n \n Product myProduct = ProductGenerator.generate(createdPT);\n List<ProductPropertyValue> salePriceDateValue = new ArrayList<ProductPropertyValue>();\n ProductPropertyValue salePriceValue = new ProductPropertyValue();\n DateTime date = DateTime.now();\n salePriceValue.setValue(date);\n salePriceDateValue.add(salePriceValue);\n myProduct.getProperties().get(myProduct.getProperties().size()-1).setValues(salePriceDateValue);\n Product createdProduct = ProductFactory.addProduct(apiContext, DataViewMode.Live, myProduct, HttpStatus.SC_CREATED);\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Test\n public void update() {\n try{\n repo.save(s);\n repot.save(t);\n repon.save(n);\n Tema t2 = new Tema(1, 0, 6, \"GUI\");\n Student s2 = new Student(1,221, \"Pop Ion\",\"pop.ion@gmail.com\",\"prof\");\n Nota n2 = new Nota(1, 1, \"prof\", 10, \"Irelevant\");\n repo.save(s2);\n repot.save(t2);\n repon.save(n2);\n repo.update(s2);\n repot.update(t2);\n repon.update(n2);\n assert repo.findOne(1).getGrupa()==221;\n assert repot.findOne(1).getDeadline()==8;\n assert repon.findOne(\"11\").getFeedback()==\"Irelevant\";\n\n }\n catch (ValidationException e){\n }\n }", "@Test\n void updateSuccess() {\n String newEventName = \"Coffee meeting\";\n Event eventToUpdate = (Event)genericDao.getById(5);\n eventToUpdate.setName(newEventName);\n genericDao.saveOrUpdate(eventToUpdate);\n Event retrievedEvent = (Event)genericDao.getById(5);\n assertEquals(eventToUpdate, retrievedEvent);\n }", "@Test\n public void testUpdatePositive() throws Exception{\n Item item = new Item();\n item.setName(\"item\");\n item.setType(ItemTypes.ALCOHOLIC_BEVERAGE);\n itemDao.create(item);\n\n item.setType(ItemTypes.NON_ALCOHOLIC_BEVERAGE);\n itemDao.update(item);\n\n Item itemDB = itemDao.read(item.getName());\n Assert.assertEquals(itemDB, item);\n }", "public void willbeUpdated() {\n\t\t\n\t}", "@Override\r\n\tpublic int update() throws Exception {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\n\tpublic void update() {}", "@Override\n\tpublic void update() {}", "@Override\n\tpublic void update(UpdateInfo updateInfo) {\n\t\t\n\t}", "@Test\n public void updatedAtTest() {\n // TODO: test updatedAt\n }", "@Test\r\n public void testUpdateEmployee1() throws Exception {\r\n try {\r\n\r\n int employee_id = 0;\r\n int department_id = 1;\r\n int position_id = 1;\r\n int status = 1;\r\n String date = \"\";\r\n EmployeeDAOImpl instance = new EmployeeDAOImpl();\r\n boolean expResult = false;\r\n boolean result = instance.updateEmployee(employee_id, department_id, position_id, status, date);\r\n assertEquals(expResult, result);\r\n } catch (Exception ex) {\r\n assertTrue(ex.getMessage().contains(\"Wrong Required Parameters\"));\r\n }\r\n }", "@Test\n void updateSuccess() {\n String Vin = \"1111111111111111X\";\n Car carToUpdate = carDao.getById(1);\n carToUpdate.setVin(Vin);\n carDao.saveOrUpdate(carToUpdate);\n Car retrievedCar = carDao.getById(1);\n assertEquals(carToUpdate, retrievedCar);\n }", "@Override\n\tpublic int update(TestPoEntity entity) {\n\t\treturn 0;\n\t}", "@Test\r\n\tpublic void updateUpdate() throws InterruptedException, ExecutionException {\r\n\t\tLOGGER.debugf(\"BEGINN\");\r\n\t\t\r\n\t\t// Given\r\n\t\tfinal Long zahlId = ZAHLUNGSINFORMATION_ID_UPDATE;\r\n \tfinal String neuerKontoinhaber = NEUER_KONTOINHABER;\r\n \tfinal String neuerKontoinhaber2 = NEUER_KONTOINHABER_2;\r\n\t\tfinal String username = USERNAME_ADMIN;\r\n\t\tfinal String password = PASSWORD_ADMIN;\r\n\t\t\r\n\t\t// When\r\n\t\tResponse response = given().header(ACCEPT, APPLICATION_JSON)\r\n\t\t\t\t .pathParameter(ZAHLUNGSINFORMATIONEN_ID_PATH_PARAM, zahlId)\r\n .get(ZAHLUNGSINFORMATIONEN_ID_PATH);\r\n\t\tJsonObject jsonObject;\r\n\t\ttry (final JsonReader jsonReader =\r\n\t\t\t\t getJsonReaderFactory().createReader(new StringReader(response.asString()))) {\r\n\t\t\tjsonObject = jsonReader.readObject();\r\n\t\t}\r\n\r\n \t// Konkurrierendes Update\r\n\t\t// Aus den gelesenen JSON-Werten ein neues JSON-Objekt mit neuem Nachnamen bauen\r\n \tfinal JsonObjectBuilder job2 = getJsonBuilderFactory().createObjectBuilder();\r\n \tSet<String> keys = jsonObject.keySet();\r\n \tfor (String k : keys) {\r\n \t\tif (\"kontoinhaber\".equals(k)) {\r\n \t\t\tjob2.add(\"kontoinhaber\", neuerKontoinhaber2);\r\n \t\t}\r\n \t\telse {\r\n \t\t\tjob2.add(k, jsonObject.get(k));\r\n \t\t}\r\n \t}\r\n \tfinal JsonObject jsonObject2 = job2.build();\r\n \tfinal ConcurrentUpdate concurrentUpdate = new ConcurrentUpdate(jsonObject2, ZAHLUNGSINFORMATIONEN_PATH,\r\n \t\t\t username, password);\r\n \tfinal ExecutorService executorService = Executors.newSingleThreadExecutor();\r\n\t\tfinal Future<Response> future = executorService.submit(concurrentUpdate);\r\n\t\tresponse = future.get(); // Warten bis der \"parallele\" Thread fertig ist\r\n\t\tassertThat(response.getStatusCode(), is(HTTP_NO_CONTENT));\r\n\t\t\r\n \t// Fehlschlagendes Update\r\n\t\t// Aus den gelesenen JSON-Werten ein neues JSON-Objekt mit neuem Nachnamen bauen\r\n\t\tfinal JsonObjectBuilder job1 = getJsonBuilderFactory().createObjectBuilder();\r\n \tkeys = jsonObject.keySet();\r\n \tfor (String k : keys) {\r\n \t\tif (\"kontoinhaber\".equals(k)) {\r\n \t\t\tjob1.add(\"kontoinhaber\", neuerKontoinhaber);\r\n \t\t}\r\n \t\telse {\r\n \t\t\tjob1.add(k, jsonObject.get(k));\r\n \t\t}\r\n \t}\r\n \tjsonObject = job1.build();\r\n\t\tresponse = given().contentType(APPLICATION_JSON)\r\n\t\t\t\t .body(jsonObject.toString())\r\n\t\t .auth()\r\n\t\t .basic(username, password)\r\n\t\t .put(ZAHLUNGSINFORMATIONEN_PATH);\r\n \t\r\n\t\t// Then\r\n\t\tassertThat(response.getStatusCode(), is(HTTP_CONFLICT));\r\n\t\t\r\n\t\tLOGGER.debugf(\"ENDE\");\r\n\t}", "@Test\n void updateSuccess() {\n String newFirstName = \"Artemis\";\n User userToUpdate = (User) dao.getById(1);\n userToUpdate.setFirstName(newFirstName);\n dao.saveOrUpdate(userToUpdate);\n User userAfterUpdate = (User) dao.getById(1);\n assertEquals(newFirstName, userAfterUpdate.getFirstName());\n }", "@Override\r\n\tpublic void update() {\r\n\r\n\t}", "@Test\n\tpublic void testSaveOrUpdateDriverUpdate() throws MalBusinessException{\t\n\t\tfinal long drvId = 203692;\n\t\tfinal String FNAME = \"Update\";\n\t\tfinal String LNAME = \"Driver Test\";\n\t\tfinal String PHONE_NUMBER = \"554-2728\";\n\t\t\n\t\tDriver driver;\n\t\t\n\t\tdriver = driverService.getDriver(drvId);\n\t\tdriver.setDriverForename(FNAME);\n\t\tdriver.setDriverSurname(LNAME);\t\t\n\t\tdriver.getDriverAddressList().get(0).setAddressLine1(\"111\");\t\n\t\tdriver.getPhoneNumbers().get(0).setNumber(PHONE_NUMBER);\n\t\tdriver = driverService.saveOrUpdateDriver(driver.getExternalAccount(), driver.getDgdGradeCode(), driver, driver.getDriverAddressList(), driver.getPhoneNumbers(), userName, null);\t\n\t\tdriver = driverService.getDriver(drvId);\n\t\t\n assertEquals(\"Update driver first name failed \", driver.getDriverForename(), FNAME);\t\n\t\tassertEquals(\"Update driver last name failed \", driver.getDriverSurname(), LNAME);\t\t\n\t\tassertEquals(\"Update driver phone number failed \", driver.getPhoneNumbers().get(0).getNumber(), PHONE_NUMBER);\t\t\n\t}", "@Test\r\n public void testUpdate() {\r\n TestingTypeList test = new TestingTypeList();\r\n test.addTestingType(\"TestType\", \"test\");\r\n TestingType testValue = test.getTestingTypeAt(0);\r\n test.update(testValue, testValue);\r\n TestingType notInList = new TestingType(\"NotInList\", \"notinlist\", \"notinlist\");\r\n test.update(notInList, notInList);\r\n assertEquals(1, test.size());\r\n }", "public void update() {}", "public void testUpdate() {\n TUpdate_Input[] PriceLists_update_in = new TUpdate_Input[] { PriceList_update };\n TUpdate_Return[] PriceLists_update_out = priceListService.update(PriceLists_update_in);\n // test if update was successful\n assertEquals(\"update result set\", 1, PriceLists_update_out.length);\n\n TUpdate_Return PriceList_update_out = PriceLists_update_out[0];\n assertNoError(PriceList_update_out.getError());\n assertEquals(\"updated?\", true, PriceList_update_out.getUpdated());\n }", "@Test\r\n public void testUpdate() throws Exception {\r\n System.out.println(\"update\");\r\n Bureau obj = new Bureau(0,\"Test\",\"000000000\",\"\");\r\n BureauDAO instance = new BureauDAO();\r\n instance.setConnection(dbConnect);\r\n obj = instance.create(obj);\r\n obj.setSigle(\"Test2\");\r\n //etc\r\n obj.setTel(\"000000001\");\r\n //etc\r\n Bureau expResult=obj;\r\n Bureau result = instance.update(obj);\r\n assertEquals(expResult.getSigle(), result.getSigle());\r\n //etc\r\n assertEquals(expResult.getTel(), result.getTel());\r\n //etc\r\n instance.delete(obj);\r\n //TODO verifier que si met à jour vers un doublé sigle-tel déjà existant, on a une exception\r\n }", "@Test\n public void updateTest2() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBar(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isBar() ,\"Should return true if update Servizio\");\n }", "@Test\n void updateSuccess() {\n RunCategory categoryToUpdate = (RunCategory) dao.getById(2);\n categoryToUpdate.setCategoryName(\"New Name\");\n dao.saveOrUpdate(categoryToUpdate);\n RunCategory categoryAfterUpdate = (RunCategory) dao.getById(2);\n assertEquals(categoryToUpdate, categoryAfterUpdate);\n }", "@Test\n public void testUpdate() {\n System.out.println(\"update\");\n Address obj = null;\n AddressDAO instance = null;\n boolean expResult = false;\n boolean result = instance.update(obj);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@SmallTest\n public void testUpdate() {\n int result = -1;\n if (this.entity != null) {\n Settings settings = SettingsUtils.generateRandom(this.ctx);\n settings.setId(this.entity.getId());\n\n result = (int) this.adapter.update(settings);\n\n Assert.assertTrue(result >= 0);\n }\n }", "@Test\n public void test2Update() {\n \n System.out.println(\"Prueba deSpecialityDAO\");\n SpecialityFactory factory = new MysqlSpecialityDAOFactry();\n SpecialityDAO dao = factory.create();\n assertEquals(dao.update(spec2,\"teleinformatica\"),1); \n }", "@Override\r\n\tpublic String update() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String update() {\n\t\treturn null;\r\n\t}", "@Test @Ignore\n\tpublic void testSQLUpdate() {\n\t\tlog.info(\"*** testSQLUpdate ***\");\n\t}", "protected abstract void update();", "@Override\r\n\tpublic void update() {\n\r\n\t}", "@Override\r\n\tpublic void update() {\n\r\n\t}", "@Test\n public void testExposesUpdate() throws Exception {\n Link customer = findCustomersLinks().iterator().next();\n byte[] bytes = Files.readAllBytes(Paths.get(\"src/test/resources/customer-update.txt\"));\n\n mockMvc\n .perform(put(customer.getHref())\n .contentType(MediaType.APPLICATION_JSON)\n .content(bytes))\n .andExpect(status().isNoContent());\n\n MockHttpServletResponse response2 = request(customer.getHref());\n\n assertThat(\"Firstname field was updated correctly\",\n JsonPath.read(response2.getContentAsString(), \"firstname\").toString(),\n is(\"Ralph\"));\n }", "@Test\n public void updateTest9() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setCabina(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isCabina() ,\"Should return true if update Servizio\");\n }", "@Override\r\n\tpublic void update() {\n\t}", "@Override\r\n\tpublic void update() {\n\t}", "public void update() {\n\t\t\n\t}", "Account.Update update();", "@Override\n\tpublic void update() { }", "public Boolean update(Test c) \n\t{\n\t\t\n\t\treturn true;\n\t}", "public void update(){}", "public void update(){}", "@Override\r\n\tpublic void update() {\r\n\t}", "@Test\n public void updateTest12() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setAnimazione(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isAnimazione() ,\"Should return true if update Servizio\");\n }", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}" ]
[ "0.715476", "0.6978452", "0.6860269", "0.6779362", "0.67640907", "0.6695519", "0.6669735", "0.666525", "0.6643767", "0.65802515", "0.65633726", "0.65583545", "0.65063494", "0.6500772", "0.6492081", "0.64799225", "0.64697", "0.64599895", "0.6458616", "0.6458616", "0.6458616", "0.64268047", "0.64128494", "0.63999873", "0.6386185", "0.63840246", "0.6373329", "0.6351999", "0.6349189", "0.6348523", "0.6347493", "0.6341743", "0.6311182", "0.6298849", "0.6293579", "0.629173", "0.6284167", "0.628107", "0.6280496", "0.62755257", "0.6272625", "0.62722194", "0.6253258", "0.6253258", "0.6253258", "0.6253258", "0.6253258", "0.6253258", "0.6252237", "0.6252237", "0.62385994", "0.62385994", "0.62385994", "0.62385994", "0.62385994", "0.62369454", "0.62369454", "0.6236436", "0.6234627", "0.6226945", "0.62252533", "0.6224648", "0.6224027", "0.62233466", "0.6216647", "0.62059385", "0.62023914", "0.6194873", "0.6191616", "0.6190828", "0.61892444", "0.6186244", "0.6181422", "0.617165", "0.61592275", "0.6153218", "0.6153218", "0.6151264", "0.6147822", "0.6134344", "0.6134344", "0.6134076", "0.613292", "0.61270773", "0.61270773", "0.6126864", "0.6125009", "0.6116309", "0.6101488", "0.6098774", "0.6098774", "0.6097542", "0.60934806", "0.6092399", "0.6092399", "0.6092399", "0.6092399", "0.6092399", "0.6092399", "0.6092399", "0.6092399" ]
0.0
-1
/ TODO This method returns up to 10 of the last balance changes (if available)
AbstractList<BalanceChange> recentActivity() { ArrayList<BalanceChange> activity = new ArrayList<BalanceChange>(); int i=10; while (i > 0) { //TODO i--; } return activity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String myAfterBalanceAmount() {\r\n\t\tint count=0;\r\n\t\tList<SavingAccount> acc = null;\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"Before Repeat\");\r\n\t\t\tacc = getSavingAccountList();\r\n\r\n\t\t\tfor (SavingAccount savingAcc : acc) {\r\n\t\t\t\tif (!(\"0\".equals(savingAcc.getState()))) {\r\n\t\t\t\t\tif (savingAcc.getState().equals(\"active\")) {\r\n\t\t\t\t\t\tint maxRepeat = Integer.parseInt(savingAcc\r\n\t\t\t\t\t\t\t\t.getRepeatable());\r\n\r\n\t\t\t\t\t\tDate date = new Date();\r\n\t\t\t\t\t\tDate systemDate = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAccSer\r\n\t\t\t\t\t\t\t\t\t\t.convertDateToStringDDmmYYYY(date));\r\n\r\n\t\t\t\t\t\tDate dateEnd = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t.getDateEnd());\r\n\r\n\t\t\t\t\t\tif (systemDate.getTime() == dateEnd.getTime()) {\r\n\t\t\t\t\t\t\tDate newEndDate = DateUtils.addMonths(systemDate,\r\n\t\t\t\t\t\t\t\t\tsavingAcc.getInterestRateId().getMonth());\r\n\r\n\t\t\t\t\t\t\tfloat balance = savingAcc.getBalanceAmount();\r\n\t\t\t\t\t\t\tfloat interest = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getInterestRate();\r\n\r\n\t\t\t\t\t\t\tint month = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getMonth();\r\n\t\t\t\t\t\t\tint days = Days\r\n\t\t\t\t\t\t\t\t\t.daysBetween(\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateStart())),\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateEnd())))\r\n\t\t\t\t\t\t\t\t\t.getDays();\r\n\t\t\t\t\t\t\tfloat amountAll = balance\r\n\t\t\t\t\t\t\t\t\t+ (balance * ((interest / (100)) / 360) * days);\r\n\t\t\t\t\t\t\tsavingAcc.setDateStart(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(systemDate));\r\n\t\t\t\t\t\t\tsavingAcc.setDateEnd(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(newEndDate));\r\n\t\t\t\t\t\t\tsavingAcc.setBalanceAmount(amountAll);\r\n\t\t\t\t\t\t\tsavingAcc.setRepeatable(\"\" + (maxRepeat + 1));\r\n\t\t\t\t\t\t\tupdateSavingAccount(savingAcc);\r\n\t\t\t\t\t\t\tcount+=1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"Successfully!! \"+ count +\" Saving Account has been updated. Minh Map!!!\");\r\n\t\t\t\r\n\t\t\treturn \"success\";\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"Exception\");\r\n\r\n\t\t}\r\n\t\treturn \"Fail\";\r\n\t}", "private void listBalances() {\n\t\t\r\n\t}", "public double getBalance() {\n\n double balance = 0;\n balance = overDraftLimit;\n return balance;\n\n }", "private Changelist[] getChanges() {\n String depot = parent.getDepot();\n String counterName = parent.getCounter();\n Client client = Client.getClient();\n\n // Obtain the most recent changelist available on the client\n Changelist toChange = Changelist.getChange(depot, client);\n\n // Obtain the lower boundary for the changelist results\n Counter counter = Counter.getCounter(counterName);\n int counterVal = 0;\n if (counter != null) {\n counterVal = counter.getValue();\n } else {\n counterVal = toChange.getNumber();\n }\n\n return Changelist.getChanges(depot, counterVal, toChange.getNumber());\n }", "public BigDecimal getHistoryRebate() {\n return historyRebate;\n }", "BigDecimal getOpeningDebitBalance();", "BigDecimal getOpeningDebitBalance();", "public static String getPastBills(String account){\n return \"select * from account_history where ah_accountnum = '\"+account+\"'\";\n }", "public abstract int getBalancesRead();", "public double getCurrentBalance(){\n if(!checkAccountOpen()){\n System.out.println(\"This transaction could not be processed. Please check your account status.\");\n }\n System.out.println(\"Your current balance is: $\"+currentBalance);\n return currentBalance;\n }", "List<Expenses> latestExpenses();", "double getBalance();", "double getBalance();", "private static int getChange(int m) {\n int[] change = new int[m+1];\n int[] coins = {1, 3, 4};\n for(int i = 1; i <= m; i++){\n \tchange[i] = Integer.MAX_VALUE;\n \tfor(int j = 0; j < 3; j++){\n \t\tif(i >= coins[j]){\n \t\t\tint temp = change[i-coins[j]] + 1;\n \t\t\tif (temp < change[i])\n \t\t\t\tchange[i] = temp;\n \t\t}\n \t}\n }\n return change[m];\n }", "private int getLatestRuns() {\n // return 90 for simplicity\n return 90;\n }", "public com.token.vl.service.MoneyWs getCurrent_balance() {\n return current_balance;\n }", "BigDecimal getClosingDebitBalance();", "public double getBalance()\n {\n return startingBalance;\n }", "public String balance() {\n\t\treturn this.apiCall(\"balance\", \"\", \"\", true);\n\t}", "public int getCurBalance() {\n\t\treturn curBalance;\n\t}", "public long getBalance() {\n\t\n\treturn balance;\n}", "public double getBal() {\n\t\t return balance;\r\n\t }", "public int getMoneyAfterBet() {\n moneyAfterBet = initialBudget - betAmount;\n // initialBudget = moneyAfterBet;\n return moneyAfterBet;\n\n }", "public static int[] getChange (int value, int[] denominations, int[] amounts) {\n\t\tint [] f = new int[value + 1];\r\n\t\tint m = denominations.length;\r\n\t\tint result, temp = 1, j;\r\n\t\tint d = 0;\r\n\t\tfor (int i = 1; i <= value; i ++) {\r\n\t\t\ttemp = value + 1; j = 0;\r\n\t\t\t\r\n\t\t\twhile (j < m && i >= denominations[j] ){\r\n\t\t\t\td = f[i-denominations[j]];\r\n\t\t\t\tif (temp > d)\r\n\t\t\t\t temp = d;\r\n\t\t\t\tj ++;\r\n\t\t\t} \r\n\t\t\tf[i] = temp + 1;\r\n\t\t}\r\n\t\tresult = f[value]; // will be put in the position 0\r\n // tracing the array f backwards, finding the denomination contributing to the minimum number of coins\r\n\t\tint k = result;\r\n\t\tint [] change = new int[k + 1]; // position 0 for the number of coins, positions 1 to k for the denominations\r\n\t\tj = 0;\r\n\t\tint pos = 0;\r\n\t\twhile (k > 0) {\r\n\t\t\ttemp = k;\r\n\t\t\tfor (j = 0; j < m && denominations[j] <= value; j ++) {\r\n\t\t\t\td = f[value-denominations[j]];\r\n\t\t\t\tif ( temp > d) {\r\n\t\t\t\t\ttemp = d;\r\n\t\t\t\t\tpos = j;\r\n\t\t\t\t}\r\n\t\t\t\t//pos is the index in the array of denominations indicating the \r\n //pos = smallest num of needed coins // smallest number of needed coins\t\t\r\n\t\t\t}\r\n\t\t\tchange[k] = denominations[pos]; \r\n\t\t\tvalue -= change[k --]; // use the remaining value and decrement number of coins\r\n\t\t}\r\n\t\tchange[0] = result;\r\n\t\t\r\n\t\tfor(int i = 1; i < change.length; i++) {\r\n\t\t\t\r\n\t\t\tint a = amounts[i -1] - change[i];\r\n\t\t\tif(a <= 0) {\r\n\t\t\t\tdenomupdate[i - 1] = a;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\treturn change;\t\r\n\t}", "public Money getTotalBalance();", "@Override\r\n\tpublic double showbalanceDao() {\n\t\t\r\n\t\treturn temp.getCustBal();\r\n\t}", "public int getBalance()\n {\n return balance;\n }", "double getChangePercent() {\n\t return 100 - (currentPrice * 100 / previousClosingPrice);\n\t }", "private ArrayList<Transaction> getTransactionsOfTheDay(int assetID) throws Exception {\n int i = 1;\n ArrayList<Transaction> currentTransactions = new ArrayList<Transaction>();\n ArrayList<Transaction> allTransactions = new ArrayList<Transaction>();\n\n while (true) {\n String url = MASTER_URL + ASSETS + assetID + \"/history_paginate.api?page=\" + i;\n\n URL obj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) obj.openConnection();\n // request method\n con.setRequestMethod(\"GET\");\n\n // request headers\n con.setRequestProperty(\"token\", USER_TOKEN);\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n\n // reading input stream\n BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n String inputLine;\n String response = \"\";\n while ((inputLine = in.readLine()) != null) {\n response += inputLine;\n }\n in.close();\n\n DateTime assetActiveDateTime = new DateTime().minusDays(1);\n// System.out.println(assetActiveDateTime);\n int day = assetActiveDateTime.getDayOfMonth();\n int month = assetActiveDateTime.getMonthOfYear();\n int year = assetActiveDateTime.getYear();\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(org.codehaus.jackson.map.DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);\n String emptyHistory = \"{\\\"history\\\":[]\";\n if (!response.substring(0,13).equals(emptyHistory)) {\n String arrayResponse = response.substring(11, response.length() - 1);\n CollectionType constructCollectionType =\n TypeFactory.defaultInstance().constructCollectionType(ArrayList.class,\n Transaction.class);\n currentTransactions = mapper.readValue(arrayResponse, constructCollectionType);\n for (Transaction t : currentTransactions){\n DateTime checkoutDateTime = t.getCheckOutDateTime();\n if (day == checkoutDateTime.getDayOfMonth() &&\n month == checkoutDateTime.getMonthOfYear() &&\n year == checkoutDateTime.getYear()) {\n allTransactions.add(t);\n }\n }\n// System.out.println(allTransactions);\n currentTransactions.clear();\n } else {\n break;\n }\n i++;\n }\n return allTransactions;\n }", "BigDecimal getPreviousClosePrice();", "private double getBalance() { return balance; }", "public String getLastChange() {\n return lastChange;\n }", "public Double getBalance(){\n Double sum = 0.0;\n // Mencari balance dompet dari transaksi dengan cara menghitung total transaksi\n for (Transaction transaction : transactions) {\n sum += transaction.getAmount().doubleValue();\n }\n return sum;\n }", "BigDecimal getOpeningCreditBalance();", "BigDecimal getOpeningCreditBalance();", "@Override\n\tpublic BigDecimal getBackAccMoney(String bidId, String period) {\n\t\treturn dao.getBackAccMoney(bidId,period);\n\t}", "@Override\n public BigDecimal getCurrentBalance(Account account) {\n return null;\n }", "public long getBalance() {\n return this.balance;\n }", "public double getBalance()\r\n\t{\r\n\t\treturn balance;\t\t\r\n\t}", "public void getBalance() {\n\t\tSystem.out.println(\"Balance in Savings account is\" + balance);\n\t\t//return balance;\n\t}", "public void checkBalance()\n\t{\n\t\tList<Account> accounts = Main.aDao.getAllAccounts(this.loggedIn.getUserId());\n\t\tdouble accountsTotal = 0;\n\t\t\n\t\tfor(Account a : accounts)\n\t\t{\n\t\t\taccountsTotal += a.getBalance();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Total funds available across all accounts:\\n\" + accountsTotal);\n\t}", "private Node<T> balance(Node<T> current) {\n hAndBF(current);\n int balance = current.getBalanceFactor();\n if (balance > 1) {\n hAndBF(current.getLeft());\n if (current.getLeft().getBalanceFactor() < 0) {\n return doubleWithLeft(current);\n } else {\n return rotateWithLeft(current);\n }\n }\n if (balance < -1) {\n hAndBF(current.getRight());\n if (current.getRight().getBalanceFactor() <= 0) {\n return rotateWithRight(current);\n } else {\n return doubleWithRight(current);\n }\n }\n return current;\n }", "public BigDecimal getPriceListOld();", "public double getBalance(){\r\n\t\treturn balance;\r\n\t}", "public double getBalance()\n {\n return balance;\n }", "public double getBalance()\n \n {\n \n return balance;\n \n }", "public int getBalance() {\n return balance;\n }", "public int getBalance() {\n return balance;\n }", "public static Double getCurrentBalance() {\n\t\treturn BankAccount.currentBalance;\n\t}", "public BigDecimal getPriceLimitOld();", "public static double resolveBackOrders(BookData bookInfo){\n\n int currentStock = bookInfo.getBook().getStock();\n double newSales = 0;\n\n // If there are back orders resolve them in order\n // of oldest to most recent\n\n while (bookInfo.areThereBackOrders() ) {\n BackOrder oldestBKOD = bookInfo.getOldestBackOrder();\n\n boolean backOrderFilled = true;\n\n // If new stock is not enough to resolve back order,\n // send all new stock to customer\n if (currentStock - oldestBKOD.getNumOrders() < 0){\n oldestBKOD.changeNumOrders(currentStock);\n\n // Print notification to Screen about\n // oldest back order being partially satisfied\n System.out.print(\"Back order filled \");\n newSales += orderDescription(currentStock, bookInfo,\n oldestBKOD.getCustomerNum(), backOrderFilled);\n\n bookInfo.getBook().changeStock(-1*currentStock);\n break;\n\n // Otherwise resolve back order\n } else {\n // Update Stock of specified book\n int booksSent = oldestBKOD.getNumOrders();\n currentStock -= booksSent;\n bookInfo.getBook().changeStock(-1*booksSent);\n\n // Print notification to Screen\n // about oldest back order being satisfied\n System.out.print(\"Back order filled \");\n newSales += orderDescription(booksSent, bookInfo,\n oldestBKOD.getCustomerNum(), backOrderFilled);\n\n // Delete oldest back order\n bookInfo.terminateOldestBackOrder();\n }\n }\n // Return revenue from sales if any\n return newSales;\n }", "private int calculateBalance() {\n return height(getRight()) - height(getLeft());\n }", "public Double getBalance() {\r\n return balance;\r\n }", "public void viewBalance() {\n\t\tSystem.out.println(\"This is your current Balance $\" + tuitionBalance);\n\t}", "public Map<String, Integer> getAccountBalances() throws LedgerException {\n Block lastBlock;\n\n try {\n // Retrieve most recent completed block\n lastBlock = getBlock(blockMap.size());\n } catch (LedgerException e) {\n // Catch exception that 'Block does not exist' and throw a more specific error\n throw new LedgerException(\"get account balances\", \"No blocks have been committed yet.\");\n }\n\n // Get accountBalanceMap from the last committed block\n Map<String, Account> accountMap = lastBlock.getBalanceMap();\n\n // Create new map to store values\n Map<String, Integer> accountBalancesMap = new HashMap<String, Integer>();\n\n // Iterate through accounts to retrieve their current balances.\n for (Map.Entry<String, Account> entry : accountMap.entrySet() ) {\n accountBalancesMap.put(entry.getKey(), entry.getValue().getBalance());\n }\n\n return accountBalancesMap;\n }", "ResponseEntity<List<TieredRatesHistory>> getTieredRatesHistory();", "public List<Record> getAccountHistory(BigDecimal bankAccountID){\n String sql = \"SELECT * FROM history WHERE bankaccount_id = :bankaccount_id\";\n Map paramMap = new HashMap();\n paramMap.put(\"bankaccount_id\", bankAccountID);\n List<Record> result = jdbcTemplate.query(sql, paramMap, new HistoryRowMapper());\n return result;\n }", "public String getWithdrawalHistory(String currency) {\n\n\t\tString method = \"getwithdrawalhistory\";\n\n\t\tif(currency.equals(\"\"))\n\n\t\t\treturn getJson(API_VERSION, ACCOUNT, method);\n\n\t\treturn getJson(API_VERSION, ACCOUNT, method, returnCorrectMap(\"currency\", currency));\n\t}", "BigDecimal getClosingCreditBalance();", "public static ArrayList<String> getPreviousBillRounds() {\n\n\t\tAppLog.begin();\n\t\tConnection conn = null;\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\tList<String> previousBillRoundList = new ArrayList<String>();\n\t\ttry {\n\t\t\tString query = QueryContants.getPreviousBillRoundQuery();\n\t\t\tAppLog.info(\"getPreviousBillRoundsQuery::\" + query);\n\t\t\tconn = DBConnector.getConnection();\n\t\t\tps = conn.prepareStatement(query);\n\t\t\trs = ps.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tString previousBillRound = rs.getString(\"PREV_BILL_ROUND\");\n\t\t\t\tpreviousBillRoundList.add(previousBillRound);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tAppLog.error(e);\n\t\t} catch (IOException e) {\n\t\t\tAppLog.error(e);\n\t\t} catch (Exception e) {\n\t\t\tAppLog.error(e);\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (null != ps) {\n\t\t\t\t\tps.close();\n\t\t\t\t}\n\t\t\t\tif (null != rs) {\n\t\t\t\t\trs.close();\n\t\t\t\t}\n\t\t\t\tif (null != conn) {\n\t\t\t\t\tconn.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tAppLog.error(e);\n\t\t\t}\n\t\t}\n\t\tAppLog.end();\n\t\treturn (ArrayList<String>) previousBillRoundList;\n\t}", "public HashMap<String, Integer> compute_balance(JsonObject block) {\n \tHashMap<String, Integer> balance = new HashMap<>();\n \tStack<JsonObject> s = new Stack<JsonObject>();\n \tString initHash = \"0000000000000000000000000000000000000000000000000000000000000000\";\n \tString prevHash = block.get(\"PrevHash\").getAsString();\n \ts.push(block);\n \t\n \twhile (!prevHash.equals(initHash)) {\n JsonObject now = blocks.get(prevHash);\n s.push(now);\n try{\n prevHash = now.get(\"PrevHash\").getAsString();\n } catch (NullPointerException e){\n System.out.println(\"Null pointer in compute_balance(), prevHash:\" + prevHash);\n break;\n }\n \t}\n \t\n \twhile(!s.empty()) {\n \t\tJsonObject now = s.pop();\n \t\tUpdate_by_block(balance, now);\n \t}\n \t\n \treturn balance;\n }", "public double getBalance(){\n return this.balance;\r\n }", "public double getBalance() {\n return balance;\n }", "double getBalance() {\n\t\treturn balance;\n\t}", "public double getBalance(){\n return balance.getBalance();\n }", "public double getBalance(){\n\t\treturn balance;\n\t}", "public static void main(String[] args) {\n Account anushaAccount = new Account(456123, \"SBIK1014\", 100);\n Account priyaAccount = new Account(789456, \"SBIK1014\", 200);\n Account dhanuAccount = new Account(951753, \"SBIK1014\", 300);\n\n ArrayList<Account> accounts = new ArrayList<>();\n\n accounts.add(anushaAccount);\n accounts.add(priyaAccount);\n accounts.add(dhanuAccount);\n\n TransactionHistory anuTranHist1 = new TransactionHistory(\"8-Jun-2018\", \"savaings\", 25000);\n TransactionHistory anuTranHist2 = new TransactionHistory(\"28-nov-2018\", \"current\", 50000);\n TransactionHistory anuTranHist3 = new TransactionHistory(\"15-Mar-2018\", \"savaings\", 5000);\n\n TransactionHistory priyaTranHist1 = new TransactionHistory(\"8-Jun-2018\", \"savaings\", 25000);\n TransactionHistory priyaTranHist2 = new TransactionHistory(\"28-nov-2018\", \"current\", 50000);\n TransactionHistory priyaTranHist3 = new TransactionHistory(\"15-Mar-2018\", \"savaings\", 5000);\n\n TransactionHistory dhanuTranHist1 = new TransactionHistory(\"8-Jun-2018\", \"savaings\", 25000);\n TransactionHistory dhanuTranHist2 = new TransactionHistory(\"28-nov-2018\", \"current\", 50000);\n TransactionHistory dhanuTranHist3 = new TransactionHistory(\"15-Mar-2018\", \"savaings\", 5000);\n\n\n ArrayList<TransactionHistory> anuTransactionHistory = new ArrayList<>();\n anuTransactionHistory.add(anuTranHist1);\n anuTransactionHistory.add(anuTranHist2);\n anuTransactionHistory.add(anuTranHist3);\n\n ArrayList<TransactionHistory> priyaTransactionHistory = new ArrayList<>();\n anuTransactionHistory.add(priyaTranHist1);\n anuTransactionHistory.add(priyaTranHist2);\n anuTransactionHistory.add(priyaTranHist3);\n\n ArrayList<TransactionHistory> dhanuTransactionHistory = new ArrayList<>();\n anuTransactionHistory.add(dhanuTranHist1);\n anuTransactionHistory.add(dhanuTranHist2);\n anuTransactionHistory.add(dhanuTranHist3);\n\n //useless code\n //you have already instantiated arraylist above and filled it with objects.. you can use that\n // List<Account> accountDetails=Arrays.asList(anushaAccount,priyaAccount,dhanuAccount);\n //List<TransactionHistory> transHistory=Arrays.asList(anuTranHist1,anuTranHist2,anuTranHist3);\n\n Customer anusha = new Customer(\"anusha\", 26, \"28-mar-92\", anushaAccount, anuTransactionHistory);\n Customer priya = new Customer(\"priya\", 22, \"15-oct-96\", priyaAccount, priyaTransactionHistory);\n Customer dhanu = new Customer(\"dhanu\", 32, \"05-jan-82\", dhanuAccount, dhanuTransactionHistory);\n\n anusha.setAccount(anushaAccount);\n priya.setAccount(priyaAccount);\n dhanu.setAccount(dhanuAccount);\n\n List<Customer> customerDetails = Arrays.asList(anusha, priya, dhanu);\n\n\n Bank bank = new Bank(\"SBI\", \"BNGLR\", customerDetails);\n\n// use the utitlity class here and output the customer object with the highest amount\n // check if your logic is running fine and fix this by morning. I have to finish work, and will leave it to you.\n Customer highestAmountCustomer = BankUtility.getCustomerWithHighestDeposit(bank);\n\n System.out.println(\"Customer with highest bank balance is \"+ highestAmountCustomer.getName() + \" with value \"+highestAmountCustomer.getAccount().getAmount());\n }", "public double getChange() \n\t{\n\t\treturn purchase.getPayment().getChange();\n\t}", "public double getBalance() {\r\n\t\t\r\n\t\treturn balance;\r\n\t\t\r\n\t}", "public BigDecimal borrow(Account acct) {\n\t\tBigDecimal amt = maxLoans.subtract(acct.loans);\n\t\tif (amt.compareTo(BigDecimal.ZERO) < 0)\n\t\t\tamt = BigDecimal.ZERO;\n\t\treturn amt;\n\t}", "long getLastChanged();", "public double calculateNet(){\r\n double total = 0;\r\n for (Map.Entry<String, Account[]> list : allAccounts.entrySet()){\r\n Account[] accountList = list.getValue();\r\n String accountName = list.getKey();\r\n for (Account account : accountList){\r\n if (account == null){\r\n break;\r\n }\r\n if (accountName.equals(\"CreditCard\") || accountName.equals(\"LineOfCredit\")){\r\n total -= account.getCurrentBalance();\r\n } else{\r\n total += account.getCurrentBalance();\r\n }\r\n }\r\n }\r\n return Double.valueOf(twoDec.format(total));\r\n }", "public double getBalance() \n\t{\n\t\treturn balance;\n\t\t\n\t}", "public Integer getBalance() {\n return balance;\n }", "public Integer getBalance() {\n return balance;\n }", "@Override\n\tpublic BigDecimal getBackMoney(String bidId, String peridId) {\n\t\treturn dao.getBackMoney(bidId, peridId);\n\t}", "private void calculateDebitAgingOLDEST(String customerId, List<EMCQuery> periodQueries, List<DebtorsAgingHelper> agingList, Date atDate, EMCUserData userData) {\n //First calculate total outstanding debits\n calculateDebitAgingNONE(periodQueries, agingList, atDate, customerId, userData);\n\n //Bev requested that we remove this check. This will now include all unallocated credits, regardless of\n //whether or not they existed at atDate.\n //query.addAnd(\"createdDate\", atDate, EMCQueryConditions.LESS_THAN_EQ);\n\n BigDecimal unallocatedCredit = getTotalUnallocatedCredit(customerId, atDate, userData);\n\n //Start allocating credits to oldest debits\n for (int i = agingList.size() - 1; i >= 0; i--) {\n BigDecimal currentBinAmount = agingList.get(i).getBinAmount();\n if (currentBinAmount.compareTo(BigDecimal.ZERO) > 0) {\n //Debit amount found\n if (currentBinAmount.compareTo(unallocatedCredit) > 0) {\n //Outstanding debit is more than outstanding credit.\n //Allocate credit in full.\n agingList.get(i).setBinAmount(currentBinAmount.subtract(unallocatedCredit));\n unallocatedCredit = BigDecimal.ZERO;\n } else {\n //Outstanding debit is less than or equal to outstanding credit.\n //Allocate bin debit amount.\n unallocatedCredit = unallocatedCredit.subtract(currentBinAmount);\n agingList.get(i).setBinAmount(BigDecimal.ZERO);\n }\n\n if (unallocatedCredit.compareTo(BigDecimal.ZERO) == 0) {\n //Consumed credit, exit loop.\n break;\n }\n }\n }\n\n //If credit remains, allocate all of it to the current bin.\n if (unallocatedCredit.compareTo(BigDecimal.ZERO) > 0 && !agingList.isEmpty()) {\n agingList.get(0).setBinAmount(agingList.get(0).getBinAmount().subtract(unallocatedCredit));\n }\n\n// This code removed. As the getTotalUnallocatedCredit() method already returned the full credit amount outstanding at the specified\n// date, this caused double the outstanding credit to be allocated.\n// //If atDate less than today, ignore updates made to transactions between atDate and today.\n// //Only check dates, not time\n// Calendar atCalendar = Calendar.getInstance();\n// atCalendar.setTime(atDate);\n// atCalendar.set(Calendar.HOUR, 0);\n// atCalendar.set(Calendar.MINUTE, 0);\n// atCalendar.set(Calendar.SECOND, 0);\n// atCalendar.set(Calendar.MILLISECOND, 0);\n//\n// Calendar nowCalendar = Calendar.getInstance();\n// nowCalendar.setTime(Functions.nowDate());\n// nowCalendar.set(Calendar.HOUR, 0);\n// nowCalendar.set(Calendar.MINUTE, 0);\n// nowCalendar.set(Calendar.SECOND, 0);\n// nowCalendar.set(Calendar.MILLISECOND, 0);\n//\n// if (atCalendar.compareTo(nowCalendar) < 0) {\n// EMCQuery creditQuery = new EMCQuery(enumQueryTypes.SELECT, DebtorsTransactionSettlementHistory.class);\n// creditQuery.addFieldAggregateFunction(\"creditSettled\", \"SUM\");\n// //Only include transactions that existed on atDate. Bev requested that we remove this check.\n// //creditQuery.addAnd(\"transactionCreatedDate\", atDate, EMCQueryConditions.LESS_THAN_EQ);\n//\n// //Customer is optional\n// if (customerId != null) {\n// creditQuery.addAnd(\"customerId\", customerId);\n// }\n//\n// //Only include transactions settled after atDate\n// creditQuery.addAnd(\"createdDate\", atDate, EMCQueryConditions.GREATER_THAN);\n//\n// BigDecimal creditSettled = (BigDecimal) util.executeSingleResultQuery(creditQuery, userData);\n// if (creditSettled == null) {\n// creditSettled = BigDecimal.ZERO;\n// }\n//\n// //Start allocating credits to oldest debits\n// for (int i = agingList.size() - 1; i >= 0; i--) {\n// BigDecimal currentBinAmount = agingList.get(i).getBinAmount();\n// if (currentBinAmount.compareTo(BigDecimal.ZERO) > 0) {\n// //Debit amount found\n// if (currentBinAmount.compareTo(creditSettled) > 0) {\n// //Outstanding debit is more than outstanding credit.\n// //Allocate credit in full.\n// agingList.get(i).setBinAmount(currentBinAmount.subtract(creditSettled));\n// creditSettled = BigDecimal.ZERO;\n// } else {\n// //Outstanding debit is less than or equal to outstanding credit.\n// //Allocate bin debit amount.\n// creditSettled = creditSettled.subtract(currentBinAmount);\n// agingList.get(i).setBinAmount(BigDecimal.ZERO);\n// }\n//\n// if (creditSettled.compareTo(BigDecimal.ZERO) == 0) {\n// //Consumed credit, exit loop.\n// break;\n// }\n// }\n// }\n//\n// //If credit remains, allocate all of it to the current bin.\n// if (creditSettled.compareTo(BigDecimal.ZERO) > 0 && !agingList.isEmpty()) {\n// agingList.get(0).setBinAmount(agingList.get(0).getBinAmount().subtract(creditSettled));\n// }\n// }\n }", "public String getWithdrawalHistory() {\n\n\t\treturn getWithdrawalHistory(\"\");\n\t}", "public BigDecimal getPriceLastOrd();", "public String accountsReceivingLoans(){\n int total = 0;\n double sum = 0;\n for(MicroLoan record : bank.getAccount2MicroloansReceived().values()){\n total++;\n sum += record.getAmount();\n }\n return \"Number of accounts receiving micro loans: \" +total +\" worth a value of \"+sum;\n }", "protected double getTotalBalance()\r\n {\r\n return totalBalance;\r\n }", "public String getLastAccountOperations(int account_id, int n) {\n StringBuilder a = new StringBuilder();\n try (\n Statement s = rawDataSource.getConnection().createStatement();\n ResultSet res = s.executeQuery(\n \"SELECT * FROM OPERATIONS where FROM_ACCOUNT_ID = \"+account_id+\" OR TO_ACCOUNT_ID = \"+account_id+\" ORDER BY TIMESTAMP \" +\n \"DESC FETCH FIRST \"+n+\" ROWS ONLY\")) {\n\n while (res.next()) {\n int type = res.getInt(\"OP_TYPE\");\n switch(type){\n case 1:\n getMovementLog(a, res);\n break;\n case 2:\n getTransferLog(a, res);\n break;\n case 3:\n getCreateAccountLog(a, res);\n break;\n }\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n if(a.length() == 0) a.append(\"No operations for account \"+account_id);\n return a.toString();\n }", "public int giveChange(Coin coinType)\n {\n numberofcoins = 0;\n while(balance> coinType.getValue()-1E-12){\n numberofcoins++;\n balance = balance - coinType.getValue();\n }\n System.out.println(balance);\n System.out.println(numberofcoins);\n return numberofcoins;\n }", "private HashMap<Integer, Integer> determineDifference(BidDetails previousBid, BidDetails currentBid) {\r\n\r\n HashMap<Integer, Integer> diff = new HashMap<Integer, Integer>();\r\n try {\r\n for (Issue i : opponentUtilitySpace.getDomain().getIssues()) {\r\n // compare the values of each issue to see if the have changed between the two bids\r\n diff.put(i.getNumber(), (((ValueDiscrete) currentBid.getBid().getValue(i.getNumber()))\r\n .equals((ValueDiscrete) previousBid.getBid().getValue(i.getNumber()))) ? 0 : 1);\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n // return the hashmap\r\n return diff;\r\n }", "public static int findDecimal(int currentDecimal, int previousNum, int lastDecimal) {\n if (previousNum > currentDecimal) {\n return lastDecimal - currentDecimal;\n //if if previous is greater than current then subtract that\n } else {\n return lastDecimal + currentDecimal;\n //if previous value is smaller than current then add current to total\n }\n}", "public double getBalance(){\n return balance;\n }", "public double getBalance() {\n return balance;\n }", "public double getBalance() {\n return balance;\n }", "public double getBalance() {\n return balance;\n }", "public double getBalance() {\n return balance;\n }", "public int getCurrRuptures();", "public int getBalance() {\n return this.balance;\n\n }", "public long getTimeOfLastValuesChanged();", "public void balance(int arg1)\n \n {\n \tint sum=0;\n int s;\n int i=0;\n response=RestAssured.get(\"http://18.222.188.206:3333/accounts\");\n Bala=response.jsonPath().getList(\"Balance\");\n while(i<=Bala.size())\n {\n try\n {\n if(Bala.get(i)!=null)\n {\n s=Integer.parseInt(Bala.get(i));\n if(s>arg1)\n {\n sum++;\n }\n }\n }\n catch(Exception e)\n {\n \n }\n i++;\n \n }\n System.out.println(\"The number of accounts with balance 200000= \"+sum);\n }", "ResponseEntity<List<TOURatesHistory>> getTouRatesHistory();", "public double getInitialBalance() {\n return initialBalance;\n }", "public Double getBalance() {\n return null;\n }", "public static String getChange(int amount){\n String result = \"\";\n for (Coins c : Coins.values()) {\n if(amount >= c.value()){\n int numberOfCoins = amount / c.value();\n amount = amount % c.value();\n result += c + \" : \" + numberOfCoins + \"\\n\";\n }\n }\n return result;\n }", "public Object getMinimumBalance() {\n\treturn null;\n}", "public static void main(String[] args) {\n\n\tBankAccount2 gil = new BankAccount2(\"Gil\",500);\n\tBankAccount2 joe = new BankAccount2(\"Joe\",1000);\n\tBankAccount2 fred = new BankAccount2(\"Fred\",2000);\n\tBankAccount2 sally = new BankAccount2(\"Sally\",2500);\n\tArrayList<BankAccount2> accountList= new ArrayList<>();\n\taccountList.add(gil);\n\taccountList.add(joe);\n\taccountList.add(fred);\n\tfor(BankAccount2 Account:accountList)\n\t{\n\t\tSystem.out.println(Account.getAccount());\n\t}\n\taccountList.add(sally);\n\t\n\tdouble highBal = 0;\n\tString info = \" \";\n\tfor(BankAccount2 Account:accountList)\n\t{\n\t\tif(Account.getBalance() > highBal)\n\t\t{\n\t\t\thighBal = Account.getBalance();\n\t\t\tinfo = Account.getAccount();\n\t\t}\n\t}\n\t\n\tfor(BankAccount2 Account:accountList)\n\t{\n\t\tif(Account.getBalance() > highBal)\n\t\t{\n\t\t\thighBal = Account.getBalance();\n\t\t\tinfo = Account.getAccount();\n\t\t}\n\t}\n\t\n\tSystem.out.println(\"The account with the highest balance once Sally is added is: \"+info);\n\taccountList.remove(sally);\n\t\n\thighBal = 0;\n\tinfo = \" \";\n\tfor(BankAccount2 Account:accountList)\n\t{\n\t\tif(Account.getBalance() > highBal)\n\t\t{\n\t\t\thighBal = Account.getBalance();\n\t\t\tinfo = Account.getAccount();\n\t\t}\n\t}\n\t\n\tSystem.out.println(\"The account with the highest balance once Sally is removed is: \"+ info);\n\t\n\t\n\t}" ]
[ "0.6274843", "0.60215396", "0.5845698", "0.57033646", "0.57029456", "0.5662086", "0.5662086", "0.5638662", "0.5627391", "0.56075734", "0.5583672", "0.5576546", "0.5576546", "0.55654365", "0.5540883", "0.5540621", "0.5540167", "0.5503808", "0.5484504", "0.54619265", "0.545997", "0.544169", "0.5435817", "0.5430999", "0.5418406", "0.53779596", "0.5376618", "0.53612256", "0.5349604", "0.53489244", "0.53452766", "0.53431845", "0.5342069", "0.53312147", "0.53312147", "0.53132933", "0.5311957", "0.5303001", "0.52931035", "0.5292192", "0.52901983", "0.5277098", "0.5273613", "0.5267507", "0.52587736", "0.5253834", "0.52537525", "0.52537525", "0.52379096", "0.5237791", "0.5235561", "0.5226264", "0.5221124", "0.52151394", "0.52112925", "0.5210024", "0.520697", "0.52062243", "0.5200861", "0.51998043", "0.51995844", "0.51994264", "0.5196872", "0.5195322", "0.51936877", "0.51901615", "0.51821387", "0.51778185", "0.51753175", "0.51681644", "0.51664305", "0.5164201", "0.5158677", "0.5156479", "0.5156479", "0.5151811", "0.5149622", "0.5145655", "0.5143205", "0.51425976", "0.5138119", "0.5135862", "0.5135828", "0.5135011", "0.5134857", "0.5133205", "0.512799", "0.512799", "0.512799", "0.512799", "0.51268107", "0.51234084", "0.5120764", "0.5115796", "0.511115", "0.51106244", "0.51091284", "0.51018494", "0.51012915", "0.5094379" ]
0.6824016
0
METHODS NOT CURRENTLY IN THE CONTRACT//
public Event createEvent(String name) { Event newEvent = new Event(this.GID, name); events.add(newEvent); return newEvent; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "private void m50366E() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo115190b() {\n }", "public void method_4270() {}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "public void mo21825b() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "public void m23075a() {\n }", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo55254a() {\n }", "public final void mo91715d() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void mo21779D() {\n }", "public void mo4359a() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "protected void mo6255a() {\n }", "public void mo21793R() {\n }", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public void mo38117a() {\n }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public void mo97908d() {\n }", "public void mo21795T() {\n }", "@Override\n protected void getExras() {\n }", "public void mo21785J() {\n }", "public void mo21791P() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public void mo21794S() {\n }", "public void mo115188a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void mo21792Q() {\n }", "public void mo21789N() {\n }", "public void mo21782G() {\n }", "private void getStatus() {\n\t\t\n\t}", "zzafe mo29840Y() throws RemoteException;", "private void kk12() {\n\n\t}", "public abstract void mo70713b();", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\t\t\t\t\t\tpublic void onInvateComplet() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "public void mo21878t() {\n }", "@Override\n public void memoria() {\n \n }", "public void mo21877s() {\n }", "zzang mo29839S() throws RemoteException;", "public void mo12628c() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\n\tpublic void buscar() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void Method3() {\n\t\t\r\n\t}", "public void mo21880v() {\n }", "@Override\n\tprotected void logic() {\n\n\t}", "public void mo56167c() {\n }", "public void mo6081a() {\n }", "public void mo23813b() {\n }", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "public void method_192() {}", "private final void i() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "public void mo44053a() {\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public void mo21787L() {\n }", "public void mo21786K() {\n }", "@Override\n public void onCancelled(CancelledException arg0) {\n }", "@Override\n public void onCancelled(CancelledException arg0) {\n }", "@Override\n\tpublic void leti() \n\t{\n\t}", "@Override\r\npublic int method() {\n\treturn 0;\r\n}", "public void method_206() {}", "public void mo97906c() {\n }", "public void mo21780E() {\n }", "public void mo9848a() {\n }", "public void mo21784I() {\n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}" ]
[ "0.69616663", "0.6922041", "0.66955316", "0.6623446", "0.6598805", "0.657991", "0.657991", "0.6466945", "0.6462296", "0.6454922", "0.64530075", "0.6450539", "0.64476687", "0.64335036", "0.6414982", "0.64095676", "0.63931376", "0.635445", "0.6339821", "0.63340753", "0.63291615", "0.6325739", "0.63153934", "0.63086206", "0.62921417", "0.6285078", "0.6273144", "0.6249267", "0.624861", "0.6241153", "0.6241153", "0.6241153", "0.6241153", "0.6241153", "0.6241153", "0.6241153", "0.6236141", "0.6218757", "0.6197407", "0.6196984", "0.61968863", "0.6196587", "0.617912", "0.6178651", "0.6178651", "0.61753225", "0.6163484", "0.615386", "0.613731", "0.61361945", "0.6133082", "0.61321867", "0.6121007", "0.6120098", "0.6120098", "0.6112381", "0.61123", "0.6110172", "0.610722", "0.6106093", "0.6103511", "0.60989726", "0.6097386", "0.6096056", "0.60925424", "0.6086972", "0.60749686", "0.6072954", "0.60644376", "0.60590816", "0.6046187", "0.6045238", "0.6044344", "0.60410947", "0.6036144", "0.6028349", "0.6008725", "0.6005137", "0.60005283", "0.5993603", "0.5987259", "0.5985832", "0.5984622", "0.59829235", "0.59807813", "0.59711885", "0.59674144", "0.59615856", "0.5957755", "0.5956876", "0.59434855", "0.59404576", "0.59404576", "0.5939888", "0.5938746", "0.5935589", "0.5932839", "0.5932452", "0.59287524", "0.59201574", "0.59191835" ]
0.0
-1
TODO Assume array list for now; Change later
public void setSettings(AbstractList<String> settings) { this.settings = (ArrayList<String>) settings; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo9148a(int i, ArrayList<C0889x> arrayList);", "public abstract void mo56920a(List<C4122e> list);", "@Test\r\n\tpublic void testToArrayType() {\r\n\t\tMunitions[] sample1 = new Munitions[5];\r\n\t\tsample1 = list.toArray(sample1);\r\n\t\tAssert.assertEquals(15, sample1.length);\r\n\t\tfor (int i = 0; i < sample1.length; i++) {\r\n\t\t\tAssert.assertNotNull(sample1[i]);\r\n\t\t}\r\n\t\tMunitions[] sample2 = new Munitions[20];\r\n\t\tsample2 = list.toArray(sample2);\r\n\t\tAssert.assertEquals(20, sample2.length);\r\n\t\tfor (int i = 0; i < sample2.length - list.size(); i++) {\r\n\t\t\tAssert.assertNotNull(sample1[i]);\r\n\t\t}\r\n\t}", "public abstract void mo56923b(List<C4122e> list);", "private PyObject[] listtoarray(ArrayList<PyObject> a)\n {\n PyObject[] results = new PyObject[a.size()];\n int iter = 0;\n for (PyObject pt : a) {\n results[iter] = pt;\n iter++;\n }\n return results;\n }", "private static Object[] m59444a(Iterable<?> iterable, Object[] objArr) {\n int i = 0;\n for (Object obj : iterable) {\n int i2 = i + 1;\n objArr[i] = obj;\n i = i2;\n }\n return objArr;\n }", "@Test\r\n\tpublic void testToArray() {\r\n\t\tObject[] sample = list.toArray();\r\n\t\tAssert.assertEquals(15, sample.length);\r\n\t\tfor (int i = 0; i < sample.length; i++) {\r\n\t\t\tAssert.assertNotNull(sample[i]);\r\n\t\t}\r\n\t}", "void mo100444b(List<C40429b> list);", "private Object arrayToSPLArray(String name, JSONArray jarr, Type ptype) throws Exception {\n\t\tif(l.isLoggable(TraceLevel.DEBUG)) {\n\t\t\tl.log(TraceLevel.DEBUG, \"Creating Array: \" + name);\n\t\t}\n\t\tCollectionType ctype = (CollectionType) ptype;\n\t\tint cnt=0;\n\t\tString cname = \"List: \" + name;\n\n\t\tswitch(ctype.getElementType().getMetaType()) {\n\t\tcase INT8:\n\t\tcase UINT8: \n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tbyte[] arr= new byte[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Byte)val;\n\t\t\treturn arr;\n\t\t} \n\t\tcase INT16:\n\t\tcase UINT16:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tshort[] arr= new short[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Short)val;\n\t\t\treturn arr;\n\t\t} \n\t\tcase INT32:\n\t\tcase UINT32:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tint[] arr= new int[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Integer)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase INT64:\n\t\tcase UINT64:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tlong[] arr= new long[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Long)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase BOOLEAN:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tboolean[] arr= new boolean[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Boolean)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase FLOAT32:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tfloat[] arr= new float[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Float)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase FLOAT64:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tdouble[] arr= new double[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Double)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase USTRING:\n\t\t{\n\t\t\tList<String> lst = new ArrayList<String>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((String)obj);\n\t\t\t}\n\t\t\treturn lst.toArray(new String[lst.size()]);\n\t\t} \n\n\t\tcase BSTRING:\n\t\tcase RSTRING:\n\t\t{\n\t\t\tList<RString> lst = new ArrayList<RString>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((RString)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\n\t\tcase TUPLE:\n\t\t{\n\t\t\tList<Tuple> lst = new ArrayList<Tuple>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((Tuple)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\n\t\tcase LIST:\n\t\tcase BLIST:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add(obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\t\tcase SET:\n\t\tcase BSET:\n\t\t{\n\t\t\tSet<Object> lst = new HashSet<Object>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add(obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\t\tcase DECIMAL32:\n\t\tcase DECIMAL64:\n\t\tcase DECIMAL128:\n\t\t{\n\t\t\tList<BigDecimal> lst = new ArrayList<BigDecimal>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((BigDecimal)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\t\tcase TIMESTAMP:\n\t\t{\n\t\t\tList<Timestamp> lst = new ArrayList<Timestamp>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((Timestamp)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\n\n\t\t//TODO -- not yet supported types\n\t\tcase BLOB:\n\t\tcase MAP:\n\t\tcase BMAP:\n\t\tcase COMPLEX32:\n\t\tcase COMPLEX64:\n\t\tdefault:\n\t\t\tthrow new Exception(\"Unhandled array type: \" + ctype.getElementType().getMetaType());\n\t\t}\n\n\t}", "@Test\n public void testToArray_0args() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n instance.add(5);\n instance.add(6);\n\n Integer[] expResult = { 1, 2, 3, 4, 5, 6 };\n Object[] result = instance.toArray();\n assertArrayEquals(expResult, result);\n\n }", "@Override\r\n\tpublic void visit(ArrayExpression arrayExpression) {\n\r\n\t}", "private void displayArrays(ArrayList list){}", "ArrayValue createArrayValue();", "@Test public void getArrayShouldReturnCorrectArray() throws SQLException {\n\t\tList<String> list = new ArrayList<>();\n\t\tArray array = new ListArray(list, Types.VARCHAR);\n\t\tassertTrue(array.getArray() instanceof String[]);\n\t\tlist.add(\"test\");\n\t\tarray = new ListArray(list, Types.VARCHAR);\n\t\tassertEquals(\"test\", ((String[])array.getArray())[0]);\n\t\tlist.add(\"test2\");\n\t\tarray = new ListArray(list, Types.VARCHAR);\n\t\tassertEquals(\"test2\", ((String[])array.getArray())[1]);\n\t}", "public static void arrayDemo() {\n\t}", "@Override\r\n\tpublic void visit(Array array) {\n\r\n\t}", "testarray() {\r\n \tarrayList = new Arraylist();\t\r\n\t}", "public static void main(String[] args)\r\n\t{\nArrayList al = new ArrayList<>();\r\nal.add(10);\r\nal.add(\"manu\");\r\nal.add('m');\r\nObject [] ob=al.toArray();\r\nfor (int i = 0; i < ob.length; i++)\r\n{\r\n\tSystem.out.println(ob[i]);\r\n\t\r\n}\r\n\t}", "void mo54419a(List<String> list);", "@Test\r\n public void testGenericArray()\r\n {\r\n Type t0 = Types.create(List.class).withType(Number.class).build();\r\n Type arrayType = Types.createGenericArrayType(t0);\r\n test(arrayType);\r\n }", "private <T> void populateArrayFromList(T[] arr, ArrayList<T> arrayList) {\n\t\tSystem.out.println(\"Array size \" + arr.length);\n\t\tSystem.out.println(\"ArrayList size \" + arrayList.size());\n\t\tfor (int i = 0; i < arrayList.size(); i++) {\n\t\t\tsavedListModel.addElement(arrayList.get(i).toString());\n\t\t\tarr[i] = arrayList.get(i);\n\t\t}\n\t}", "@org.junit.jupiter.api.Test\r\n void toArray() {\n mll.add(\"A\");\r\n Object [] backDoor = mll.toArray();\r\n backDoor[0] = \"HAHHA\";\r\n\r\n assertEquals(\"A\", mll.get(0));\r\n }", "private String[] toStringArray(ArrayList<String> list) {\n String[] tempStrings = new String[list.size()];\n tempStrings = list.toArray(tempStrings);\n\n return tempStrings;\n }", "@Test\n\tpublic void createListWithArraysUtil() {\n\t\tList<String> list = new ArrayList<>();\n\t\tlist.add(\"AAPL\");\n\t\tlist.add(\"MSFT\");\n\n\t\tList<String> copy = Arrays.asList(\"AAPL\", \"MSFT\");\n\n\t\tassertTrue(list.equals(copy));\n\t}", "public ArrayBackedList(IList list) {\n while (list.size() > stringArray.length) {\n reallocArray();\n }\n for (int i = 0; i < list.size(); i++) {\n stringArray[i] = list.get(i);\n }\n }", "private ArraySetHelper() {\n\t\t// nothing\n\t}", "public void tacoArray() {\n\n\n ArrayList<String> tacos = new ArrayList<>();\n tacos.add(\"blah\");\n tacos.add(\"blah2\");\n tacos.add(\"blah3\");\n tacos.add(\"blah4\");\n tacos.add(\"blah5\");\n }", "@Test public void getListTest()\n {\n PentagonalPyramid[] pArray = new PentagonalPyramid[100];\n PentagonalPyramid p1 = new PentagonalPyramid(\"PP1\", 1, 2);\n PentagonalPyramid p2 = new PentagonalPyramid(\"PP1\", 2, 3);\n PentagonalPyramid p3 = new PentagonalPyramid(\"PP1\", 3, 4);\n pArray[0] = p1;\n pArray[1] = p2;\n pArray[2] = p3;\n \n PentagonalPyramidList2 pList = new PentagonalPyramidList2(\"ListName\", \n pArray, 3);\n \n \n Assert.assertArrayEquals(pArray, pList.getList());\n }", "void arrayListToArray() {\n List<String> coolStringList = Arrays.asList( \"Java\", \"Scala\", \"Groovy\" ); //Declare &initialize o\n //coolStringList.add( \"Syed\" ); // Exception in thread \"main\" java.lang.UnsupportedOperationException\n coolStringList.set( 0, \"Syed\" );// works well\n System.out.println( coolStringList );\n/*\n /) Its not as fast as Arrays.asList() but more flexible.\n\n 2) This method actually copies the content of the underlying array into ArrayList provided.\n\n\n 3) Since you are creating copy of original array, you can add, modify and remove any element without affecting original one.*/\n\n List<String> assetList = new ArrayList();\n String[] asset = {\"equity\", \"stocks\", \"gold\", \"foriegn exchange\", \"fixed income\", \"futures\", \"options\"};\n Collections.addAll( assetList, asset );\n System.out.println( assetList );\n assetList.add( \"Mohammed\" );\n System.out.println( assetList );\n\n List newAssetList = new ArrayList();\n newAssetList.addAll( Arrays.asList( asset ) );\n System.out.println( newAssetList );\n newAssetList.add( \"YNS\" );\n System.out.println( newAssetList );\n /*String [] currency = {\"SGD\", \"USD\", \"INR\", \"GBP\", \"AUD\", \"SGD\"};\n System.out.println(\"Size of array: \" + currency.length);\n List<String> currencyList = CollectionUtils.arrayToList(currency);\n*/\n }", "@SuppressWarnings(\"unchecked\")\n public void testListToArray() throws Exception\n {\n List<PSKeyword> sourceList = new ArrayList<PSKeyword>();\n sourceList.add(createKeyword(\"1\"));\n sourceList.add(createKeyword(\"2\"));\n \n List<PSKeyword> targetList = roundTripListConversion(\n com.percussion.webservices.content.PSKeyword[].class, \n sourceList);\n\n assertTrue(sourceList.equals(targetList));\n }", "@Test\n public void testToArray_GenericType() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n instance.add(5);\n instance.add(6);\n\n Integer[] expResult = { 1, 2, 3, 4, 5, 6 };\n Integer[] result = instance.toArray(new Integer[] {});\n assertArrayEquals(expResult, result);\n }", "void mo100443a(List<String> list);", "Array createArray();", "int givePropNum(List<List<Integer[]>> allPropCoords) throws Exception;", "@SuppressWarnings( \"rawtypes\" )\n private XmlElement toXmlArray(List list)\n {\n XmlElement array = new XmlElement(\"array\");\n for (Object o : list)\n {\n array.add(objectToXml(o));\n }\n return array;\n }", "private void m10259a(ArrayList<Double> arrayList) {\n int size = arrayList.size();\n if (size <= this.f8993u) {\n this.f8973a.mo3315b((ArrayList) arrayList);\n return;\n }\n ArrayList arrayList2 = new ArrayList();\n int i = size / this.f8993u;\n for (int i2 = 0; i2 < this.f8993u; i2++) {\n int i3 = i2 * i;\n if (i3 >= size) {\n arrayList2.add(arrayList.get(size - 1));\n } else {\n arrayList2.add(arrayList.get(i3));\n }\n }\n this.f8973a.mo3315b(arrayList2);\n }", "private static ArrayList<String> transmit(ArrayList<String> array){\n\n\t\tArrayList<String> ret= new ArrayList<String>();\n\t\tfor (int i = 0; i < array.size(); i++) {\n\t\t\tret.add(array.get(i));\n\t\t}\n\t\treturn ret;\t\n\t}", "private int[] arrayListToIntList(ArrayList<Integer> arrayList){\n int[] list=new int[arrayList.size()];\n for(Integer integer:arrayList){\n list[arrayList.indexOf(integer)]=integer;\n }\n return list;\n }", "static public Object expandArray(Object[] list) {\n\t\tint newSize=list.length*2;\n Class type = list.getClass().getComponentType();\n Object temp = Array.newInstance(type, newSize);\n System.arraycopy(list, 0, temp, 0,\t\n Math.min(Array.getLength(list), newSize));\n return temp;\n }", "public abstract NSMutableArray<I_WorkFlowItem> tachesObligatoires();", "@Test\n public void test13() throws Throwable {\n // Undeclared exception!\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1333,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test13\");\n try {\n IteratorUtils.arrayListIterator((Object) \"\", 978);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Argument is not an array\n //\n }\n }", "public static void main(String[] args) {\n ArrayList<Object> ar = new ArrayList<Object>();\n ar.add(100);\n ar.add(100);\n ar.add(\"testing\");\n ar.add('c');\n ar.add(12.36);\n ar.add(true);\n\n System.out.println(ar);\n System.out.println(ar.get(4));\n System.out.println(ar.size());\n System.out.println(\"LI = \"+ 0);\n System.out.println(\"HI = \" + (ar.size()-1));\n\n ar.add(500);\n ar.add(400);\n System.out.println(ar.size());\n\n }", "public ArrayList61B() {\n\t\tthis.size = 1;\n\t\tthis.arrayList = (E[]) new Object[this.size];\n\t}", "private static final <R> List<R> m65272q(@C6003d Object[] objArr) {\n ArrayList arrayList = new ArrayList();\n for (Object obj : objArr) {\n C14445h0.m62450a(3, \"R\");\n if (obj instanceof Object) {\n arrayList.add(obj);\n }\n }\n return arrayList;\n }", "public abstract ArrayList<Object> calculateTransform(ArrayList<Integer> arr);", "private String literal(Array list) {\n StringBuffer buffer = new StringBuffer();\n \n buffer.append(\"(\");\n for (int i = 0; i < list.size(); i++) {\n if (i > 0) {\n buffer.append(\",\");\n }\n buffer.append(literal(list.get(i)));\n }\n buffer.append(\")\");\n return buffer.toString();\n }", "void mo13370a(int i, int i2, List<C15929a> list) throws IOException;", "private void doubleArray()\n\t{\n\t\tT[] oldList = list;\n\t\tint oldSize = oldList.length;\n\t\t\n\t\tlist = (T[]) new Object[2 * oldSize];\n\t\t\n\t\t// copy entries from old array to new, bigger array\n\t\tfor (int index = 0; index < oldSize; index++)\n\t\t\tlist[index] = oldList[index];\n\t}", "public static void shufleArray(ArrayList<Number> list) {\r\n\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\t// generisemo prvi indeks.\r\n\t\t\tint indx1 = (int) (Math.random() * list.size());\r\n\t\t\t// generisemo drugi index.\r\n\t\t\tint indx2 = (int) (Math.random() * list.size());\r\n\t\t\t// cuvamo elemenat sa prvog indeksa.\r\n\t\t\tNumber temp = list.get(indx1);\r\n\t\t\t// Kopiramo elemenat sa drugog indeksa preko prvog elementa.\r\n\t\t\tlist.set(indx1, list.get(indx2));\r\n\t\t\t// Kopiramo temp (prvi elemenat) preko drugog elementa.\r\n\t\t\tlist.set(indx2, temp);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n ArrayList<Integer> items = new ArrayList<>();\n items.add(1);\n items.add(2);\n items.add(3);\n items.add(4);\n items.add(5);\n items.add(6);\n items.add(7);\n items.add(8);\n\n\n printArray(items);\n }", "public void testCheckArray() {\n Object[] objects = new Object[] {\"one\"};\n Util.checkArray(objects, \"test\");\n }", "private Number[] arrayExtension(Number[] array) {\n int extendedLength = (int) (array.length * 1.3 + 2);\n Number[] extendedArray = new Number[extendedLength];\n for (int index = 0; index < array.length; index++) {\n extendedArray[index] = array[index];\n }\n return extendedArray;\n }", "private void m10266b(List<C2411a> list) {\n int i;\n int i2;\n List arrayList = new ArrayList();\n ArrayList arrayList2 = new ArrayList();\n arrayList.addAll(list);\n this.f8987o.add(Double.valueOf(0.0d));\n arrayList2.add(Double.valueOf(0.0d));\n for (i = 0; i < 5; i++) {\n C2411a c2411a = (C2411a) arrayList.remove(0);\n this.f8987o.add(Double.valueOf(c2411a.m12234j()));\n arrayList2.add(Double.valueOf(c2411a.m12233i() / 1000.0d));\n }\n int size = arrayList.size();\n i = 5;\n while (i > 0) {\n i2 = size - 1;\n c2411a = (C2411a) arrayList.remove(size - i);\n this.f8987o.add(Double.valueOf(c2411a.m12234j()));\n arrayList2.add(Double.valueOf(c2411a.m12233i() / 1000.0d));\n i--;\n size = i2;\n }\n int size2 = arrayList.size();\n int i3 = size2 / 387;\n int i4 = 0;\n int i5 = 6;\n while (i4 < 387) {\n i2 = i4 * i3;\n if (i2 >= size2) {\n double j = ((C2411a) arrayList.get(size2 - 1)).m12234j();\n if (j > this.f8976d.getMaxVelocity()) {\n j = this.f8976d.getMaxVelocity();\n }\n this.f8987o.add(i5, Double.valueOf(j));\n arrayList2.add(i5, Double.valueOf(((C2411a) arrayList.get(size2 - 1)).m12233i() / 1000.0d));\n size = i5 + 1;\n } else {\n c2411a = (C2411a) arrayList.get(i2);\n i = (i4 + 1) * i3;\n if (i >= size2) {\n i = size2 - 1;\n }\n C2411a c2411a2 = (C2411a) arrayList.get(i);\n long h = (c2411a2.m12232h() / 1000) - (c2411a.m12232h() / 1000);\n double d;\n if (h <= 0) {\n double d2 = 0.0d;\n while (i2 < (i4 + 1) * i3) {\n d2 += ((C2411a) arrayList.get(i2)).m12234j();\n i2++;\n }\n d = d2 / ((double) i3);\n if (d > this.f8976d.getMaxVelocity()) {\n d = this.f8976d.getMaxVelocity();\n }\n this.f8987o.add(i5, Double.valueOf(d));\n } else {\n d = ((c2411a2.m12233i() - c2411a.m12233i()) / ((double) h)) * 3.6d;\n if (d > this.f8976d.getMaxVelocity()) {\n d = this.f8976d.getMaxVelocity();\n }\n this.f8987o.add(i5, Double.valueOf(d));\n }\n arrayList2.add(i5, Double.valueOf(c2411a.m12233i() / 1000.0d));\n size = i5 + 1;\n }\n i4++;\n i5 = size;\n }\n this.f8987o.add(Double.valueOf(0.0d));\n arrayList2.add(Double.valueOf(this.f8976d.getTotalDistance()));\n i2 = this.f8987o.size();\n i = 1;\n while (i < i2) {\n if (this.f8978f >= ((Double) arrayList2.get(i - 1)).doubleValue() && this.f8978f < ((Double) arrayList2.get(i)).doubleValue()) {\n this.f8987o.add(i, Double.valueOf(this.f8976d.getMaxVelocity()));\n arrayList2.add(i, Double.valueOf(this.f8978f));\n break;\n }\n i++;\n }\n this.f8993u = this.f8987o.size();\n }", "Exp getArrayExp();", "@Override\n\tprotected void getDifferentJsonArrayValue() {\n\n\t}", "public final void mo37748V(ArrayList<C43640g> arrayList) {\n AppMethodBeat.m2504i(109588);\n C25052j.m39376p(arrayList, \"<set-?>\");\n this.cHb = arrayList;\n AppMethodBeat.m2505o(109588);\n }", "public static void main(String args[]){\n int Array_List[]= new int[]{1,2,3,4,5,6,7,8,9,10};\n\n }", "private static List<Node> arrayToList(Node[] n) {\n List<Node> listItems = new ArrayList<>();\n for (Node n1 : n) {\n listItems.add(n1);\n }\n return listItems;\n }", "void writeBack(Comparable[] arr, int list) {\n\n\t\t// Iterate array and put sorted elements in it \n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\t\n\t\t\tarr[i] = this.array[list];\n\t\t\tlist = next[list];\n\t\t}\n\t\t\n\t\t/*\n\t\t * Release resources.\n\t\t */\n\t\t\n\t\tthis.array = null;\n\t\tthis.data = null;\n\t\tthis.next = null;\n\t\tthis.queue = null;\n\t}", "Object[] getChildArray();", "public static void printArray(double[] list) \n {\n for (int i = 0; i < list.length; i++) \n {\n System.out.print(list[i] + \" \");\n }\n int b[];\n b=new int[5];\n }", "private TemplateInfo m19294a(long j, List<TemplateInfo>... listArr) {\n if (listArr != null) {\n for (List<TemplateInfo> it : listArr) {\n for (TemplateInfo templateInfo : it) {\n if (C2575a.m7391rq(templateInfo.ttid) == j) {\n return templateInfo;\n }\n }\n }\n }\n return null;\n }", "static void arrayToSet()\n\t{\n\t\tList<String> oList = null;\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\tString arr[] = {\"A\",\"B\",\"C\",\"D\",\"E\",\"A\"};\n\t\t\t\n\t\t\toList = Arrays.asList(arr);\n\t\t\tSystem.out.println(\"List: \"+oList);\n\t\t\t\n\t\t\toSet = new TreeSet<>(oList);\n\t\t\t\n\t\t\tSystem.out.println(\"Set: \"+oSet);\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toSet = null;\n\t\t}\n\t}", "private static void addEffectArray(List<Tuple<JsonValue, JsonValue>> list, JsonArray code, JsonArray payload){\n\t if(payload != null){\n\t for(int i = 0; i < code.size(); i++){\n\t list.add(new Tuple<JsonValue, JsonValue>(code.get(i), payload.get(i)));\n\t }\n\t } else {\n\t for(JsonValue singleCode : code){\n\t list.add(new Tuple<JsonValue, JsonValue>(singleCode, null));\n\t }\n\t }\n\t}", "static /* synthetic */ List m17132a(List list) throws Exception {\n ArrayList arrayList = new ArrayList(list);\n Collections.sort(arrayList, f15631B0);\n return arrayList;\n }", "public abstract ArrayList<Cell> getSelfArray();", "protected static void writeList(Output out, List<?> list) {\n if (!list.isEmpty()) {\n int size = list.size();\n // if its a small list, write it as an array\n if (size < 100) {\n out.writeArray(list);\n return;\n }\n // else we should check for lots of null values,\n // if there are over 80% then its probably best to do it as a map\n int nullCount = 0;\n for (int i = 0; i < size; i++) {\n if (list.get(i) == null) {\n nullCount++;\n }\n }\n if (nullCount > (size * 0.8)) {\n out.writeMap(list);\n } else {\n out.writeArray(list);\n }\n } else {\n out.writeArray(new Object[] {});\n }\n }", "ArrayProxyValue createArrayProxyValue();", "Object[] elements(Object[] destination) {\n return elements.toArray(destination);\n }", "private ArrayList<String> initList(String[] vastitems){\n return new ArrayList<>(Arrays.asList(vastitems));\n }", "@SuppressWarnings(\"rawtypes\")\n\t@Test\n\tpublic void retrieveArrays() {\n\t\tObjectSet result = db.queryByExample(new double[] { 0.6, 0.4 });\n\t\tlistResult(result);\n\n\t\t// Important note QBE does not work well with arrays\n\t\tassertEquals(0, result.size());\n\n\t}", "public static int simpleArraySum() { //(List<Integer> ar)\n \n Integer []ar = {1,2,3}; \n\n Integer sum =0;\n for(Integer i : ar){\n sum +=i;\n }\n return sum; \n }", "private static void arrayInserionTime() {\n\t\t String[] namesArray = new String[1000];\n\t\t \n\t long startTime = System.nanoTime();\n\t \n\t for (int i = 0; i < namesArray.length; i++)\n\t {\n\t namesArray[i] = \"Name\"+i;\n\t }\n\t \n\t long endTime = System.nanoTime(); \n\t \n\t System.out.println(\"Time taken by Array : \"+(endTime - startTime)/1000+\"us\");\n\t \n\t ArrayList<String> nameList = new ArrayList<String>(); \n\t \n\t startTime = System.nanoTime();\n\t \n\t for (int i = 0; i <= 1000; i++)\n\t {\n\t nameList.add(\"Name\"+i);\n\t }\n\t \n\t endTime = System.nanoTime();\n\t \n\t System.out.println(\"Time taken by ArrayList : \"+(endTime-startTime)/1000+\"us\");\n\n\t}", "void mo12207a(int[] iArr);", "private void arrayToCollection(String name, Collection<Object>lst, JSONArray jarr, Type ptype) throws Exception {\n\t\tCollectionType ctype = (CollectionType) ptype;\n\t\tString cname = lst.getClass().getSimpleName() + \": \" + name;\n\t\tfor(Object jsonObj : jarr) {\n\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\tif(obj!=null)\n\t\t\t\tlst.add(obj);\n\t\t}\n\t}", "int mo13159a(List<Log> list);", "public void arrayList(List<Student> list)\r\n\t{\r\n\t\tlist.add(s1);\r\n\t\tlist.add(s2);\r\n\t\tlist.add(s3);\r\n\t\tlist.add(s4);\r\n\t\tlist.add(s5);\r\n\t\tlist.add(s6);\r\n\t\tSystem.out.println(\"Objects of ArrayList\");\r\n\t\tfor(int i=0;i<list.size();i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(list.get(i));\r\n\t\t}\r\n\t}", "private void arraySize(MyArrayList list, Results results) {\r\n int size = -123;\r\n size = list.size();\r\n if(size != -123) {\r\n results.storeNewResult(\"ArraySize test case: PASSED\");\r\n }\r\n else {\r\n results.storeNewResult(\"ArraySize test case: FAILED\");\r\n }\r\n }", "public static void arrayListSubtypeTest()\r\n\t{\r\n\t\tArrayList<Person> persons = new ArrayList<Person>();\r\n\t persons.add(new Person(\"twoa\"));\r\n\t persons.add(new Person(\"threea\"));\r\n\t PrintCollection(persons);\r\n\t // PrintCollection1(persons);\r\n\t PrintCollection2(persons);\r\n\t}", "public boolean isArrayType()\n/* */ {\n/* 138 */ return true;\n/* */ }", "boolean m6609a(List<Log> list);", "public static void main(String args[]){\r\n Object objArray;\r\n \r\n \t Scanner input = new Scanner(System.in);\r\n \t // display on console enter file name\r\n \t System.out.println(\"Enter array list data separated by a comma - for example 1, 2, 3, 4 : \");\r\n\r\n \t input = new Scanner(System.in);\r\n Object arrayListInput = input.nextLine();\r\n \r\n // create instance of class ArrayList.java\r\n \t Arraylist arrayList = new Arraylist();\r\n\r\n \t // load input data into array list object\r\n \t arrayList.loadArrayList(arrayListInput);\r\n\r\n \t // determine if array list object is empty \t \r\n \t boolean arrayListEmpty = arrayList.isEmpty();\r\n \t \r\n \t System.out.println(\"Is the array list empty \" + arrayListEmpty);\r\n \r\n arrayList.add(\"10\"); \r\n \t System.out.println(\"Add object to array list\");\r\n \t \r\n objArray = arrayList.get(5);\r\n \t System.out.println(\"Get object from array list \");\r\n \r\n }", "private void updateEntityArray(ArrayList<Entity> array, GameContainer gc, StateBasedGame sb, int delta){\r\n \t\tfor(int i=0; i<array.size(); i++){\r\n \t\t\tarray.get(i).update(gc, sb, delta);\r\n \t\t\tif(array.get(i).getHealth() <= 0){\r\n \t\t\t\tarray.remove(i);\r\n \t\t\t\ti--;\r\n \t\t\t}\r\n \t\t}\r\n \t}", "private static String[] listToArray(List<String> list){\n\t\tString[] arr = new String[list.size()];\n\t\tfor (int i = 0; i < list.size(); i++){\n\t\t\t\n\t\t\tarr[i] = list.get(i);\n\t\t}\n\t\t\n\t\treturn arr;\n\t}", "@Test\n public void testSetAccountNumberArray() {\n System.out.println(\"setAccountNumberArray\");\n int[] accountNumberArray = {1, 2, 3, 4, 5, 6};\n AbstractMethod instance = new AbstractMethodImpl();\n instance.setAccountNumberArray(accountNumberArray);\n int[] result = instance.getAccountNumberArray();\n for (int r : result) {\n System.out.print(r);\n }\n assertArrayEquals(accountNumberArray, result);\n\n }", "static <T> T[] m59446a(Collection<?> collection, T[] tArr) {\n int size = collection.size();\n if (tArr.length < size) {\n tArr = m59448a(tArr, size);\n }\n m59444a((Iterable<?>) collection, (Object[]) tArr);\n if (tArr.length > size) {\n tArr[size] = null;\n }\n return tArr;\n }", "static Object[] m59445a(Collection<?> collection) {\n return m59444a((Iterable<?>) collection, new Object[collection.size()]);\n }", "private void m152570a(List<ByteBuffer> list) {\n synchronized (this.f113322u) {\n for (ByteBuffer byteBuffer : list) {\n m152578e(byteBuffer);\n }\n }\n }", "public void testGetArray() {\n System.out.println(\"getArray\"); // NOI18N\n \n TypeID type = new TypeID(TypeID.Kind.PRIMITIVE, \"javacode\");// NOI18N\n PropertyValue arrayPropertyValue = PropertyValue.createValue(primitveDescritor, type, DesignComponentTest.PROPERTY1_VALUE_STRING); // NOI18N\n List<PropertyValue> array = new ArrayList();\n \n array.add(arrayPropertyValue);\n \n PropertyValue result = PropertyValue.createArray(type,array);\n \n type = type.getArrayType();\n assertEquals(type,result.getType());\n assertNotNull(result.getArray());\n }", "@Test\n public void testReflectionArrayCycle() {\n final Object[] objects = new Object[1];\n objects[0] = objects;\n assertEquals(\n this.toBaseString(objects) + \"[{\" + this.toBaseString(objects) + \"}]\",\n ToStringBuilder.reflectionToString(objects));\n }", "public interface ExternalArrayData{\n /**\n * Return the element at the specified index. The result must be a type that is valid in JavaScript:\n * Number, String, or Scriptable. This method will not be called unless \"index\" is in\n * range.\n */\n Object getArrayElement(int index);\n\n /**\n * Set the element at the specified index. This method will not be called unless \"index\" is in\n * range. The method must check that \"value\" is a valid type, and convert it if necessary.\n */\n void setArrayElement(int index, Object value);\n\n /**\n * Return the length of the array.\n */\n int getArrayLength();\n}", "public abstract void startArray();", "void mo69875a(List<Aweme> list, boolean z);", "private Labels(ArrayMixedObject array) {\n\t\tthis.array = array != null ? array : new ArrayMixedObject();\n\t}", "@SuppressWarnings(\"unchecked\")\n\tprivate void growArray() {\n\t\tObject[] newList = new Object[size * 2];\n\t\tfor (int i = 0; i < size(); i++) {\n\t\t\tnewList[i] = get(i);\n\t\t}\n\t\tlist = (E[]) newList;\n\t\tsize *= 2;\n\t}", "private static ArrayList<String> transmit(String[] array){\n\n\t\tArrayList<String> ret= new ArrayList<String>();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tret.add(array[i]);\n\t\t}\n\t\treturn ret;\t\n\t}", "private static void printArray(ArrayList<Integer> list) {\n for (int i : list) {\n System.out.println(i * 3);\n }\n\n }", "private static final <R, C extends Collection<? super R>> C m64428a(@C6003d Object[] objArr, C c) {\n for (Object obj : objArr) {\n C14445h0.m62450a(3, \"R\");\n if (obj instanceof Object) {\n c.add(obj);\n }\n }\n return c;\n }", "public void Array(ArrayList<String> L, int round) {\r\n ArrayList<ArrayList<String>> currentArrays = new ArrayList<>();\r\n ArrayList<String> arrayItems = new ArrayList<>();\r\n ArrayList<String> betweenBrackets = new ArrayList<>();\r\n ArrayList<String> tempLexemes = new ArrayList<>();\r\n ArrayList<Integer> indexes = new ArrayList<>();\r\n int arrayCounter = -1;\r\n int arraySize;\r\n boolean similarSizes = true;\r\n String s = \"\";\r\n String tempHistoryString = \"\";\r\n\r\n if(L.contains(\"{\") || L.contains(\"}\")) {//It is an array\r\n for(int i = 0; i < L.size(); i++) {\r\n if(L.get(i).equals(\"{\")) {//If it's a massive\r\n indexes.add(i+1);//index = i+1;\r\n arrayCounter += 1;\r\n while(!L.get(indexes.get(arrayCounter)).equals(\"}\")) {\r\n betweenBrackets.add(L.get(indexes.get(arrayCounter)));\r\n L.remove((int)indexes.get(arrayCounter));\r\n }\r\n L.remove((int)indexes.get(arrayCounter));\r\n L.remove(indexes.get(arrayCounter)-1);\r\n currentArrays.add(betweenBrackets);\r\n betweenBrackets = new ArrayList<>();\r\n }\r\n }\r\n\r\n for (int a = 0; a < currentArrays.size(); a++) {//a = array (one of currentArrays)\r\n ArrayList<String> currentArray;// = new ArrayList<String>();\r\n currentArray = currentArrays.get(a);\r\n for(int i = 0; i < currentArray.size(); i++) {\r\n s += currentArray.get(i);\r\n if(currentArray.get(i).equals(\";\")) {\r\n s = s.substring(0, s.length()-1);\r\n arrayItems.add(s);\r\n s = \"\";\r\n }\r\n if(i == currentArray.size()-1) {\r\n arrayItems.add(s);\r\n s = \"\";\r\n }\r\n }\r\n currentArrays.set(a, arrayItems);\r\n arrayItems = new ArrayList<>();\r\n }\r\n\r\n //Todo: Check if arrays' sizes are not similar\r\n\r\n arraySize = currentArrays.get(0).size();\r\n for(int a = 1; a < currentArrays.size(); a++) {\r\n if(currentArrays.get(a).size() != arraySize) similarSizes = false;\r\n }\r\n\r\n if(similarSizes) {//Continue working\r\n int size = currentArrays.get(0).size();\r\n //Parse all elements in all arrays\r\n for(int i = 0; i < size; i++) {\r\n for(int a = 0; a < currentArrays.size(); a++) {\r\n ArrayList<String> lexemesOfArrayItem = new ArrayList<>();\r\n MakeListOfLexemes(currentArrays.get(a).get(i), lexemesOfArrayItem);\r\n ParsingSet(lexemesOfArrayItem);\r\n currentArrays.get(a).set(i, lexemesOfArrayItem.get(0));\r\n }\r\n }\r\n\r\n if(!lexemes.isEmpty()) for (int k = 0; k < lexemes.size(); k++)\r\n tempLexemes.add(lexemes.get(k));\r\n\r\n for (int a = 0; a < currentArrays.size(); a++) {\r\n tempLexemes.add(indexes.get(a)-1+a, currentArrays.get(a).get(0));\r\n }\r\n //Todo: tempHistoryString\r\n tempHistoryString = makeStringFromList(tempLexemes);\r\n ParsingSet(tempLexemes);\r\n String currentResult = tempLexemes.get(0);\r\n try {\r\n currentResult = Round(tempLexemes.get(0), round);\r\n } catch (Exception e) {\r\n //Some exceptions in Round()\r\n }\r\n arrayHistory.add(\"index: 0; \" + tempHistoryString + \" = \" + currentResult);\r\n arrayHistoryRaw.add(currentResult);\r\n tempLexemes.clear();\r\n\r\n for (int i = 1; i < size; i++) {\r\n if(!lexemes.isEmpty()) for (int k = 0; k < lexemes.size(); k++)\r\n tempLexemes.add(lexemes.get(k));\r\n for (int a = 0; a < currentArrays.size(); a++) {\r\n tempLexemes.add(indexes.get(a)-1+a, currentArrays.get(a).get(i));\r\n }\r\n tempHistoryString = makeStringFromList(tempLexemes);\r\n ParsingSet(tempLexemes);\r\n currentResult = tempLexemes.get(0);\r\n try {\r\n currentResult = Round(tempLexemes.get(0), round);\r\n } catch (Exception e) {\r\n //Some exceptions in Round()\r\n }\r\n arrayHistory.add(\"index: \" + i + \"; \" + tempHistoryString + \" = \" + currentResult);\r\n arrayHistoryRaw.add(currentResult);\r\n tempLexemes.clear();\r\n }\r\n } else {\r\n //An error occurred - not similar sizes!\r\n }\r\n } else {//It is not an array\r\n ParsingSet(L); //Compute as an expression without arrays\r\n }\r\n }", "private static double[] toArray(ArrayList<Double> dbls) {\n double[] r = new double[dbls.size()];\n int i = 0;\n for( double d:dbls ) r[i++] = d;\n return r;\n }", "@Test\n public void testSingleNestArray()\n {\n Object[] array = new Object[]{1, 2, new Object[]{3}, 4};\n testList = ArrayFlattener.flattenArray(array);\n assertArrayEquals(testList.toArray(new Integer[testList.size()]), flat);\n }" ]
[ "0.6314695", "0.5955245", "0.5948963", "0.5936591", "0.5853402", "0.5823617", "0.57940286", "0.5762017", "0.5694028", "0.5684203", "0.56769705", "0.5663458", "0.5658288", "0.5645372", "0.56433153", "0.5642253", "0.5631178", "0.56076866", "0.5571578", "0.55695945", "0.5539182", "0.5525712", "0.5519385", "0.55103487", "0.54845107", "0.5476531", "0.5476026", "0.5475807", "0.5474248", "0.5461206", "0.5458373", "0.5430069", "0.5417858", "0.54138356", "0.5413522", "0.5406536", "0.54037136", "0.54036576", "0.5396937", "0.5394395", "0.5394189", "0.537106", "0.5369863", "0.5364271", "0.53630054", "0.5355321", "0.53404593", "0.53359705", "0.5327658", "0.53241795", "0.5311678", "0.53103805", "0.529156", "0.52897096", "0.5289288", "0.5288248", "0.5284362", "0.52838874", "0.5280515", "0.52804565", "0.52766573", "0.5270299", "0.52699465", "0.52671504", "0.5264314", "0.5257645", "0.5233381", "0.5233023", "0.52287424", "0.5225297", "0.5225295", "0.5222139", "0.5221329", "0.52207327", "0.52135825", "0.5209279", "0.5204757", "0.5195935", "0.5191181", "0.51893836", "0.51854515", "0.51838714", "0.5182617", "0.5181971", "0.5181347", "0.51799655", "0.5179606", "0.5179321", "0.5173318", "0.51725924", "0.51724446", "0.51700795", "0.5169287", "0.5166987", "0.5163186", "0.515857", "0.51562685", "0.5156057", "0.5153488", "0.515241", "0.5145569" ]
0.0
-1
TODO Assume array list for now; Change later
public void setPastRelations(AbstractList<Account> pastRelations) { this.pastRelations = (ArrayList<Account>) pastRelations; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo9148a(int i, ArrayList<C0889x> arrayList);", "public abstract void mo56920a(List<C4122e> list);", "@Test\r\n\tpublic void testToArrayType() {\r\n\t\tMunitions[] sample1 = new Munitions[5];\r\n\t\tsample1 = list.toArray(sample1);\r\n\t\tAssert.assertEquals(15, sample1.length);\r\n\t\tfor (int i = 0; i < sample1.length; i++) {\r\n\t\t\tAssert.assertNotNull(sample1[i]);\r\n\t\t}\r\n\t\tMunitions[] sample2 = new Munitions[20];\r\n\t\tsample2 = list.toArray(sample2);\r\n\t\tAssert.assertEquals(20, sample2.length);\r\n\t\tfor (int i = 0; i < sample2.length - list.size(); i++) {\r\n\t\t\tAssert.assertNotNull(sample1[i]);\r\n\t\t}\r\n\t}", "public abstract void mo56923b(List<C4122e> list);", "private PyObject[] listtoarray(ArrayList<PyObject> a)\n {\n PyObject[] results = new PyObject[a.size()];\n int iter = 0;\n for (PyObject pt : a) {\n results[iter] = pt;\n iter++;\n }\n return results;\n }", "private static Object[] m59444a(Iterable<?> iterable, Object[] objArr) {\n int i = 0;\n for (Object obj : iterable) {\n int i2 = i + 1;\n objArr[i] = obj;\n i = i2;\n }\n return objArr;\n }", "@Test\r\n\tpublic void testToArray() {\r\n\t\tObject[] sample = list.toArray();\r\n\t\tAssert.assertEquals(15, sample.length);\r\n\t\tfor (int i = 0; i < sample.length; i++) {\r\n\t\t\tAssert.assertNotNull(sample[i]);\r\n\t\t}\r\n\t}", "void mo100444b(List<C40429b> list);", "private Object arrayToSPLArray(String name, JSONArray jarr, Type ptype) throws Exception {\n\t\tif(l.isLoggable(TraceLevel.DEBUG)) {\n\t\t\tl.log(TraceLevel.DEBUG, \"Creating Array: \" + name);\n\t\t}\n\t\tCollectionType ctype = (CollectionType) ptype;\n\t\tint cnt=0;\n\t\tString cname = \"List: \" + name;\n\n\t\tswitch(ctype.getElementType().getMetaType()) {\n\t\tcase INT8:\n\t\tcase UINT8: \n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tbyte[] arr= new byte[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Byte)val;\n\t\t\treturn arr;\n\t\t} \n\t\tcase INT16:\n\t\tcase UINT16:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tshort[] arr= new short[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Short)val;\n\t\t\treturn arr;\n\t\t} \n\t\tcase INT32:\n\t\tcase UINT32:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tint[] arr= new int[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Integer)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase INT64:\n\t\tcase UINT64:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tlong[] arr= new long[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Long)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase BOOLEAN:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tboolean[] arr= new boolean[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Boolean)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase FLOAT32:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tfloat[] arr= new float[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Float)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase FLOAT64:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tdouble[] arr= new double[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Double)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase USTRING:\n\t\t{\n\t\t\tList<String> lst = new ArrayList<String>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((String)obj);\n\t\t\t}\n\t\t\treturn lst.toArray(new String[lst.size()]);\n\t\t} \n\n\t\tcase BSTRING:\n\t\tcase RSTRING:\n\t\t{\n\t\t\tList<RString> lst = new ArrayList<RString>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((RString)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\n\t\tcase TUPLE:\n\t\t{\n\t\t\tList<Tuple> lst = new ArrayList<Tuple>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((Tuple)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\n\t\tcase LIST:\n\t\tcase BLIST:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add(obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\t\tcase SET:\n\t\tcase BSET:\n\t\t{\n\t\t\tSet<Object> lst = new HashSet<Object>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add(obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\t\tcase DECIMAL32:\n\t\tcase DECIMAL64:\n\t\tcase DECIMAL128:\n\t\t{\n\t\t\tList<BigDecimal> lst = new ArrayList<BigDecimal>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((BigDecimal)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\t\tcase TIMESTAMP:\n\t\t{\n\t\t\tList<Timestamp> lst = new ArrayList<Timestamp>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((Timestamp)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\n\n\t\t//TODO -- not yet supported types\n\t\tcase BLOB:\n\t\tcase MAP:\n\t\tcase BMAP:\n\t\tcase COMPLEX32:\n\t\tcase COMPLEX64:\n\t\tdefault:\n\t\t\tthrow new Exception(\"Unhandled array type: \" + ctype.getElementType().getMetaType());\n\t\t}\n\n\t}", "@Test\n public void testToArray_0args() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n instance.add(5);\n instance.add(6);\n\n Integer[] expResult = { 1, 2, 3, 4, 5, 6 };\n Object[] result = instance.toArray();\n assertArrayEquals(expResult, result);\n\n }", "@Override\r\n\tpublic void visit(ArrayExpression arrayExpression) {\n\r\n\t}", "private void displayArrays(ArrayList list){}", "ArrayValue createArrayValue();", "@Test public void getArrayShouldReturnCorrectArray() throws SQLException {\n\t\tList<String> list = new ArrayList<>();\n\t\tArray array = new ListArray(list, Types.VARCHAR);\n\t\tassertTrue(array.getArray() instanceof String[]);\n\t\tlist.add(\"test\");\n\t\tarray = new ListArray(list, Types.VARCHAR);\n\t\tassertEquals(\"test\", ((String[])array.getArray())[0]);\n\t\tlist.add(\"test2\");\n\t\tarray = new ListArray(list, Types.VARCHAR);\n\t\tassertEquals(\"test2\", ((String[])array.getArray())[1]);\n\t}", "public static void arrayDemo() {\n\t}", "@Override\r\n\tpublic void visit(Array array) {\n\r\n\t}", "testarray() {\r\n \tarrayList = new Arraylist();\t\r\n\t}", "public static void main(String[] args)\r\n\t{\nArrayList al = new ArrayList<>();\r\nal.add(10);\r\nal.add(\"manu\");\r\nal.add('m');\r\nObject [] ob=al.toArray();\r\nfor (int i = 0; i < ob.length; i++)\r\n{\r\n\tSystem.out.println(ob[i]);\r\n\t\r\n}\r\n\t}", "void mo54419a(List<String> list);", "@Test\r\n public void testGenericArray()\r\n {\r\n Type t0 = Types.create(List.class).withType(Number.class).build();\r\n Type arrayType = Types.createGenericArrayType(t0);\r\n test(arrayType);\r\n }", "private <T> void populateArrayFromList(T[] arr, ArrayList<T> arrayList) {\n\t\tSystem.out.println(\"Array size \" + arr.length);\n\t\tSystem.out.println(\"ArrayList size \" + arrayList.size());\n\t\tfor (int i = 0; i < arrayList.size(); i++) {\n\t\t\tsavedListModel.addElement(arrayList.get(i).toString());\n\t\t\tarr[i] = arrayList.get(i);\n\t\t}\n\t}", "@org.junit.jupiter.api.Test\r\n void toArray() {\n mll.add(\"A\");\r\n Object [] backDoor = mll.toArray();\r\n backDoor[0] = \"HAHHA\";\r\n\r\n assertEquals(\"A\", mll.get(0));\r\n }", "private String[] toStringArray(ArrayList<String> list) {\n String[] tempStrings = new String[list.size()];\n tempStrings = list.toArray(tempStrings);\n\n return tempStrings;\n }", "@Test\n\tpublic void createListWithArraysUtil() {\n\t\tList<String> list = new ArrayList<>();\n\t\tlist.add(\"AAPL\");\n\t\tlist.add(\"MSFT\");\n\n\t\tList<String> copy = Arrays.asList(\"AAPL\", \"MSFT\");\n\n\t\tassertTrue(list.equals(copy));\n\t}", "public ArrayBackedList(IList list) {\n while (list.size() > stringArray.length) {\n reallocArray();\n }\n for (int i = 0; i < list.size(); i++) {\n stringArray[i] = list.get(i);\n }\n }", "private ArraySetHelper() {\n\t\t// nothing\n\t}", "public void tacoArray() {\n\n\n ArrayList<String> tacos = new ArrayList<>();\n tacos.add(\"blah\");\n tacos.add(\"blah2\");\n tacos.add(\"blah3\");\n tacos.add(\"blah4\");\n tacos.add(\"blah5\");\n }", "@Test public void getListTest()\n {\n PentagonalPyramid[] pArray = new PentagonalPyramid[100];\n PentagonalPyramid p1 = new PentagonalPyramid(\"PP1\", 1, 2);\n PentagonalPyramid p2 = new PentagonalPyramid(\"PP1\", 2, 3);\n PentagonalPyramid p3 = new PentagonalPyramid(\"PP1\", 3, 4);\n pArray[0] = p1;\n pArray[1] = p2;\n pArray[2] = p3;\n \n PentagonalPyramidList2 pList = new PentagonalPyramidList2(\"ListName\", \n pArray, 3);\n \n \n Assert.assertArrayEquals(pArray, pList.getList());\n }", "void arrayListToArray() {\n List<String> coolStringList = Arrays.asList( \"Java\", \"Scala\", \"Groovy\" ); //Declare &initialize o\n //coolStringList.add( \"Syed\" ); // Exception in thread \"main\" java.lang.UnsupportedOperationException\n coolStringList.set( 0, \"Syed\" );// works well\n System.out.println( coolStringList );\n/*\n /) Its not as fast as Arrays.asList() but more flexible.\n\n 2) This method actually copies the content of the underlying array into ArrayList provided.\n\n\n 3) Since you are creating copy of original array, you can add, modify and remove any element without affecting original one.*/\n\n List<String> assetList = new ArrayList();\n String[] asset = {\"equity\", \"stocks\", \"gold\", \"foriegn exchange\", \"fixed income\", \"futures\", \"options\"};\n Collections.addAll( assetList, asset );\n System.out.println( assetList );\n assetList.add( \"Mohammed\" );\n System.out.println( assetList );\n\n List newAssetList = new ArrayList();\n newAssetList.addAll( Arrays.asList( asset ) );\n System.out.println( newAssetList );\n newAssetList.add( \"YNS\" );\n System.out.println( newAssetList );\n /*String [] currency = {\"SGD\", \"USD\", \"INR\", \"GBP\", \"AUD\", \"SGD\"};\n System.out.println(\"Size of array: \" + currency.length);\n List<String> currencyList = CollectionUtils.arrayToList(currency);\n*/\n }", "@SuppressWarnings(\"unchecked\")\n public void testListToArray() throws Exception\n {\n List<PSKeyword> sourceList = new ArrayList<PSKeyword>();\n sourceList.add(createKeyword(\"1\"));\n sourceList.add(createKeyword(\"2\"));\n \n List<PSKeyword> targetList = roundTripListConversion(\n com.percussion.webservices.content.PSKeyword[].class, \n sourceList);\n\n assertTrue(sourceList.equals(targetList));\n }", "@Test\n public void testToArray_GenericType() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n instance.add(5);\n instance.add(6);\n\n Integer[] expResult = { 1, 2, 3, 4, 5, 6 };\n Integer[] result = instance.toArray(new Integer[] {});\n assertArrayEquals(expResult, result);\n }", "void mo100443a(List<String> list);", "Array createArray();", "int givePropNum(List<List<Integer[]>> allPropCoords) throws Exception;", "@SuppressWarnings( \"rawtypes\" )\n private XmlElement toXmlArray(List list)\n {\n XmlElement array = new XmlElement(\"array\");\n for (Object o : list)\n {\n array.add(objectToXml(o));\n }\n return array;\n }", "private void m10259a(ArrayList<Double> arrayList) {\n int size = arrayList.size();\n if (size <= this.f8993u) {\n this.f8973a.mo3315b((ArrayList) arrayList);\n return;\n }\n ArrayList arrayList2 = new ArrayList();\n int i = size / this.f8993u;\n for (int i2 = 0; i2 < this.f8993u; i2++) {\n int i3 = i2 * i;\n if (i3 >= size) {\n arrayList2.add(arrayList.get(size - 1));\n } else {\n arrayList2.add(arrayList.get(i3));\n }\n }\n this.f8973a.mo3315b(arrayList2);\n }", "private static ArrayList<String> transmit(ArrayList<String> array){\n\n\t\tArrayList<String> ret= new ArrayList<String>();\n\t\tfor (int i = 0; i < array.size(); i++) {\n\t\t\tret.add(array.get(i));\n\t\t}\n\t\treturn ret;\t\n\t}", "private int[] arrayListToIntList(ArrayList<Integer> arrayList){\n int[] list=new int[arrayList.size()];\n for(Integer integer:arrayList){\n list[arrayList.indexOf(integer)]=integer;\n }\n return list;\n }", "static public Object expandArray(Object[] list) {\n\t\tint newSize=list.length*2;\n Class type = list.getClass().getComponentType();\n Object temp = Array.newInstance(type, newSize);\n System.arraycopy(list, 0, temp, 0,\t\n Math.min(Array.getLength(list), newSize));\n return temp;\n }", "public abstract NSMutableArray<I_WorkFlowItem> tachesObligatoires();", "@Test\n public void test13() throws Throwable {\n // Undeclared exception!\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1333,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test13\");\n try {\n IteratorUtils.arrayListIterator((Object) \"\", 978);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Argument is not an array\n //\n }\n }", "public static void main(String[] args) {\n ArrayList<Object> ar = new ArrayList<Object>();\n ar.add(100);\n ar.add(100);\n ar.add(\"testing\");\n ar.add('c');\n ar.add(12.36);\n ar.add(true);\n\n System.out.println(ar);\n System.out.println(ar.get(4));\n System.out.println(ar.size());\n System.out.println(\"LI = \"+ 0);\n System.out.println(\"HI = \" + (ar.size()-1));\n\n ar.add(500);\n ar.add(400);\n System.out.println(ar.size());\n\n }", "public ArrayList61B() {\n\t\tthis.size = 1;\n\t\tthis.arrayList = (E[]) new Object[this.size];\n\t}", "private static final <R> List<R> m65272q(@C6003d Object[] objArr) {\n ArrayList arrayList = new ArrayList();\n for (Object obj : objArr) {\n C14445h0.m62450a(3, \"R\");\n if (obj instanceof Object) {\n arrayList.add(obj);\n }\n }\n return arrayList;\n }", "public abstract ArrayList<Object> calculateTransform(ArrayList<Integer> arr);", "private String literal(Array list) {\n StringBuffer buffer = new StringBuffer();\n \n buffer.append(\"(\");\n for (int i = 0; i < list.size(); i++) {\n if (i > 0) {\n buffer.append(\",\");\n }\n buffer.append(literal(list.get(i)));\n }\n buffer.append(\")\");\n return buffer.toString();\n }", "void mo13370a(int i, int i2, List<C15929a> list) throws IOException;", "private void doubleArray()\n\t{\n\t\tT[] oldList = list;\n\t\tint oldSize = oldList.length;\n\t\t\n\t\tlist = (T[]) new Object[2 * oldSize];\n\t\t\n\t\t// copy entries from old array to new, bigger array\n\t\tfor (int index = 0; index < oldSize; index++)\n\t\t\tlist[index] = oldList[index];\n\t}", "public static void shufleArray(ArrayList<Number> list) {\r\n\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\t// generisemo prvi indeks.\r\n\t\t\tint indx1 = (int) (Math.random() * list.size());\r\n\t\t\t// generisemo drugi index.\r\n\t\t\tint indx2 = (int) (Math.random() * list.size());\r\n\t\t\t// cuvamo elemenat sa prvog indeksa.\r\n\t\t\tNumber temp = list.get(indx1);\r\n\t\t\t// Kopiramo elemenat sa drugog indeksa preko prvog elementa.\r\n\t\t\tlist.set(indx1, list.get(indx2));\r\n\t\t\t// Kopiramo temp (prvi elemenat) preko drugog elementa.\r\n\t\t\tlist.set(indx2, temp);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n ArrayList<Integer> items = new ArrayList<>();\n items.add(1);\n items.add(2);\n items.add(3);\n items.add(4);\n items.add(5);\n items.add(6);\n items.add(7);\n items.add(8);\n\n\n printArray(items);\n }", "public void testCheckArray() {\n Object[] objects = new Object[] {\"one\"};\n Util.checkArray(objects, \"test\");\n }", "private Number[] arrayExtension(Number[] array) {\n int extendedLength = (int) (array.length * 1.3 + 2);\n Number[] extendedArray = new Number[extendedLength];\n for (int index = 0; index < array.length; index++) {\n extendedArray[index] = array[index];\n }\n return extendedArray;\n }", "private void m10266b(List<C2411a> list) {\n int i;\n int i2;\n List arrayList = new ArrayList();\n ArrayList arrayList2 = new ArrayList();\n arrayList.addAll(list);\n this.f8987o.add(Double.valueOf(0.0d));\n arrayList2.add(Double.valueOf(0.0d));\n for (i = 0; i < 5; i++) {\n C2411a c2411a = (C2411a) arrayList.remove(0);\n this.f8987o.add(Double.valueOf(c2411a.m12234j()));\n arrayList2.add(Double.valueOf(c2411a.m12233i() / 1000.0d));\n }\n int size = arrayList.size();\n i = 5;\n while (i > 0) {\n i2 = size - 1;\n c2411a = (C2411a) arrayList.remove(size - i);\n this.f8987o.add(Double.valueOf(c2411a.m12234j()));\n arrayList2.add(Double.valueOf(c2411a.m12233i() / 1000.0d));\n i--;\n size = i2;\n }\n int size2 = arrayList.size();\n int i3 = size2 / 387;\n int i4 = 0;\n int i5 = 6;\n while (i4 < 387) {\n i2 = i4 * i3;\n if (i2 >= size2) {\n double j = ((C2411a) arrayList.get(size2 - 1)).m12234j();\n if (j > this.f8976d.getMaxVelocity()) {\n j = this.f8976d.getMaxVelocity();\n }\n this.f8987o.add(i5, Double.valueOf(j));\n arrayList2.add(i5, Double.valueOf(((C2411a) arrayList.get(size2 - 1)).m12233i() / 1000.0d));\n size = i5 + 1;\n } else {\n c2411a = (C2411a) arrayList.get(i2);\n i = (i4 + 1) * i3;\n if (i >= size2) {\n i = size2 - 1;\n }\n C2411a c2411a2 = (C2411a) arrayList.get(i);\n long h = (c2411a2.m12232h() / 1000) - (c2411a.m12232h() / 1000);\n double d;\n if (h <= 0) {\n double d2 = 0.0d;\n while (i2 < (i4 + 1) * i3) {\n d2 += ((C2411a) arrayList.get(i2)).m12234j();\n i2++;\n }\n d = d2 / ((double) i3);\n if (d > this.f8976d.getMaxVelocity()) {\n d = this.f8976d.getMaxVelocity();\n }\n this.f8987o.add(i5, Double.valueOf(d));\n } else {\n d = ((c2411a2.m12233i() - c2411a.m12233i()) / ((double) h)) * 3.6d;\n if (d > this.f8976d.getMaxVelocity()) {\n d = this.f8976d.getMaxVelocity();\n }\n this.f8987o.add(i5, Double.valueOf(d));\n }\n arrayList2.add(i5, Double.valueOf(c2411a.m12233i() / 1000.0d));\n size = i5 + 1;\n }\n i4++;\n i5 = size;\n }\n this.f8987o.add(Double.valueOf(0.0d));\n arrayList2.add(Double.valueOf(this.f8976d.getTotalDistance()));\n i2 = this.f8987o.size();\n i = 1;\n while (i < i2) {\n if (this.f8978f >= ((Double) arrayList2.get(i - 1)).doubleValue() && this.f8978f < ((Double) arrayList2.get(i)).doubleValue()) {\n this.f8987o.add(i, Double.valueOf(this.f8976d.getMaxVelocity()));\n arrayList2.add(i, Double.valueOf(this.f8978f));\n break;\n }\n i++;\n }\n this.f8993u = this.f8987o.size();\n }", "Exp getArrayExp();", "@Override\n\tprotected void getDifferentJsonArrayValue() {\n\n\t}", "public final void mo37748V(ArrayList<C43640g> arrayList) {\n AppMethodBeat.m2504i(109588);\n C25052j.m39376p(arrayList, \"<set-?>\");\n this.cHb = arrayList;\n AppMethodBeat.m2505o(109588);\n }", "public static void main(String args[]){\n int Array_List[]= new int[]{1,2,3,4,5,6,7,8,9,10};\n\n }", "private static List<Node> arrayToList(Node[] n) {\n List<Node> listItems = new ArrayList<>();\n for (Node n1 : n) {\n listItems.add(n1);\n }\n return listItems;\n }", "void writeBack(Comparable[] arr, int list) {\n\n\t\t// Iterate array and put sorted elements in it \n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\t\n\t\t\tarr[i] = this.array[list];\n\t\t\tlist = next[list];\n\t\t}\n\t\t\n\t\t/*\n\t\t * Release resources.\n\t\t */\n\t\t\n\t\tthis.array = null;\n\t\tthis.data = null;\n\t\tthis.next = null;\n\t\tthis.queue = null;\n\t}", "Object[] getChildArray();", "public static void printArray(double[] list) \n {\n for (int i = 0; i < list.length; i++) \n {\n System.out.print(list[i] + \" \");\n }\n int b[];\n b=new int[5];\n }", "private TemplateInfo m19294a(long j, List<TemplateInfo>... listArr) {\n if (listArr != null) {\n for (List<TemplateInfo> it : listArr) {\n for (TemplateInfo templateInfo : it) {\n if (C2575a.m7391rq(templateInfo.ttid) == j) {\n return templateInfo;\n }\n }\n }\n }\n return null;\n }", "static void arrayToSet()\n\t{\n\t\tList<String> oList = null;\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\tString arr[] = {\"A\",\"B\",\"C\",\"D\",\"E\",\"A\"};\n\t\t\t\n\t\t\toList = Arrays.asList(arr);\n\t\t\tSystem.out.println(\"List: \"+oList);\n\t\t\t\n\t\t\toSet = new TreeSet<>(oList);\n\t\t\t\n\t\t\tSystem.out.println(\"Set: \"+oSet);\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toSet = null;\n\t\t}\n\t}", "private static void addEffectArray(List<Tuple<JsonValue, JsonValue>> list, JsonArray code, JsonArray payload){\n\t if(payload != null){\n\t for(int i = 0; i < code.size(); i++){\n\t list.add(new Tuple<JsonValue, JsonValue>(code.get(i), payload.get(i)));\n\t }\n\t } else {\n\t for(JsonValue singleCode : code){\n\t list.add(new Tuple<JsonValue, JsonValue>(singleCode, null));\n\t }\n\t }\n\t}", "static /* synthetic */ List m17132a(List list) throws Exception {\n ArrayList arrayList = new ArrayList(list);\n Collections.sort(arrayList, f15631B0);\n return arrayList;\n }", "public abstract ArrayList<Cell> getSelfArray();", "protected static void writeList(Output out, List<?> list) {\n if (!list.isEmpty()) {\n int size = list.size();\n // if its a small list, write it as an array\n if (size < 100) {\n out.writeArray(list);\n return;\n }\n // else we should check for lots of null values,\n // if there are over 80% then its probably best to do it as a map\n int nullCount = 0;\n for (int i = 0; i < size; i++) {\n if (list.get(i) == null) {\n nullCount++;\n }\n }\n if (nullCount > (size * 0.8)) {\n out.writeMap(list);\n } else {\n out.writeArray(list);\n }\n } else {\n out.writeArray(new Object[] {});\n }\n }", "ArrayProxyValue createArrayProxyValue();", "Object[] elements(Object[] destination) {\n return elements.toArray(destination);\n }", "private ArrayList<String> initList(String[] vastitems){\n return new ArrayList<>(Arrays.asList(vastitems));\n }", "@SuppressWarnings(\"rawtypes\")\n\t@Test\n\tpublic void retrieveArrays() {\n\t\tObjectSet result = db.queryByExample(new double[] { 0.6, 0.4 });\n\t\tlistResult(result);\n\n\t\t// Important note QBE does not work well with arrays\n\t\tassertEquals(0, result.size());\n\n\t}", "public static int simpleArraySum() { //(List<Integer> ar)\n \n Integer []ar = {1,2,3}; \n\n Integer sum =0;\n for(Integer i : ar){\n sum +=i;\n }\n return sum; \n }", "private static void arrayInserionTime() {\n\t\t String[] namesArray = new String[1000];\n\t\t \n\t long startTime = System.nanoTime();\n\t \n\t for (int i = 0; i < namesArray.length; i++)\n\t {\n\t namesArray[i] = \"Name\"+i;\n\t }\n\t \n\t long endTime = System.nanoTime(); \n\t \n\t System.out.println(\"Time taken by Array : \"+(endTime - startTime)/1000+\"us\");\n\t \n\t ArrayList<String> nameList = new ArrayList<String>(); \n\t \n\t startTime = System.nanoTime();\n\t \n\t for (int i = 0; i <= 1000; i++)\n\t {\n\t nameList.add(\"Name\"+i);\n\t }\n\t \n\t endTime = System.nanoTime();\n\t \n\t System.out.println(\"Time taken by ArrayList : \"+(endTime-startTime)/1000+\"us\");\n\n\t}", "void mo12207a(int[] iArr);", "private void arrayToCollection(String name, Collection<Object>lst, JSONArray jarr, Type ptype) throws Exception {\n\t\tCollectionType ctype = (CollectionType) ptype;\n\t\tString cname = lst.getClass().getSimpleName() + \": \" + name;\n\t\tfor(Object jsonObj : jarr) {\n\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\tif(obj!=null)\n\t\t\t\tlst.add(obj);\n\t\t}\n\t}", "int mo13159a(List<Log> list);", "public void arrayList(List<Student> list)\r\n\t{\r\n\t\tlist.add(s1);\r\n\t\tlist.add(s2);\r\n\t\tlist.add(s3);\r\n\t\tlist.add(s4);\r\n\t\tlist.add(s5);\r\n\t\tlist.add(s6);\r\n\t\tSystem.out.println(\"Objects of ArrayList\");\r\n\t\tfor(int i=0;i<list.size();i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(list.get(i));\r\n\t\t}\r\n\t}", "private void arraySize(MyArrayList list, Results results) {\r\n int size = -123;\r\n size = list.size();\r\n if(size != -123) {\r\n results.storeNewResult(\"ArraySize test case: PASSED\");\r\n }\r\n else {\r\n results.storeNewResult(\"ArraySize test case: FAILED\");\r\n }\r\n }", "public static void arrayListSubtypeTest()\r\n\t{\r\n\t\tArrayList<Person> persons = new ArrayList<Person>();\r\n\t persons.add(new Person(\"twoa\"));\r\n\t persons.add(new Person(\"threea\"));\r\n\t PrintCollection(persons);\r\n\t // PrintCollection1(persons);\r\n\t PrintCollection2(persons);\r\n\t}", "public boolean isArrayType()\n/* */ {\n/* 138 */ return true;\n/* */ }", "boolean m6609a(List<Log> list);", "public static void main(String args[]){\r\n Object objArray;\r\n \r\n \t Scanner input = new Scanner(System.in);\r\n \t // display on console enter file name\r\n \t System.out.println(\"Enter array list data separated by a comma - for example 1, 2, 3, 4 : \");\r\n\r\n \t input = new Scanner(System.in);\r\n Object arrayListInput = input.nextLine();\r\n \r\n // create instance of class ArrayList.java\r\n \t Arraylist arrayList = new Arraylist();\r\n\r\n \t // load input data into array list object\r\n \t arrayList.loadArrayList(arrayListInput);\r\n\r\n \t // determine if array list object is empty \t \r\n \t boolean arrayListEmpty = arrayList.isEmpty();\r\n \t \r\n \t System.out.println(\"Is the array list empty \" + arrayListEmpty);\r\n \r\n arrayList.add(\"10\"); \r\n \t System.out.println(\"Add object to array list\");\r\n \t \r\n objArray = arrayList.get(5);\r\n \t System.out.println(\"Get object from array list \");\r\n \r\n }", "private void updateEntityArray(ArrayList<Entity> array, GameContainer gc, StateBasedGame sb, int delta){\r\n \t\tfor(int i=0; i<array.size(); i++){\r\n \t\t\tarray.get(i).update(gc, sb, delta);\r\n \t\t\tif(array.get(i).getHealth() <= 0){\r\n \t\t\t\tarray.remove(i);\r\n \t\t\t\ti--;\r\n \t\t\t}\r\n \t\t}\r\n \t}", "private static String[] listToArray(List<String> list){\n\t\tString[] arr = new String[list.size()];\n\t\tfor (int i = 0; i < list.size(); i++){\n\t\t\t\n\t\t\tarr[i] = list.get(i);\n\t\t}\n\t\t\n\t\treturn arr;\n\t}", "@Test\n public void testSetAccountNumberArray() {\n System.out.println(\"setAccountNumberArray\");\n int[] accountNumberArray = {1, 2, 3, 4, 5, 6};\n AbstractMethod instance = new AbstractMethodImpl();\n instance.setAccountNumberArray(accountNumberArray);\n int[] result = instance.getAccountNumberArray();\n for (int r : result) {\n System.out.print(r);\n }\n assertArrayEquals(accountNumberArray, result);\n\n }", "static <T> T[] m59446a(Collection<?> collection, T[] tArr) {\n int size = collection.size();\n if (tArr.length < size) {\n tArr = m59448a(tArr, size);\n }\n m59444a((Iterable<?>) collection, (Object[]) tArr);\n if (tArr.length > size) {\n tArr[size] = null;\n }\n return tArr;\n }", "static Object[] m59445a(Collection<?> collection) {\n return m59444a((Iterable<?>) collection, new Object[collection.size()]);\n }", "private void m152570a(List<ByteBuffer> list) {\n synchronized (this.f113322u) {\n for (ByteBuffer byteBuffer : list) {\n m152578e(byteBuffer);\n }\n }\n }", "public void testGetArray() {\n System.out.println(\"getArray\"); // NOI18N\n \n TypeID type = new TypeID(TypeID.Kind.PRIMITIVE, \"javacode\");// NOI18N\n PropertyValue arrayPropertyValue = PropertyValue.createValue(primitveDescritor, type, DesignComponentTest.PROPERTY1_VALUE_STRING); // NOI18N\n List<PropertyValue> array = new ArrayList();\n \n array.add(arrayPropertyValue);\n \n PropertyValue result = PropertyValue.createArray(type,array);\n \n type = type.getArrayType();\n assertEquals(type,result.getType());\n assertNotNull(result.getArray());\n }", "@Test\n public void testReflectionArrayCycle() {\n final Object[] objects = new Object[1];\n objects[0] = objects;\n assertEquals(\n this.toBaseString(objects) + \"[{\" + this.toBaseString(objects) + \"}]\",\n ToStringBuilder.reflectionToString(objects));\n }", "public interface ExternalArrayData{\n /**\n * Return the element at the specified index. The result must be a type that is valid in JavaScript:\n * Number, String, or Scriptable. This method will not be called unless \"index\" is in\n * range.\n */\n Object getArrayElement(int index);\n\n /**\n * Set the element at the specified index. This method will not be called unless \"index\" is in\n * range. The method must check that \"value\" is a valid type, and convert it if necessary.\n */\n void setArrayElement(int index, Object value);\n\n /**\n * Return the length of the array.\n */\n int getArrayLength();\n}", "public abstract void startArray();", "void mo69875a(List<Aweme> list, boolean z);", "private Labels(ArrayMixedObject array) {\n\t\tthis.array = array != null ? array : new ArrayMixedObject();\n\t}", "@SuppressWarnings(\"unchecked\")\n\tprivate void growArray() {\n\t\tObject[] newList = new Object[size * 2];\n\t\tfor (int i = 0; i < size(); i++) {\n\t\t\tnewList[i] = get(i);\n\t\t}\n\t\tlist = (E[]) newList;\n\t\tsize *= 2;\n\t}", "private static ArrayList<String> transmit(String[] array){\n\n\t\tArrayList<String> ret= new ArrayList<String>();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tret.add(array[i]);\n\t\t}\n\t\treturn ret;\t\n\t}", "private static void printArray(ArrayList<Integer> list) {\n for (int i : list) {\n System.out.println(i * 3);\n }\n\n }", "private static final <R, C extends Collection<? super R>> C m64428a(@C6003d Object[] objArr, C c) {\n for (Object obj : objArr) {\n C14445h0.m62450a(3, \"R\");\n if (obj instanceof Object) {\n c.add(obj);\n }\n }\n return c;\n }", "public void Array(ArrayList<String> L, int round) {\r\n ArrayList<ArrayList<String>> currentArrays = new ArrayList<>();\r\n ArrayList<String> arrayItems = new ArrayList<>();\r\n ArrayList<String> betweenBrackets = new ArrayList<>();\r\n ArrayList<String> tempLexemes = new ArrayList<>();\r\n ArrayList<Integer> indexes = new ArrayList<>();\r\n int arrayCounter = -1;\r\n int arraySize;\r\n boolean similarSizes = true;\r\n String s = \"\";\r\n String tempHistoryString = \"\";\r\n\r\n if(L.contains(\"{\") || L.contains(\"}\")) {//It is an array\r\n for(int i = 0; i < L.size(); i++) {\r\n if(L.get(i).equals(\"{\")) {//If it's a massive\r\n indexes.add(i+1);//index = i+1;\r\n arrayCounter += 1;\r\n while(!L.get(indexes.get(arrayCounter)).equals(\"}\")) {\r\n betweenBrackets.add(L.get(indexes.get(arrayCounter)));\r\n L.remove((int)indexes.get(arrayCounter));\r\n }\r\n L.remove((int)indexes.get(arrayCounter));\r\n L.remove(indexes.get(arrayCounter)-1);\r\n currentArrays.add(betweenBrackets);\r\n betweenBrackets = new ArrayList<>();\r\n }\r\n }\r\n\r\n for (int a = 0; a < currentArrays.size(); a++) {//a = array (one of currentArrays)\r\n ArrayList<String> currentArray;// = new ArrayList<String>();\r\n currentArray = currentArrays.get(a);\r\n for(int i = 0; i < currentArray.size(); i++) {\r\n s += currentArray.get(i);\r\n if(currentArray.get(i).equals(\";\")) {\r\n s = s.substring(0, s.length()-1);\r\n arrayItems.add(s);\r\n s = \"\";\r\n }\r\n if(i == currentArray.size()-1) {\r\n arrayItems.add(s);\r\n s = \"\";\r\n }\r\n }\r\n currentArrays.set(a, arrayItems);\r\n arrayItems = new ArrayList<>();\r\n }\r\n\r\n //Todo: Check if arrays' sizes are not similar\r\n\r\n arraySize = currentArrays.get(0).size();\r\n for(int a = 1; a < currentArrays.size(); a++) {\r\n if(currentArrays.get(a).size() != arraySize) similarSizes = false;\r\n }\r\n\r\n if(similarSizes) {//Continue working\r\n int size = currentArrays.get(0).size();\r\n //Parse all elements in all arrays\r\n for(int i = 0; i < size; i++) {\r\n for(int a = 0; a < currentArrays.size(); a++) {\r\n ArrayList<String> lexemesOfArrayItem = new ArrayList<>();\r\n MakeListOfLexemes(currentArrays.get(a).get(i), lexemesOfArrayItem);\r\n ParsingSet(lexemesOfArrayItem);\r\n currentArrays.get(a).set(i, lexemesOfArrayItem.get(0));\r\n }\r\n }\r\n\r\n if(!lexemes.isEmpty()) for (int k = 0; k < lexemes.size(); k++)\r\n tempLexemes.add(lexemes.get(k));\r\n\r\n for (int a = 0; a < currentArrays.size(); a++) {\r\n tempLexemes.add(indexes.get(a)-1+a, currentArrays.get(a).get(0));\r\n }\r\n //Todo: tempHistoryString\r\n tempHistoryString = makeStringFromList(tempLexemes);\r\n ParsingSet(tempLexemes);\r\n String currentResult = tempLexemes.get(0);\r\n try {\r\n currentResult = Round(tempLexemes.get(0), round);\r\n } catch (Exception e) {\r\n //Some exceptions in Round()\r\n }\r\n arrayHistory.add(\"index: 0; \" + tempHistoryString + \" = \" + currentResult);\r\n arrayHistoryRaw.add(currentResult);\r\n tempLexemes.clear();\r\n\r\n for (int i = 1; i < size; i++) {\r\n if(!lexemes.isEmpty()) for (int k = 0; k < lexemes.size(); k++)\r\n tempLexemes.add(lexemes.get(k));\r\n for (int a = 0; a < currentArrays.size(); a++) {\r\n tempLexemes.add(indexes.get(a)-1+a, currentArrays.get(a).get(i));\r\n }\r\n tempHistoryString = makeStringFromList(tempLexemes);\r\n ParsingSet(tempLexemes);\r\n currentResult = tempLexemes.get(0);\r\n try {\r\n currentResult = Round(tempLexemes.get(0), round);\r\n } catch (Exception e) {\r\n //Some exceptions in Round()\r\n }\r\n arrayHistory.add(\"index: \" + i + \"; \" + tempHistoryString + \" = \" + currentResult);\r\n arrayHistoryRaw.add(currentResult);\r\n tempLexemes.clear();\r\n }\r\n } else {\r\n //An error occurred - not similar sizes!\r\n }\r\n } else {//It is not an array\r\n ParsingSet(L); //Compute as an expression without arrays\r\n }\r\n }", "private static double[] toArray(ArrayList<Double> dbls) {\n double[] r = new double[dbls.size()];\n int i = 0;\n for( double d:dbls ) r[i++] = d;\n return r;\n }", "@Test\n public void testSingleNestArray()\n {\n Object[] array = new Object[]{1, 2, new Object[]{3}, 4};\n testList = ArrayFlattener.flattenArray(array);\n assertArrayEquals(testList.toArray(new Integer[testList.size()]), flat);\n }" ]
[ "0.6314695", "0.5955245", "0.5948963", "0.5936591", "0.5853402", "0.5823617", "0.57940286", "0.5762017", "0.5694028", "0.5684203", "0.56769705", "0.5663458", "0.5658288", "0.5645372", "0.56433153", "0.5642253", "0.5631178", "0.56076866", "0.5571578", "0.55695945", "0.5539182", "0.5525712", "0.5519385", "0.55103487", "0.54845107", "0.5476531", "0.5476026", "0.5475807", "0.5474248", "0.5461206", "0.5458373", "0.5430069", "0.5417858", "0.54138356", "0.5413522", "0.5406536", "0.54037136", "0.54036576", "0.5396937", "0.5394395", "0.5394189", "0.537106", "0.5369863", "0.5364271", "0.53630054", "0.5355321", "0.53404593", "0.53359705", "0.5327658", "0.53241795", "0.5311678", "0.53103805", "0.529156", "0.52897096", "0.5289288", "0.5288248", "0.5284362", "0.52838874", "0.5280515", "0.52804565", "0.52766573", "0.5270299", "0.52699465", "0.52671504", "0.5264314", "0.5257645", "0.5233381", "0.5233023", "0.52287424", "0.5225297", "0.5225295", "0.5222139", "0.5221329", "0.52207327", "0.52135825", "0.5209279", "0.5204757", "0.5195935", "0.5191181", "0.51893836", "0.51854515", "0.51838714", "0.5182617", "0.5181971", "0.5181347", "0.51799655", "0.5179606", "0.5179321", "0.5173318", "0.51725924", "0.51724446", "0.51700795", "0.5169287", "0.5166987", "0.5163186", "0.515857", "0.51562685", "0.5156057", "0.5153488", "0.515241", "0.5145569" ]
0.0
-1
TODO Assume array list for now; Change later
public void setEvents(AbstractList<Event> events) { this.events = (ArrayList<Event>) events; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo9148a(int i, ArrayList<C0889x> arrayList);", "public abstract void mo56920a(List<C4122e> list);", "@Test\r\n\tpublic void testToArrayType() {\r\n\t\tMunitions[] sample1 = new Munitions[5];\r\n\t\tsample1 = list.toArray(sample1);\r\n\t\tAssert.assertEquals(15, sample1.length);\r\n\t\tfor (int i = 0; i < sample1.length; i++) {\r\n\t\t\tAssert.assertNotNull(sample1[i]);\r\n\t\t}\r\n\t\tMunitions[] sample2 = new Munitions[20];\r\n\t\tsample2 = list.toArray(sample2);\r\n\t\tAssert.assertEquals(20, sample2.length);\r\n\t\tfor (int i = 0; i < sample2.length - list.size(); i++) {\r\n\t\t\tAssert.assertNotNull(sample1[i]);\r\n\t\t}\r\n\t}", "public abstract void mo56923b(List<C4122e> list);", "private PyObject[] listtoarray(ArrayList<PyObject> a)\n {\n PyObject[] results = new PyObject[a.size()];\n int iter = 0;\n for (PyObject pt : a) {\n results[iter] = pt;\n iter++;\n }\n return results;\n }", "private static Object[] m59444a(Iterable<?> iterable, Object[] objArr) {\n int i = 0;\n for (Object obj : iterable) {\n int i2 = i + 1;\n objArr[i] = obj;\n i = i2;\n }\n return objArr;\n }", "@Test\r\n\tpublic void testToArray() {\r\n\t\tObject[] sample = list.toArray();\r\n\t\tAssert.assertEquals(15, sample.length);\r\n\t\tfor (int i = 0; i < sample.length; i++) {\r\n\t\t\tAssert.assertNotNull(sample[i]);\r\n\t\t}\r\n\t}", "void mo100444b(List<C40429b> list);", "private Object arrayToSPLArray(String name, JSONArray jarr, Type ptype) throws Exception {\n\t\tif(l.isLoggable(TraceLevel.DEBUG)) {\n\t\t\tl.log(TraceLevel.DEBUG, \"Creating Array: \" + name);\n\t\t}\n\t\tCollectionType ctype = (CollectionType) ptype;\n\t\tint cnt=0;\n\t\tString cname = \"List: \" + name;\n\n\t\tswitch(ctype.getElementType().getMetaType()) {\n\t\tcase INT8:\n\t\tcase UINT8: \n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tbyte[] arr= new byte[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Byte)val;\n\t\t\treturn arr;\n\t\t} \n\t\tcase INT16:\n\t\tcase UINT16:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tshort[] arr= new short[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Short)val;\n\t\t\treturn arr;\n\t\t} \n\t\tcase INT32:\n\t\tcase UINT32:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tint[] arr= new int[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Integer)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase INT64:\n\t\tcase UINT64:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tlong[] arr= new long[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Long)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase BOOLEAN:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tboolean[] arr= new boolean[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Boolean)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase FLOAT32:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tfloat[] arr= new float[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Float)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase FLOAT64:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tdouble[] arr= new double[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Double)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase USTRING:\n\t\t{\n\t\t\tList<String> lst = new ArrayList<String>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((String)obj);\n\t\t\t}\n\t\t\treturn lst.toArray(new String[lst.size()]);\n\t\t} \n\n\t\tcase BSTRING:\n\t\tcase RSTRING:\n\t\t{\n\t\t\tList<RString> lst = new ArrayList<RString>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((RString)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\n\t\tcase TUPLE:\n\t\t{\n\t\t\tList<Tuple> lst = new ArrayList<Tuple>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((Tuple)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\n\t\tcase LIST:\n\t\tcase BLIST:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add(obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\t\tcase SET:\n\t\tcase BSET:\n\t\t{\n\t\t\tSet<Object> lst = new HashSet<Object>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add(obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\t\tcase DECIMAL32:\n\t\tcase DECIMAL64:\n\t\tcase DECIMAL128:\n\t\t{\n\t\t\tList<BigDecimal> lst = new ArrayList<BigDecimal>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((BigDecimal)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\t\tcase TIMESTAMP:\n\t\t{\n\t\t\tList<Timestamp> lst = new ArrayList<Timestamp>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((Timestamp)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\n\n\t\t//TODO -- not yet supported types\n\t\tcase BLOB:\n\t\tcase MAP:\n\t\tcase BMAP:\n\t\tcase COMPLEX32:\n\t\tcase COMPLEX64:\n\t\tdefault:\n\t\t\tthrow new Exception(\"Unhandled array type: \" + ctype.getElementType().getMetaType());\n\t\t}\n\n\t}", "@Test\n public void testToArray_0args() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n instance.add(5);\n instance.add(6);\n\n Integer[] expResult = { 1, 2, 3, 4, 5, 6 };\n Object[] result = instance.toArray();\n assertArrayEquals(expResult, result);\n\n }", "@Override\r\n\tpublic void visit(ArrayExpression arrayExpression) {\n\r\n\t}", "private void displayArrays(ArrayList list){}", "ArrayValue createArrayValue();", "@Test public void getArrayShouldReturnCorrectArray() throws SQLException {\n\t\tList<String> list = new ArrayList<>();\n\t\tArray array = new ListArray(list, Types.VARCHAR);\n\t\tassertTrue(array.getArray() instanceof String[]);\n\t\tlist.add(\"test\");\n\t\tarray = new ListArray(list, Types.VARCHAR);\n\t\tassertEquals(\"test\", ((String[])array.getArray())[0]);\n\t\tlist.add(\"test2\");\n\t\tarray = new ListArray(list, Types.VARCHAR);\n\t\tassertEquals(\"test2\", ((String[])array.getArray())[1]);\n\t}", "public static void arrayDemo() {\n\t}", "@Override\r\n\tpublic void visit(Array array) {\n\r\n\t}", "testarray() {\r\n \tarrayList = new Arraylist();\t\r\n\t}", "public static void main(String[] args)\r\n\t{\nArrayList al = new ArrayList<>();\r\nal.add(10);\r\nal.add(\"manu\");\r\nal.add('m');\r\nObject [] ob=al.toArray();\r\nfor (int i = 0; i < ob.length; i++)\r\n{\r\n\tSystem.out.println(ob[i]);\r\n\t\r\n}\r\n\t}", "void mo54419a(List<String> list);", "@Test\r\n public void testGenericArray()\r\n {\r\n Type t0 = Types.create(List.class).withType(Number.class).build();\r\n Type arrayType = Types.createGenericArrayType(t0);\r\n test(arrayType);\r\n }", "private <T> void populateArrayFromList(T[] arr, ArrayList<T> arrayList) {\n\t\tSystem.out.println(\"Array size \" + arr.length);\n\t\tSystem.out.println(\"ArrayList size \" + arrayList.size());\n\t\tfor (int i = 0; i < arrayList.size(); i++) {\n\t\t\tsavedListModel.addElement(arrayList.get(i).toString());\n\t\t\tarr[i] = arrayList.get(i);\n\t\t}\n\t}", "@org.junit.jupiter.api.Test\r\n void toArray() {\n mll.add(\"A\");\r\n Object [] backDoor = mll.toArray();\r\n backDoor[0] = \"HAHHA\";\r\n\r\n assertEquals(\"A\", mll.get(0));\r\n }", "private String[] toStringArray(ArrayList<String> list) {\n String[] tempStrings = new String[list.size()];\n tempStrings = list.toArray(tempStrings);\n\n return tempStrings;\n }", "@Test\n\tpublic void createListWithArraysUtil() {\n\t\tList<String> list = new ArrayList<>();\n\t\tlist.add(\"AAPL\");\n\t\tlist.add(\"MSFT\");\n\n\t\tList<String> copy = Arrays.asList(\"AAPL\", \"MSFT\");\n\n\t\tassertTrue(list.equals(copy));\n\t}", "public ArrayBackedList(IList list) {\n while (list.size() > stringArray.length) {\n reallocArray();\n }\n for (int i = 0; i < list.size(); i++) {\n stringArray[i] = list.get(i);\n }\n }", "private ArraySetHelper() {\n\t\t// nothing\n\t}", "public void tacoArray() {\n\n\n ArrayList<String> tacos = new ArrayList<>();\n tacos.add(\"blah\");\n tacos.add(\"blah2\");\n tacos.add(\"blah3\");\n tacos.add(\"blah4\");\n tacos.add(\"blah5\");\n }", "@Test public void getListTest()\n {\n PentagonalPyramid[] pArray = new PentagonalPyramid[100];\n PentagonalPyramid p1 = new PentagonalPyramid(\"PP1\", 1, 2);\n PentagonalPyramid p2 = new PentagonalPyramid(\"PP1\", 2, 3);\n PentagonalPyramid p3 = new PentagonalPyramid(\"PP1\", 3, 4);\n pArray[0] = p1;\n pArray[1] = p2;\n pArray[2] = p3;\n \n PentagonalPyramidList2 pList = new PentagonalPyramidList2(\"ListName\", \n pArray, 3);\n \n \n Assert.assertArrayEquals(pArray, pList.getList());\n }", "void arrayListToArray() {\n List<String> coolStringList = Arrays.asList( \"Java\", \"Scala\", \"Groovy\" ); //Declare &initialize o\n //coolStringList.add( \"Syed\" ); // Exception in thread \"main\" java.lang.UnsupportedOperationException\n coolStringList.set( 0, \"Syed\" );// works well\n System.out.println( coolStringList );\n/*\n /) Its not as fast as Arrays.asList() but more flexible.\n\n 2) This method actually copies the content of the underlying array into ArrayList provided.\n\n\n 3) Since you are creating copy of original array, you can add, modify and remove any element without affecting original one.*/\n\n List<String> assetList = new ArrayList();\n String[] asset = {\"equity\", \"stocks\", \"gold\", \"foriegn exchange\", \"fixed income\", \"futures\", \"options\"};\n Collections.addAll( assetList, asset );\n System.out.println( assetList );\n assetList.add( \"Mohammed\" );\n System.out.println( assetList );\n\n List newAssetList = new ArrayList();\n newAssetList.addAll( Arrays.asList( asset ) );\n System.out.println( newAssetList );\n newAssetList.add( \"YNS\" );\n System.out.println( newAssetList );\n /*String [] currency = {\"SGD\", \"USD\", \"INR\", \"GBP\", \"AUD\", \"SGD\"};\n System.out.println(\"Size of array: \" + currency.length);\n List<String> currencyList = CollectionUtils.arrayToList(currency);\n*/\n }", "@SuppressWarnings(\"unchecked\")\n public void testListToArray() throws Exception\n {\n List<PSKeyword> sourceList = new ArrayList<PSKeyword>();\n sourceList.add(createKeyword(\"1\"));\n sourceList.add(createKeyword(\"2\"));\n \n List<PSKeyword> targetList = roundTripListConversion(\n com.percussion.webservices.content.PSKeyword[].class, \n sourceList);\n\n assertTrue(sourceList.equals(targetList));\n }", "@Test\n public void testToArray_GenericType() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n instance.add(5);\n instance.add(6);\n\n Integer[] expResult = { 1, 2, 3, 4, 5, 6 };\n Integer[] result = instance.toArray(new Integer[] {});\n assertArrayEquals(expResult, result);\n }", "void mo100443a(List<String> list);", "Array createArray();", "int givePropNum(List<List<Integer[]>> allPropCoords) throws Exception;", "@SuppressWarnings( \"rawtypes\" )\n private XmlElement toXmlArray(List list)\n {\n XmlElement array = new XmlElement(\"array\");\n for (Object o : list)\n {\n array.add(objectToXml(o));\n }\n return array;\n }", "private void m10259a(ArrayList<Double> arrayList) {\n int size = arrayList.size();\n if (size <= this.f8993u) {\n this.f8973a.mo3315b((ArrayList) arrayList);\n return;\n }\n ArrayList arrayList2 = new ArrayList();\n int i = size / this.f8993u;\n for (int i2 = 0; i2 < this.f8993u; i2++) {\n int i3 = i2 * i;\n if (i3 >= size) {\n arrayList2.add(arrayList.get(size - 1));\n } else {\n arrayList2.add(arrayList.get(i3));\n }\n }\n this.f8973a.mo3315b(arrayList2);\n }", "private static ArrayList<String> transmit(ArrayList<String> array){\n\n\t\tArrayList<String> ret= new ArrayList<String>();\n\t\tfor (int i = 0; i < array.size(); i++) {\n\t\t\tret.add(array.get(i));\n\t\t}\n\t\treturn ret;\t\n\t}", "private int[] arrayListToIntList(ArrayList<Integer> arrayList){\n int[] list=new int[arrayList.size()];\n for(Integer integer:arrayList){\n list[arrayList.indexOf(integer)]=integer;\n }\n return list;\n }", "static public Object expandArray(Object[] list) {\n\t\tint newSize=list.length*2;\n Class type = list.getClass().getComponentType();\n Object temp = Array.newInstance(type, newSize);\n System.arraycopy(list, 0, temp, 0,\t\n Math.min(Array.getLength(list), newSize));\n return temp;\n }", "public abstract NSMutableArray<I_WorkFlowItem> tachesObligatoires();", "@Test\n public void test13() throws Throwable {\n // Undeclared exception!\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1333,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test13\");\n try {\n IteratorUtils.arrayListIterator((Object) \"\", 978);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Argument is not an array\n //\n }\n }", "public static void main(String[] args) {\n ArrayList<Object> ar = new ArrayList<Object>();\n ar.add(100);\n ar.add(100);\n ar.add(\"testing\");\n ar.add('c');\n ar.add(12.36);\n ar.add(true);\n\n System.out.println(ar);\n System.out.println(ar.get(4));\n System.out.println(ar.size());\n System.out.println(\"LI = \"+ 0);\n System.out.println(\"HI = \" + (ar.size()-1));\n\n ar.add(500);\n ar.add(400);\n System.out.println(ar.size());\n\n }", "public ArrayList61B() {\n\t\tthis.size = 1;\n\t\tthis.arrayList = (E[]) new Object[this.size];\n\t}", "private static final <R> List<R> m65272q(@C6003d Object[] objArr) {\n ArrayList arrayList = new ArrayList();\n for (Object obj : objArr) {\n C14445h0.m62450a(3, \"R\");\n if (obj instanceof Object) {\n arrayList.add(obj);\n }\n }\n return arrayList;\n }", "public abstract ArrayList<Object> calculateTransform(ArrayList<Integer> arr);", "private String literal(Array list) {\n StringBuffer buffer = new StringBuffer();\n \n buffer.append(\"(\");\n for (int i = 0; i < list.size(); i++) {\n if (i > 0) {\n buffer.append(\",\");\n }\n buffer.append(literal(list.get(i)));\n }\n buffer.append(\")\");\n return buffer.toString();\n }", "void mo13370a(int i, int i2, List<C15929a> list) throws IOException;", "private void doubleArray()\n\t{\n\t\tT[] oldList = list;\n\t\tint oldSize = oldList.length;\n\t\t\n\t\tlist = (T[]) new Object[2 * oldSize];\n\t\t\n\t\t// copy entries from old array to new, bigger array\n\t\tfor (int index = 0; index < oldSize; index++)\n\t\t\tlist[index] = oldList[index];\n\t}", "public static void shufleArray(ArrayList<Number> list) {\r\n\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\t// generisemo prvi indeks.\r\n\t\t\tint indx1 = (int) (Math.random() * list.size());\r\n\t\t\t// generisemo drugi index.\r\n\t\t\tint indx2 = (int) (Math.random() * list.size());\r\n\t\t\t// cuvamo elemenat sa prvog indeksa.\r\n\t\t\tNumber temp = list.get(indx1);\r\n\t\t\t// Kopiramo elemenat sa drugog indeksa preko prvog elementa.\r\n\t\t\tlist.set(indx1, list.get(indx2));\r\n\t\t\t// Kopiramo temp (prvi elemenat) preko drugog elementa.\r\n\t\t\tlist.set(indx2, temp);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n ArrayList<Integer> items = new ArrayList<>();\n items.add(1);\n items.add(2);\n items.add(3);\n items.add(4);\n items.add(5);\n items.add(6);\n items.add(7);\n items.add(8);\n\n\n printArray(items);\n }", "public void testCheckArray() {\n Object[] objects = new Object[] {\"one\"};\n Util.checkArray(objects, \"test\");\n }", "private Number[] arrayExtension(Number[] array) {\n int extendedLength = (int) (array.length * 1.3 + 2);\n Number[] extendedArray = new Number[extendedLength];\n for (int index = 0; index < array.length; index++) {\n extendedArray[index] = array[index];\n }\n return extendedArray;\n }", "private void m10266b(List<C2411a> list) {\n int i;\n int i2;\n List arrayList = new ArrayList();\n ArrayList arrayList2 = new ArrayList();\n arrayList.addAll(list);\n this.f8987o.add(Double.valueOf(0.0d));\n arrayList2.add(Double.valueOf(0.0d));\n for (i = 0; i < 5; i++) {\n C2411a c2411a = (C2411a) arrayList.remove(0);\n this.f8987o.add(Double.valueOf(c2411a.m12234j()));\n arrayList2.add(Double.valueOf(c2411a.m12233i() / 1000.0d));\n }\n int size = arrayList.size();\n i = 5;\n while (i > 0) {\n i2 = size - 1;\n c2411a = (C2411a) arrayList.remove(size - i);\n this.f8987o.add(Double.valueOf(c2411a.m12234j()));\n arrayList2.add(Double.valueOf(c2411a.m12233i() / 1000.0d));\n i--;\n size = i2;\n }\n int size2 = arrayList.size();\n int i3 = size2 / 387;\n int i4 = 0;\n int i5 = 6;\n while (i4 < 387) {\n i2 = i4 * i3;\n if (i2 >= size2) {\n double j = ((C2411a) arrayList.get(size2 - 1)).m12234j();\n if (j > this.f8976d.getMaxVelocity()) {\n j = this.f8976d.getMaxVelocity();\n }\n this.f8987o.add(i5, Double.valueOf(j));\n arrayList2.add(i5, Double.valueOf(((C2411a) arrayList.get(size2 - 1)).m12233i() / 1000.0d));\n size = i5 + 1;\n } else {\n c2411a = (C2411a) arrayList.get(i2);\n i = (i4 + 1) * i3;\n if (i >= size2) {\n i = size2 - 1;\n }\n C2411a c2411a2 = (C2411a) arrayList.get(i);\n long h = (c2411a2.m12232h() / 1000) - (c2411a.m12232h() / 1000);\n double d;\n if (h <= 0) {\n double d2 = 0.0d;\n while (i2 < (i4 + 1) * i3) {\n d2 += ((C2411a) arrayList.get(i2)).m12234j();\n i2++;\n }\n d = d2 / ((double) i3);\n if (d > this.f8976d.getMaxVelocity()) {\n d = this.f8976d.getMaxVelocity();\n }\n this.f8987o.add(i5, Double.valueOf(d));\n } else {\n d = ((c2411a2.m12233i() - c2411a.m12233i()) / ((double) h)) * 3.6d;\n if (d > this.f8976d.getMaxVelocity()) {\n d = this.f8976d.getMaxVelocity();\n }\n this.f8987o.add(i5, Double.valueOf(d));\n }\n arrayList2.add(i5, Double.valueOf(c2411a.m12233i() / 1000.0d));\n size = i5 + 1;\n }\n i4++;\n i5 = size;\n }\n this.f8987o.add(Double.valueOf(0.0d));\n arrayList2.add(Double.valueOf(this.f8976d.getTotalDistance()));\n i2 = this.f8987o.size();\n i = 1;\n while (i < i2) {\n if (this.f8978f >= ((Double) arrayList2.get(i - 1)).doubleValue() && this.f8978f < ((Double) arrayList2.get(i)).doubleValue()) {\n this.f8987o.add(i, Double.valueOf(this.f8976d.getMaxVelocity()));\n arrayList2.add(i, Double.valueOf(this.f8978f));\n break;\n }\n i++;\n }\n this.f8993u = this.f8987o.size();\n }", "Exp getArrayExp();", "@Override\n\tprotected void getDifferentJsonArrayValue() {\n\n\t}", "public final void mo37748V(ArrayList<C43640g> arrayList) {\n AppMethodBeat.m2504i(109588);\n C25052j.m39376p(arrayList, \"<set-?>\");\n this.cHb = arrayList;\n AppMethodBeat.m2505o(109588);\n }", "public static void main(String args[]){\n int Array_List[]= new int[]{1,2,3,4,5,6,7,8,9,10};\n\n }", "private static List<Node> arrayToList(Node[] n) {\n List<Node> listItems = new ArrayList<>();\n for (Node n1 : n) {\n listItems.add(n1);\n }\n return listItems;\n }", "void writeBack(Comparable[] arr, int list) {\n\n\t\t// Iterate array and put sorted elements in it \n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\t\n\t\t\tarr[i] = this.array[list];\n\t\t\tlist = next[list];\n\t\t}\n\t\t\n\t\t/*\n\t\t * Release resources.\n\t\t */\n\t\t\n\t\tthis.array = null;\n\t\tthis.data = null;\n\t\tthis.next = null;\n\t\tthis.queue = null;\n\t}", "Object[] getChildArray();", "public static void printArray(double[] list) \n {\n for (int i = 0; i < list.length; i++) \n {\n System.out.print(list[i] + \" \");\n }\n int b[];\n b=new int[5];\n }", "private TemplateInfo m19294a(long j, List<TemplateInfo>... listArr) {\n if (listArr != null) {\n for (List<TemplateInfo> it : listArr) {\n for (TemplateInfo templateInfo : it) {\n if (C2575a.m7391rq(templateInfo.ttid) == j) {\n return templateInfo;\n }\n }\n }\n }\n return null;\n }", "static void arrayToSet()\n\t{\n\t\tList<String> oList = null;\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\tString arr[] = {\"A\",\"B\",\"C\",\"D\",\"E\",\"A\"};\n\t\t\t\n\t\t\toList = Arrays.asList(arr);\n\t\t\tSystem.out.println(\"List: \"+oList);\n\t\t\t\n\t\t\toSet = new TreeSet<>(oList);\n\t\t\t\n\t\t\tSystem.out.println(\"Set: \"+oSet);\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toSet = null;\n\t\t}\n\t}", "private static void addEffectArray(List<Tuple<JsonValue, JsonValue>> list, JsonArray code, JsonArray payload){\n\t if(payload != null){\n\t for(int i = 0; i < code.size(); i++){\n\t list.add(new Tuple<JsonValue, JsonValue>(code.get(i), payload.get(i)));\n\t }\n\t } else {\n\t for(JsonValue singleCode : code){\n\t list.add(new Tuple<JsonValue, JsonValue>(singleCode, null));\n\t }\n\t }\n\t}", "static /* synthetic */ List m17132a(List list) throws Exception {\n ArrayList arrayList = new ArrayList(list);\n Collections.sort(arrayList, f15631B0);\n return arrayList;\n }", "public abstract ArrayList<Cell> getSelfArray();", "protected static void writeList(Output out, List<?> list) {\n if (!list.isEmpty()) {\n int size = list.size();\n // if its a small list, write it as an array\n if (size < 100) {\n out.writeArray(list);\n return;\n }\n // else we should check for lots of null values,\n // if there are over 80% then its probably best to do it as a map\n int nullCount = 0;\n for (int i = 0; i < size; i++) {\n if (list.get(i) == null) {\n nullCount++;\n }\n }\n if (nullCount > (size * 0.8)) {\n out.writeMap(list);\n } else {\n out.writeArray(list);\n }\n } else {\n out.writeArray(new Object[] {});\n }\n }", "ArrayProxyValue createArrayProxyValue();", "Object[] elements(Object[] destination) {\n return elements.toArray(destination);\n }", "private ArrayList<String> initList(String[] vastitems){\n return new ArrayList<>(Arrays.asList(vastitems));\n }", "@SuppressWarnings(\"rawtypes\")\n\t@Test\n\tpublic void retrieveArrays() {\n\t\tObjectSet result = db.queryByExample(new double[] { 0.6, 0.4 });\n\t\tlistResult(result);\n\n\t\t// Important note QBE does not work well with arrays\n\t\tassertEquals(0, result.size());\n\n\t}", "public static int simpleArraySum() { //(List<Integer> ar)\n \n Integer []ar = {1,2,3}; \n\n Integer sum =0;\n for(Integer i : ar){\n sum +=i;\n }\n return sum; \n }", "private static void arrayInserionTime() {\n\t\t String[] namesArray = new String[1000];\n\t\t \n\t long startTime = System.nanoTime();\n\t \n\t for (int i = 0; i < namesArray.length; i++)\n\t {\n\t namesArray[i] = \"Name\"+i;\n\t }\n\t \n\t long endTime = System.nanoTime(); \n\t \n\t System.out.println(\"Time taken by Array : \"+(endTime - startTime)/1000+\"us\");\n\t \n\t ArrayList<String> nameList = new ArrayList<String>(); \n\t \n\t startTime = System.nanoTime();\n\t \n\t for (int i = 0; i <= 1000; i++)\n\t {\n\t nameList.add(\"Name\"+i);\n\t }\n\t \n\t endTime = System.nanoTime();\n\t \n\t System.out.println(\"Time taken by ArrayList : \"+(endTime-startTime)/1000+\"us\");\n\n\t}", "void mo12207a(int[] iArr);", "private void arrayToCollection(String name, Collection<Object>lst, JSONArray jarr, Type ptype) throws Exception {\n\t\tCollectionType ctype = (CollectionType) ptype;\n\t\tString cname = lst.getClass().getSimpleName() + \": \" + name;\n\t\tfor(Object jsonObj : jarr) {\n\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\tif(obj!=null)\n\t\t\t\tlst.add(obj);\n\t\t}\n\t}", "int mo13159a(List<Log> list);", "public void arrayList(List<Student> list)\r\n\t{\r\n\t\tlist.add(s1);\r\n\t\tlist.add(s2);\r\n\t\tlist.add(s3);\r\n\t\tlist.add(s4);\r\n\t\tlist.add(s5);\r\n\t\tlist.add(s6);\r\n\t\tSystem.out.println(\"Objects of ArrayList\");\r\n\t\tfor(int i=0;i<list.size();i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(list.get(i));\r\n\t\t}\r\n\t}", "private void arraySize(MyArrayList list, Results results) {\r\n int size = -123;\r\n size = list.size();\r\n if(size != -123) {\r\n results.storeNewResult(\"ArraySize test case: PASSED\");\r\n }\r\n else {\r\n results.storeNewResult(\"ArraySize test case: FAILED\");\r\n }\r\n }", "public static void arrayListSubtypeTest()\r\n\t{\r\n\t\tArrayList<Person> persons = new ArrayList<Person>();\r\n\t persons.add(new Person(\"twoa\"));\r\n\t persons.add(new Person(\"threea\"));\r\n\t PrintCollection(persons);\r\n\t // PrintCollection1(persons);\r\n\t PrintCollection2(persons);\r\n\t}", "public boolean isArrayType()\n/* */ {\n/* 138 */ return true;\n/* */ }", "boolean m6609a(List<Log> list);", "public static void main(String args[]){\r\n Object objArray;\r\n \r\n \t Scanner input = new Scanner(System.in);\r\n \t // display on console enter file name\r\n \t System.out.println(\"Enter array list data separated by a comma - for example 1, 2, 3, 4 : \");\r\n\r\n \t input = new Scanner(System.in);\r\n Object arrayListInput = input.nextLine();\r\n \r\n // create instance of class ArrayList.java\r\n \t Arraylist arrayList = new Arraylist();\r\n\r\n \t // load input data into array list object\r\n \t arrayList.loadArrayList(arrayListInput);\r\n\r\n \t // determine if array list object is empty \t \r\n \t boolean arrayListEmpty = arrayList.isEmpty();\r\n \t \r\n \t System.out.println(\"Is the array list empty \" + arrayListEmpty);\r\n \r\n arrayList.add(\"10\"); \r\n \t System.out.println(\"Add object to array list\");\r\n \t \r\n objArray = arrayList.get(5);\r\n \t System.out.println(\"Get object from array list \");\r\n \r\n }", "private void updateEntityArray(ArrayList<Entity> array, GameContainer gc, StateBasedGame sb, int delta){\r\n \t\tfor(int i=0; i<array.size(); i++){\r\n \t\t\tarray.get(i).update(gc, sb, delta);\r\n \t\t\tif(array.get(i).getHealth() <= 0){\r\n \t\t\t\tarray.remove(i);\r\n \t\t\t\ti--;\r\n \t\t\t}\r\n \t\t}\r\n \t}", "private static String[] listToArray(List<String> list){\n\t\tString[] arr = new String[list.size()];\n\t\tfor (int i = 0; i < list.size(); i++){\n\t\t\t\n\t\t\tarr[i] = list.get(i);\n\t\t}\n\t\t\n\t\treturn arr;\n\t}", "@Test\n public void testSetAccountNumberArray() {\n System.out.println(\"setAccountNumberArray\");\n int[] accountNumberArray = {1, 2, 3, 4, 5, 6};\n AbstractMethod instance = new AbstractMethodImpl();\n instance.setAccountNumberArray(accountNumberArray);\n int[] result = instance.getAccountNumberArray();\n for (int r : result) {\n System.out.print(r);\n }\n assertArrayEquals(accountNumberArray, result);\n\n }", "static <T> T[] m59446a(Collection<?> collection, T[] tArr) {\n int size = collection.size();\n if (tArr.length < size) {\n tArr = m59448a(tArr, size);\n }\n m59444a((Iterable<?>) collection, (Object[]) tArr);\n if (tArr.length > size) {\n tArr[size] = null;\n }\n return tArr;\n }", "static Object[] m59445a(Collection<?> collection) {\n return m59444a((Iterable<?>) collection, new Object[collection.size()]);\n }", "private void m152570a(List<ByteBuffer> list) {\n synchronized (this.f113322u) {\n for (ByteBuffer byteBuffer : list) {\n m152578e(byteBuffer);\n }\n }\n }", "public void testGetArray() {\n System.out.println(\"getArray\"); // NOI18N\n \n TypeID type = new TypeID(TypeID.Kind.PRIMITIVE, \"javacode\");// NOI18N\n PropertyValue arrayPropertyValue = PropertyValue.createValue(primitveDescritor, type, DesignComponentTest.PROPERTY1_VALUE_STRING); // NOI18N\n List<PropertyValue> array = new ArrayList();\n \n array.add(arrayPropertyValue);\n \n PropertyValue result = PropertyValue.createArray(type,array);\n \n type = type.getArrayType();\n assertEquals(type,result.getType());\n assertNotNull(result.getArray());\n }", "@Test\n public void testReflectionArrayCycle() {\n final Object[] objects = new Object[1];\n objects[0] = objects;\n assertEquals(\n this.toBaseString(objects) + \"[{\" + this.toBaseString(objects) + \"}]\",\n ToStringBuilder.reflectionToString(objects));\n }", "public interface ExternalArrayData{\n /**\n * Return the element at the specified index. The result must be a type that is valid in JavaScript:\n * Number, String, or Scriptable. This method will not be called unless \"index\" is in\n * range.\n */\n Object getArrayElement(int index);\n\n /**\n * Set the element at the specified index. This method will not be called unless \"index\" is in\n * range. The method must check that \"value\" is a valid type, and convert it if necessary.\n */\n void setArrayElement(int index, Object value);\n\n /**\n * Return the length of the array.\n */\n int getArrayLength();\n}", "public abstract void startArray();", "void mo69875a(List<Aweme> list, boolean z);", "private Labels(ArrayMixedObject array) {\n\t\tthis.array = array != null ? array : new ArrayMixedObject();\n\t}", "@SuppressWarnings(\"unchecked\")\n\tprivate void growArray() {\n\t\tObject[] newList = new Object[size * 2];\n\t\tfor (int i = 0; i < size(); i++) {\n\t\t\tnewList[i] = get(i);\n\t\t}\n\t\tlist = (E[]) newList;\n\t\tsize *= 2;\n\t}", "private static ArrayList<String> transmit(String[] array){\n\n\t\tArrayList<String> ret= new ArrayList<String>();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tret.add(array[i]);\n\t\t}\n\t\treturn ret;\t\n\t}", "private static void printArray(ArrayList<Integer> list) {\n for (int i : list) {\n System.out.println(i * 3);\n }\n\n }", "private static final <R, C extends Collection<? super R>> C m64428a(@C6003d Object[] objArr, C c) {\n for (Object obj : objArr) {\n C14445h0.m62450a(3, \"R\");\n if (obj instanceof Object) {\n c.add(obj);\n }\n }\n return c;\n }", "public void Array(ArrayList<String> L, int round) {\r\n ArrayList<ArrayList<String>> currentArrays = new ArrayList<>();\r\n ArrayList<String> arrayItems = new ArrayList<>();\r\n ArrayList<String> betweenBrackets = new ArrayList<>();\r\n ArrayList<String> tempLexemes = new ArrayList<>();\r\n ArrayList<Integer> indexes = new ArrayList<>();\r\n int arrayCounter = -1;\r\n int arraySize;\r\n boolean similarSizes = true;\r\n String s = \"\";\r\n String tempHistoryString = \"\";\r\n\r\n if(L.contains(\"{\") || L.contains(\"}\")) {//It is an array\r\n for(int i = 0; i < L.size(); i++) {\r\n if(L.get(i).equals(\"{\")) {//If it's a massive\r\n indexes.add(i+1);//index = i+1;\r\n arrayCounter += 1;\r\n while(!L.get(indexes.get(arrayCounter)).equals(\"}\")) {\r\n betweenBrackets.add(L.get(indexes.get(arrayCounter)));\r\n L.remove((int)indexes.get(arrayCounter));\r\n }\r\n L.remove((int)indexes.get(arrayCounter));\r\n L.remove(indexes.get(arrayCounter)-1);\r\n currentArrays.add(betweenBrackets);\r\n betweenBrackets = new ArrayList<>();\r\n }\r\n }\r\n\r\n for (int a = 0; a < currentArrays.size(); a++) {//a = array (one of currentArrays)\r\n ArrayList<String> currentArray;// = new ArrayList<String>();\r\n currentArray = currentArrays.get(a);\r\n for(int i = 0; i < currentArray.size(); i++) {\r\n s += currentArray.get(i);\r\n if(currentArray.get(i).equals(\";\")) {\r\n s = s.substring(0, s.length()-1);\r\n arrayItems.add(s);\r\n s = \"\";\r\n }\r\n if(i == currentArray.size()-1) {\r\n arrayItems.add(s);\r\n s = \"\";\r\n }\r\n }\r\n currentArrays.set(a, arrayItems);\r\n arrayItems = new ArrayList<>();\r\n }\r\n\r\n //Todo: Check if arrays' sizes are not similar\r\n\r\n arraySize = currentArrays.get(0).size();\r\n for(int a = 1; a < currentArrays.size(); a++) {\r\n if(currentArrays.get(a).size() != arraySize) similarSizes = false;\r\n }\r\n\r\n if(similarSizes) {//Continue working\r\n int size = currentArrays.get(0).size();\r\n //Parse all elements in all arrays\r\n for(int i = 0; i < size; i++) {\r\n for(int a = 0; a < currentArrays.size(); a++) {\r\n ArrayList<String> lexemesOfArrayItem = new ArrayList<>();\r\n MakeListOfLexemes(currentArrays.get(a).get(i), lexemesOfArrayItem);\r\n ParsingSet(lexemesOfArrayItem);\r\n currentArrays.get(a).set(i, lexemesOfArrayItem.get(0));\r\n }\r\n }\r\n\r\n if(!lexemes.isEmpty()) for (int k = 0; k < lexemes.size(); k++)\r\n tempLexemes.add(lexemes.get(k));\r\n\r\n for (int a = 0; a < currentArrays.size(); a++) {\r\n tempLexemes.add(indexes.get(a)-1+a, currentArrays.get(a).get(0));\r\n }\r\n //Todo: tempHistoryString\r\n tempHistoryString = makeStringFromList(tempLexemes);\r\n ParsingSet(tempLexemes);\r\n String currentResult = tempLexemes.get(0);\r\n try {\r\n currentResult = Round(tempLexemes.get(0), round);\r\n } catch (Exception e) {\r\n //Some exceptions in Round()\r\n }\r\n arrayHistory.add(\"index: 0; \" + tempHistoryString + \" = \" + currentResult);\r\n arrayHistoryRaw.add(currentResult);\r\n tempLexemes.clear();\r\n\r\n for (int i = 1; i < size; i++) {\r\n if(!lexemes.isEmpty()) for (int k = 0; k < lexemes.size(); k++)\r\n tempLexemes.add(lexemes.get(k));\r\n for (int a = 0; a < currentArrays.size(); a++) {\r\n tempLexemes.add(indexes.get(a)-1+a, currentArrays.get(a).get(i));\r\n }\r\n tempHistoryString = makeStringFromList(tempLexemes);\r\n ParsingSet(tempLexemes);\r\n currentResult = tempLexemes.get(0);\r\n try {\r\n currentResult = Round(tempLexemes.get(0), round);\r\n } catch (Exception e) {\r\n //Some exceptions in Round()\r\n }\r\n arrayHistory.add(\"index: \" + i + \"; \" + tempHistoryString + \" = \" + currentResult);\r\n arrayHistoryRaw.add(currentResult);\r\n tempLexemes.clear();\r\n }\r\n } else {\r\n //An error occurred - not similar sizes!\r\n }\r\n } else {//It is not an array\r\n ParsingSet(L); //Compute as an expression without arrays\r\n }\r\n }", "private static double[] toArray(ArrayList<Double> dbls) {\n double[] r = new double[dbls.size()];\n int i = 0;\n for( double d:dbls ) r[i++] = d;\n return r;\n }", "@Test\n public void testSingleNestArray()\n {\n Object[] array = new Object[]{1, 2, new Object[]{3}, 4};\n testList = ArrayFlattener.flattenArray(array);\n assertArrayEquals(testList.toArray(new Integer[testList.size()]), flat);\n }" ]
[ "0.6314695", "0.5955245", "0.5948963", "0.5936591", "0.5853402", "0.5823617", "0.57940286", "0.5762017", "0.5694028", "0.5684203", "0.56769705", "0.5663458", "0.5658288", "0.5645372", "0.56433153", "0.5642253", "0.5631178", "0.56076866", "0.5571578", "0.55695945", "0.5539182", "0.5525712", "0.5519385", "0.55103487", "0.54845107", "0.5476531", "0.5476026", "0.5475807", "0.5474248", "0.5461206", "0.5458373", "0.5430069", "0.5417858", "0.54138356", "0.5413522", "0.5406536", "0.54037136", "0.54036576", "0.5396937", "0.5394395", "0.5394189", "0.537106", "0.5369863", "0.5364271", "0.53630054", "0.5355321", "0.53404593", "0.53359705", "0.5327658", "0.53241795", "0.5311678", "0.53103805", "0.529156", "0.52897096", "0.5289288", "0.5288248", "0.5284362", "0.52838874", "0.5280515", "0.52804565", "0.52766573", "0.5270299", "0.52699465", "0.52671504", "0.5264314", "0.5257645", "0.5233381", "0.5233023", "0.52287424", "0.5225297", "0.5225295", "0.5222139", "0.5221329", "0.52207327", "0.52135825", "0.5209279", "0.5204757", "0.5195935", "0.5191181", "0.51893836", "0.51854515", "0.51838714", "0.5182617", "0.5181971", "0.5181347", "0.51799655", "0.5179606", "0.5179321", "0.5173318", "0.51725924", "0.51724446", "0.51700795", "0.5169287", "0.5166987", "0.5163186", "0.515857", "0.51562685", "0.5156057", "0.5153488", "0.515241", "0.5145569" ]
0.0
-1
/ The methods below return all events sorted by various parameters (TODO comparators not implemented yet)
AbstractList<Event> getEventByCreateDate(Date d){ return events; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sortEvents() {\n\t\tCollections.sort(events);\n\t}", "public static void sortEvents(){\n if(events.size()>0){\n Comparator<Event> comp = new Comparator<Event>(){\n public int compare(Event e1, Event e2){\n if(e1.getEventStartTime().before(e2.getEventStartTime())){\n return -1;\n }\n else if(e1.getEventStartTime().after(e2.getEventStartTime())){\n return 1;\n }\n else{\n return 0;\n }\n }\n \n };\n Collections.sort(events, comp);\n \n }}", "public static void printAllEventListInSortedOrder(){\n sortEvents();\n for(int i=0;i<events.size();i++){\n System.out.println((events.get(i).getMonth()+1)+\"/\"+events.get(i).getDate()+\"/\"+events.get(i).getYear()+\" \"+events.get(i).getStringStartandFinish()+\" \"+events.get(i).getEventTitle());\n }\n }", "public void sortEventsByTime() {\n for (OrgEvent event : events) {\n event.setCompareByTime(true);\n }\n Collections.sort(events);\n }", "default List<Event> sort(List<Event> events, Comparator<Event> cmp) {\n\t\tCollections.sort(events, cmp);\n\t\treturn events;\n\t}", "private static SortedEventList sortEvents(LinkedList<Event> events) {\n\t\tSortedEventList sorted = new SortedEventList(); // Creates a new SortedEventList.\n\t\tfor (Event event : events) { // Iterates foreach Event.\n\t\t\tsorted.insertInOrder(event); // Adds the Event into the new SortedEventList.\n\t\t}\n\t\treturn sorted; // Returns the SortedEventList.\n\t}", "public void sortEventsByValue() {\n for (OrgEvent event : events) {\n event.setCompareByTime(false);\n }\n Collections.sort(events);\n }", "public String arrangeEvents() throws Exception {\n JSONArray scheduledEventList = calObj.retrieveEvents(\"primary\").getJSONArray(\"items\");\n JSONArray unScheduledEventList = calObj.retrieveEvents(this.user.getCalId()).getJSONArray(\"items\");\n\n //Filter events for this week\n\n\n //Make a list of all events\n\n //Prioritise all unscheduled events\n\n\n //Send the list to client to display\n String events = \"\";\n for (int i = 0; i < scheduledEventList.length(); i++) {\n org.json.JSONObject jsonLineItem = scheduledEventList.getJSONObject(i);\n events += jsonLineItem.getString(\"summary\") + \" \" + jsonLineItem.getJSONObject(\"start\").getString(\"dateTime\") + \"\\n\";\n }\n // Unscheduled events set in bot created aPAS calendar\n for (int i = 0; i < unScheduledEventList.length(); i++) {\n org.json.JSONObject jsonLineItem = unScheduledEventList.getJSONObject(i);\n events += jsonLineItem.getString(\"summary\") + \" \" + jsonLineItem.getJSONObject(\"start\").getString(\"dateTime\") + \"\\n\";\n }\n return events;\n }", "protected void sort(@NotNull ArrayList<Event<?>> events) {\n\t\tevents.sort(new Comparator<Event<?>>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Event<?> e1, Event<?> e2) {\n\t\t\t\tif (e1.getEnd() < e2.getStart())\n\t\t\t\t\treturn -1;\n\t\t\t\telse\n\t\t\t\t\treturn 1;\n\t\t\t}\n\t\t});\n\t\tsnap(this.events);\n\t}", "public ArrayList<Event> sortByDate() {\n\t\tArrayList<Event>calendarSortedByDate = new ArrayList();\n\t\tfor(int j = 0; j<calendar.size(); j++) {\n\t\t\tcalendarSortedByDate.add(calendar.get(j));\n\t\t\t\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < calendarSortedByDate.size() - 1; i++) {\n\t\t // Find the minimum in the list[i..list.size-1]\n\t\t Event currentMin = calendarSortedByDate.get(i);\n\t\t int currentMinIndex = i;\n\n\t\t for (int j = i + 1; j < calendarSortedByDate.size(); j++) {\n\t\t if (currentMin.compareDate​(calendarSortedByDate.get(j)) > 0) {\n\t\t currentMin = calendarSortedByDate.get(j);\n\t\t currentMinIndex = j;\n\t\t }\n\t\t }\n\n\t\t // Swap list[i] with list[currentMinIndex] if necessary;\n\t\t if (currentMinIndex != i) {\n\t\t \t calendarSortedByDate.set(currentMinIndex, calendarSortedByDate.get(i));\n\t\t \t calendarSortedByDate.set(i, currentMin);\n\t\t }\n\t\t }\n\t\treturn calendarSortedByDate;\n\t}", "public PriorityQueue<Event> getEventList() {\n return new PriorityQueue<Event>(eventsList);\n }", "@Test\n\tpublic void testAssociatorSort() throws Exception {\n\t\t// add out of order to events list\n\t\tJsonEventInfoComparatorTest comparatorTest = new JsonEventInfoComparatorTest();\n\t\tcomparatorTest.setup();\n\t\ttestService.events.add(comparatorTest.farEvent);\n\t\ttestService.events.add(comparatorTest.fartherEvent);\n\t\ttestService.events.add(comparatorTest.closeEvent);\n\n\t\tJsonEventInfo reference = new JsonEventInfo(comparatorTest.referenceEvent);\n\t\tList<JsonEventInfo> sorted = testAssociator.getSortedNearbyEvents(\n\t\t\t\treference, null);\n\t\tAssert.assertEquals(\"closest event first\",\n\t\t\t\tcomparatorTest.closeEvent, sorted.get(0).getEvent());\n\t\tAssert.assertEquals(\"farther event last\",\n\t\t\t\tcomparatorTest.fartherEvent,\n\t\t\t\tsorted.get(testService.events.size() - 1).getEvent());\n\n\t\tSystem.err.println(testAssociator.formatOutput(reference, null, sorted));\n\t}", "public List<ServiceEvent> genEventQueue(){\n for(int i=0; i<serviceNum; i++){\n genEvent(i);\n }\n Collections.sort(eventQueue, new EventComparator());\n return eventQueue;\n }", "public void setEvents(Event[] event) {\n\n setEventID(event[0].getEventID());\n\n //Store keys as EventID for later use to put it all in order\n Map<String, ArrayList<Event>> listMap = new HashMap<>();\n\n for (int i = 0; i < event.length; i++) {\n\n events.put(event[i].getEventID(), event[i]);\n eventTypes.add(event[i].getEventType().toLowerCase());\n\n if(!listMap.containsKey(event[i].getPersonID())) {\n ArrayList<Event> newEventList = new ArrayList<>();\n listMap.put(event[i].getPersonID(), newEventList);\n }\n listMap.get(event[i].getPersonID()).add(event[i]);\n }\n\n // Chronologically order for events\n for (String key : listMap.keySet()) {\n Set birthSet = new HashSet<>(); // birth events come first\n Set deathSet = new HashSet<>(); // death events come last (obviously)\n ArrayList<Event> eventList = new ArrayList<Event>();\n\n // Adding events in chronological order based on events\n for(int i = 0; i < listMap.get(key).size(); i++) {\n Event currEvent = listMap.get(key).get(i);\n\n if(currEvent.getEventType().toLowerCase().equals(\"birth\")) {\n birthSet.add(currEvent);\n } else if (currEvent.getEventType().toLowerCase().equals(\"death\")) {\n deathSet.add(currEvent);\n } else { // get events by year and sort them\n if(eventList.size() > 0) {\n if (currEvent.getYear() < eventList.get(0).getYear()) {\n eventList.add(0, currEvent);\n } else if (currEvent.getYear() >= eventList.get(eventList.size() - 1).getYear()) {\n eventList.add(currEvent);\n } else {\n for (int j = 0; j < eventList.size() - 1; j++) {\n if(eventList.get(j).getYear() <= currEvent.getYear() && eventList.get(j + 1).getYear() > currEvent.getYear()) {\n eventList.add(j + 1, currEvent);\n }\n }\n }\n } else {\n eventList.add(currEvent);\n }\n }\n }\n\n ArrayList<Event> orderedList = new ArrayList<Event>(); // will store ordered list for events\n\n orderedList.addAll(birthSet);\n orderedList.addAll(eventList);\n orderedList.addAll(deathSet);\n\n personEvents.put(key, orderedList);\n }\n }", "private List grepTopLevelEvents(Collection events) throws Exception {\n\t // Grep all events that are contained by other events\n\t Set containedEvents = new HashSet();\n\t GKInstance event = null;\n\t for (Iterator it = events.iterator(); it.hasNext();) {\n\t event = (GKInstance) it.next();\n\t if (event.getSchemClass().isValidAttribute(ReactomeJavaConstants.hasEvent)) {\n\t List components = event.getAttributeValuesList(ReactomeJavaConstants.hasEvent);\n\t if (components != null && components.size() > 0) { \n\t for (Iterator it1 = components.iterator(); it1.hasNext();) {\n\t GKInstance tmp = (GKInstance) it1.next();\n\t Boolean dnr = (Boolean) tmp.getAttributeValue(DO_NOT_RELEASE);\n\t if (dnr != null && !dnr.booleanValue())\n\t containedEvents.add(tmp);\n\t }\n\t }\n\t }\n\t }\n\t List topEvents = new ArrayList(events);\n\t topEvents.removeAll(containedEvents);\n\t return topEvents;\n\t}", "public Observable getEvents(){\n QBRequestGetBuilder requestBuilder = new QBRequestGetBuilder();\n requestBuilder.sortDesc(\"startDate\");\n return makeObservable(requestBuilder);\n }", "public static void eventList() {\n\t\tfor (Map.Entry<Calendar, TreeSet<Event>> entry : calendarToEvent.entrySet()) {\n\t\t\tTreeSet<Event> value = entry.getValue();\n\t\t\tfor (Event e: value) {\n\t\t\t\tSystem.out.println(e.toString());\n\t\t\t}\n\t\t}\n\t}", "public interface EventStore extends EventSource, EventSink {\n\n\t/**\n\t * Sorts the the events with the provided comparator.\n\t * \n\t * @param events\n\t * the events to be sorted\n\t * @return the sorted events\n\t */\n\tdefault List<Event> sort(List<Event> events, Comparator<Event> cmp) {\n\t\tCollections.sort(events, cmp);\n\t\treturn events;\n\t}\n\n}", "public List<SortedArrayInfo> sortHistory();", "@Override\r\n\tpublic List<Evento> listarDisponivelPorDataAsc() {\n\t\treturn repository.findByFimAfterToday(sortByInicioAsc());\r\n\t}", "public int compareTo(Event other){\n return other.timestamp.compareTo(timestamp);\n }", "IEvent[] getEvents();", "public List<Event> getEvents() {\n List<Event> events = new ArrayList<>();\n\n Query query = new Query(\"Event\");\n PreparedQuery results = datastore.prepare(query);\n\n for (Entity entity : results.asIterable()) {\n try {\n String idString = entity.getKey().getName();\n UUID eventId = UUID.fromString(idString);\n String speaker = (String) entity.getProperty(\"speaker\");\n String organization = (String) entity.getProperty(\"organization\");\n String eventDate = (String) entity.getProperty(\"eventDate\");\n Location location = (Location) entity.getProperty(\"location\");\n List<String> amenities = getAmenities(eventId);\n String externalLink = (String) entity.getProperty(\"externalLink\");\n PublicType publicType = (PublicType) entity.getProperty(\"publicType\");\n long ownerId = (long) entity.getProperty(\"ownerId\");\n List<ThreadComment> thread = getThread(eventId);\n // long timeStamp = (long) entity.getProperty(\"timestamp\");\n\n Event event = new Event(eventId, speaker, organization, eventDate, location, amenities, externalLink,\n publicType, ownerId);\n event.copyThread(thread);\n events.add(event);\n // An exception can occur here for multiple reasons (Type casting error, any\n // property not existing, key error, etc...)\n } catch (Exception e) {\n System.err.println(\"Error reading event.\");\n System.err.println(entity.toString());\n e.printStackTrace();\n }\n }\n\n return events;\n }", "public List getReleasedTopLevelEvents() {\n Collection releasedEvents = getReleasedEvents();\n try {\n return grepTopLevelEvents(releasedEvents);\n }\n catch (Exception e) {\n System.err.println(\"EventReleaseCheckPane.getReleaseTopLevelEvents(): \" + e);\n e.printStackTrace();\n }\n return new ArrayList();\n }", "@Override\r\n\t\tpublic int compareTo(Event compareEvent){\r\n\t\t\t\r\n\t\t\tint compareQuantity = ((Event)compareEvent).date;\r\n\t\t\t//ascending order\r\n\t\t\treturn this.date-compareQuantity;\r\n\t\t\t//descending order\r\n\t\t\t//return compareQuantity -this.quantity;\r\n\t\t}", "public ArrayList<String> sort(ArrayList<String> eventIdsList){\n ArrayList<Event> eventList2 = new ArrayList<>();\n for (String id : eventIdsList){\n eventList2.add(getEvent(id));\n }\n Collections.sort(eventList2, Comparator.comparing(Event::getStartTime));\n ArrayList<String>sorted = new ArrayList<>();\n for (Event t : eventList2){\n sorted.add(t.getEventId());\n }\n return sorted;\n }", "@Override\n\t\tpublic int compareTo(Event other) {\n\t\t\tif (this.time < other.time + 1.0e-9) return -1;\n\t\t\telse if (this.time > other.time - 1.0e-9) return 1;\n\t\t\telse {\n\t\t\t\tif(this.active > other.active) return 1;\n\t\t\t\telse return -1;\n\t\t\t}\n\t\t}", "public abstract Event[] getInitialEvents();", "public ArrayList<Event> getEvents(){return new ArrayList<Event>(events);}", "@Override\n\tpublic int getOrder() {\n\t\treturn CoreEvent.DEFAULT_ORDER - 1;\n\t}", "public void sortAppointments() {\n reminders = sort(reminders);\n followup = sort(followup);\n }", "private List<String> getDataFromApi() throws IOException {\n // List the next 10 events from the primary calendar.\n DateTime now = new DateTime(System.currentTimeMillis());\n List<String> eventStrings = new ArrayList<String>();\n Events events = mService.events().list(\"primary\")\n .setMaxResults(10)\n .setTimeMin(now)\n .setOrderBy(\"startTime\")\n .setSingleEvents(true)\n .execute();\n List<Event> items = events.getItems();\n\n for (Event event : items) {\n DateTime start = event.getStart().getDateTime();\n if (start == null) {\n // All-day events don't have start times, so just use\n // the start date.\n start = event.getStart().getDate();\n }\n eventStrings.add(\n String.format(\"%s (%s)\", event.getSummary(), start));\n }\n return eventStrings;\n }", "public List<Events> getAllSystemEventsListForAll();", "void updateSortingComparators(Comparator<ReadOnlyEntry> eventComparator,\n Comparator<ReadOnlyEntry> deadlineComparator,\n Comparator<ReadOnlyEntry> floatingTaskComparator);", "public abstract Map<String, Event> getEvents();", "public EventList getEvents(String userName) {\n try {\n PreparedStatement s = sql.prepareStatement(\"SELECT userId, eventName, startMonth, startDay, startYear, startHour, startMinute\" +\n \", endMonth, endDay, endYear, endHour, endMinute FROM Events WHERE userId=?\");\n s.setInt(1, getIdOfUser(userName));\n s.execute();\n ResultSet results = s.getResultSet();\n\n EventList events = new EventList();\n if (!results.isBeforeFirst()) {\n return events;\n }\n\n while (!results.isLast()) {\n results.next();\n Event e = new Event(userName, results.getString(2),\n results.getInt(3), results.getInt(4), results.getInt(5),\n results.getInt(6), results.getInt(7), results.getInt(8),\n results.getInt(9), results.getInt(10), results.getInt(11),\n results.getInt(12));\n events.add(e);\n }\n results.close();\n s.close();\n events.sort();\n\n return events;\n } catch (SQLException e) {\n System.err.println(\"SQLE\");\n sqlException(e);\n return null;\n }\n }", "@Override\n public int compareTo(Event e) {\n\n if(this.getAllDay() && !e.getAllDay()){\n return -1;\n }\n\n else if(e.getAllDay() && !this.getAllDay()){\n return 1;\n }\n\n else if(this.getAllDay() && e.getAllDay()){\n return 0;\n }\n\n else {\n int event1 = parseTime(this.getStartTime());\n int event2 = parseTime(e.getStartTime());\n\n if(event1 - event2 < 0){\n return -1;\n }\n\n else if(event1 - event2 > 0){\n return 1;\n }\n\n else {\n return 0;\n }\n }\n }", "FutureEventList() {\n q = new PriorityQueue<Event>(10, new EventComperator());\n }", "private Collection getReleasedEvents() {\n Set events = new HashSet();\n Collection topEvents = eventPane.getTopLevelEvents();\n Set current = new HashSet();\n current.addAll(topEvents);\n Set next = new HashSet();\n GKInstance event = null;\n List values = null;\n Boolean dnr = null;\n try {\n while (current.size() > 0) {\n for (Iterator it = current.iterator(); it.hasNext();) {\n event = (GKInstance) it.next();\n dnr = (Boolean) event.getAttributeValue(DO_NOT_RELEASE);\n if (dnr != null && !dnr.booleanValue())\n events.add(event);\n if (event.getSchemClass().isValidAttribute(\"hasComponent\")) {\n values = event.getAttributeValuesList(\"hasComponent\");\n if (values != null)\n next.addAll(values);\n }\n if (event.getSchemClass().isValidAttribute(\"hasInstance\")) {\n values = event.getAttributeValuesList(\"hasInstance\");\n if (values != null)\n next.addAll(values);\n }\n }\n current.clear();\n current.addAll(next);\n next.clear();\n }\n }\n catch(Exception e) {\n System.err.println(\"EventReleaseCheckPane.getReleasedEvents(): \" + e);\n e.printStackTrace();\n }\n return events;\n }", "@ApiOperation(\"Listar eventos em ordem crescente de data.\")\n\t@GetMapping(\"/data/asc\")\n\tpublic ResponseEntity<List<Evento>> dataAsc() {\n\t\treturn ResponseEntity.status(HttpStatus.OK).body(eventoservices.dataAsc());\n\t}", "@Override\n public int compare(Event o1, Event o2) {\n char[] event1 = o1.getEvent().toCharArray();\n char[] event2 = o2.getEvent().toCharArray();\n\n int i = 0; // Intiialize counter variable i\n\n while (i < event1.length && i < event2.length) // We reached the end, stop\n {\n if (event1[i] - event2[i] == 0) /* if the two elements are the same, tells us nothing about difference */\n {\n i++; // Keep going\n }\n\n else if (event1[i] - event2[i] < 0) // If true, this->str[i] comes first\n {\n return -1; // Return -1 for sorting\n }\n\n else if (event1[i] - event2[i] > 0) // If true,argStr.str[i] comes first\n {\n return 1;\n }\n }\n\n if (event1.length < event2.length)\n {\n return -1;\n }\n\n else if (event1.length > event2.length)\n {\n return 1;\n }\n\n else\n {\n return 0;\n }\n\n }", "public GameEvent[] getEvents();", "public int compareTo(Event e)\n { \n int x =eventName.compareToIgnoreCase(e.eventName);\n if (x != 0 )\n return x;\n else return 0;\n \n }", "public List<EventDesc> getEvents()\r\n {\r\n return Collections.unmodifiableList(events);\r\n }", "private static void sortEventsByTokenIndex(Row row) {\n Collections.sort(row.getEvents(), new Comparator<GridEvent>() {\n @Override\n public int compare(GridEvent o1, GridEvent o2) {\n if (o1 == o2) {\n return 0;\n }\n if (o1 == null) {\n return -1;\n }\n if (o2 == null) {\n return +1;\n }\n\n return ((Integer) o1.getLeft()).compareTo(o2.getLeft());\n }\n });\n }", "public List<InputEvent> getEvents() {\n return new ArrayList<>(events);\n }", "public Cursor getAllItems() {\n\t\treturn db.query(TABLE_EVENTS, new String[] { ROW_ID, ROW_TITLE,ROW_INFO, ROW_DATE, ROW_TIME, ROW_DATETIME,\n\t\t\tROW_REPEAT,ROW_REPEAT_TEXT, ROW_REPEAT_CNT,ROW_REPEAT_TYPE_ID,ROW_REPEAT_TYPE_TEXT,\n\t\t\tROW_BEFORE,ROW_BEFORE_TEXT, ROW_BEFORE_CNT,ROW_BEFORE_TYPE_ID,ROW_BEFORE_TYPE_TEXT,\n\t\t\t\t\t\t\tROW_ACTIVE }, null, null, null, null, ROW_DATETIME+\" asc\");\n\t}", "List<Event> findAllBy();", "AbstractList<Event> getEventByName(String eventName) {\r\n\t\treturn events;\r\n\t}", "public static void main(String[] args) {\n\t\tList<StatetostateDetail> list = new ArrayList<StatetostateDetail>();\n\t\tfor(int i = 1; i < 16; i++){\n\t\t\tStatetostateDetail s = new StatetostateDetail();\n\t\t\ts.setId(i);\n\t\t\ts.setStatue(0);\n\t\t\ts.setTime(System.currentTimeMillis() + (i + i * 100));\n\t\t\tlist.add(s);\n\t\t}\n\t\tlist.get(3).setStatue(1);\n\t\tlist.get(5).setStatue(1);\n\t\tlist.get(10).setStatue(1);\n\t\tlist.get(14).setStatue(1);\n\t\tlist.get(7).setStatue(2);\n\t\tlist.get(9).setStatue(2);\n\t\tSystem.out.println(\"list:\" + list);\n\t\n\t\t\n\t\tCollections.sort(list, new Comparator<StatetostateDetail>(){\n public int compare(StatetostateDetail s1, StatetostateDetail s2) {\n \tLong t1 = null;\n \tLong t2 = null;\n \ttry{\n \t\tt1 = s1.getTime();\n\t \tt2 = s2.getTime();\n \t}catch(Exception e){\n \t\te.printStackTrace();\n \t}\n \n return t2.compareTo(t1);\n }\n });\n\t\tCollections.sort(list, new Comparator<StatetostateDetail>(){\n public int compare(StatetostateDetail s1, StatetostateDetail s2) {\n \treturn s1.getStatue()>s2.getStatue()?1:(s1.getStatue()==s2.getStatue()?0:(s2.getTime()>s1.getTime()?-1:0));\n }\n });\n\t\t\n\t\tSystem.out.println(\"list:\" + list);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "static Map<Integer, Event> getEvents() {\n\t\treturn events;\n\t}", "@WebMethod public List<Event> getAllEvents();", "private List<Event> generateEvents() {\n\t\tList<Event> events = new ArrayList<Event>();\n\t\tint numEvents = random.nextInt(2) + 1;\n\t\tfor (int i = 0; i < numEvents; i++) {\n\t\t\tEvent newEvent = null;\n\t\t\tdo {\n\t\t\t\tnewEvent = new Event(db);\n\t\t\t} while (events.contains(newEvent)); // make sure only one instance of an event occurs per turn\n\t\t\tevents.add(newEvent);\t\t\t\n\t\t}\n\t\treturn events;\n\t}", "@Path(\"/showAll\")\n\t@GET\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic List<EventData> getAllEvent() throws JSONException {\n\t\tString today_frm = DateUtil.getNow(DateUtil.SHORT_FORMAT_TYPE);\n\t\tList<Event> list = eventService.getEventsByType(today_frm,\n\t\t\t\tEventType.EVENTTODAY);\n\t\tList<EventData> d = null;\n\t\tif (null != list && list.size() > 0) {\n\t\t\td = getEventsByDateList(list);\n\t\t} else {\n\t\t\td = new ArrayList<EventData>();\n\t\t}\n\t\treturn d;\n\t}", "ArrayList<HabitEvent> getHabitEvents();", "public void listReceivedEvents() {\r\n for (Event event : receivedEvents) {\r\n System.out.print(event);\r\n }\r\n }", "private ArrayList<Task> sortByDate(ArrayList<Task> toSort) {\n ArrayList<Task> sorted = new ArrayList<>();\n\n toSort = removeNoTimeTask(toSort);\n\n int size = toSort.size();\n for (int i = 0; i < size; i++) {\n Date earliest = new Date(Long.MAX_VALUE);\n int earliestIndex = -1;\n for (int j = 0; j < toSort.size(); j++) {\n if (toSort.get(j).getClass().equals(Deadline.class)) {\n Deadline temp = (Deadline) toSort.get(j);\n if (temp.getTime().before(earliest)) {\n earliest = temp.getTime();\n earliestIndex = j;\n }\n } else if (toSort.get(j).getClass().equals(Event.class)) {\n Event temp = (Event) toSort.get(j);\n if (temp.getTime().before(earliest)) {\n earliest = temp.getTime();\n earliestIndex = j;\n }\n } else if (toSort.get(j).getClass().equals(Period.class)) {\n Period temp = (Period) toSort.get(j);\n if (temp.getStart().before(earliest)) {\n earliest = temp.getStart();\n earliestIndex = j;\n }\n }\n }\n\n sorted.add(toSort.get(earliestIndex));\n toSort.remove(earliestIndex);\n }\n return sorted;\n }", "private void listEvents() {\n System.out.println(\"\\nEvents:\");\n for (Event event: world.getEvents()) {\n String name = event.getName();\n String coords = \" with x = \" + event.getX() + \" light seconds and t = \" + event.getTime() + \" seconds \";\n String frame = \"in \" + event.getFrame().getName() + \".\";\n System.out.println(name + coords + frame);\n }\n }", "public String showAllEvents() {\n String allEvents = \"\";\n for (Event e: events)\n {\n allEvents = allEvents + e.getName() + \"\\n\";\n }\n return allEvents;\n }", "static HistoryEvent[] getHistoryEvents() {\n/* 73 */ HISTORY_RW_LOCK.readLock().lock();\n/* */ \n/* */ try {\n/* 76 */ return HISTORY.<HistoryEvent>toArray(new HistoryEvent[HISTORY.size()]);\n/* */ }\n/* */ finally {\n/* */ \n/* 80 */ HISTORY_RW_LOCK.readLock().unlock();\n/* */ } \n/* */ }", "public List<KeyEvent> getKeyEvents() {\n synchronized (this) {\n int len = keyEvents.size();\n for (int i = 0; i < len; i++) {\n keyEventPool.free(keyEvents.get(i));\n }\n keyEvents.clear();\n keyEvents.addAll(keyEventsBuffer);\n keyEventsBuffer.clear();\n return keyEvents;\n }\n }", "public ArrayList<Question> getQuestionsSortedByDate() {\n \t\tArrayList<Question> sortedQuestions = this.getQuestions();\n \n \t\tCollections.sort(sortedQuestions, new DateComparator());\n \n \t\treturn sortedQuestions;\n \t}", "ArrayList<HabitEvent> getHabitEvents(Habit forHabit);", "@Override\n\tpublic Set<Event> getEvents() {\n return events;\n }", "@Override\n protected List<String> getFieldOrder() {\n ArrayList<String> FieldOrder=new ArrayList<>();\n FieldOrder.add(\"eventId\");\n FieldOrder.add(\"timestamp\");\n FieldOrder.add(\"type\");\n FieldOrder.add(\"username\");\n FieldOrder.add(\"fullMessage\");\n return FieldOrder;\n }", "private static void sortingArrayList() {\n Collections.sort(allMapData, new Comparator<MapDataModel>() {\n public int compare(MapDataModel d1, MapDataModel d2) {\n return valueOf(d1.getDateTime().compareTo(d2.getDateTime()));\n }\n });\n }", "private static SortedEventList fetchEvents(BufferedReader br) throws Exception {\n\t\t// Instantiates a new LinkedList<Event> object.\n\t\tLinkedList<Event> events = new LinkedList<Event>();\n\t\t// The first line should be an Integer value representing how many Events are in the file.\n\t\tint records = Integer.parseInt(br.readLine().trim());\n\t\t// Once the value is determined, it will then iterate until the records amount is reached.\n\t\tfor (int i = 0; i < records; i++) {\n\t\t\t// It will split each read line on the comma.\n\t\t\tString[] values = br.readLine().trim().split(COMMA);\n\t\t\t// Instantiate a new Event passing in the athlete's name and country code.\n\t\t\t// It will then add the instance to the LinkedList<Event>.\n\t\t\tevents.append(new Event(values[0], values[1]));\n\t\t}\n\t\tfor (int i = 0; i < 6; i++) { // It will iterate 6 times for each attempt.\n\t\t\tfor (Event event : events) { // It will iterate through each Event object in the LinkedList.\n\t\t\t\t// It will then convert the String value to a double, and add it to the event using the addAttempt method.\n\t\t\t\tevent.addAttempt(Double.parseDouble(br.readLine().trim()));\n\t\t\t}\n\t\t}\n\t\t// Passes the LinkedList<Event> into the sortEvents method which will\n\t\t// instantiate a new SortedEventList and iterate through the events inserting each one in order.\n\t\treturn sortEvents(events); // Returns the SortedEventList.\n\t}", "void parseEventList() {\n\t\tfor (int eventsId : events.keySet()) {\n\t\t\tfinal Event event = events.get(eventsId);\n\t\t\tif (users.get(event.getUser().getName()).isActiveStatus()\n\t\t\t\t\t&& !event.isViewed()\n\t\t\t\t\t&& event.getInnerSisdate().compareTo(\n\t\t\t\t\t\t\tnew GregorianCalendar()) >= 0) {\n\t\t\t\tevent.setViewed(true);\n\t\t\t\tfinal SimpleDateFormat fm = new SimpleDateFormat(\n\t\t\t\t\t\t\"dd.MM.yyyy-HH:mm:ss\");\n\t\t\t\tt.schedule(new TimerTask() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tif (event.isActive()) {\n\t\t\t\t\t\t\tgenerateEventMessage(\"User \"\n\t\t\t\t\t\t\t\t\t+ event.getUser().getName()\n\t\t\t\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t\t\t\t+ fm.format(event.getInnerSisdate()\n\t\t\t\t\t\t\t\t\t\t\t.getTime()) + \" \" + event.getText());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, event.getInnerSisdate().getTime());\n\n\t\t\t}\n\t\t}\n\n\t}", "ObservableList<ReadOnlyEvent> getFilteredEventList();", "public AbstractList<Event> getEvents() {\r\n\t\treturn (AbstractList<Event>) events;\r\n\t}", "List<Event> getAllEventsByTitle(String title);", "private List<Event> getEventsOnDate(Date date) {\r\n List<Event> eventsOnDate = new ArrayList<>();\r\n for (Event event : this.events) {\r\n if (event.getDate().equals(date)) {\r\n eventsOnDate.add(event);\r\n }\r\n }\r\n\r\n return eventsOnDate;\r\n }", "public static List<Events> retrieveEvents() {\n Connection conn = null;\n PreparedStatement stmt = null;\n ResultSet rs = null;\n String sql = \"\";\n List<Events> results = new ArrayList<>();\n\n try {\n conn = ConnectionManager.getConnection();\n\n sql = \"SELECT eventID, eventName, eventDate, eventOwner, eventPriority, eventDeadline, eventProcessStatus, eventLocation, comments FROM \" + TBLNAME;\n stmt = conn.prepareStatement(sql);\n\n rs = stmt.executeQuery();\n\n while (rs.next()) {\n //Retrieve by column name\n String eventID = rs.getString(\"eventID\");\n String eventName = rs.getString(\"eventName\");\n Date eventDate = rs.getDate(\"eventDate\");\n String eventOwner = rs.getString(\"eventOwner\");\n String eventPriority = rs.getString(\"eventPriority\");\n Date eventDeadline = rs.getDate(\"eventDeadline\");\n String eventProcessStatus = rs.getString(\"eventProcessStatus\");\n String eventLocation = rs.getString(\"eventLocation\");\n String comments = rs.getString(\"comments\");\n\n Events obj = new Events(eventID, eventName, eventDate, eventOwner, eventPriority, eventDeadline, eventProcessStatus, eventLocation, comments);\n results.add(obj);\n }\n\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n } finally {\n ConnectionManager.close(conn, stmt, rs);\n\n }\n return results;\n }", "private static ArrayList<Quest> sortAfterTimestamp(ArrayList<Quest> questListToSort) {\n\t\tfor (int i = 0; i < questListToSort.size() - 1; i++) {\n\t\t\tint index = i;\n\t\t\tfor (int j = i + 1; j < questListToSort.size(); j++) {\n\t\t\t\tif (questListToSort.get(j).getTimestamp() > questListToSort.get(index).getTimestamp()) {\n\t\t\t\t\tindex = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tCollections.swap(questListToSort, index, i);\n\t\t}\n\t\treturn questListToSort;\n\t}", "public void sort(){\n listOperation.sort(Comparator.comparingInt(Operation::getiStartTime));\n }", "public ArrayList<FbEvent> getOngoingEvents() throws SQLException {\n\t\tArrayList<FbEvent> events = new ArrayList<FbEvent>();\n\t\tSQLiteDatabase db = tableHelper.getReadableDatabase();\n\t\ttry {\n\t\t\tCursor cursor = db.query(SQLTablesHelper.MY_EVENT_TABLE_NAME, columns,\n\t\t\t\t\tSQLTablesHelper.MY_EVENT_START_TIME + \" >= ?\",\n\t\t\t\t\tnew String[] {String.valueOf(TimeFrame.getUnixTime(TimeFrame.getTodayDate()))}, \n\t\t\t\t\tnull, null, null);\n\t\t\tcursor.moveToFirst();\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tFbEvent event = cursorToEvent(cursor);\n\t\t\t\tevents.add(event);\n\t\t\t\tcursor.moveToNext();\n\t\t\t}\n\t\t\tcursor.close();\n\t\t} finally {\n\t\t\tdb.close();\n\t\t}\n\t\treturn events;\n\t}", "@Test\r\n public void testGetShapesSortedByTimestamp() {\r\n List<Shape> expectedOutput = new ArrayList<Shape>();\r\n expectedOutput.add(circle);\r\n expectedOutput.add(square);\r\n expectedOutput.add(rectangle);\r\n expectedOutput.add(triangle);\r\n expectedOutput.add(regularPolygon);\r\n List<Shape> actualOutput = screen.sortShape(SortType.TIMESTAMP);\r\n assertEquals(expectedOutput, actualOutput);\r\n }", "private void prepareData() {\n eventList = databaseHandler.getLatestDistinctEvents(prefs.getString(KEY_SORT_FIELD, \"name\"),\n prefs.getBoolean(KEY_SORT_ORDER_ASCENDING, true));\n\n // Send list to adapter\n eventLogAdapter.updateData(eventList);\n }", "Collection<EventDetector> getEventsDetectors();", "public ArrayList<Event> getAllEvents()\r\n\t{\r\n\t\treturn dataService.getAllEvents();\r\n\t}", "private void queryEvents() {\n ParseQuery<Event> query = ParseQuery.getQuery(Event.class);\n // include data referred by user key\n query.include(Event.KEY_HOST);\n // limit query to latest 20 items\n query.setLimit(30);\n // order posts by creation date (newest first)\n query.addDescendingOrder(\"createdAt\");\n // start an asynchronous call for events\n query.findInBackground(new FindCallback<Event>() {\n @Override\n public void done(List<Event> events, com.parse.ParseException e) {\n\n // check for errors\n if (e != null) {\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n\n // for debugging purposes let's print every event description to logcat\n for (Event event : events) {\n Log.i(TAG, \"Event: \" + event.getDescription() + \", username: \" + event.getHost().getUsername());\n }\n\n // save received events to list and notify adapter of new data\n allEvents.addAll(events);\n }\n\n });\n }", "public List getChangedEvents() {\n return new ArrayList(originalDnr.keySet());\n }", "private static List<Event> getMyEvents(List<Registration> registrations) {\n List<Event> result = new ArrayList<>();\n for (Registration registration : registrations) {\n result.add(registration.getEvent());\n }\n return result;\n }", "@DISPID(7) //= 0x7. The runtime will prefer the VTID if present\r\n @VTID(14)\r\n visiotool.IVEventList eventList();", "private List<String> getDataFromApi() throws IOException {\n // List the next 10 events from the primary calendar.\n DateTime now = new DateTime(System.currentTimeMillis());\n Date nowToday = new Date(System.currentTimeMillis());\n Date now2 = new Date();\n Log.d(\"TIME\", now2.toString()); // Fri Apr 14 11:45:53 GMT-04:00 2017\n String show = DateFormat.getTimeInstance().format(nowToday); // 오후 4:22:40\n String show2 = DateFormat.getDateInstance().format(nowToday); // 2017. 4. 7.\n String show3 = DateFormat.getDateTimeInstance().format(nowToday); // 2017. 4. 7. 오후 4:22:40\n // String show4 = DateFormat.getDateInstance().format(now); 이건 안됌 에러\n\n\n java.text.SimpleDateFormat toDateTime = new java.text.SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssZ\");\n //Date todayDate = new Date();\n // String todayName = dayName.format(todayDate);\n\n java.util.Calendar calendar = java.util.Calendar.getInstance();\n\n calendar.setTime(nowToday);\n calendar.add(Calendar.HOUR, 2);\n Date twoFromNow = calendar.getTime();\n\n\n\n List<String> eventStrings = new ArrayList<String>();\n Events events = mService.events().list(\"primary\")\n .setMaxResults(10)\n .setTimeMin(now)\n .setTimeMax(new DateTime(twoFromNow, TimeZone.getDefault()))\n .setOrderBy(\"startTime\")\n .setSingleEvents(true)\n .execute();\n\n\n List<Event> items = events.getItems();\n // List<Map<String, String>> pairList = new ArrayList<Map<String, String>>();\n // String nowDay = now.toString().substring(0, now.toString().indexOf(\"T\"));\n\n\n for (Event event : items) {\n DateTime start = event.getStart().getDateTime();\n\n // Only get events with exact start time set, exclude all day\n if (start != null) {\n eventStrings.add(\n String.format(\"%s //// %s)\", event.getSummary(), start));\n }\n\n\n }\n\n return eventStrings;\n }", "public PriorityQueue<CustomerEvent> getEventList()\r\n {\r\n return this.eventSet;\r\n }", "public HashMap<String, Integer> sortedEventTimes(ArrayList<Athlete> allAths, String targetEvent){\n\t\t\n\t\t//stores all athletes and times for specific event in hashmap\n\t\tHashMap<String, Integer> athleteTimes = new HashMap<>();\n\t\t\n\t\tfor(int i=0; i<allAths.size(); i++) {\n\t\t\tfor(Event event : allAths.get(i).getEvents().values()) {\n\t\t\t\tif(event.toString().equals(targetEvent)) {\n\t\t\t\t\tathleteTimes.put(allAths.get(i).getName(), event.getIntTime());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this.sortByValue(athleteTimes);\n\t\t\n\t\t\n\t\n\t\t\n\t}", "private void sortViewEntries() {\n runOnUiThread(new Runnable() {\n public void run() {\n try {\n Collections.sort(viewEntries, new DateComparator());\n } catch (final Exception ex) {\n // Log.i(\"sortViewEntries\", \"Exception in thread\");\n }\n }\n });\n }", "public Set<EventTO> getEvents() {\n\n Iterable<Event> events = eventRepository.findAll();\n LOGGER.info(\"Returning all events\");\n return mapperService.convertToEventTO(events);\n\n }", "public abstract List<Log> getSorted(boolean asc, String columnName) throws DatabaseConfigException;", "public List<Event> getEventsList() {\n List<Event> eventDetails = eventRepository.findAll();\n return eventDetails;\n }", "Deque<Event> getEvents(long inId);", "public ArrayList<Event> getEvents(){\n return this.events;\n }", "public List<PluginStatsEvent> getPastEvents() {\n\t\tsynchronized (queue) {\n\t\t\tPluginStatsEvent[] info = new PluginStatsEvent[queue.size()];\n\t\t\tList<PluginStatsEvent> returnList = new ArrayList<PluginStatsEvent>();\n\t\t\tCollections.addAll(returnList, queue.toArray(info));\n\t\t\treturn returnList;\n\t\t}\n\t}", "public ArrayList<Event> getCalendarEventsByDay()\n {\n ArrayList<Event> dayListOfEvents = new ArrayList<>();\n\n for(int i = 0; i < events.size(); i++)\n {\n if( (events.get(i).getCalendar().get(Calendar.YEAR) == currentCalendar.get(Calendar.YEAR)) &&\n (events.get(i).getCalendar().get(Calendar.MONTH) == currentCalendar.get(Calendar.MONTH)) &&\n (events.get(i).getCalendar().get(Calendar.DAY_OF_MONTH) == currentCalendar.get(Calendar.DAY_OF_MONTH)))\n {\n dayListOfEvents.add(events.get(i));\n }\n }\n\n return dayListOfEvents;\n }", "public void sortBasedPendingJobs();", "public static List<Event> loadPubs() throws JSONException {\n \t\t\n \t\tString data = getJSON(Constants.PUBEVENTS);\n \t\t\n \t\tJSONObject json_obj = new JSONObject(data).getJSONObject(\"feed\");\n \t\tJSONArray json_arr = json_obj.getJSONArray(\"entry\");\n \t\t\t\n \t\tList<Event> events = new ArrayList<Event>();\n \t\t\t\n \t\t\t\n \t\tfor (int i = 0; i < json_arr.length(); i++){\n \t\t\tString title = json_arr.getJSONObject(i).getJSONObject(\"title\").optString(\"$t\");\n \t\t\tString description = json_arr.getJSONObject(i).getJSONObject(\"content\").optString(\"$t\");\n \t\t\tString time = json_arr.getJSONObject(i).getJSONArray(\"gd$when\").getJSONObject(0).optString(\"startTime\");\n \t\t\tString where = json_arr.getJSONObject(i).getJSONArray(\"gd$where\").getJSONObject(0).optString(\"valueString\");\n \t\t\t\n \t\t\t//If time is not an all day event\n \t\t\tif(time.length() > \"1967-09-03\".length()){\n \t\t\t\ttime = fromDate(time) + \" - SENT. \";\n \t\t\t}\n \t\t\t\n \n \t\t\tif (!title.equals(\"\")){\n \t\t\t\tevents.add(new Event(title, description, where, time));\n \t\t\t}\n \t\t}\n \t\t\t\n \t\treturn events;\n \t}", "private ArrayList<Item> getEvents() {\n\t\tArrayList<Item> events = Magical.getStorage().getList(\n\t\t\t\tStorage.EVENTS_INDEX);\n\t\treturn events;\n\t}", "public String doSort();", "private void viewEvents() {\n ReferenceFrame frame = selectFrame(\"What frame would you like to view the events from?\");\n List<Event> transformedEvents = new ArrayList<>();\n for (Event event: world.getEvents()) {\n transformedEvents.add(event.lorentzTransform(frame));\n }\n for (Event event: transformedEvents) {\n System.out.println(event.getName() + \" occurs at t = \" + event.getTime() + \" and x = \" + event.getX());\n }\n }" ]
[ "0.78070784", "0.761026", "0.7335628", "0.72538906", "0.7228067", "0.71545523", "0.6909315", "0.6705577", "0.65824866", "0.65327317", "0.648067", "0.646818", "0.63021904", "0.6287272", "0.6133149", "0.6096957", "0.6089976", "0.6037729", "0.60366213", "0.5999233", "0.59823716", "0.59397703", "0.5893275", "0.58717734", "0.58695614", "0.58570325", "0.577807", "0.57756144", "0.5764769", "0.5747702", "0.5746845", "0.5745314", "0.57433647", "0.5731234", "0.5724438", "0.57243186", "0.5721325", "0.57173294", "0.56948584", "0.5683612", "0.5675371", "0.560787", "0.5595486", "0.5573194", "0.5572528", "0.5563545", "0.5543499", "0.552018", "0.5486683", "0.5476871", "0.54756254", "0.54693455", "0.5461491", "0.54443455", "0.54420525", "0.54365766", "0.54229194", "0.5411966", "0.5409425", "0.5408016", "0.5407002", "0.54045963", "0.54019034", "0.5399699", "0.5395622", "0.53916943", "0.53784347", "0.5367672", "0.53632957", "0.5360004", "0.5347125", "0.533497", "0.53343797", "0.53275615", "0.53261155", "0.5323116", "0.5320926", "0.5319508", "0.53128767", "0.53085977", "0.53018415", "0.5299859", "0.5298796", "0.52964723", "0.5293593", "0.52890724", "0.52844036", "0.5283765", "0.52826774", "0.52801234", "0.5279855", "0.52769846", "0.5261913", "0.52361596", "0.5235706", "0.52257586", "0.5223931", "0.52230257", "0.5221722", "0.52203214" ]
0.5588066
43
broadcasts the new battlefield to ALL clients
@Override public void run() { while(!Server.killServer){ try { Thread.sleep(Constants.BROADCAST_BATTLEFIELD_PERIOD_TO_CLIENTS); } catch (InterruptedException e) { e.printStackTrace(); } //send to EACH client for(Node client : Server.getClientList().keySet()){ //get client's RMI instance ClientServer clientComm = null; clientComm = Server.getClientReg(client); //create Message ClientServerMessage sendBattlefieldMessage = new ClientServerMessage( MessageType.GetBattlefield, this.serverOwner.getName(), this.serverOwner.getIP(), client.getName(), client.getIP()); sendBattlefieldMessage.setBattlefield(Server.getBattlefield()); if(clientComm==null){ System.out.println("clientComm is null"); continue; } //System.out.println("Server: Battlefield sent"); try { clientComm.onMessageReceived(sendBattlefieldMessage); } catch (RemoteException e) { //e.printStackTrace(); } catch (NotBoundException e) { //e.printStackTrace(); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sendGameInfoToAll(){\r\n\t\t\r\n\t\tVector<Player> players = lobby.getLobbyPlayers();\t\r\n\t\tString message = \"UDGM\" + lobby.getGameString();\r\n\t\t\r\n\t\tif(!players.isEmpty()){\r\n\t \tfor(int i=0; i<players.size(); i++){\t \t\t\r\n\t \t\tsendOnePlayer(players.get(i), message);\t \t\t\r\n\t \t}\r\n\t\t}\r\n\t}", "private void broadcast() {\n for (int key : bootstrapMap.keySet()) {\n bootstrapMap.get(key).getBroadcastView().show(Colors.BLUE + gameService.getCurrentPlayer().getName() + Colors.NOCOLOR, lastAnswer);\n }\n gameService.upDateCurrentPlayer();\n }", "public static void main(String[] args) {\r\n\t\tint portNumber = 1500;\r\n\t\tString serverAddress = \"localhost\";\r\n\t\tString userName = \"Anonymous\";\r\n\t\tint type = 1;\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\t\r\n\t\tSystem.out.println(\"Enter Character Name: \");\r\n\t\tuserName = scan.nextLine();\r\n\t\tSystem.out.println(\"Type '1' to be a warrior\");\r\n\t\tSystem.out.println(\"Type '2' to be a wizard\");\r\n\t\tSystem.out.println(\"Type '3' to be a paladin\");\r\n\t\ttype = Integer.parseInt(scan.nextLine());\r\n\r\n\t\tswitch(type) {\r\n\t\t\tcase 1:\r\n\t\t\t\tp = new Player(userName, 1);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tp = new Player(userName, 2);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\tp = new Player(userName, 3);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tp = new Player(userName, 1);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tClient client = new Client(serverAddress, portNumber, p);\r\n\t\tif(!client.start())\r\n\t\t\treturn;\r\n\t\t\r\n\t\tSystem.out.println(\"Instructions:\");\r\n\t\tSystem.out.println(\"1. Simply type the message to send broadcast to all active clients\");\r\n\t\tSystem.out.println(\"2. Type 'LIST PARTY' to see who is in the game\");\r\n\t\tSystem.out.println(\"3. Type 'STATUS' to show your stats.\");\r\n\t\tSystem.out.println(\"4. Type 'ENEMIES' to show enemies in room\");\r\n\t\tSystem.out.println(\"5. Type 'TURN' to show your parties remaining turns.\");\r\n\t\tSystem.out.println(\"6. Type 'ATTACK X' where X is the enemy target.\");\r\n\t\tSystem.out.println(\"7. Type 'QUIT' to close the game\\n\");\r\n\t\t\r\n\t\twhile(true) {\r\n\t\t\tSystem.out.print(\"> \");\r\n\t\t\tString msg = scan.nextLine();\r\n\t\t\tif(msg.equalsIgnoreCase(\"QUIT\")) {\r\n\t\t\t\tclient.sendMessage(\"QUIT\");\r\n\t\t\t\tbreak;\r\n\t\t\t}else if(msg.length() > 0){\r\n\t\t\t\tclient.sendMessage(msg);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tscan.close();\r\n\t\tclient.disconnect();\t\r\n\t}", "@Override\n public void run(){\n ServerConnection[] clients = new ServerConnection[]{client2, client3, client1};\n\n for( ServerConnection c : clients ) {\n if ( c != null ){\n if ( client3 == null ){\n c.send(\"Game has started with code:\" + gameID + \".\\n\" + \"Current players are \" +\n client1.getName() + \", \" + client2.getName());\n }\n else {\n c.send(\"Game has started with code:\" + gameID + \".\\n\" + \"Current players are \" +\n client1.getName() + \", \" + client2.getName() + \", \" + client3.getName());\n }\n c.setGameID(gameID);\n }\n }\n\n String[] gods = readChallengerMessage();\n\n for (int i=0; i<2 && currClient != client1; i++){\n currClient.send(Arrays.toString(gods) );\n clientMessage = readClientMessage();\n if (i == 0) {\n gameMessage.setGod2(clientMessage.getGod());\n gameMessage.setName2(clientMessage.getName());\n } else if (i == 1) {\n gameMessage.setGod3(clientMessage.getGod());\n gameMessage.setName3(clientMessage.getName());\n }\n List<String> list = new ArrayList<String>(Arrays.asList(gods));\n list.remove( clientMessage.getGod().name());\n gods = list.toArray(new String[0]);\n currClient.send(\"Choice confirmed\");\n updateCurrClient();\n }\n\n currClient.send(gods[0]);\n gameMessage.setGod1(God.valueOf(gods[0]));\n gameMessage.setName1(client1.getName());\n updateCurrClient();\n resetUpdate();\n gameMessage.notify(gameMessage);\n sendLiteGame();\n\n for( ServerConnection c : clients ) {\n resetUpdate();\n if ( c != null ) {\n while ( !updateModel) {\n sendToCurrClient(\"Placing workers\");\n clientMessage = readClientMessage();\n gameMessage.setSpace1(clientMessage.getSpace1());\n gameMessage.setSpace2(clientMessage.getSpace2());\n gameMessage.notify(gameMessage);\n if (!updateModel) {\n sendLiteGame();\n }\n }\n updateCurrClient();\n liteGame.setPlayer(currClient.getName());\n sendLiteGame();\n }\n }\n\n\n while ( !endOfTheGame ) {\n sendToCurrClient(\"Next action\");\n clientMessage = readClientMessage();\n\n if ( \"Choose Worker\".equals(clientMessage.getAction()) ) {\n chooseWorker();\n }\n else if ( \"Charon Switch\".equals(clientMessage.getAction()) ) {\n charonSwitch();\n }\n else if ( \"Prometheus Build\".equals(clientMessage.getAction()) ) {\n build();\n }\n else if ( \"Move\".equals(clientMessage.getAction()) ) {\n move();\n }\n else if ( \"Build\".equals(clientMessage.getAction()) ) {\n build();\n }\n\n if ( \"End\".equals(clientMessage.getAction()) ) {\n gameMessage.resetGameMessage();\n updateCurrClient();\n liteGame.setCurrWorker(5,5);\n liteGame.setPlayer(currClient.getName());\n sendLiteGame();\n }\n else {\n sendLiteGame();\n if ( !endOfTheGame && !playerRemoved ) {\n if (!updateModel) {\n currClient.send(\"Invalid action\");\n } else currClient.send(\"Action performed\");\n }\n else playerRemoved = false;\n }\n }\n\n sendToCurrClient(\"You won the match.\");\n server.endMatch(gameID, null);\n }", "private void sendClientsChangedBroadcast() {\n Intent intent = new Intent(WifiHotspotManager.WIFI_HOTSPOT_CLIENTS_CHANGED_ACTION);\n intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);\n mContext.sendBroadcastAsUser(intent, UserHandle.ALL);\n }", "private void broadcast(ArrayList<Integer> update){\n for (Player p : players.values()){\n p.sendModel(update);\n }\n }", "public void onLobby(){\n\t\tif(Bukkit.getPluginManager().isPluginEnabled(\"MVdWPlaceholderAPI\")){\n\t\t\tPlaceholderAPI.registerPlaceholder(SimplePlugin.getPlugin(ArenaPlugin.class), \"build_battle_players\",\n\t\t\t\t\tplaceholderReplaceEvent -> {\n\t\t\t\t\t\tint players = getArena().getPlayers(ArenaJoinMode.PLAYING).size();\n\t\t\t\t\t\treturn Integer.toString(players);\n\t\t\t\t\t});\n\n\t\t\tPlaceholderAPI.registerPlaceholder(SimplePlugin.getPlugin(ArenaPlugin.class), \"build_battle_time\",\n\t\t\t\t\tplaceholderReplaceEvent -> Common.plural(arena.getStartCountdown().getTimeLeft(), \"second\"));\n\n\t\t}\n\t}", "private void broadcast(String message)\n \t{\n \t\tfor(int i = 0; i < players.length; i++)\n \t\t{\n // PROTOCOL\n \t\t\tplayers[i].sendMessage(message);\n // PROTOCOL\n \t\t}\n \t}", "public void sendNameInfoToAll(){\r\n\t\t\r\n\t\tVector<Player> players = lobby.getLobbyPlayers();\t\r\n\t\tString message = \"UDNM\" + lobby.getNameString();\r\n\t\t\r\n\t\tif(!players.isEmpty()){\r\n\t \tfor(int i=0; i<players.size(); i++){\t \t\t\r\n\t \t\tsendOnePlayer(players.get(i), message);\t \t\t\r\n\t \t}\r\n\t\t}\r\n\t}", "public void broadcastToChannelMembers(L2GameServerPacket gsp) \r\n\t{\r\n\t\tif (_partys != null)\r\n\t\t\tfor (L2Party party : _partys)\r\n\t\t\t\tif (party != null)\r\n\t\t\t\t\tparty.broadcastToPartyMembers(gsp);\r\n\t}", "@Override\n\tpublic void battle(String ip) throws RemoteException {\n\t\tSystem.out.println(\"Chiamato il metodo battle da \" +ip);\n\t}", "@Override\n public void receiveStartGame(){\n for (AbstractCard c : AbstractDungeon.player.masterDeck.group) {\n if (c instanceof AwakenedForm) {\n ((AwakenedForm) c).updateAwakenCost();\n }\n }\n }", "public void treatment()\n {\n\t\tCommunicationManagerServer cms = CommunicationManagerServer.getInstance();\n\t\tDataServerToComm dataInterface = cms.getDataInterface();\n\t\t/** On récupère et stocke l'adresse IP du serveur\n\t\t */\n\t\tdataInterface.updateUserChanges(user);\n\n\t /** Création du message pour le broadcast des informations**/\n\t updatedAccountMsg message = new updatedAccountMsg(this.user);\n\t\tmessage.setPort(this.getPort());\n\t cms.broadcast(message);\n\t}", "public void sendeLobby();", "@Override\n\t\tpublic void onMessage(String msg) {\n\t\t\tif(msg.equals(\"update\")) {\n\t\t\t\tAuctionList al = new AuctionList();\n\t\t\t\tal.refreshAuction();\n\t\t\t}\n\t\t\tfor (ChatWebSocket member : webSockets) {\n\t\t try {\n\t\t member.connection.sendMessage(msg);\n\t\t \n\t\t } catch(IOException e) {\n\t\t \te.printStackTrace();\n\t\t }\n\t\t }\n\t\t}", "public void sendGameStateToAllClients(GameState gameState) {\n for (String player : this.getDistantPlayers()) {\n\n Socket s = getPlayersSocket().get(player);\n\n // System.out.println(\"GAMESTATE READY TO BE SENT to \"+player);\n ObjectOutputStream out = null;\n if ((!s.isClosed()) && s.isConnected()) {\n\n }\n\n try {\n out = new ObjectOutputStream(this.getPlayersSocket().get(player).getOutputStream());\n // System.out.println(\"GAMESTATE READY TO BE SENT to \"+player+\"Soket ok\");\n out.writeObject(gameState);\n // System.out.println(\"GAMESTATE READY TO BE SENT to \"+player+\"Soket ok\"+\" Written\");\n out.flush();\n } catch (IOException e) {\n e.printStackTrace();\n }\n //System.out.println(\"GAMESTATE SENT\");\n }\n ((LocalClientI) AppSingleton.getInstance().getClient()).receive(gameState);\n }", "public void updateClientParty()\n\t{\n\t\tfor(int i = 0; i < getParty().length; i++)\n\t\t\tupdateClientParty(i);\n\t}", "private void broadcast(String msg) {\n\t\tfor (PrintWriter out : clients) {\n\t\t\tout.println(msg);\n\t\t\tout.flush();\n\t\t}\n\t}", "public void initiate() {\n // all we know is neighbours\n Set<Integer> idsToSend = neighbours.stream().map(Bunker::getId).collect(Collectors.toSet());\n sendGetCount(idsToSend);\n }", "@Override\r\n public void sendClientGame(ClientGame clientGame) {\r\n\r\n //System.out.println(\"Invio \"+clientGame+clientGame.getReserve()+\" a \"+username);\r\n ClientGameNetObject clientGameNetObject = new ClientGameNetObject(MessageHeaderEnum.CLIENTGAME.toString(),clientGame);\r\n //System.out.println(clientGameNetObject+\" : \"+clientGameNetObject.getClientGame().getReserve()+\" : \"+clientGame.getActivePlayerUsername());\r\n sendObject(clientGameNetObject);\r\n }", "void onFleetSync(CampaignFleetAPI fleet);", "public static void sendRegistrationFormObs(Player player)\r\n {\r\n List<BattleGroundTemplate> acceptedBattlegrounds = new ArrayList<BattleGroundTemplate>(); \r\n for(BattleGroundTemplate template : DataManager.BATTLEGROUND_DATA.getAllTemplates())\r\n {\r\n acceptedBattlegrounds.add(template);\r\n }\r\n \r\n if(acceptedBattlegrounds.size() < 1)\r\n {\r\n PacketSendUtility.sendMessage(player, \"No battleground available.\");\r\n return;\r\n }\r\n \r\n String[] acceptedLoc = new String[acceptedBattlegrounds.size()];\r\n for(int i=0; i < acceptedBattlegrounds.size(); i++)\r\n {\r\n acceptedLoc[i] = acceptedBattlegrounds.get(i).getName() + \" (\" + elyosWaitList.get(acceptedBattlegrounds.get(i).getTplId()).size() + \" - \" + asmodiansWaitList.get(acceptedBattlegrounds.get(i).getTplId()).size() + \" / \" + acceptedBattlegrounds.get(i).getNbPlayers() + \")\";\r\n }\r\n \r\n String html = HTMLService.HTMLTemplate(\"Register to battlegrounds\", \"You can register for the following battlegrounds :\", acceptedLoc, 0, 0);\r\n HTMLService.showHTML(player, html, 151000001);\r\n }", "public void boardPassenger(int floor){\n _passengersOnboard +=1;\n switch(floor){\n case 1: Floor.FIRST.makeDestinationRequest();\n Floor.FIRST.addQueuedPassenger();\n break;\n case 2: Floor.SECOND.makeDestinationRequest();\n Floor.SECOND.addQueuedPassenger();\n break;\n case 3: Floor.THIRD.makeDestinationRequest();\n Floor.THIRD.addQueuedPassenger();\n break;\n case 4: Floor.FOURTH.makeDestinationRequest();\n Floor.FOURTH.addQueuedPassenger();\n break;\n case 5: Floor.FIFTH.makeDestinationRequest();\n Floor.FIFTH.addQueuedPassenger();\n break;\n case 6: Floor.SIXTH.makeDestinationRequest();\n Floor.SIXTH.addQueuedPassenger();\n break;\n case 7: Floor.SEVENTH.makeDestinationRequest();\n Floor.SEVENTH.addQueuedPassenger();\n break;\n }\n }", "public void requestAccepted(String username)\n\t{\n\t\t// Player otherPlayer = TcpProtocolHandler.getPlayer(username);\n\t\tPlayer otherPlayer = ActiveConnections.getPlayer(username);\n\t\tif(otherPlayer != null)\n\t\t{\n\t\t\tif(m_requests.containsKey(username))\n\t\t\t\tswitch(m_requests.get(username))\n\t\t\t\t{\n\t\t\t\t\tcase BATTLE:\n\t\t\t\t\t\t/* First, ensure both players are on the same map */\n\t\t\t\t\t\tif(otherPlayer.getMap() != getMap())\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t/* Based on the map's pvp type, check this battle is possible If pvp is enforced, it will be started when the offer is made */\n\t\t\t\t\t\tif(getMap().getPvPType() != null)\n\t\t\t\t\t\t\tswitch(getMap().getPvPType())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcase DISABLED:\n\t\t\t\t\t\t\t\t\t/* Some maps have pvp disabled */\n\t\t\t\t\t\t\t\t\tServerMessage sendNotOther = new ServerMessage(ClientPacket.PVP_PACKETS);\n\t\t\t\t\t\t\t\t\tsendNotOther.addInt(2);\n\t\t\t\t\t\t\t\t\totherPlayer.getSession().Send(sendNotOther);\n\t\t\t\t\t\t\t\t\tServerMessage sendNot = new ServerMessage(ClientPacket.PVP_PACKETS);\n\t\t\t\t\t\t\t\t\tsendNot.addInt(2);\n\t\t\t\t\t\t\t\t\tgetSession().Send(sendNot);\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\tcase ENABLED:\n\t\t\t\t\t\t\t\t\t/* This is a valid battle, start it */\n\t\t\t\t\t\t\t\t\tensureHealthyPokemon();\n\t\t\t\t\t\t\t\t\totherPlayer.ensureHealthyPokemon();\n\t\t\t\t\t\t\t\t\tm_battleField = new PvPBattleField(DataService.getBattleMechanics(), this, otherPlayer);\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\tcase ENFORCED:\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tm_battleField = new PvPBattleField(DataService.getBattleMechanics(), this, otherPlayer);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase TRADE:\n\t\t\t\t\t\tif(canTrade() && otherPlayer.canTrade())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/* Set the player as talking so they can't move */\n\t\t\t\t\t\t\tm_isTalking = true;\n\t\t\t\t\t\t\t/* Create the trade */\n\t\t\t\t\t\t\tm_trade = new Trade(this, otherPlayer);\n\t\t\t\t\t\t\totherPlayer.setTrade(m_trade);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tServerMessage sendNotOther = new ServerMessage(ClientPacket.PVP_PACKETS);\n\t\t\t\t\t\t\tsendNotOther.addInt(4);\n\t\t\t\t\t\t\totherPlayer.getSession().Send(sendNotOther);\n\t\t\t\t\t\t\tServerMessage sendNot = new ServerMessage(ClientPacket.PVP_PACKETS);\n\t\t\t\t\t\t\tsendNot.addInt(4);\n\t\t\t\t\t\t\tgetSession().Send(sendNot);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tServerMessage sendNot = new ServerMessage(ClientPacket.PVP_PACKETS);\n\t\t\tsendNot.addInt(0);\n\t\t\tgetSession().Send(sendNot);\n\t\t}\n\t}", "public void broadcast() {\n for (int i = 1; i <= nbMessagesToBroadcast; i++) {\n Message broadcastMsg = new Message(pid, pid, i,false, null);\n lcb.broadcast(broadcastMsg);\n logs.add(String.format(\"b %d\\n\",i));\n }\n }", "public void onboard(String passenger) {\n \t\r\n \tthis.passengers.add(passenger);\r\n }", "public void battleComplete() {\n\t}", "public void sendPeerListToAll() {\r\n\t\tPacket packet = new Packet();\r\n\t\tpacket.eventCode = 1;\r\n\t\tfor(int i = 0; i < peerClientNodeConnectionList.size(); i++) {\r\n\t\t\tPeer peer = new Peer();\r\n\t\t\tpeer.peerID = peerClientNodeConnectionList.get(i).peerClientID;\r\n\t\t\tpeer.peerIP = peerClientNodeConnectionList.get(i).peerClientIP;\r\n\t\t\tpeer.peerPort = peerClientNodeConnectionList.get(i).peerClientListeningPort;\r\n\t\t\tpacket.peerList.add(peer);\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0; i < peerClientNodeConnectionList.size(); i++) {\r\n\t\t\ttry {\r\n\t\t\t\tpeerClientNodeConnectionList.get(i).outStream.writeObject(packet);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t}", "public void sendMatch() {\n for (int i = 0; i < numberOfPlayers; i++) {\n try {\n // s = ss.accept();\n oos = new ObjectOutputStream(sockets.get(i).getOutputStream());\n oos.writeObject(game);\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }", "public void sendLiteGame(){\n SerializableLiteGame toSend = liteGame.makeSerializable();\n\n if ( client1 != null ) {\n client1.send(toSend);\n }\n if ( client2 != null ) {\n client2.send(toSend);\n }\n if ( client3 != null ) {\n client3.send(toSend);\n }\n }", "private void sendGMToAll(String msg){\r\n for(ClientHandler ch: clientThreads){\r\n try{\r\n //Get the client's ObjectOutputStream\r\n ObjectOutputStream oos = ch.getOOS();\r\n //Print the message to the client\r\n oos.writeObject(new DataWrapper(0, msg, true));\r\n } catch(IOException ioe) {\r\n System.out.println(\"IOException occurred: \" + ioe.getMessage());\r\n ioe.printStackTrace();\r\n }\r\n }\r\n }", "public void campaign() {\r\n for (int i = 0; i < this.parties.length; i++) {\r\n while (this.parties[i].makeAction(this.constituencies, this.acts)) {}\r\n }\r\n }", "public void announcingBusBoarding() {\n\t\tClientCom clientCom = new ClientCom(RunParameters.ArrivalQuayHostName, RunParameters.ArrivalQuayPort);\n\t\twhile (!clientCom.open()) {\n\t\t\tSystem.out.println(\"Arrival Quay not active yet, sleeping for 1 seccond\");\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tThread.currentThread().interrupt();\n\t\t\t}\n\t\t}\n\t\t;\n\t\tBusDriver busDriver = (BusDriver) Thread.currentThread();\n\t\tMessage pkt = new Message();\n\t\tpkt.setType(MessageType.BD_ANNOUNCING_BOARDING);\n\n\t\tclientCom.writeObject(pkt);\n\t\tpkt = (Message) clientCom.readObject();\n\t\tclientCom.close();\n\t}", "@Override\n public void broadcast(T msg) {\n for (Integer i : activeUsers.keySet()) {\n this.send(Integer.valueOf(i), msg);\n }\n\n }", "public void draftEvent(){\n gameState = GameState.DRAFT;\n currentMessage = \"\" + currentPlayer.getNumTroops();\n currentTerritoriesOfInterest = currentPlayer.getTerritoriesList();\n notifyObservers();\n }", "public void startserver()\r\n\t{\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t\r\n\t\t\twhile(true)\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tSocket clientsocket = serversocket.accept();\r\n\t\t\t\tif(clientsocket.isConnected())\r\n\t\t\t\t{\r\n\t\t\t\t\tDataOutputStream wdata = new DataOutputStream(clientsocket.getOutputStream());\r\n\t\t\t\t\tDataInputStream rdata = new DataInputStream(clientsocket.getInputStream());\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\t// read message from client and add new player\r\n\t\t\t\t\tJsonObject newplayrejson = gson.fromJson(rdata.readUTF(), JsonObject.class);\r\n\t\t\t\t\tint mode = newplayrejson.get(\"mode\").getAsInt();\r\n\t\t\t\t\tclientaddresslist.get(mode).add(clientsocket.getInetAddress());\r\n\t\t\t\t\tString profession = newplayrejson.get(\"profession\").getAsString();\r\n\t\t\t\t\tString teamname;\r\n\t\t\t\t\tif(mode == 0)\r\n\t\t\t\t\t\tteamname = \"deathMatch\";\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(teamcount)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tteamname = \"teamBlue\";\r\n\t\t\t\t\t\t\tif(king[0] == -1)\r\n\t\t\t\t\t\t\t\tking[0] = idcount[mode];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tteamname = \"teamRed\";\r\n\t\t\t\t\t\t\tif(king[1] == -1)\r\n\t\t\t\t\t\t\t\tking[1] = idcount[mode];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tteamcount = !teamcount;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcdc.collideObjectManager[mode].addCharacter(collideObjecctClass.valueOf(profession), idcount[mode], randposition(), newplayrejson.get(\"name\").getAsString(), TeamName.valueOf(teamname));\r\n\t\t\t\t\tclientidlist.get(mode).add(idcount[mode]);\r\n\t\t\t\t\t++idcount[mode];\r\n\t\t\t\t\t++playercount[mode];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// sending collideobject list to client\r\n\t\t\t\t\twdata.writeInt(idcount[mode] - 1);\r\n\t\t\t\t\twdata.flush();\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tfor(CollideObject object : cdc.collideObjectManager[mode].collideObjectList)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\twdata.writeUTF(object.getClass().getName());\r\n\t\t\t\t\t\twdata.writeUTF(gson.toJson(object));\r\n\t\t\t\t\t\twdata.flush();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\twdata.writeUTF(\"done\");\r\n\t\t\t\t\twdata.flush();\r\n\t\t\t\t\t\r\n\t\t\t\t\t// send king id if mode is kingkill\r\n\t\t\t\t\tif(mode == 1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\twdata.writeInt(king[0]);\r\n\t\t\t\t\t\twdata.writeInt(king[1]);\r\n\t\t\t\t\t\twdata.flush();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tThread thread = new Thread(new clientmanager(clientsocket , this , mode));\r\n\t\t\t\t\tthread.start();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void update(DroitsMembre client) {\n\n\t}", "public void run() {\n try {\n\n // Create character streams for the socket.\n in = new BufferedReader(new InputStreamReader(\n socket.getInputStream()));\n out = new PrintWriter(socket.getOutputStream(), true);\n System.out.println(\"...\"+socket.getInetAddress());\n\n // Request a name from this client. Keep requesting until\n // a name is submitted that is not already used. Note that\n // checking for the existence of a name and adding the name\n // must be done while locking the set of names.\n while (true) {\n out.println(\"SUBMIT NAME\");\n name = in.readLine();\n \tString[] arr= name.split(\":\", 2);\n \tname= arr[1];\n if (name == null) {\n return;\n }\n if (!ip.contains(socket.getInetAddress())) {\n ip.add(socket.getInetAddress());\n }\n else\n {\n \tout.println(\"already opened once.\");\n \tcontinue;\n }\n synchronized (clientOut) {\n if (clientOut.get(name) == null) {\n client.put(count, name);\n id= count;\n break;\n }\n }\n }\n\n // Now that a successful name has been chosen, add the\n // socket's print writer to the set of all writers so\n // this client can receive broadcast messages.\n clientOut.put(name, out);\n out.println(\"NAMEACCEPTED\"+name);\n //adding online users to the new user.\n for (int i= 0;i < count;i++) {\n \tString str;\n\t\t\t\t\tif((str= (String)client.get(i)) != null)\n \t\tout.println(\"TAB\"+i+str);\n }\n \n //adding new user to all the users who are online.\n for (int i= 0;i < count;i++) {\n \tPrintWriter wrt;\n \tif((wrt= clientOut.get(client.get(i))) != null)\n \t\twrt.println(\"TAB\"+count+name);\n }\n count++;\n\n // Accept messages from this client and broadcast them.\n // Ignore other clients that cannot be broadcasted to.\n while (true) {\n \tString input= in.readLine();\n \tchar c1;\n \tint c2;\n \tString[] arr= input.split(\":\", 2);\n \tif(arr[0].equals(\"FILE\"))\n \t{\n \t\tString[] arr1= input.split(\":\", 3);\n \t\tPrintWriter p= clientOut.get(client.get(Integer.valueOf(arr1[1])));\n \t\tp.println(\"FILE:\"+id+\":\"+arr1[2]);\n \t\twhile((input= in.readLine()) != \"stop\")\n \t\t{\n \t\t\tp.println(input);\n \t\t\tp.flush();\n \t\t}\n \t\tp.println(\"stop\");\n \t\tp.flush();\n \t\tSystem.out.println(\"sent.........\");\n/* \t\twhile((c2= in.read()) != -1)\n \t\t{\n \t\t\tc1= (char) c2;\n \t\t\tp.print(c1);\n \t\t\tp.flush();\n \t\t\tSystem.out.print(c2);\n \t\t}\n \t\tSystem.out.println(c2+\".......\");\n \t\tp.print((char)-1);*/\n \t}\n \telse\n \t\tclientOut.get(client.get(Integer.valueOf(arr[0]))).println(\"MESSAGE:\"+id+\":\"+name+\":\"+arr[1]);\n }\n } catch (IOException e) {\n System.out.println(e);\n } finally {\n // This client is going down! Remove its name and its print\n // writer from the sets, and close its socket.\n \t//remove this client from every other client.(TAB)\n \tfor (int i= 0;i < count;i++) {\n \t\tPrintWriter wrt;\n\t\t\t\t\tif(i != id && (wrt= clientOut.get(client.get(i))) != null)\n \t\t\twrt.println(\"REMOVE\"+id);\n }\n\n if (name != null) {\n \tclient.remove(id);\n \tclientOut.remove(name);\n \tip.remove(socket.getInetAddress());\n }\n try {\n socket.close();\n } catch (IOException e) {\n }\n }\n }", "@Override\n public void run() {\n // When we read from the input stream, broadcast it to all client observers to relay to the clients via the respective socket.\n try {\n Object dataFromClient = inputFromClient.readObject();\n while (dataFromClient != null) {\n setChanged();\n if(dataFromClient instanceof Integer){\n Integer clientID = (Integer) dataFromClient;\n // This client sent its client id to be added to or removed from registered users. So, send the updated list to all observers to push to ALL clients.\n if(registeredUsers.contains(clientID)){\n removeClient(clientID);\n clientData.remove(clientID);\n }else {\n registeredUsers.add((Integer)dataFromClient); // Add the new client's future ID to the list of registered users. ID sent\n }\n System.out.println(\"Server sending \" + registeredUsers);\n notifyObservers(registeredUsers);\n }else if (dataFromClient instanceof Group){\n System.out.println(\"Server received \" + dataFromClient);\n Group group = (Group)dataFromClient;\n if(group.getGroupID() == -1){ // Indicates group is asking for proper id.\n group.setGroupID(currentGroupNumber);\n System.out.println(\"Here ya go, number \" + currentGroupNumber);\n currentGroupNumber++;\n }\n notifyObservers(group);\n }else{\n notifyObservers(dataFromClient);\n }\n System.out.println(\"Server sent \" + dataFromClient);\n dataFromClient = inputFromClient.readObject();\n }\n } catch (IOException | ClassNotFoundException e) {\n System.out.println(\"Could not read data from client\");\n }\n }", "private synchronized void broadcast(String message){\n //add dd-MM-yyyy HH:mm:ss to the message, each starting on a new line\n String messageLf = sdf.format(new Date()) + \" \" + message + \"\\n\";\n // display message in GUI\n displayMsg(messageLf);\n //loop in reverse order in case a client disconnects & needs to be removed\n for (int i = al.size(); --i >= 0;){\n ClientThread ct = al.get(i);\n // try to write to the client, if fail, remove client from the list\n if (!ct.writeMsg(messageLf)) {\n al.remove(i);\n displayEvent(\"Disconnected Client \" + ct.username +\n \" removed from list.\");\n }\n }\n }", "public synchronized void updateField (ServerThread oppo) {\n\t\tsendMessage(\"123\",oppo); // Junk message to allow Signal:UpdateField to be sent\n\t\tsendMessage (\"Signal:UpdateField\", oppo);\n\t\tfor(int j=0; j < Field.size(); j++) {\n\t\t\t// Signal clients that the next few cards will be the field\n\t\t\tsendMessage (\"Signal:SendField\", oppo);\n\t\t\t// Make sure the messages are not sent to clients at the same time as the cards\n\t\t\t//TODO: The sleep was commented out earlier, why?\n\t\t\ttry {\n\t\t\t\tThread.sleep (10);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tsendCard (Field.get (j), oppo);\n\t\t}\n\t\tsendMessage (\"Signal:UpdateFieldEnded\", oppo);\n\t}", "private synchronized void sendToAllClients(Object whatever) // Synchronized to work among multiple clients and multiple threads\n {\n System.out.println(\"Sending '\" + whatever + \"' to everyone.\");\t\n \n ObjectOutputStream[] oosList = whosIn.values().toArray(new ObjectOutputStream[0]);\n \n for (ObjectOutputStream clientOOS : oosList)\n {\n try {clientOOS.writeObject(whatever);}\n catch (IOException e) {} \n }\n\t \n }", "public void updateClientParty(int i)\n\t{\n\t\tif(getParty()[i] != null)\n\t\t{\n\t\t\tString data = PokemonSpecies.getDefaultData().getPokemonByName(getParty()[i].getSpeciesName()).getPokedexNumber() + \",\" + getParty()[i].getName() + \",\" + getParty()[i].getHealth() + \",\"\n\t\t\t\t\t+ getParty()[i].getGender() + \",\" + (getParty()[i].isShiny() ? 1 : 0) + \",\" + getParty()[i].getStat(0) + \",\" + getParty()[i].getStat(1) + \",\" + getParty()[i].getStat(2) + \",\"\n\t\t\t\t\t+ getParty()[i].getStat(3) + \",\" + getParty()[i].getStat(4) + \",\" + getParty()[i].getStat(5) + \",\" + getParty()[i].getTypes()[0] + \",\"\n\t\t\t\t\t+ (getParty()[i].getTypes().length > 1 && getParty()[i].getTypes()[1] != null ? getParty()[i].getTypes()[1] + \",\" : \",\") + getParty()[i].getExp() + \",\" + getParty()[i].getLevel()\n\t\t\t\t\t+ \",\" + getParty()[i].getAbilityName() + \",\" + getParty()[i].getNature().getName() + \",\" + (getParty()[i].getMoves()[0] != null ? getParty()[i].getMoveName(0) : \"\") + \",\"\n\t\t\t\t\t+ (getParty()[i].getMoves()[1] != null ? getParty()[i].getMoveName(1) : \"\") + \",\" + (getParty()[i].getMoves()[2] != null ? getParty()[i].getMoveName(2) : \"\") + \",\"\n\t\t\t\t\t+ (getParty()[i].getMoves()[3] != null ? getParty()[i].getMoveName(3) : \"\") + \",\"\n\t\t\t\t\t+ (this.getParty()[i].getMoves()[0] != null ? this.getParty()[i].getMove(0).getMove().getType().toString() : \"\") + \",\"\n\t\t\t\t\t+ (this.getParty()[i].getMoves()[1] != null ? this.getParty()[i].getMove(1).getMove().getType().toString() : \"\") + \",\"\n\t\t\t\t\t+ (this.getParty()[i].getMoves()[2] != null ? this.getParty()[i].getMove(2).getMove().getType().toString() : \"\") + \",\"\n\t\t\t\t\t+ (this.getParty()[i].getMoves()[3] != null ? this.getParty()[i].getMove(3).getMove().getType().toString() : \"\") + \",\" + this.getParty()[i].getItemName() + \",\"\n\t\t\t\t\t+ (int) this.getParty()[i].getExpForLevel(this.getParty()[i].getLevel()) + \",\" + (int) this.getParty()[i].getExpForLevel(this.getParty()[i].getLevel() + 1) + \",\"\n\t\t\t\t\t+ this.getParty()[i].getOriginalTrainer();\n\t\t\tServerMessage message = new ServerMessage(ClientPacket.INIT_POKEMON);\n\t\t\tmessage.addInt(i);\n\t\t\tmessage.addString(data);\n\t\t\tgetSession().Send(message);\n\t\t\t/* Update move pp */\n\t\t\tfor(int j = 0; j < 4; j++)\n\t\t\t\tupdateClientPP(i, j);\n\t\t}\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n client.sendMessage(new BuzzInMessage(teamIndex));\n }", "void onClientsUpdated(String[] clients);", "public void run() \n\t\t\t{\n\t\t\t\tif (Math.abs(player.getLocation().getX() - playerLoc.getX()) > 1\n\t\t\t\t\t\t|| Math.abs(player.getLocation().getY() - playerLoc.getY()) > 1\n\t\t\t\t\t\t|| Math.abs(player.getLocation().getZ() - playerLoc.getZ()) > 1)\n\t\t\t\t{\n\t\t\t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You cannot move while bandaging!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString name = player.getCustomName();\n\t\t\t\tif (name == null)\n\t\t\t\t\tname = player.getName();\n\t\t\t\t\n\t\t\t\t//Check that the recipient is still in roughly the same location\n\t\t\t\t//Skip if self-heal\n\t\t\t\tif (!player.equals(recipient))\n\t\t\t\t\tif (Math.abs(recipient.getLocation().getX() - recipientLoc.getX()) > 1\n\t\t\t\t\t\t|| Math.abs(recipient.getLocation().getY() - recipientLoc.getY()) > 1\n\t\t\t\t\t\t|| Math.abs(recipient.getLocation().getZ() - recipientLoc.getZ()) > 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You cannot bandage your patient while they are moving!\");\n\t\t\t\t\t\trecipient.sendMessage(ChatColor.YELLOW + name + \" cannot bandage you while you are moving!\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Remove item from player's inventory.\n\t \t\tplayer.getInventory().removeItem(new ItemStack(Material.getMaterial(item.toUpperCase()), 1));\n\t \t\tplayer.updateInventory();\n\t \t\t\t\n\t \t\t//Heal the other player.\n\t \t\trecipient.setHealth(recipient.getHealth() + amountToHeal);\n\n\t \t\t//Award experience.\n\t \t\tProfessionStats prof = new ProfessionStats(perms, data, config, player.getUniqueId());\n\t \t\t\n\t \t\tif (!prof.isPracticeFatigued(profession))\n\t \t\t\taddExperience(player, profession, config.getInt(\"healing.\" + item + \".exp\"));\n\t \t\t\t\n\t \t\t//Notify both parties.\n\t \t\tif (!player.equals(recipient))\n\t \t\t{\t \t\t\n\t \t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You bandaged \" + recipient.getName() + \"'s wounds.\");\n\t \t\t\trecipient.sendMessage(ChatColor.YELLOW + player.getName() + \" bandaged your wounds.\");\n\t \t\t}\n\t \t\telse\n\t \t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You bandaged your wounds.\");\n\t\t\t }", "public void create(Lobby lobby) {\n for (LobbyPlayer player : lobby.getPlayers()) Firebase.registerListener(\"lobbies/\" + player.getLobbyCode(), onLobbyChange);\n Firebase.setDocument(\"lobbies/\" + lobby.getGameCode(), LobbyDTO.fromModel(lobby));\n }", "public void takeABus() {\n\t\tClientCom clientCom = new ClientCom(RunParameters.ArrivalQuayHostName, RunParameters.ArrivalQuayPort);\n\t\twhile (!clientCom.open()) {\n\t\t\tSystem.out.println(\"Arrival Quay not active yet, sleeping for 1 seccond\");\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tThread.currentThread().interrupt();\n\t\t\t}\n\t\t}\n\t\t;\n\t\tPassenger passenger = (Passenger) Thread.currentThread();\n\t\tMessage pkt = new Message();\n\t\tpkt.setType(MessageType.PASSENGERS_WAITING);\n\t\tpkt.setId(passenger.getPassengerId());\n\n\t\tclientCom.writeObject(pkt);\n\t\tpkt = (Message) clientCom.readObject();\n\n\t\tpassenger.setCurrentState(pkt.getState());\n\t\tclientCom.close();\n\t}", "public void addAllToConference();", "public void setLobby(Lobby lobby)\r\n\t{\r\n\t\treceiver.setLobby(lobby);\t\r\n\t}", "@Override\n public void onOpen(WebSocketConnection connection) {\n System.out.println(\"ClientConnected!\");\n clients.add(connection);\n projectIdReference.add(\"\");\n connectionCount++;\n }", "public static interface Client\n\t{\n\n\t\t/**\n\t\t * Server notify the client to refresh the player list.\n\t\t * @param playerList New player list.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid refreshPlayerList(Map<String, IPlayerConfig> playerList) throws RpcException;\n\n\t\t/**\n\t\t * Server notify the client to refresh the game config. Client is expected to display it in GameCreation panel.\n\t\t * @param gameCfg New game config.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid refreshGameConfig(GameConfig gameCfg) throws RpcException;\n\t\t\n\t\t/**\n\t\t * Server broadcast game creation message from another player.\n\t\t * @param fromPlayer Sender player. \n\t\t * @param msg Message.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid receiveGameCreationMessage(String fromPlayer, String msg) throws RpcException;\n\n\t\t/**\n\t\t * Server broadcast running game message from another player.\n\t\t * @param fromPlayer Sender player. \n\t\t * @param msg Message.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid receiveRunningGameMessage(String fromPlayer, String msg) throws RpcException;\n\t\t\n\t\t/**\n\t\t * Server broadcast paused game message from another player.\n\t\t * @param fromPlayer Sender player. \n\t\t * @param msg Message.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid receivePausedGameMessage(String fromPlayer, String msg) throws RpcException;\n\t\t\n\t\t/**\n\t\t * Server broadcast new turn events.\n\t\t * Client should process these events on local gameboard.\n\t\t * If there is an error processins events on local gameboard, then it means local gameboard and server gameboard view for this player are out of sync.\n\t\t * In that case, client should call {@link ServerRunningGame#getEntireGameLog()} methods to recreate a fresh local gameboard.\n\t\t * @param newTurnEvents Events generated on turn resolution.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid receiveNewTurnGameBoard(List<IGameEvent> newTurnEvents) throws RpcException;\n\t}", "@Override\r\n\t\tpublic void run()\r\n\t\t{\r\n\r\n\t\t\t\r\n\t\t\twhile(clientsocket.isConnected())\r\n\t\t\t{\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\t// get type for update. 1 for object update, 2 for new attack object\r\n\t\t\t\t\tint type = rdata.readInt();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(type == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString playerupdatestr = rdata.readUTF();\r\n\t\t\t\t\t\tJsonObject jsonObject = server.gson.fromJson(playerupdatestr, JsonObject.class);\r\n\t\t\t\t\t\tint index = findlistindex(jsonObject.get(\"ID\").getAsInt());\r\n\t\t\t\t\t\tArrayList<CollideObject> templist = server.cdc.collideObjectManager[mode].collideObjectList;\r\n\t\t\t\t\t\tCollideObject obj = server.gson.fromJson(jsonObject, templist.get(index).getClass());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\ttemplist.set(index,obj);\r\n\t\t\t\t\t\tif(obj.getFlag())\r\n\t\t\t\t\t\t\tserver.cdc.calculatecollide(mode);\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tserver.broacast_update(mode , obj);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString classname = rdata.readUTF();\r\n\t\t\t\t\t\tint id = rdata.readInt();\r\n\t\t\t\t\t\tint index = findlistindex(id);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tserver.cdc.collideObjectManager[mode].addAttackObject(collideObjecctClass.valueOf(classname), server.idcount[mode], server.randposition(),(Character) server.cdc.collideObjectManager[mode].collideObjectList.get(index));\r\n\t\t\t\t\t\t++server.idcount[mode];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception e)\r\n\t\t\t\t{\r\n\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\t//e.printStackTrace();\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}", "public void registerNewPlayer(int playerObjId)\n\t{\n\t\t// create a new array\n\t\tInteger[] array = new Integer[PROTECTEDACTIONSIZE];\n\t\tfor (int i = 0; i < array.length; i++)\n\t\t\tarray[i] = 0;\n\n\t\t// register the player with an empty array\n\t\t_floodClient.put(playerObjId, array);\n\t}", "@Override\r\n\tpublic void onBattleEvent(BattleEvent e) {\n\t\t\r\n\t}", "public void sendMessage(Message message) {\n if (accepted || !ended || message.type.equals(\"register\") || message.type.equals(\"lobby\")) {\n message.packetNum = packetNum;\n ByteBuffer buffer = ByteBuffer.wrap(SerializationUtils.serialize(message));\n SocketAddress addr = null;\n try {\n addr = client.getLocalAddress();\n log(\"sending [\" + message + \"] to \" + addr);\n client.write(buffer);\n reconciliation.add(message);\n packetNum++;\n } catch (IOException e) {\n error(\"Failed to send message to:\" + addr);\n e.printStackTrace();\n }\n }\n }", "public void sendToCurrClient ( String message ){\n currClient.send( message );\n ServerConnection[] clients = new ServerConnection[]{client1, client2, client3};\n for(ServerConnection c: clients){\n if(c != currClient && c != null )\n if ( !message.contains(\"You won\") )\n c.send(\"Wait for \" + currClient.getName() + \" to end his turn\" );\n else c.send(\"You lost the match. \" + currClient.getName() + \" won the game.\");\n }\n }", "public void updateConnectedPlayers(ArrayList<Player> connectedPlayers) throws RemoteException{\n match.setPlayers(connectedPlayers);\n for (int i=0;i<match.getPlayers().size();i++){\n System.out.println(\"[LOBBY]: Player \"+ match.getPlayers().get(i).getNickname()+ \" is in lobby\");\n }\n System.out.println(\"[LOBBY]: Refreshing Lobby..\");\n Platform.runLater(() -> firstPage.refreshPlayersInLobby());// Update on JavaFX Application Thread\n }", "public static void updateGUI(Client client) {\n\n int currentwhoHasBall = client.whoHasBall();\n int[] ids = client.getPlayersID();\n boolean currentPlayerHasBall = client.playerID == currentwhoHasBall;\n if (whoHasBall != currentwhoHasBall || storedIDs.length != ids.length) {\n\n SwingUtilities.invokeLater(() -> {\n clientGUI.label.setText(\"Waiting for player: \" + currentwhoHasBall + \" to pass\");\n clientGUI.button.setEnabled(false);\n clientGUI.dropDown.removeAllItems();\n for (int id : ids) {\n String inputString = \"Player: \" + id;\n clientGUI.dropDown.addItem(inputString);\n }\n if (currentPlayerHasBall) {\n clientGUI.label.setText(\"You have the ball, select the player you wish to pass to\");\n clientGUI.button.setEnabled(true);\n }\n });\n whoHasBall = currentwhoHasBall;\n storedIDs = ids;\n }\n }", "private void sendToAll(final byte[] data) {\n for (ServerClient client : clients) {\n send(data, client.getAddress(), client.getPort());\n }\n }", "public void enter(FieldPlayer player){\n player.getTeam().setReceiver(player);\n \n //this player is also now the controlling player\n player.getTeam().setControllingPlayer(player);\n\n //there are two types of receive behavior. One uses arrive to direct\n //the receiver to the position sent by the passer in its telegram. The\n //other uses the pursuit behavior to pursue the ball. \n //This statement selects between them dependent on the probability\n //ChanceOfUsingArriveTypeReceiveBehavior, whether or not an opposing\n //player is close to the receiving player, and whether or not the receiving\n //player is in the opponents 'hot region' (the third of the pitch closest\n //to the opponent's goal\n double PassThreatRadius = 70.0;\n\n if (( player.isInHotRegion() ||\n RandFloat() < Params.Instance().ChanceOfUsingArriveTypeReceiveBehavior) &&\n !player.getTeam().isOpponentWithinRadius(player.getPos(), PassThreatRadius)){\n player.getSteering().arriveOn();\n }\n else{\n player.getSteering().pursuitOn();\n }\n \n //FIXME: Change animation\n// player.info.setAnim(\"Run\");\n// player.info.setDebugText(\"ReceiveBall\");\n }", "public void broadcast(DefinedPacket packet)\n {\n for (UserConnection con : connections.values())\n {\n con.packetQueue.add(packet);\n }\n }", "public void createGame()\n {\n //call Client Controller's setState method with\n //a parameter of new ClientLobbyState()\n clientController.startMultiPlayerGame(\"GameLobby\");\n }", "public void broadcast(byte[] data)\n\t{\n\t\tfor(Connection c : CLIENTS)\n\t\t{\n\t\t\tsend(new Packet(data, c.getAddress(), c.getPort()));\n\t\t}\n\t}", "@Override\r\n public void update() {\n for (int i = 0; i < super.npcShips.size(); i++){\r\n super.npcShips.get(i).owner.update();\r\n for (int ii = 0; ii < Server.serverClientsList.size(); ii++) {\r\n AbstractShip ship = Server.serverClientsList.get(ii).pilot.ship;\r\n if ((Math.abs(ship.x - super.npcShips.get(i).x) < sightLength) && (Math.abs(ship.y - super.npcShips.get(i).y) < sightLength)){\r\n if (super.npcShips.get(i) instanceof Asteroid) {\r\n int asteroidNr = (super.npcShips.get(i).moving) ? 1 : 0;\r\n Server.send((\"/a/,\" + super.npcShips.get(i).name + \",\" + String.format(Locale.US, \"%1$.3f\", super.npcShips.get(i).x) + \",\" + String.format(Locale.US, \"%1$.3f\", super.npcShips.get(i).y) + \",\" + String.format(Locale.US, \"%1$.3f\", super.npcShips.get(i).rotationRadians) + \",\" + asteroidNr + \",\").getBytes(), Server.serverClientsList.get(ii).address, Server.serverClientsList.get(ii).port);\r\n } else {\r\n int moving = (super.npcShips.get(i).moving) ? 1 : 0;\r\n int turbo = (super.npcShips.get(i).turbo) ? 1 : 0;\r\n Server.send((\"/s/,\" + super.npcShips.get(i).name + \",\" + String.format(Locale.US, \"%1$.3f\", super.npcShips.get(i).x)\r\n + \",\" + String.format(Locale.US, \"%1$.3f\", super.npcShips.get(i).y)\r\n + \",\" + String.format(Locale.US, \"%1$.3f\", super.npcShips.get(i).rotationRadians)\r\n + \",\" + moving + \",\" + super.npcShips.get(i).engineLevel + \",\" + super.npcShips.get(i).gunLevel\r\n + \",\" + super.npcShips.get(i).gunCount + \",\" + super.npcShips.get(i).constitution + \",\" + turbo\r\n + \",\" + String.format(Locale.US, \"%1$.3f\", super.npcShips.get(i).curHP) + \",\" + (int)super.npcShips.get(i).owner.getPointerForGunsX() + \",\" + (int)super.npcShips.get(i).owner.getPointerForGunsY() + \",\").getBytes(), Server.serverClientsList.get(ii).address, Server.serverClientsList.get(ii).port);\r\n }\r\n }\r\n }\r\n if (super.npcShips.get(i).curHP <= 0) {\r\n if (npcShips.get(i).owner instanceof ClientPlayer) {\r\n tiles[super.npcShips.get(i).currentTile].ships.remove(super.npcShips.get(i));\r\n ClientPlayer owner = (ClientPlayer)super.npcShips.get(i).owner;\r\n BasicShip ship = new BasicShip(this, super.npcShips.get(i).owner);\r\n owner.ship = ship;\r\n ship.name = super.npcShips.get(i).name;\r\n if (Server.serverClients.get(ship.name) == null) {\r\n super.npcShips.remove(super.npcShips.get(i));\r\n super.npcShipsByName.remove(ship.name);\r\n i--;\r\n continue;\r\n }\r\n Server.serverClients.get(ship.name).pilot = owner;\r\n super.npcShips.remove(super.npcShips.get(i));\r\n super.npcShips.add(ship);\r\n super.npcShipsByName.remove(ship.name);\r\n super.npcShipsByName.put(ship.name, ship);\r\n i--;\r\n continue;\r\n }\r\n tiles[super.npcShips.get(i).currentTile].ships.remove(super.npcShips.get(i));\r\n npcShips.remove(super.npcShips.get(i));\r\n i--;\r\n }\r\n }\r\n\r\n //update every projectile, if removed then remove\r\n for (int i = 0; i < super.projectiles.size(); i++){\r\n super.projectiles.get(i).update();\r\n //Server.sendToAll(\"/p/,\" + super.projectiles.get(i).x + \",\" + super.projectiles.get(i).y + \",\" + super.projectiles.get(i));\r\n if (super.projectiles.get(i).removed) {\r\n super.projectiles.remove(i);\r\n i--;\r\n }\r\n }\r\n\r\n }", "private void processMessage(Message message) {\n log(\"\");\n log(\"\");\n// log(\"recon list: \" + reconciliation);\n log(\"message\", message);\n\n switch (message.type) {\n // Response from server when registering\n case \"accepted\":\n accepted = true;\n\n // lobby leader, this user sets the info for all users.\n if (message.stringData != null && message.stringData.equals(\"leader\")) {\n\n LobbySettings lobbySettings = new LobbySettings();\n if (requestedGameType != null)\n lobbySettings.updateType(requestedGameType);\n log(\"req points\", requestedMapCntrlPoints);\n lobbySettings.setMap(requestedMapCntrlPoints);\n\n sendLobbySettingsToServer(lobbySettings);\n }\n\n if (message.name != name) {\n name = message.name;\n System.out.println(\"Name rejected. New name: \" + name);\n }\n\n break;\n // Resend register message\n case \"rejected\":\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n sendRegisterMessage();\n break;\n // the first game message from the server\n case \"initialUpdate\":\n EntityHandler eh = message.entityHandler;\n game.entityHandler = eh;\n game.modelLayer.setEntities(eh);\n game.lobbySettings = message.lobbySettings;\n game.timeRemaining = message.timeRemaining;\n game.teamsList = message.teamsList;\n game.tankID = message.stringData;\n game.teamID = message.teamID;\n tankToUsernameMap = message.tankToNameMap;\n log(String.format(\"We are '%s' on team %d.\", message.stringData, message.teamID));\n\n // TODO this is the shit\n game.map.loadMap(message.lobbySettings.getMap());\n game.setupTerrainFlag = true;\n\n started = true;\n\n game.postConnect();\n log(\"game started!!\");\n break;\n // main update case\n case \"update\":\n if (!started)\n return;\n\n log(\"received new entity handler\");\n\n EntityHandler serverEntityHandler = message.entityHandler;\n game.entityHandler = serverEntityHandler;\n tankToHeldLength = message.tankToHeldLength;\n game.modelLayer.setEntities(serverEntityHandler);\n\n game.entityHandler.constrainTanks(game.map);\n game.entityHandler.constrainCrates(game.map);\n game.entityHandler.constrainTurrets(game.tankID, Input.cursorPos);\n\n game.timeRemaining = message.timeRemaining;\n\n double serverPacketNumber = message.packetNum;\n log(\"server packet:\" + serverPacketNumber + \", last packet we sent:\" + packetNum);\n\n int i = 0;\n while (i < reconciliation.size()) {\n Message reconMessage = reconciliation.get(i);\n\n if (reconMessage.packetNum <= serverPacketNumber) {\n log(\"reconcile!, m packet:\" + reconMessage.packetNum + \"<= server packet:\" + serverPacketNumber);\n reconciliation.remove(i);\n } else {\n log(\"server lagging behind, apply inputs again for packet: \" + reconMessage.packetNum);\n\n Integer[] keysPressed = reconMessage.keysPressed;\n double mouseHeldTime = reconMessage.mouseHeldTime;\n reconciliationUpdate(keysPressed, mouseHeldTime);\n i++;\n }\n }\n break;\n case \"endUpdate\":\n if (!started)\n return;\n\n log(\"received final entity handler\");\n accepted = false;\n started = false;\n ended = true;\n game.entityHandler = message.entityHandler;\n game.modelLayer.setEntities(message.entityHandler);\n game.entityHandler.constrainTanks(game.map);\n game.entityHandler.constrainTurrets(game.tankID, Input.cursorPos);\n game.setEndOfGame(); // assuming we are in online mode\n break;\n case \"debug\":\n String str = message.stringData;\n log(str);\n testMessages.add(message);\n break;\n default:\n error(\"unknown type: \" + message.type);\n break;\n }\n }", "@FXML\n private void JoinLobbySubmit(ActionEvent actionEvent) {\n try {\n token = Integer.parseInt(JoinLobbyViewTokenTextField.getText());\n name = JoinLobbyViewNameTextField.getText();\n\n FireStoreController fireStoreController = (FireStoreController) ControllerRegistry.get(FireStoreController.class);\n PlayerController playerController = (PlayerController) ControllerRegistry.get(PlayerController.class);\n\n joinLobby(actionEvent, name);\n goToLobby(actionEvent);\n int order = fireStoreController.getLobbySize(token);\n Players playersEnum = Players.getByOrder(order + 1)\n .orElseThrow( () -> new Exception(\"Order out of bounds\"));\n playerController.setClientPlayersEnum(playersEnum);\n Player player = playerController.setPlayerWithPlayersEnum(playersEnum, name);\n fireStoreController.addPlayer(token, player);\n } catch(NumberFormatException numberFormatException) {\n JoinLobbyViewTokenTextField.setText(\"Numbers Only\");\n } catch (Exception executionException) {\n executionException.printStackTrace();\n }\n }", "public void notifyAllFriends(PresenceModel presence);", "@Override\n\t\t\t\t\t public void visit(Player player) {\n\t\t\t\t\t\t\tPacketSendUtility.sendPacket(player, SM_SYSTEM_MESSAGE.STR_MSG_HF_ShugoCaravanAppear);\n\t\t\t\t\t }", "public void broadCastMessage(String message){\n\t\tfor (Socket s : connectedClientSockets){\n\t\t\tsendMsgToSocket(message, s);\n\t\t}\n\t}", "public void add(ClientHandler clientHandler, String nickname) {\n clientHandler.setNickname(nickname);\n\n for(String nick: nicknames){\n namesToClient.get(nick).send(new SendMessage(Constants.ANSI_BLUE + nickname + \" joins the game. \"+(nicknames.size()+1)+\" players have already joined this Lobby.\"+Constants.ANSI_RESET));\n }\n\n clientToNames.put(clientHandler, nickname);\n namesToClient.put(nickname, clientHandler);\n nicknames.add(nickname);\n view.setNamesToClient(nickname, clientHandler, false);\n\n clientHandler.registerObserver(this);\n\n if(nicknames.size()<playersNumber){\n view.waitingRoom(clientHandler);\n } else {\n view.waitingRoom(clientHandler);\n view.prepareTheLobby();\n }\n\n System.out.println(nickname + \" has joined the lobby number \" + lobbyID);\n\n clientHandler.send(new InitialSetup());\n }", "public abstract void collector(FloodItWorld w);", "public void broadCast(String message) {\n/* 1661 */ if (this.creatures != null)\n/* */ {\n/* 1663 */ for (Iterator<Creature> it = this.creatures.iterator(); it.hasNext(); ) {\n/* */ \n/* 1665 */ Creature creature = it.next();\n/* 1666 */ if (!creature.getCommunicator().isInvulnerable()) {\n/* 1667 */ creature.getCommunicator().sendNormalServerMessage(message);\n/* */ }\n/* */ } \n/* */ }\n/* */ }", "public void newLobby(ClientHandler firstClient, String nickname, int number) {\n clientToNames.put(firstClient, nickname);\n namesToClient.put(nickname, firstClient);\n nicknames.add(nickname);\n firstClient.setNickname(nickname);\n view.setNamesToClient(nickname, firstClient, false);\n\n firstClient.registerObserver(this);\n view.registerObserver(this);\n\n System.out.println(nickname + \" has joined the lobby number \" + lobbyID);\n\n playersNumber = number;\n\n System.out.println(\"The lobby number \"+ lobbyID +\" will contain \" + playersNumber + \" players\");\n\n view.waitingRoom(firstClient);\n\n firstClient.send(new InitialSetup());\n }", "public void run()\n {\n try\n {\n String ack = \"You are online!\";\n DatagramPacket outPacket = new DatagramPacket(ack.getBytes(), ack.getBytes().length, clientAddress, udpPort);\n DatagramSocket outSocket = new DatagramSocket();\n outSocket.send(outPacket);\n clients.add(new Client(inMsg.split(\",\")[1], clientAddress));\n System.out.println(LocalDateTime.now() + \n \"\\nClient \" + inMsg.split(\",\")[1] + \" connected!\" +\n \"\\nClient address is : \" + clientAddress + \" (\" + clientUDPPort + \")\" +\n \"\\n============================================\");\n }\n catch(SocketException e)\n {\n System.out.println(\"SocketException in ConnectionAccepter : \" +\n \"\\n\" + e + \n \"\\n============================================\");\n }\n catch(IOException e)\n {\n System.out.println(\"IOException in ConnectionAccepter : \" +\n \"\\n\" + e + \n \"\\n============================================\");\n }\n }", "@Override\n\tpublic void onFoeEncountered(NonPlayableFighter foe) {\n\t\tBattle fight=new Battle(player.getActiveFighter(),foe);\n\t\tfight.setListener(this);\n\t\tfight.start();\n\t\tGameGUI controller= (GameGUI)listener;\n\t\tSystem.out.println(\"LOL ? \");\n\t\tcontroller.setActiveBattle(fight);\n\t\tcontroller.initializeBattle();\n\t\tstate=GameState.BATTLE;\n\t\t\n\t}", "public void updateClientBadges()\n\t{\n\t\tString data = \"\";\n\t\tfor(int i = 0; i < m_badges.length; i++)\n\t\t\tdata += m_badges[i];\n\t\tServerMessage message = new ServerMessage(ClientPacket.BADGES_PACKET);\n\t\tmessage.addInt(0);\n\t\tmessage.addString(data);\n\t\tgetSession().Send(message);\n\t}", "@Override\n public void opponentSurrender(int id) {\n try {\n if (getClientInterface() != null)\n getClientInterface().notifyOpponentSurrender(id);\n }\n catch (RemoteException e) {\n System.out.println(\"remote sending opponent surrender error\");\n }\n }", "public void kickStart() {\n startLobby();\n }", "public AskGodsFromListGUIClientState(Client client) {\n super(client);\n playersCount = client.getGame().getPlayersCount();\n }", "public void processFights() {\n\n\t\tfor (int row = 0; row < battlefield.length; row++) {\n\t\t\tfor (int column = 0; column < battlefield[row].length; column++) {\n\t\t\t\tbattlefield[row][column].fight();\n\t\t\t}\n\t\t}\n\t}", "private void newGame() {\n try {\n toServer.writeInt(READY);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void run() {\n try {\n connectionLoggerService.add(\"Connection Join: \"\n + socket.getInetAddress().getHostName());\n Message message = readMessage();\n if (message.getCommand() == Message.Command.REGISTER_CLIENT) {\n connectionType = Message.Command.REGISTER_CLIENT;\n writeMessage(new Message.Builder()\n .accountId(bank.registerClient())\n .response(Message.Response.SUCCESS)\n .command(Message.Command.REGISTER_CLIENT)\n .send(bank.getId()));\n }\n if (message.getCommand() == Message.Command.REGISTER_AH) {\n connectionType = Message.Command.REGISTER_AH;\n writeMessage(new Message.Builder()\n .accountId(bank.registerAuctionHouse(\n message.getNetInfo().get(0)))\n .response(Message.Response.SUCCESS)\n .command(Message.Command.REGISTER_AH)\n .send(bank.getId()));\n }\n while (running) {\n message = readMessage();\n switch (message.getCommand()) {\n // UUID - senderID\n // double - amount\n case DEPOSIT: {\n bank.depositFunds(message.getSender(),\n message.getAmount());\n writeMessage(new Message.Builder()\n .response(Message.Response.SUCCESS)\n .command(Message.Command.DEPOSIT)\n .amount(message.getAmount())\n .send(bank.getId()));\n break;\n }\n // UUID - accountId\n // double - amount\n case HOLD: {\n if (bank.holdFunds(message.getAccountId(),\n message.getAmount())) {\n writeMessage(new Message.Builder()\n .response(Message.Response.SUCCESS)\n .command(Message.Command.HOLD)\n .amount(message.getAmount())\n .accountId(message.getAccountId())\n .send(bank.getId()));\n System.out.println(message.getAmount());\n } else {\n writeMessage(new Message.Builder()\n .response(\n Message.Response.INSUFFICIENT_FUNDS)\n .command(Message.Command.HOLD)\n .accountId(message.getAccountId())\n .send(bank.getId()));\n }\n break;\n }\n // UUID - accountId\n // double - amount\n case RELEASE_HOLD: {\n if (bank.releaseFunds(message.getAccountId(),\n message.getAmount())) {\n writeMessage(new Message.Builder()\n .amount(message.getAmount())\n .response(Message.Response.SUCCESS)\n .command(Message.Command.RELEASE_HOLD)\n .send(bank.getId()));\n } else {\n writeMessage(new Message.Builder()\n .response(\n Message.Response.INSUFFICIENT_FUNDS)\n .command(Message.Command.RELEASE_HOLD)\n .amount(message.getAmount())\n .send(bank.getId()));\n }\n break;\n }\n // UUID - senderId\n // UUID - accountId\n // double - amount\n case TRANSFER: {\n if (bank.transferFunds(message.getSender(),\n message.getAccountId(), message.getAmount())) {\n writeMessage(new Message.Builder()\n .response(Message.Response.SUCCESS)\n .command(Message.Command.TRANSFER)\n .amount(message.getAmount())\n .accountId(message.getAccountId())\n .send(bank.getId()));\n } else {\n writeMessage(new Message.Builder()\n .response(Message.Response.ERROR)\n .command(Message.Command.TRANSFER)\n .amount(message.getAmount())\n .accountId(message.getAccountId())\n .send(bank.getId()));\n }\n break;\n }\n // UUID - senderId\n case GET_AVAILABLE: {\n writeMessage(new Message.Builder()\n .amount(bank.getAccountFunds(message.getSender()))\n .command(Message.Command.GET_AVAILABLE)\n .send(bank.getId()));\n break;\n }\n case GET_NET_INFO: {\n writeMessage(new Message.Builder()\n .command(Message.Command.GET_NET_INFO)\n .netInfo(bank.getAuctionHouseNetInfo())\n .send(bank.getId()));\n break;\n }\n // UUID - senderId\n case GET_RESERVED: {\n writeMessage(new Message.Builder()\n .command(Message.Command.GET_RESERVED)\n .amount(bank.getHeldFunds(message.getSender()))\n .send(bank.getId()));\n break;\n }\n // UUID - sender\n // List<NetInfo> netInfo\n case DEREGISTER_AH: {\n bank.deRegisterAuctionHouse(message.getNetInfo().get(0));\n connectionLoggerService.add(\"AuctionHouse Disconnected : \"\n + socket.getInetAddress().getHostName());\n this.closeThread();\n break;\n }\n // UUID - sender\n case DEREGISTER_CLIENT: {\n bank.deRegisterClient(message.getSender());\n connectionLoggerService.add(\"Client Disconnected : \"\n + socket.getInetAddress().getHostName());\n this.closeThread();\n break;\n }\n }\n }\n } catch (ClassNotFoundException |\n NullPointerException ignored) {\n try {\n writeMessage(new Message.Builder()\n .response(Message.Response.INVALID_PARAMETERS)\n .send(bank.getId()));\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n } catch (IOException e) {\n if (connectionType == Message.Command.REGISTER_AH) {\n bank.auctionHouseConnDrop(\n socket.getInetAddress().getHostAddress());\n }\n connectionLoggerService.add(\"Connection dropped : \"\n + socket.getInetAddress().getHostName());\n this.closeThread();\n }\n }", "@Override\n public void onData(SocketIOClient client, Message data, AckRequest ackRequest) {\n data = new Message(\"hello i'm server\");\n //yuyuenamespace.getBroadcastOperations().sendEvent(\"message\", data);\n }", "@Override\n\t\tpublic void agentConnected(Agent agent) {\n\n\t\t\t// Create new input for callbacks events for the new agent\n\t\t\tagentsId.put(agent.getSystem_id(), agent);\n\t\t\taCallback.put(agent.getSystem_id(), new RemoteCallbackList<IAgentCallbackService>());\n\n\t\t\t// Send a manager Broadcast Event to all clients.\n final int N = mCallbacks.beginBroadcast();\n for (int i=0; i<N; i++) {\n try {\n mCallbacks.getBroadcastItem(i).agentConnection(getAgentDevice(agent));\n } catch (RemoteException e) {\n // The RemoteCallbackList will take care of removing\n // the dead object for us.\n }\n }\n mCallbacks.finishBroadcast();\n\t\t}", "@Override\n\tpublic void passedBy() {\n\t\tMonopolyGameController.getInstance();\n\t\tMonopolyGameController.getCurrentPlayer().increaseMoney(250);\n\t\tLogger.getInstance().notifyAll(MonopolyGameController.getCurrentPlayer().getName()+ \" gained 250 dollars by landing on Bonus Square\");\n\n\t}", "public void sendRequest() {\r\n\t\t\r\n\t\tclient.join(this, isHost, gameCode, playerName, playerNumber);\r\n\t\t\r\n\t}", "public void msgReadyForParts()\n\t{\n\t\tprint(\"Gantry: Feeder ready for party\");\n\t\tgantry_events.add(GantryEvents.FeederReadyForBin);\n\t//\tlog.add(new LoggedEvent(\"msgReadyForParts received from Feeder\"));\n\t\tstateChanged();\n\t}", "public void timeToChallenger() {\n\n\n String c = null;\n for(PlayerInterface p : onlinePlayers){\n if(p.getNickname().equals(getCurrentTurn().getCurrentPlayer().getNickname())){\n c = p.getWorkerRef().get(0).getColor();\n break;\n }\n }\n notifyCards(getCurrentTurn().getCurrentPlayer().getNickname(), c);\n notifyChoose(cardsChosen, this.getAllGods(), this.getCurrentTurn().getCurrentPlayer().getNickname());\n }", "public void updateBuildingManager(){\n for(int onFloor = 0; onFloor < passengerArrivals.size(); onFloor++){\n for(int i = 0; i < passengerArrivals.get(onFloor).size(); i++){\n PassengerArrival aPassengerArrival = passengerArrivals.get(onFloor).get(i);\n if(SimClock.getTime() % aPassengerArrival.getTimePeriod() == 0){\n \n aBuildingManager.updatePassengerRequestsOnFloor(onFloor, aPassengerArrival.getNumPassengers(),\n aPassengerArrival.getDestinationFloor());\n } \n }\n }\n }", "void broadCastMessageLocal(Message message) {\n/* 1691 */ if (this.creatures != null)\n/* 1692 */ for (Iterator<Creature> it = this.creatures.iterator(); it.hasNext(); ) {\n/* */ \n/* 1694 */ Creature creature = it.next();\n/* 1695 */ if (!creature.getCommunicator().isInvulnerable()) {\n/* 1696 */ creature.getCommunicator().sendMessage(message);\n/* */ }\n/* */ } \n/* */ }", "private void updatePlayersStatus() {\n PlayerModel[] playersInLobby = this.lobbyModel.getPlayersInLobby();\n int i = 0;\n for (; i < playersInLobby.length; i++) {\n final PlayerModel playerInLobby = playersInLobby[i];\n final TextField playerStatus = this.playersStatus[i];\n playerStatus.setColor(playerInLobby.isReady() ? Color.GREEN : Color.RED);\n playerStatus.setText(playerInLobby.getUsername());\n playerInLobby.clearPropertyChangeListeners();\n this.addPropertyChangeListener(playerInLobby, new PropertyChangeListener() {\n @Override\n public void propertyChange(PropertyChangeEvent evt) {\n String propertyName = evt.getPropertyName();\n if (propertyName.equals(\"username\")) {\n playerStatus.setText((String) evt.getNewValue());\n } else if (propertyName.equals(\"ready\")) {\n playerStatus.setColor((boolean) evt.getNewValue() ? Color.GREEN : Color.RED);\n }\n }\n });\n if (i >= 1 && this.host) {\n TextButton kickButton = kickButtons[i - 1];\n kickButton.clearListeners();\n kickButton.addListener(new ClickListener() {\n @Override\n public void clicked(InputEvent e, float x, float y) {\n Connection connection = ConnectionManager.getInstance().getConnection();\n if (connection instanceof ServerConnection) {\n UUID playerUUID = playerInLobby.getPlayerUUID();\n ServerSenderReceiver client = ((ServerConnection) connection).getClientByUUID(playerUUID);\n if (client != null) {\n connection.sendPacket(new KickPlayerPacket(playerUUID));\n ((ServerConnection) connection).removeClient(client);\n connection.getPlayer().getLobby().removePlayer(client.getPlayer());\n }\n }\n }\n });\n kickButton.setDisabled(false);\n }\n }\n for (int j = i; j < this.playersStatus.length; j++) {\n final TextField playerStatus = this.playersStatus[j];\n playerStatus.setColor(Color.RED);\n playerStatus.setText(\"\");\n if (j >= 1 && this.host) {\n TextButton kickButton = kickButtons[j - 1];\n kickButton.clearListeners();\n kickButton.setDisabled(true);\n }\n }\n }", "@Override\n public boolean build(Match m, ClientHandler ch, Server server) {\n int wID=2;\n Player p = m.getPlayer(ch.getName());\n if(p.getWorker(0).getMoved()) wID = 0;\n if(p.getWorker(1).getMoved()) wID = 1;\n ArrayList<Coordinate> coordinates = whereCanBuild(m, ch, wID);\n server.write(ch, \"serviceMessage\", \"MSGE-Build: \\n\");\n if(coordinates.size()!=0){\n Coordinate c = null;\n server.write(ch, \"serviceMessage\", \"LIST-\"+printCoordinates(coordinates));\n server.write(ch, \"interactionServer\", \"TURN-Where you want to build?\\n\");\n int id;\n while(true){\n try{\n String msg = server.read(ch);\n if(msg == null){\n for(ClientHandler chl : server.getClientHandlers()){\n server.write(chl, \"serviceMessage\", \"WINM-Player disconnected\\n\");\n }\n ch.resetConnected();\n ch.closeConnection();\n return false;\n }else{\n id = Integer.parseInt(msg);\n }\n if(id<0 || id>=coordinates.size()){\n server.write(ch, \"serviceMessage\", \"MSGE-Invalid input\\n\");\n server.write(ch, \"interactionServer\", \"TURN-Try another index: \");\n continue;\n }\n break;\n } catch (NumberFormatException e){\n server.write(ch, \"serviceMessage\", \"MSGE-Invalid input\\n\");\n server.write(ch, \"interactionServer\", \"TURN-Try another index: \");\n }\n }\n c = coordinates.get(id);\n if(c.equals(p.getWorker(wID).getPosition()))\n server.write(ch, \"serviceMessage\", \"MSGE-You're using Zeus Power!\\n\");\n m.updateBuilding(c);\n m.getBoard()[c.getX()][c.getY()].setLevelledUp(true);\n p.getWorker(wID).changeBuilt(true);\n return true;\n }else{\n return false;\n }\n\n }", "public void youWinByAbandonment() {\n try {\n if (getClientInterface() != null)\n getClientInterface().gameEndedByAbandonment(\"YOU WON BECAUSE YOUR OPPONENTS HAVE ABANDONED!!\");\n }\n catch (RemoteException e) {\n System.out.println(\"remote sending ended by abandonment error\");\n }\n }", "@Override\n\tpublic void action(GameObject triggeredBy) {\n\t\tif(triggeredBy == Directory.profile.getPlayer()){\n\t\t\t//Push a battlestate to the stateStack\n\t\t\tDirectory.engine.pushState(new BattleState((Entity)triggeredBy, (Entity)attachedTo));\n\n\t\t\t// Create custom background as gameObject\n\t\t\tGameObject background = new GameObject(0, 0, Directory.screenManager.getPercentageWidth(100.0), Directory.screenManager.getPercentageHeight(100.0));\n\t\t\t// set background values\n\t\t\tbackground.setVisible(true);\n\t\t\t\n\t\t\t//Create sprite for background out of BackgroundForest 1 image\n\t\t\t//Set sprite of background\n\t\t\tbackground.setSprite(Directory.spriteLibrary.get(\"Background_Forest_1\"));\n\n\t\t\t\n\t\t\tDirectory.engine.getCurrentState().addObj(background);\n\t\t\t\n\t\t\t//Set stae of the attached obj\n\t\t\tattachedTo.pushState(battleState);\n\t\t\tattachedTo.removeTrigger(this);\n\t\t\tattachedTo.setTriggerable(false);\n\t\t\t\n\t\t\t//Set state of player\n\t\t\ttriggeredBy.pushState(new PlayerBattleState());\n\t\t\t\n\t\t\t//Add this obj to the next state\n\t\t\t//Not needed anymore since separation of competitors from projectiles (list of targetables) in battlestate\n\t\t\t//Directory.engine.getCurrentState().addObj(attachedTo);\n\t\t\t//Directory.engine.getCurrentState().addObj(triggeredBy);\n\t\t}\n\t}", "public void broadcast(String msg, TBGPCommand command) {\n\t\tplayers.forEach((k,v) -> k.sendMessage(new TBGPMessage(command,msg)));\n\t}", "public void cardToAll() {\n\t\tfor(ClientThread player: players) {\n\t\t\tcardToOne(player);\n\t\t\ttry {Thread.sleep(200);}catch(Exception exc) {exc.printStackTrace();}\n\t\t}\n\t}", "public void updateList()\r\n\t{\r\n\t\tclientQueue.offer(name);\r\n\t}", "private void sendUpdates() {\n\n List<PeerUpdateMessage.Part> parts = new ArrayList<PeerUpdateMessage.Part>();\n for (ActivePlayer peer : player.getSavedNeighbors()) {\n PeerUpdateMessage.Part part = new PeerUpdateMessage.Part(\n peer.character.id, peer.character.getExtrapolatedMotionState());\n parts.add(part);\n }\n\n if (!parts.isEmpty()) {\n PeerUpdateMessage msg = new PeerUpdateMessage(parts);\n new ToClientMessageSink(player.session).sendWithoutConfirmation(msg);\n }\n }", "@Override\n\tpublic void onBattleStarted(BattleStartedEvent event) {\n\t\tsuper.onBattleStarted(event);\n\t\t\n\t\tSystem.out.println(\"-- Battle started !!! --\");\n\t}" ]
[ "0.6215194", "0.5950888", "0.588582", "0.5878835", "0.58566016", "0.5816598", "0.57925725", "0.576075", "0.5681018", "0.5664345", "0.557484", "0.5549135", "0.5529176", "0.549822", "0.5485352", "0.5424485", "0.5413204", "0.5384911", "0.53739977", "0.5365725", "0.536441", "0.5346722", "0.53442395", "0.53329605", "0.53302956", "0.5320751", "0.52783847", "0.5253272", "0.52086085", "0.5193004", "0.5176303", "0.5175499", "0.5169007", "0.5160558", "0.5159906", "0.5155647", "0.5148246", "0.5147763", "0.51387644", "0.51323485", "0.51278275", "0.5111948", "0.5110514", "0.5104982", "0.5084357", "0.50712544", "0.5067963", "0.50634325", "0.5060055", "0.5058844", "0.5055398", "0.50465703", "0.50459576", "0.5043783", "0.50376445", "0.5037566", "0.50354385", "0.5033856", "0.50309163", "0.50300217", "0.50297624", "0.50268936", "0.5025846", "0.50163686", "0.50151104", "0.50140506", "0.50129384", "0.5009494", "0.5008461", "0.5006348", "0.4999854", "0.49947646", "0.49928272", "0.49910465", "0.49870235", "0.4983161", "0.49824274", "0.4980805", "0.49733356", "0.49717012", "0.49673173", "0.49644116", "0.49642846", "0.4963486", "0.4954458", "0.4953633", "0.49503744", "0.49500275", "0.49406737", "0.49365503", "0.49357063", "0.4934124", "0.49324444", "0.49311936", "0.49285218", "0.49279937", "0.49246773", "0.49231517", "0.49201846", "0.49181613" ]
0.69324017
0
Returns true if a given string is a valid matric number.
public static boolean isValidMatricNumber(String test) { return test.matches(VALIDATION_REGEX); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean validateString(String string) {\n Pattern pattern = Pattern.compile(\"^([1-9]+[0-9]?|100)\\\\s([1-9]+\" +\n \"[0-9]?|100)\\\\s([1-9]+[0-9]?|100)$\");\n Matcher matcher = pattern.matcher(string);\n return matcher.matches();\n }", "public boolean isNum(String cad){\n try{\n Integer.parseInt(cad);\n return true;\n }catch(NumberFormatException nfe){\n System.out.println(\"Solo se aceptan valores numericos\");\n return false;\n }\n }", "public boolean isNumber(String s)\r\n {\r\n if (s == null)\r\n {\r\n return false;\r\n }\r\n s = s.trim();\r\n ValidNumberStateMachine vnsm = new ValidNumberStateMachine(s);\r\n return vnsm.isValid();\r\n }", "public boolean validate(String input)//true if valid\n\t{\n\t\t//loop through string verifying for numbers\n\t\tfor(int i = 0;i<input.length(); i++)\n\t\t{\n\t\t\tchar c = input.charAt(i);\n\t\t\tif(!Character.isDigit(c))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\t\n\t\t}\n\t\treturn true;\n\t}", "public static boolean isNumber(String string) {\n\n\t\ttry {\n\t\t\tLong.parseLong(string);\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\n\t}", "public static boolean isNumeric(String string) { \r\n\t\ttry { \r\n\t\t\tint testNumber = Integer.parseInt(string); \r\n\t\t} catch(NumberFormatException e) { \r\n\t\t\treturn false; \r\n\t\t} \r\n\t\t\r\n\t\treturn true; \r\n\t}", "public static boolean numbersCheck(String num)\r\n\t{\r\n\t\treturn num.matches(\"[0-9]+\");\r\n\t}", "public static boolean isNumber(String str){\n try {\n Integer.parseInt(str);\n } catch(NumberFormatException e) {\n return false;\n } catch(NullPointerException e) {\n return false;\n }\n return true;\n }", "public static boolean isNumber(String s, int radix) {\n try {\n new BigDecimal(new BigInteger(s, radix));\n\n return true;\n } catch (Exception e) {\n }\n\n return false;\n }", "private static boolean validNumber(String thing) {\n\t\treturn validDouble(thing);\n\t}", "public static boolean isNumeric(String cadena){ \r\n try {\r\n Integer.parseInt(cadena);\r\n return true;\r\n } catch (NumberFormatException e){\t\r\n System.out.println(e.getMessage());\r\n return false;\r\n }\r\n }", "private boolean valid_numbers(String nr)\n\t{\n\t\t// loop through the string, char by char\n\t\tfor(int i = 0; i < nr.length();i++)\n\t\t{\n\t\t\t// if the char is not a numeric value or negative\n\t\t\tif(Character.getNumericValue(nr.charAt(i)) < 0)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// if it did not return false in the loop, return true\n\t\treturn true;\n\t}", "public boolean isNumber(String num)\t{\n\t\tfor(int i=0;i<13;i++)\t{\n\t\t\tif(Integer.parseInt(num)==i)\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean isNumeric(String str){\n try {\n int i = Integer.parseInt(str);\n } catch (NumberFormatException nfe) {\n return false;\n }\n return true;\n }", "private boolean checkMobileDigit(String mobileNumber) {\n\t\tString patternStr = \"^[0-9]*$\";\n\t\tPattern pattern = Pattern.compile(patternStr);\n\t\tMatcher matcher = pattern.matcher(mobileNumber);\n\t\tboolean matchFound = matcher.matches();\n\t\treturn matchFound;\n\t}", "public static boolean isNumericRegex(String str)\n {\n return str.matches(\"-?\\\\d+(\\\\.\\\\d+)?\"); //match a number with optional '-' and decimal.\n }", "public static boolean test (String s){\n\t\t// This pattern tests whether string s contains 3 numbers.\n\t Pattern pattern = Pattern.compile(\"\\\\d{3}\");\n\t Matcher matcher = pattern.matcher(s);\n\t if (matcher.find()){\n\t return true; \n\t } \n\t return false; \n\t }", "public boolean isNumeric(String str){\r\n\t Pattern pattern = Pattern.compile(\"[0-9]*\");\r\n\t return pattern.matcher(str).matches(); \r\n\t}", "public boolean isNum() \n\t{ \n\t try \n\t { \n\t int d = Integer.parseInt(numeric); \n\t } \n\t catch(NumberFormatException nfe) \n\t { \n\t return false; \n\t } \n\t return true; \n\t}", "public static boolean verificaMatricolaDipendente(String matricola){\r\n\t\tif (Pattern.matches(\"[0-9]{7}\", matricola)) return true;\r\n\t\treturn false;\r\n\t}", "@Test\n void checkIsTrueForStringWithNumbers() {\n // Act, Assert\n assertTrue(IsNumeric.check(\"3\"));\n assertTrue(IsNumeric.check(\"0\"));\n assertTrue(IsNumeric.check(\"-0f\"));\n assertTrue(IsNumeric.check(\"3.8f\"));\n assertTrue(IsNumeric.check(\"-3.87F\"));\n assertTrue(IsNumeric.check(\"-3\"));\n assertTrue(IsNumeric.check(\"32f\"));\n assertTrue(IsNumeric.check(\"15D\"));\n assertTrue(IsNumeric.check(\"3.2\"));\n assertTrue(IsNumeric.check(\"0.2\"));\n assertTrue(IsNumeric.check(\"-0.28\"));\n assertTrue(IsNumeric.check(\"0.24D\"));\n assertTrue(IsNumeric.check(\"0.379d\"));\n }", "public static boolean isNumber(String string) {\n if (string == null || string.isEmpty()) {\n return false;\n }\n int i = 0;\n if (string.charAt(0) == '-') {\n if (string.length() > 1) {\n i++;\n } else {\n return false;\n }\n }\n for (; i < string.length(); i++) {\n if (!Character.isDigit(string.charAt(i))) {\n return false;\n }\n }\n return true;\n}", "public static boolean isNumeric(String cadena) {\n try {\n Integer.parseInt(cadena);\n return true;\n } catch (NumberFormatException ex) {\n return false;\n }\n }", "public static boolean isNumber(String str){\n return str != null && numberPattern.matcher(str).matches();\n }", "private boolean isNumeric(String s) {\n return java.util.regex.Pattern.matches(\"\\\\d+\", s);\n }", "public static boolean isValidNumber(String number) {\n\t\tSet<String> set = new HashSet<String>();\n\t\tset.add(\"4\");\n\t set.add(\"7\");\n\t\t\n\t if(number.substring(0, 1).equals(\"3\") && set.contains(number.substring(1, 2)) && number.length() == 15) { return true; }\n\t\treturn false;\n\t}", "private boolean isValidNumber(String number) {\n if (null == number) {\n return false;\n }\n\n int i = 0;\n for (i = 0; i < number.length(); ++i) {\n if (number.charAt(i) != '+' && number.charAt(i) != '-') {\n if (Character.isDigit(number.charAt(i))) {\n break;\n }\n\n // Found a character that isn't a digit or sign\n return false;\n }\n }\n\n int firstDigitIndex = i;\n\n if (number.length() == i) {\n // The number has only signs\n return false;\n }\n\n return (number.substring(firstDigitIndex).chars().allMatch(Character::isDigit));\n }", "public static boolean ComprobarNumero(String str) {\n try {\n double d = Double.parseDouble(str);\n return true;\n } catch (NumberFormatException nfe) {\n \treturn false;\n }\n }", "public static boolean isValidMobileNo(String str) \n\t\t\t{\n\t\t\tPattern ptrn = Pattern.compile(\"(0/91)?[0-9]{9}\"); \n\t\t\t//the matcher() method creates a matcher that will match the given input against this pattern \n\t\t\tMatcher match = ptrn.matcher(str); \n\t\t\t//returns a boolean value \n\t\t\treturn (match.find() && match.group().equals(str)); \n\t\t\t}", "public static boolean isNumeric(String strNum) {\n if (strNum == null) {\n return false;\n }\n try {\n Integer d = Integer.parseInt(strNum);\n } catch (NumberFormatException nfe) {\n return false;\n }\n return true;\n }", "@Override\r\n\tpublic boolean validate(String num) {\n\t\treturn false;\r\n\t}", "public boolean isNumeric(String cadena) {\n try {\r\n Integer.parseInt(cadena);\r\n return true;\r\n } catch (NumberFormatException nfe) {\r\n return false;\r\n }\r\n }", "@Test\n void checkIsTrueForStringWithNumbersWithSpacesAtTheBeginningAndEnd() {\n // Act, Assert\n assertTrue(IsNumeric.check(\" 3\"));\n assertTrue(IsNumeric.check(\"32 \"));\n assertTrue(IsNumeric.check(\" 3.2 \"));\n assertTrue(IsNumeric.check(\" -0.2\"));\n assertTrue(IsNumeric.check(\" -0.2d\"));\n assertTrue(IsNumeric.check(\"0.24D \"));\n assertTrue(IsNumeric.check(\"0.28 \"));\n assertTrue(IsNumeric.check(\" 3.8f\"));\n assertTrue(IsNumeric.check(\"-3.87F \"));\n }", "private boolean isNumber(String s) {\n\t\ttry {\n\t\t\tDouble.parseDouble(s);\n\t\t} catch (NumberFormatException nfe) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public static boolean isMobileNumber(String iNumber){\n\t\tif(General.isNotNull(iNumber))\n\t\t\treturn Pattern.matches(Constants.NUMBER_CHECK, iNumber);\n\t\treturn false;\n\t}", "static boolean isRomanNumeral(String s) {\n return s.matches(\"^(?=.)M*(C[MD]|D?C{0,3})\"\n + \"(X[CL]|L?X{0,3})(I[XV]|V?I{0,3})$\");\n }", "private static boolean isValidDigit(String strInput) {\n boolean isValid = true;\n if (isPrimitive(strInput)) {\n int input = Integer.parseInt(strInput);\n if (input < 1 || input > 255) {\n log.debug(\"Wrong config input value: {}\", strInput);\n isValid = false;\n } else {\n isValid = true;\n }\n\n } else {\n isValid = false;\n }\n\n return isValid;\n }", "public static boolean isNumber(String s) \r\n{ \r\n for (int i = 0; i < s.length(); i++) \r\n if (Character.isDigit(s.charAt(i)) \r\n == false) \r\n return false; \r\n\r\n return true; \r\n}", "private boolean phoneNumberParser(String string) {\r\n if (!Character.isDigit(string.charAt(0)))\r\n return false;\r\n else if (!Character.isDigit(string.charAt(1)))\r\n return false;\r\n else if (!Character.isDigit(string.charAt(2)))\r\n return false;\r\n else if (string.charAt(3) != '-')\r\n return false;\r\n else if (!Character.isDigit(string.charAt(4)))\r\n return false;\r\n else if (!Character.isDigit(string.charAt(5)))\r\n return false;\r\n else if (!Character.isDigit(string.charAt(6)))\r\n return false;\r\n else if (string.charAt(7) != '-')\r\n return false;\r\n else if (!Character.isDigit(string.charAt(8)))\r\n return false;\r\n else if (!Character.isDigit(string.charAt(9)))\r\n return false;\r\n else if (!Character.isDigit(string.charAt(10)))\r\n return false;\r\n else if (!Character.isDigit(string.charAt(11)))\r\n return false;\r\n return true;\r\n\r\n }", "public static boolean isNumeric(String strNum) {\r\n if (strNum == null) {\r\n return true;\r\n }\r\n try {\r\n Integer.parseInt(strNum);\r\n } catch (NumberFormatException nfe) {\r\n return true;\r\n }\r\n return false;\r\n }", "public static boolean isNumeric(String str) {\n\t\ttry {\n\t\t\tInteger.parseInt(str.trim().substring(0, 1));\n\t\t\treturn true;\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public static boolean isNumeric(String str) {\n try {\n Integer d = Integer.parseInt(str);\n } catch (NumberFormatException nfe) {\n return false;\n }\n return true;\n }", "public static boolean isIntValid (String str) {\r\n try {Integer.parseInt(str);} catch (NumberFormatException e) {return false;}\r\n return true;\r\n }", "private static boolean isNumeric(String str){\n return str.matches(\"-?\\\\d+(\\\\.\\\\d+)?\"); //match a number with optional '-' and decimal.\n }", "private static boolean isNumeric(String cadena)\n\t {\n\t\t try \n\t\t {\n\t\t\t Integer.parseInt(cadena);\n\t\t\t return true;\n\t\t } catch (NumberFormatException nfe)\n\t\t {\n\t\t\t return false;\n\t\t }\n\t }", "private static boolean areNumbers(String s) {\n boolean isADigit = false;//only changed once everything has been checked\n //checks if places 0-2 are numbers and 3 is a \"-\"\n for(int i = 0; i < 3; i++) {\n if(Character.isDigit(s.charAt(i)) && s.charAt(3) == '-') {\n isADigit = true;\n }\n }\n //checks if places 4-5 are numbers and 6 is a \"-\"\n for(int i = 4; i < 6; i++) {\n if(Character.isDigit(s.charAt(i)) && s.charAt(6) == '-') {\n isADigit = true;\n }\n }\n //checks if places 7-10 are numbers\n for(int i = 7; i < 11; i++) {\n if(Character.isDigit(s.charAt(i))) {\n isADigit = true;\n }\n }\n return isADigit;\n }", "public static boolean isNumber(final String s) {\r\n\t\tfor (int i = 0; i < s.length(); i++) {\r\n\t\t\tif (!Character.isDigit(s.charAt(i))) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "private boolean isValid(String input){\n return input.length() == 10 && input.matches(\"-?\\\\d+(\\\\.\\\\d+)?\");\n //check its digits\n }", "public static boolean isInt(String strNum) {\n try {\n int d = Integer.parseInt(strNum);\n } catch (NumberFormatException | NullPointerException nfe) {\n System.out.println(\"Invalid data format\");\n log.error(nfe);\n return false;\n }\n return true;\n }", "private boolean isNumber(String str) {\r\n int ASCII_0 = 48;\r\n int ASCII_9 = 57;\r\n if (str.equals(\"\")) {\r\n return false;\r\n }\r\n for (int i = 0; i < str.length(); i++) {\r\n int chr = str.charAt(i);\r\n if (chr < ASCII_0 || chr > ASCII_9) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public static boolean isNumeric(String str)\n {\n return str.matches(\"-?\\\\d+(\\\\.\\\\d+)?\"); //match a number with optional '-' and decimal.\n }", "public boolean isContainNumericalDigits(String password) {\n\t\treturn password.matches(\".*[0-9].*\");\n\t}", "public static boolean isValidEgyptianMobileNumber(String number) {\n if (number.length() != 11) {\n return false;\n } else if (!number.startsWith(\"01\")) {\n return false;\n } else {\n char operatorDifferentiator = number.charAt(2);\n\n if (operatorDifferentiator != '0' && operatorDifferentiator != '1' && operatorDifferentiator != '2') {\n return false;\n } else {\n try {\n long l = Long.parseLong(number);\n } catch (NumberFormatException ex) {\n return false;\n }\n }\n }\n return true;\n }", "public boolean checkInput(String str)\n {\n try\n {\n Integer.parseInt(str);\n } \n catch(NumberFormatException ex)\n {\n return false;\n } \n return true;\n }", "private static boolean stringTest(String s){\n try{ //depending on whether this is successful or not will return the relevant value\n Integer.parseInt(s);\n return true;\n } catch (NumberFormatException ex){\n return false;\n }\n }", "static boolean isLong(String strNum) {\n\t\ttry {\n\t\t\tLong.parseLong(strNum);\n\t\t} catch (NumberFormatException | NullPointerException nfe) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public static boolean isNumber(String text)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tInteger.parseInt(text);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tcatch(NumberFormatException e)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean isNumber(String sIn)\r\n {\r\n int parseNumber = -1;\r\n \r\n try{\r\n parseNumber = Integer.parseInt(sIn);\r\n }catch(Exception e){\r\n return false;\r\n }\r\n \r\n return true;\r\n }", "public boolean isNumeric(String strNum) {\n if (strNum == null) {\n return false;\n }\n try {\n double d = Double.parseDouble(strNum);\n } catch (NumberFormatException nfe) {\n return false;\n }\n return true;\n }", "private boolean validar_numero(String numero) {\n boolean es_valido;\n es_valido = numero.charAt(0) != '0';\n return es_valido;\n }", "private boolean isNumber( String test ) {\n\treturn test.matches(\"\\\\d+\");\n }", "public boolean isNumber(String str)\r\n\t{\r\n\t\tfor(int i = 0; i < str.length(); i++)\r\n\t\t{\r\n\t\t\tif(!Character.isDigit(str.charAt(i)))\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private static boolean isNumber(String value){\r\n\t\tfor (int i = 0; i < value.length(); i++){\r\n\t\t\tif (value.charAt(i) < '0' || value.charAt(i) > '9')\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "protected boolean isNumber(String s)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tDouble.parseDouble(s);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tcatch(NumberFormatException ex)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public static boolean isNumber(String text) {\r\n\t\ttry {\r\n\t\t\tInteger.parseInt(text);\r\n\t\t} catch(NumberFormatException e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static boolean numberFormatIsValid(String value) {\n return value.matches(\"^(([0-9]{1,3}[.][0-9]{1,2})|([0-9]{1,3}))$\");\n }", "private boolean containsOnlyNumbers(String inputString)\r\n {\r\n inputString = inputString.trim();\r\n if (inputString.equals(null))\r\n return false;\r\n else\r\n for (int i = 0; i < inputString.length(); i++)\r\n if (!(inputString.charAt(i) >= '0' && inputString.charAt(i) <= '9'))\r\n return false;\r\n return true;\r\n }", "public static boolean isNumeric(String str)\n {\n return str.matches(\"-?\\\\d+(\\\\.\\\\d+)?\"); //match a number with optional '-' and decimal.\n }", "private boolean isValidNumber(String quantity) {\n\t\ttry{\n\t\t\tint value=Integer.parseInt(quantity);\n\t\t\treturn value>0? true: false;\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "public static boolean validatenum(String str) {\n\t\tchar[] s=str.toCharArray();\n\t\tfor(int i=0;i<str.length();i++) {\n\t\t\tchar temp=s[i];\n\t\t\ts[i]=temp; \n\t\t}\n\t\tchar ch;\n\t\tboolean capital=false;\n\t\tboolean lower=false;\n\t\tboolean num=false;\n\t\tboolean spc=false;\n\t\tfor(int i=0; i<s.length; i++) {\n\t\t\tch=s[i];\n\t\t\tif(s.length>9) {\n\t\t\t\tif(Character.isDigit(ch)) {\n\t\t\t\t\tSystem.out.println(\"digit char: \"+ch);\n\t\t\t\t\tnum=true;\n\t\t\t\t}\n\t\t\t\telse if(Character.isUpperCase(ch)) {\n\t\t\t\t\tSystem.out.println(\"upper char: \"+ch);\n\t\t\t\t\tcapital=true;\n\t\t\t\t}\n\t\t\t\telse if(Character.isLowerCase(ch)) {\n\t\t\t\t\tSystem.out.println(\"lower char: \"+ch);\n\t\t\t\t\tlower=true;\n\t\t\t\t}\n\t\t\t\telse if((int)ch==(int)'$'|| (int)ch==(int)'#') {\n\t\t\t\t\tSystem.out.println(\"special char: \"+ch);\n\t\t\t\t\tspc=true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Extra :\"+ch);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\t\n\t\t}\n\t\tif(num && spc && lower && capital) {\n\t\t\tSystem.out.println(\"String is valid :\" + \"num: \"+num+\" spc: \"+spc+\" lower: \"+lower+\" capital: \"+capital);\n\t\t\treturn true;\n\t\t}\n\t\t//System.out.println(\"String is valid :\" + \"num: \"+num+\" spc: \"+spc+\" lower: \"+lower+\" capital: \"+capital);\n\t\treturn false;\n\t}", "public static boolean isNumeric(String strNum) {\n if (strNum == null) {\n return false;\n }\n try {\n double d = Double.parseDouble(strNum);\n } catch (NumberFormatException nfe) {\n return false;\n }\n return true;\n }", "private static boolean isNumeric(String str) {\n // The regular expression can match all numbers, including negative numbers\n Pattern pattern = Pattern.compile(\"-?[0-9]+(\\\\.[0-9]+)?\");\n String bigStr;\n try {\n bigStr = new BigDecimal(str).toString();\n } catch (Exception e) {\n return false;\n }\n // matcher是全匹配\n Matcher isNum = pattern.matcher(bigStr);\n return isNum.matches();\n }", "private boolean isNumber(final String number) {\n try {\n Integer.parseInt(number);\n return true;\n } catch (Exception e) {\n LOGGER.error(\"Not a number \" + number, e);\n return false;\n }\n }", "public boolean isNumeric(String sNumericString) {\n try {\n for (char c : sNumericString.toCharArray()) {\n if (!Character.isDigit(c)) {\n return false;\n }\n }\n return true;\n } catch (Exception e) {\n return false;\n }\n }", "public boolean isNum(String x) {\n\t\tfor (int i = 0; i < x.length(); i++) {\n\t\t\tchar c = x.charAt(i);\n\t\t\tif ((c == '-' || c == '+') && x.length() > 1)\n\t\t\t\tcontinue;\n\t\t\tif ((int) c > 47 && (int) c < 58)\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private static boolean isNumeric(String str)\t{\n\n\t\treturn str.matches(\"-?\\\\d+(\\\\.\\\\d+)?\"); \n\t\t\t// match a number with optional '-' and decimal.\n\t}", "public static boolean isNumericString(String value) {\n\t try {\n\t\t if (Double.parseDouble(value) > 0) {\n\t\t return true;\n\t\t }\n\t } catch (NumberFormatException nfe) {\n\t return false;\n\t }\n\t return false;\n\t}", "private boolean isStringValid(String s){\n int[] result = getLeftRightCount(s);\n return result[0] == 0 && result[1] == 0;\n }", "public boolean isNumber(String in) \n\t{\n\t\ttry \n\t\t{\n\t\t\tInteger.parseInt(in);\n\t\t\treturn true;\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public static boolean isInteger(String string) {\r\n\t try {\r\n\t Integer.valueOf(string);\r\n\t return true;\r\n\t } catch (NumberFormatException e) {\r\n\t return false;\r\n\t }\r\n\t}", "public boolean checkInt( String s ) {\n \tchar[] c = s.toCharArray();\n \tboolean d = true;\n\n \tfor ( int i = 0; i < c.length; i++ )\n \t // verifica se o char não é um dígito\n \t if ( !Character.isDigit( c[ i ] ) ) {\n \t d = false;\n \t break;\n \t }\n \treturn d;\n \t}", "public boolean isNumber(String str) {\n\t\treturn str.matches(\"-?\\\\d+(\\\\.\\\\d+)?\");\n\t}", "public static boolean containsOnlyDigitsV1(String str) {\n\n if (str == null || str.isBlank()) {\n // or throw IllegalArgumentException\n return false;\n }\n \n for (int i = 0; i < str.length(); i++) {\n if (!Character.isDigit(str.charAt(i))) {\n return false;\n }\n }\n \n return true;\n }", "public boolean isValid(String s) {\n if (s.contains(\".\")) {\n String[] part = s.split(\"\\\\.\");\n if (!part[0].equals(\"0\") && part[0].startsWith(\"0\")) {\n return false;\n } else {\n return !part[1].endsWith(\"0\");\n }\n } else {\n /*\n if the point has no decimal points, we can return true if the string is 0 or if it does not start with\n 0 since 01, 04, 06, etc. are not valid\n */\n if (s.equals(\"0\")) {\n return true;\n } else {\n return !s.startsWith(\"0\");\n }\n }\n }", "private static boolean m4389a(String str) {\n return str != null && str.length() != 0 && Pattern.compile(\"^[0-9A-Fa-f]{13,18}+$\").matcher(str).matches() && str.indexOf(\"000000000\") == -1 && str.indexOf(\"111111111\") == -1 && str.indexOf(\"222222222\") == -1 && str.indexOf(\"333333333\") == -1 && str.indexOf(\"444444444\") == -1 && str.indexOf(\"555555555\") == -1 && str.indexOf(\"666666666\") == -1 && str.indexOf(\"777777777\") == -1 && str.indexOf(\"888888888\") == -1 && str.indexOf(\"999999999\") == -1;\n }", "public static boolean isValid(String str)\n\t{\n\t\tboolean len = false;\n\t\tboolean cap = false;\n\t\tboolean small = false;\n\t\tboolean num = false;\n\t\tboolean valid = false;\n\n\t\tchar[] pieces = str.toCharArray();\n\n\t\tif(!(pieces.length<6))\n\t\t{\n\t\t\tlen = true;\n\t\t\tfor(int i=0; i<pieces.length; i++)\n\t\t\t{\n\t\t\t\tif(Character.isLowerCase(pieces[i])) \n\t\t\t\t\tcap = true;\n\t\t\t\telse if(Character.isUpperCase(pieces[i])) \n\t\t\t\t\tsmall = true;\n\t\t\t\telse if(Character.isDigit(pieces[i])) \n\t\t\t\t\tnum = true;\n\t\n\t\t\t\tif(len && cap && small && num)\n\t\t\t\t\tvalid = true;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn valid;\n\t}", "public boolean isNumeric(String str) {\n try {\n Double.parseDouble(str);\n } catch (NumberFormatException nfe) {\n return false;\n }\n return true;\n }", "public static boolean isINT(final String token) {\n\t\t// Check for empty or 1-size strings.\n\t\tif (token.length() < 2)\n\t\t\treturn false;\n\n\t\t// verify all chars are 0-9.\n\t\tfor (int i = 0; i < token.length(); i++) {\n\t\t\tif (!digits.contains(Character.toString(token.charAt(i)))) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Passes all tests!\n\t\treturn true;\n\t}", "public static boolean isNumeric(String str)\n {\n return str.chars().allMatch( Character::isDigit );\n }", "public static boolean isNumeric(String input) {\n\t\ttry {\n\t\t\tInteger.parseInt(input);\n\t\t\treturn true;\n\t\t}\n\t\tcatch (NumberFormatException e) {\n\t\t\t// string is not numeric\n\t\t\treturn false;\n\t\t}\n\t}", "public static boolean esNumero(String cadena) {\n try {\n Integer.parseInt(cadena);\n return true;\n } catch (NumberFormatException nfe) {\n return false;\n }\n }", "public boolean isDigit(String s)\r\n\t\t{\n\t\t\tfor(char c : s.toCharArray())\r\n\t\t\t{\r\n\t\t\t if(!(Character.isDigit(c)))\r\n\t\t\t {\r\n\t\t\t return false;\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t\t//return false;\r\n\t\t\treturn true;\r\n\t\t}", "public boolean isZero() {\n Pattern pattern = Pattern.compile(\"0+\");\n Matcher matcher = pattern.matcher(numberString);\n return matcher.matches();\n }", "public boolean checkInput(String input){\n\t\t//make sure only input 0-9\n\t\tif(input.length() != 1){\n\t\t\treturn false;\n\t\t}\n\t\tchar c = input.charAt(0);\n\t\tif(!Character.isDigit(c)){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public static boolean isNumeric(String str) {\n if (isBlank(str)) {\n return false;\n }\n\n char[] charArray = str.toCharArray();\n\n for (char c : charArray) {\n if (!Character.isDigit(c)) {\n return false;\n }\n }\n\n return true;\n }", "private boolean is_phonenumber(String nr)\n\t{\n\t\t// if the string is not null, length is between 0 and 16, starts with \"00\" and all the characters in the sttring are numbers\n\t\t// then it's valid\n\t\tif(nr != null && nr.length() > 0 && nr.length() < 16 && nr.substring(0, 2).equals(\"00\") && valid_numbers(nr))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean containsValidCharacters(String inputString)\r\n {\r\n boolean validityFlag = true;\r\n int inputStringLength = inputString.trim().length();\r\n for (int i = 0 ; i < inputStringLength ; i++)\r\n {\r\n char digit = inputString.charAt(i);\r\n if (!((digit >= 'A' && digit <= 'Z') || (digit >= 'a' && digit <= 'z') || (digit >= '0' && digit <= '9')))\r\n {\r\n validityFlag = false;\r\n break;\r\n }\r\n }\r\n return validityFlag;\r\n }", "private boolean esNumero(String cadena) {\n try {\n Integer.parseInt(cadena);\n return true;\n } catch (NumberFormatException nfe) {\n return false;\n }\n }", "public static boolean isValid(String string){\n\t\tint count = 0;\n\t\t//start count at 0, which resets to 0 every time the string is valid\n\t\tfor(int i = 0; i < string.length(); i++){\n\t\t\t//iterate through the whole string\n\t\t\tif(string.charAt(i) == '('){\n\t\t\t\t//if it is an opening parentheses sign, increment count\n\t\t\t\tcount++;\n\t\t\t} else{\n\t\t\t\t/*\n\t\t\t\t * otherwise, if count is zero, then it is valid until this character which\n\t\t\t\t * is a closing parentheses\n\t\t\t\t */\n\t\t\t\tif(count == 0){\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\t//last case: decrement count, so it is still valid\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//return true if the count is 0\n\t\t} return count == 0;\n\t}", "public static boolean isValidMobileNo(String str) {\n Pattern ptrn = Pattern.compile(\"(0/91)?[7-9][0-9]{9}\"); \r\n //the matcher() method creates a matcher that will match the given input against this pattern \r\n Matcher match = ptrn.matcher(str); \r\n //returns a boolean value \r\n return (match.find() && match.group().equals(str)); \r\n }" ]
[ "0.66781497", "0.663716", "0.6584987", "0.65731156", "0.6554726", "0.65470386", "0.6515935", "0.64526975", "0.6435642", "0.64261943", "0.6424161", "0.6409515", "0.63938755", "0.6388735", "0.63664764", "0.6364128", "0.63558257", "0.63445854", "0.63284206", "0.6313691", "0.6289809", "0.6277665", "0.6277574", "0.62759125", "0.62733185", "0.6259972", "0.6247431", "0.6246569", "0.6246433", "0.62403566", "0.62392515", "0.6233491", "0.62328327", "0.62323385", "0.6214906", "0.6212652", "0.62122494", "0.6206344", "0.6203992", "0.6200789", "0.61951077", "0.61785847", "0.61766875", "0.6165181", "0.6164649", "0.6163266", "0.61560565", "0.61475605", "0.6137504", "0.61195296", "0.6115906", "0.60996246", "0.6098973", "0.60943514", "0.60918546", "0.60918516", "0.6089754", "0.60893494", "0.6086483", "0.6085697", "0.6083513", "0.6073162", "0.6060676", "0.60546076", "0.60534036", "0.60531455", "0.60428953", "0.6041084", "0.6028996", "0.60288125", "0.6018156", "0.6016096", "0.60083574", "0.6002915", "0.60019225", "0.6000145", "0.5999869", "0.59998024", "0.59972835", "0.5994226", "0.5989382", "0.5986445", "0.5977532", "0.5975666", "0.59751177", "0.5973545", "0.5970246", "0.5966124", "0.59602594", "0.5957842", "0.5953945", "0.5953835", "0.5951877", "0.594631", "0.59342366", "0.59308577", "0.5929029", "0.59102124", "0.5904598", "0.58972454" ]
0.7875398
0
act() method called by Greenfoot at every "act" or step of execution
public void act(){ // Removing object, if out of the simulated zone if (atWorldEdge()){ getWorld().removeObject(this); return; } //Move Thanos up setLocation (getX(), getY() - speed); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void act() {\n\t}", "@Override\n public void act() {\n }", "public void act() \n {\n moveEnemy();\n checkHealth();\n attacked();\n }", "public void act() {\r\n\t\tturn(steps[number % steps.length]);\r\n\t\tnumber++;\r\n\t\tsuper.act();\r\n\t}", "public void act() \r\n {\n }", "public void act() \r\n {\n }", "public void act() \r\n {\n }", "@Override\r\n\tpublic void act() {\n\t\tausgeben();\r\n\t}", "void act();", "public void act()\n {\n trackTime();\n showScore();\n \n }", "@Override\n\tpublic void act(float dt){\n\t\t\n\t}", "public void act();", "public void act() \n {\n frameCount++;\n animateFlying();\n if (getWorld() instanceof DreamWorld)\n {\n dream();\n }\n else if (getWorld() instanceof FinishScreen)\n {\n runEnd();\n }\n }", "public void act()\n {\n // handle key events\n String key = Greenfoot.getKey();\n if (key != null)\n {\n handleKeyPress(key);\n } \n\n // handle mouse events\n if (startGameButton.wasClicked())\n {\n handleStartGame();\n }\n }", "public void act() \r\n {\r\n mueve();\r\n //tocaJugador();\r\n //bala();\r\n disparaExamen();\r\n }", "private void act() {\n\t\tmyAction.embodiment();\n\t}", "public void act() \n {\n moveAround(); \n addBomb(); \n touchGhost(); \n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() {\n\n\tif (0 == stepCount) {\n\n\t ArrayList<Location> node = new ArrayList<Location>();\n\t node.add(getLocation());\n\t crossLocation.push(node);\n\t}\n\n\tboolean willMove = canMove();\n\tif (isEnd == true) {\n\t //to show step count when reach the goal\t\t\n\t if (hasShown == false) {\n\t\tString msg = stepCount.toString() + \" steps\";\n\t\tJOptionPane.showMessageDialog(null, msg);\n\t\thasShown = true;\n\t }\n\t} else if (willMove) {\n\t\n\t move();\n\t //increase step count when move \n\t stepCount++;\n\t} else {\n\t \n\t back();\n\t stepCount++;\n\t}\n\n }", "public void act() \r\n {\r\n key();\r\n win();\r\n fall();\r\n lunch();\r\n }", "public void act() \n {\n // Add your action code here.\n klawisze();\n stawiaj();\n pobierzJablka();\n }", "@Override\n\tpublic void action() {\n\t\tSystem.out.println(\"action now!\");\n\t}", "public void act() \n {\n if(s == 0)\n {\n lead();\n lookForFood();\n lookForEdge();\n lookForTail();\n }\n else\n {\n follow();\n }\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "@Override\n protected void doAct() {\n }", "public void act() \n {\n // Add your action code here.\n tempoUp();\n }", "public void act() \n {\n movement();\n }", "public void act() \n {\n if (canGiveTestimony()) {\n giveTestimony();\n }\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n tembak();\r\n gerakKiri();\r\n gerakKanan();\r\n \r\n \r\n \r\n }", "public void act() \r\n {\r\n move(speed); //move at set speed\r\n \r\n if(actCounter < 2) //increases act counter if only 1 act has passed\r\n actCounter++;\r\n\r\n if(actCounter == 1) //if on the first act\r\n {\r\n targetClosestPlanet(); //will target closest planet depending on if it wants to find an unconquered planet, or just the closest one\r\n if(planet == null && findNearestPlanet)\r\n findNearestPlanet = false;\r\n }\r\n \r\n if(health > 0) //if alive\r\n {\r\n if(findNearestPlanet)\r\n targetClosestPlanet();\r\n if(planet != null && planet.getWorld() != null) //if planet exists\r\n moveTowards(); //move toward it\r\n else\r\n moveRandomly(); //move randomly\r\n }\r\n \r\n if(removeMe || atWorldEdge())\r\n getWorld().removeObject(this);\r\n }", "@Override\n public void act(float delta) {\n }", "public void act() {\n\t\tboolean willMove = canMove();\n\t\tif (isEnd) {\n\t\t//to show step count when reach the goal\n\t\t\tif (!hasShown) {\n\t\t\t\tString msg = stepCount.toString() + \" steps\";\n\t\t\t\tJOptionPane.showMessageDialog(null, msg);\n\t\t\t\thasShown = true;\n\t\t\t}\n\t\t} else if (willMove) {\n\t\t\t//visit the next node\n\t\t\tisVisited[next.getRow()][next.getCol()] = true;\n\t\t\tmove();\n\t\t\tstepCount++;\n\t\t} else {\n\t\t\t// back to the cross location\n\t\t\tback();\n\t\t\tstepCount++;\n\t\t}\n\t}", "public void act() \n {\n gravity();\n animate();\n }", "public void act() \n {\n mouse = Greenfoot.getMouseInfo();\n \n // Removes the achievement after its duration is over if its a popup (when it pops up during the game)\n if(popup){\n if(popupDuration == 0) getWorld().removeObject(this);\n else popupDuration--;\n }\n // Displays the decription of the achievement when the user hovers over it with the mouse\n else{\n if(Greenfoot.mouseMoved(this)) drawDescription();\n if(Greenfoot.mouseMoved(null) && !Greenfoot.mouseMoved(this)) drawMedal();\n }\n }", "public void act(){\n super.act();\n }", "public void act() \r\n {\r\n if ( Greenfoot.isKeyDown( \"left\" ) )\r\n {\r\n turn( -5 );\r\n }\r\n\r\n else if ( Greenfoot.isKeyDown( \"right\" ) )\r\n {\r\n turn( 5 );\r\n }\r\n if ( Greenfoot.isKeyDown(\"up\") )\r\n {\r\n move(10);\r\n }\r\n else if ( Greenfoot.isKeyDown( \"down\") )\r\n {\r\n move(-10);\r\n }\r\n if ( IsCollidingWithGoal() )\r\n {\r\n getWorld().showText( \"You win!\", 300, 200 );\r\n Greenfoot.stop();\r\n }\r\n }", "public void act() \n {\n // Add your action code here.\n MyWorld world = (MyWorld) getWorld();\n jefe = world.comprobarJefe();\n \n \n explotar();\n \n if(jefe)\n {\n girarHaciaEnemigo();\n movimientoPegadoAJefe();\n }\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act ()\n {\n checkScroll();\n checkPlatform();\n checkXAxis();\n checkDeath();\n // get the current state of the mouse\n MouseInfo m = Greenfoot.getMouseInfo();\n // if the mouse is on the screen...\n if (m != null)\n {\n // if the mouse button was pressed\n if (Greenfoot.mousePressed(null))\n {\n // shoot\n player.shoot(m.getX(), m.getY());\n }\n }\n }", "@Override\n public void act() {\n sleepCheck();\n if (!isAwake()) return;\n while (getActionTime() > 0f) {\n UAction action = nextAction();\n if (action == null) {\n this.setActionTime(0f);\n return;\n }\n if (area().closed) return;\n doAction(action);\n }\n }", "@Override\n\t\t\t\t\tpublic void act(Board b) {\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void act(Board b) {\n\t\t\t\t\t}", "public void act() \n {\n \n checkKey();\n platformAbove();\n \n animationCounter++;\n checkFall();\n }", "public void act() \n {\n movegas();\n \n atingido2(); \n \n }", "public void act() \n {\n checkCollision();\n KeyMovements(); \n attackWeapon();\n //stopGame();\n \n }", "public void act()\n {\n // Make sure fish is alive and well in the environment -- fish\n // that have been removed from the environment shouldn't act.\n if ( isInEnv() ) \n move();\n }", "public void act() \r\n {\r\n if (startTime > 0) {\r\n startTime--;\r\n }\r\n else {\r\n if (isScared()) {\r\n doScareMode();\r\n }\r\n else {\r\n if (counter == 0 || !canMove(currDirectionStr)) {\r\n counter = CELL_SIZE * 4;\r\n prevDirection = currDirection;\r\n do {\r\n currDirection = (int)(Math.random() * 10);\r\n if (currDirection == 0) {\r\n currDirectionStr = \"up\";\r\n }\r\n else if (currDirection == 1) {\r\n currDirectionStr = \"left\";\r\n }\r\n else if (currDirection == 2) {\r\n currDirectionStr = \"down\";\r\n }\r\n else if (currDirection == 3) {\r\n currDirectionStr = \"right\";\r\n }\r\n } while (!canMove(currDirectionStr));\r\n }\r\n \r\n if (canMove(currDirectionStr)) {\r\n move(currDirectionStr);\r\n }\r\n counter--;\r\n } \r\n }\r\n }", "public void act()\n {\n \n if (wait < 75)\n {\n wait = wait + 1;\n }\n \n \n \n \n \n \n if (wait == 75)\n {\n change();\n checkForBounce();\n checkForEdge();\n checkWin(); \n }\n \n \n }", "public void act() \n {\n if(isAlive)\n {\n move(2);\n if(isAtEdge())\n {\n turnTowards(300, 300);\n GreenfootImage img = getImage();\n img.mirrorVertically();\n setImage(img);\n }\n if (getY() <= 150 || getY() >= 395)\n {\n turn(50);\n }\n if(isTouching(Trash.class))\n {\n turnTowards(getX(), 390);\n move(1);\n setLocation(getX(), 390);\n die();\n }\n }\n }", "public void act() \n {\n fall();\n }", "public void act() \r\n {\r\n move(5);\r\n if(isAtEdge())\r\n turn(4);\r\n if(Greenfoot.getRandomNumber(35) < 34)\r\n turn(10);\r\n if(Greenfoot.getRandomNumber(20)<5)\r\n turn(-15);\r\n }", "public void act() {\n\t\tif (canMove()) {\n\t\t\tif (isOnBase()) {\n\t\t\t\tif (steps < baseSteps) {\n\t\t\t\t\tmove();\n\t\t\t\t\tsteps++;\n\t\t\t\t} else {\n\t\t\t\t\tturn();\n\t\t\t\t\tturn();\n\t\t\t\t\tturn();\n\t\t\t\t\tsteps = 0;\n\t\t\t\t}\n\t\t\t} else if (steps == baseSteps / 2) {\n\t\t\t\tturn();\n\t\t\t\tturn();\n\t\t\t\tsteps++;\n\t\t\t} else if (steps == baseSteps + 1) {\n\t\t\t\tturn();\n\t\t\t\tturn();\n\t\t\t\tturn();\n\t\t\t\tsteps = 0;\n\t\t\t} else {\n\t\t\t\tmove();\n\t\t\t\tsteps++;\n\t\t\t}\n\t\t} else {\n\t\t\tturn();\n\t\t\tturn();\n\t\t\tturn();\n\t\t\tsteps = 0;\n\t\t}\n\t}", "public void act() \n {\n playerMovement();\n }", "public void act() \r\n {\r\n move();\r\n }", "public void act() \n {\n move(5);\n turn(4);\n }", "public void act() \r\n {\r\n if (Greenfoot.mouseClicked(this)) {\r\n Greenfoot.setWorld(new howToPlayGuide());\r\n }\r\n }", "public void act()\n {\n if (Greenfoot.getRandomNumber(200) < 3)\n {\n addObject(new Cabbage(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(200) < 3)\n {\n addObject(new Eggplant(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(200) < 3)\n {\n addObject(new Onion(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(300) < 3)\n {\n addObject(new Pizza(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(400) < 3)\n {\n addObject(new Cake(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(400) < 3)\n {\n addObject(new Icecream(), Greenfoot.getRandomNumber(600), 0);\n }\n countTime();\n }", "public void act() \r\n {\n if(getOneIntersectingObject(Player.class)!=null)\r\n {\r\n if(MenuWorld.gamemode == 1)\r\n //marcheaza regenerarea labirintului(trecere la nivelul urmator in Modul Contra Timp)\r\n TAworld.shouldRegen=true;\r\n else\r\n { \r\n //reseteaza variabilele care tin de modul de joc\r\n MenuWorld.gamemode=-1;\r\n MenuWorld.isPlaying=false;\r\n for(int i=0;i<4;i++)\r\n ItemCounter.gems_taken[i]=0;\r\n \r\n //arata fereastra de castig \r\n PMworld.shouldShowVictoryWindow=true;\r\n }\r\n \r\n }\r\n \r\n }", "public void act() \n {\n\n World wrld = getWorld();\n if(frameCounter >= frameWait)\n {\n super.act();\n frameCounter = 0;\n }\n else\n {\n frameCounter++;\n }\n if (dying)\n deathcounter++;\n GreenfootImage trans = getImage();\n trans.scale(500,500);\n setImage(trans);\n setLocation(getX(), (getY()));\n\n if (deathcounter > 10)\n {\n wrld.removeObject(this);\n ((Universe)wrld).score += 50;\n }\n else if (getX() < 10)\n wrld.removeObject(this);\n }", "@Override\n public void action() {\n System.out.println(\"do some thing...\");\n }", "public void act()\n {\n \n //move();\n //if(canSee(Worm.class))\n //{\n // eat(Worm.class);\n //}\n //else if( atWorldEdge() )\n //{\n // turn(15);\n //}\n\n }", "public void act() \n {\n\n if(isTouching(Car.class))\n {\n Lap = Lap + 1;\n if ((Lap % 11) == 0)\n {\n String lap = Integer.toString(Lap / 11);\n\n getWorld().showText(lap, 450, 30);\n getWorld().showText(\"Lap:\", 400, 30);\n }\n } \n if (Lap == 47)\n {\n Greenfoot.stop();\n getWorld().showText(\"GameOver\",250,250);\n }\n }", "public void act() \n {\n moveAround();\n die();\n }", "protected abstract void actionExecuted(SUT system, State state, Action action);", "public void act() {\n boolean willMove = canMove();\n if (isEnd && !hasShown) {\n String msg = stepCount.toString() + \" steps\";\n JOptionPane.showMessageDialog(null, msg);\n hasShown = true;\n } else if (willMove) {\n move();\n stepCount++;\n }\n }", "@Override\r\n\tpublic void actionFly() {\n\t\tSystem.out.println(\"날 수 있다.\");\r\n\t}", "public void act() {\n\t\tif (canMove2()) {\n\t\t\tsteps += 2;\n\t\t\tmove();\n\t\t} else {\n\t\t\tturn();\n\t\t\tsteps = 0;\n\t\t}\n\t}", "public void act() \n {\n move(3);\n turnAtEdge(); \n StrikeSeaHorse();\n }", "public void act() \n {\n CreatureWorld playerWorld = (CreatureWorld)getWorld();\n\n if( getHealthBar().getCurrent() <= 0 )\n {\n getWorld().showText(\"Charmander has fainted...\", getWorld().getWidth()/2, getWorld().getHeight()/2 + 26);\n Greenfoot.delay(30);\n }\n }", "public void action() {\n action.action();\n }", "public void act() \n {\n move(-16);\n \n \n if (isAtEdge())\n {\n setLocation(700,getY());\n }\n \n if (isTouching(Shots.class))\n {\n getWorld().addObject(new SpaceObject(), 500,Greenfoot.getRandomNumber(400));\n }\n \n }", "public void act()\n {\n displayBoard();\n Greenfoot.delay(10);\n \n if( checkPlayerOneWin() == true )\n {\n JOptionPane.showMessageDialog( null, \"Congratulations Player One!\", \"playerOne Win\", JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( checkPlayerTwoWin() == true )\n {\n JOptionPane.showMessageDialog( null, \"Congratulations Player Two!\", \"plauerTwo Win\",JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( checkBoardFilled() == true )\n {\n JOptionPane.showMessageDialog( null, \"It is a draw!\", \"Wrong step\", JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( messageShown == false )\n {\n showTurn();\n \n messageShown = true;\n }\n \n checkMouseClick();\n }", "public void act()\n { \n if(returnTime.millisElapsed() > 1000) { //time count down every second\n time --;\n }\n \n if (time == 0) { \n bgm.stop();\n Greenfoot.stop();\n }\n \n showCredit();\n }", "public void act()\n {\n if (getGrid() == null)\n return;\n if (caughtPokemon.size() <= 0)\n {\n removeSelfFromGrid();\n System.out.println(toString() + \" has blacked out! \" + toString() + \" has appeared at a PokeCenter.\");\n return;\n }\n ArrayList<Location> moveLocs = getMoveLocations();\n Location loc = selectMoveLocation(moveLocs);\n makeMove(loc);\n }", "public void act() \n {\n if(Greenfoot.mouseClicked(this)){\n storeMenu.getLastPressed(this,item,cost);\n changeImage();\n } \n }", "@Override\n\tpublic void step(int actionType) {\n\n\t}", "@Override\n\tprotected void compute() {\n\t\tSystem.out.println(\"This is an action\");\n\t}", "public void act()\r\n {\n if (Greenfoot.getRandomNumber(1000)< flyRate)\r\n {\r\n addObject(new Fly(), getWidth(), Greenfoot.getRandomNumber(300));\r\n //flyRate++;\r\n }\r\n }", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "public void act(){\n if (alive) {\n x = x + vx * dt;\n vx = vx * (1. - daempfung); //Luftwiderstand, eventuell muss dass nur in der Spielerklasse implementiert\n //werden, damit die Pilze nicht abgebremst werden.\n if (bewegung == Bewegung.fallen) {\n y = y + vy * dt;\n vy = vy + g * dt;\n }\n }\n }", "public void act() \r\n {\r\n super.mueve();\r\n super.tocaBala();\r\n super.creaItem();\r\n \r\n if(getMoveE()==0)\r\n {\r\n \r\n if(shut%3==0)\r\n {\r\n dispara();\r\n shut=shut%3;\r\n shut+=1;\r\n \r\n }\r\n else \r\n shut+=1;\r\n }\r\n super.vidaCero();\r\n }", "public void act() \r\n {\r\n \r\n // Add your action code here\r\n MovimientoNave();\r\n DisparaBala();\r\n Colisiones();\r\n //muestraPunto();\r\n //archivoTxt();\r\n }", "public void performAction() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void act() \n {\n super.checkClick();\n active(isActive);\n }", "public void step()\n {\n status = stepInternal();\n }", "@Override\n\tpublic void step() {\n\t\t\n\t}", "@Override\n\tpublic void step() {\n\t\t\n\t}" ]
[ "0.77712786", "0.74628884", "0.74482065", "0.74053097", "0.73779213", "0.73779213", "0.73779213", "0.7375993", "0.73550683", "0.73361003", "0.73253584", "0.73229146", "0.73131835", "0.7167829", "0.71649504", "0.7159959", "0.71587384", "0.7140713", "0.7140713", "0.7140713", "0.7140713", "0.7140713", "0.7140713", "0.7140713", "0.71184653", "0.7108125", "0.70678633", "0.7046141", "0.7021688", "0.7009087", "0.7009087", "0.70056975", "0.7003957", "0.6983357", "0.69645417", "0.69362354", "0.69334644", "0.6920131", "0.6898362", "0.68943524", "0.6878558", "0.6873244", "0.68716896", "0.68683374", "0.68657696", "0.68657696", "0.68657696", "0.68657696", "0.68657696", "0.68657696", "0.68657696", "0.68657696", "0.68592685", "0.6857087", "0.68532753", "0.68532753", "0.6846322", "0.6839746", "0.6815228", "0.68114537", "0.6806572", "0.68064225", "0.68020535", "0.6798619", "0.6770245", "0.67684144", "0.6752612", "0.67285126", "0.67062694", "0.67055166", "0.6690106", "0.6679898", "0.66532576", "0.66528183", "0.6644516", "0.6640788", "0.66279864", "0.6624323", "0.66215456", "0.661778", "0.6607698", "0.65899515", "0.6589572", "0.6585135", "0.6566757", "0.6543392", "0.6527733", "0.6513908", "0.65078145", "0.6493368", "0.6489655", "0.6443401", "0.6441128", "0.64359456", "0.6425157", "0.6423931", "0.64215744", "0.64179766", "0.6401541", "0.6388529", "0.6388529" ]
0.0
-1
Thanos is too powerful to be knocked over
public void knockMeOver(){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "void kiemTraThangHopLi() {\n }", "private void poetries() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "public void Tyre() {\n\t\t\r\n\t}", "public void mo5382o() {\n }", "public void mo38117a() {\n }", "Petunia() {\r\n\t\t}", "public void mo21877s() {\n }", "@Override\n public void perish() {\n \n }", "protected void mo6255a() {\n }", "public void makeTea(){\n size();\n temp();\n type();\n additives();\n }", "public void mo6081a() {\n }", "public void woke(){\n\n //TODO\n\n }", "public final void slogan() {\n\t\tSystem.out.println(\"Hey try generic soda its cheaper!\");\n\n\t}", "@Override\n public double tuition(){\n return 2500;\n }", "public String makeUpMetaphysics() {\n\t\treturn \"Yes I know what I'm talking about and I understand existence more than everyone else. As \"\n\t\t\t\t+ \"you can see I wrote all these books: \" + books + \". I am truly the wokest being alive.\";\n\t}", "public void mo3370l() {\n }", "public void think() {\n\t\t\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void skystonePos6() {\n }", "public void leerAlimentos();", "private void meaningLess(Actor actor) {\n \n }", "void mo27575a();", "public void skystonePos5() {\n }", "public void gored() {\n\t\t\n\t}", "public void verliesLeven() {\r\n\t\t\r\n\t}", "public void mo21795T() {\n }", "protected boolean IsHighExplosive()\r\n {\r\n \t// Wrapper function to make code a little cleaner.\r\n // isInvulnerable() is wrongly named and instead represents the specific\r\n // skull type the wither has launched\r\n \t\r\n \treturn isInvulnerable();\r\n }", "public void mo12930a() {\n }", "public void mo21878t() {\n }", "public void mo55254a() {\n }", "public void stoperJeux() {\n\t\t\n\t\tliaison.stopper();\n\t}", "@Override\n public void memoria() {\n \n }", "private void kk12() {\n\n\t}", "public void smell() {\n\t\t\n\t}", "public void makeTea() {\n\t\tboil();\n\t\taddSugar();\n\t\taddTea();\n\t\tserve();\n\t}", "public void mo21794S() {\n }", "@Test\n @Tag(\"slow\")\n public void testWOOD1P() {\n CuteNetlibCase.doTest(\"WOOD1P.SIF\", \"1.44290241157344\", \"9.99999999999964\", NumberContext.of(7, 4));\n }", "public void mo4359a() {\n }", "public void mo21787L() {\n }", "void mo67924c();", "@Test \r\n\t\r\n\tpublic void ataqueDeMagoSinMagia(){\r\n\t\tPersonaje perso=new Humano();\r\n\t\tEspecialidad mago=new Hechicero();\r\n\t\tperso.setCasta(mago);\r\n\t\tperso.bonificacionDeCasta();\r\n\t\t\r\n\t\tPersonaje enemigo=new Orco();\r\n\t\tEspecialidad guerrero=new Guerrero();\r\n\t\tenemigo.setCasta(guerrero);\r\n\t\tenemigo.bonificacionDeCasta();\r\n\t\t\r\n\t\tAssert.assertEquals(50,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(44,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t\t\r\n\t\t//ataque normal\r\n\t\tperso.atacar(enemigo);\r\n\t\t\r\n\t\tAssert.assertEquals(50,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(32,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t\t\r\n\t\t// utilizar hechizo\r\n\t\tperso.getCasta().getHechicero().agregarHechizo(\"Engorgio\", new Engorgio());\r\n\t\tperso.getCasta().getHechicero().hechizar(\"Engorgio\",enemigo);\r\n\t\t\r\n\t\tAssert.assertEquals(20,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(32,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t}", "public void mo21786K() {\n }", "public void mo5099c() {\n }", "public static void hvitetest1w(){\r\n\t}", "void mo21076g();", "public void travaille();", "public void mo9848a() {\n }", "void mo1637a();", "@Test\n public void kaasunKonstruktoriToimiiOikeinTest() {\n assertEquals(rikkihappo.toString(),\"Rikkihappo Moolimassa: 0.098079\\n tiheys: 1800.0\\n lämpötila: 298.15\\n diffuusiotilavuus: 50.17\\npitoisuus: 1.0E12\");\n }", "private void peliLoppuuUfojenTuhoamiseen() {\n if (tuhotut == Ufolkm) {\n ingame = false;\n Loppusanat = \"STEVE HOLT!\";\n }\n }", "public void mo21782G() {\n }", "public void mo21879u() {\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Override\n\tpublic void maasHesapla() {\n\t\tSystem.out.println(\"isciler icin maas 5000 tl \");\n \t\t\n\t}", "void mo57278c();", "public void mo21880v() {\n }", "public void mo21791P() {\n }", "public void mo21783H() {\n }", "private UsineJoueur() {}", "void mo60893b();", "public abstract String mo9751p();", "public void mo3376r() {\n }", "public void mo21825b() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void mo21867i() {\n mo21877s();\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "void pramitiTechTutorials() {\n\t\n}", "void mo21074e();", "public void mo5097b() {\n }", "private void level7() {\n }", "private FlyWithWings(){\n\t\t\n\t}", "void mo21072c();", "public void eisagwgiFarmakou() {\n\t\t// Elegxw o arithmos twn farmakwn na mhn ypervei ton megisto dynato\n\t\tif(numOfMedicine < 100)\n\t\t{\n\t\t\tSystem.out.println();\t\n\t\t\tmedicine[numOfMedicine] = new Farmako();\t\n\t\t\tmedicine[numOfMedicine].setCode(rnd.nextInt(1000000)); // To sistima dinei automata ton kwdiko tou farmakou\n\t\t\tmedicine[numOfMedicine].setName(sir.readString(\"DWSTE TO ONOMA TOU FARMAKOU: \")); // Zitaw apo ton xristi na mou dwsei to onoma tou farmakou\n\t\t\tmedicine[numOfMedicine].setPrice(sir.readPositiveFloat(\"DWSTE THN TIMH TOU FARMAKOU: \")); // Pairnw apo ton xristi tin timi tou farmakou\n\t\t\tSystem.out.println();\n\t\t\t// Elegxos monadikotitas tou kwdikou tou farmakou\n\t\t\th = rnd.nextInt(1000000);\n\t\t\tfor(int i = 0; i < numOfMedicine; i++)\n\t\t\t{\n\t\t\t\tif(medicine[i].getCode() == h)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"O KWDIKOS AUTOS YPARXEI HDH!\");\n\t\t\t\t\th = rnd.nextInt(10);\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t}\n\t\t\tnumOfMedicine++;\n\t\t}\n\t\t// An xeperastei o megistos arithmos farmakwn\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"DEN MPOREITE NA EISAGETE ALLA FARMAKA!\");\n\t\t\tSystem.out.println(\"EXEI SYMPLHRWTHEI O PROVLEPOMENOS ARITHMOS!\");\n\t\t}\n\t}", "T mo26439a();", "void mo37810a();", "public void mo21785J() {\n }", "public void onderbreek(){\n \n }", "@Override\r\n\tpublic void laught() {\n\r\n\t}", "@Override\n\tpublic void nhanTinNhan() {\n\n\t}", "public PhanSo(){\n tuSo = 0;\n mauSo = 1;\n }", "void mo71b();", "public boolean tienePapel()\n {\n //COMPLETE\n return this.hojas > 0;\n }", "Info mo7564ix();", "void mo1943l();", "@Test\n @Tag(\"slow\")\n public void testWOODW() {\n CuteNetlibCase.doTest(\"WOODW.SIF\", \"1.30447633308416\", \"6.463675062936\", NumberContext.of(7, 4));\n }", "public void mo2740a() {\n }", "private void strin() {\n\n\t}", "private stendhal() {\n\t}", "public void mo3749d() {\n }", "public static void caso12(){\n\n FilterManager fm= new FilterManager(\"resources/stopWordsList.txt\",\"resources/useCaseWeight.properties\");\n\t\tQualityAttributeBelongable qualityAttributeBelongable = new OntologyManager(\"file:resources/caso1.owl\",\"file:resources/caso1.repository\",fm);\n\t\tMap<QualityAttributeInterface,Double> map = qualityAttributeBelongable.getWordPertenence(\"pan\");\n\t\tif(map==null){\n\t\t\tSystem.out.println(\"El map es null\");\n\t\t}\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void mo12628c() {\n }", "Lingua getLingua();" ]
[ "0.6262638", "0.6017263", "0.58837855", "0.5804976", "0.5672599", "0.5615688", "0.55976224", "0.55449706", "0.5527131", "0.5521213", "0.55146736", "0.54602563", "0.5453153", "0.5448134", "0.54459643", "0.54326266", "0.541213", "0.5410788", "0.5383855", "0.5379234", "0.5379234", "0.5379234", "0.5379234", "0.5379234", "0.5379234", "0.5379234", "0.53757674", "0.53756565", "0.53655815", "0.53611237", "0.5358099", "0.5335439", "0.53183365", "0.5315132", "0.52904886", "0.5285355", "0.5273697", "0.5271726", "0.5266846", "0.52667063", "0.5265377", "0.5263654", "0.52458084", "0.52285206", "0.5227413", "0.5226374", "0.5225167", "0.52228504", "0.5213739", "0.5210405", "0.52070236", "0.52047825", "0.51985073", "0.51983476", "0.5190043", "0.51889175", "0.5186622", "0.5186016", "0.51785314", "0.5176861", "0.51761925", "0.51748866", "0.5173479", "0.51731414", "0.5166999", "0.51652867", "0.5153778", "0.51502025", "0.51462364", "0.5145859", "0.5144881", "0.51432705", "0.5135501", "0.51342136", "0.51331294", "0.51328117", "0.5120302", "0.51180774", "0.5116987", "0.5115341", "0.5114658", "0.5111777", "0.51109755", "0.5104098", "0.5102623", "0.5102563", "0.51006603", "0.50996906", "0.50980324", "0.50968146", "0.50968105", "0.50922483", "0.5091906", "0.50840557", "0.50817096", "0.5080516", "0.5067191", "0.5064228", "0.50576603", "0.5054921", "0.50532365" ]
0.0
-1
Convierte un contacto en esta entidad
public static Person fromContact(Contact contact){ Person person = new Person(); person.id = contact.getId(); person.fullname = contact.getDisplaydName(); if(contact.getNumbers().size() > 0){ person.phone = contact.getNumbers().get(0).getNormalizedNumber(); } if(contact.getEmails().size() > 0){ person.email = contact.getEmails().get(0).getEmail(); } person.photo = contact.getPhotoUri(); return person; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void llenarContactos() {\n\t\t SharedPreferences prefs = getSharedPreferences(\"MisPreferenciasTrackxi\",Context.MODE_PRIVATE);\n String telemer = prefs.getString(\"telemer\", null);\n String correoemer = prefs.getString(\"correoemer\", null);\n String telemer2 = prefs.getString(\"telemer2\", null);\n String correoemer2 = prefs.getString(\"correoemer2\", null);\n \n\t\taddContact(telemer,correoemer);\n\n\t\tif(telemer2!=null){\n\t\t\taddContact(telemer2,correoemer2);\n\t\t}\n\t}", "public void setContacto(String contacto) {\n this.contacto = contacto;\n }", "public void setContacto(String contacto) {\n this.contacto = contacto;\n }", "public String getContacto() {\n return contacto;\n }", "public String getContacto() {\n return contacto;\n }", "public String getContacto() {\r\n\t\treturn contacto;\r\n\t}", "public void buscarEntidad(){\r\n\t\tlistaEstructuraDetalle.clear();\r\n\t\tPersona persona = null;\r\n\t\tList<EstructuraDetalle> lstEstructuraDetalle = null;\r\n\t\ttry {\r\n\t\t\tstrFiltroTextoPersona = strFiltroTextoPersona.trim();\r\n\t\t\tif(intTipoPersonaC.equals(Constante.PARAM_T_TIPOPERSONA_JURIDICA)){\r\n\t\t\t\tif (intPersonaRolC.equals(Constante.PARAM_T_TIPOROL_ENTIDAD)) {\r\n\t\t\t\t\tlstEstructuraDetalle = estructuraFacade.getListaEstructuraDetalleIngresos(SESION_IDSUCURSAL,SESION_IDSUBSUCURSAL);\r\n\t\t\t\t\tif (lstEstructuraDetalle!=null && !lstEstructuraDetalle.isEmpty()) {\r\n\t\t\t\t\t\tfor (EstructuraDetalle estructuraDetalle : lstEstructuraDetalle) {\r\n\t\t\t\t\t\t\tpersona = personaFacade.getPersonaPorPK(estructuraDetalle.getEstructura().getJuridica().getIntIdPersona());\r\n\t\t\t\t\t\t\tif (persona.getStrRuc().trim().equals(\"strFiltroTextoPersona\")) {\r\n\t\t\t\t\t\t\t\testructuraDetalle.getEstructura().getJuridica().setPersona(persona);\r\n\t\t\t\t\t\t\t\tlistaEstructuraDetalle.add(estructuraDetalle);\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 (Exception e) {\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t}\r\n\t}", "public void setContacto(String contacto) {\r\n\t\tthis.contacto = contacto;\r\n\t}", "public void mostrarContactos() {\n\t\tfor (int i = 0; i < this.listaContactos.size(); i++) {\n\t\t\tSystem.out.println(this.listaContactos.get(i).mostrarDatos());\n\t\t}\n\t}", "private void btnConfirmaActionPerformed(java.awt.event.ActionEvent evt) throws Contact.NumeEronatExceptie { \n try {\n String nume = tfNume.getText();\n String prenume = tfPrenume.getText();\n String dataNasterii = tfDataNasterii.getText();\n Contact c = new Contact(nume, prenume, dataNasterii);\n if (c.getDataNasterii().getMonth().equals(LocalDate.now().getMonth()) && c.getDataNasterii().getDayOfMonth() == LocalDate.now().getDayOfMonth()) {\n JOptionPane.showMessageDialog(this, \"Data de nasterii a contactului este astazi!\");\n }\n String numarTelefon = tfNumarTelefon.getText();\n if (cbFix.isSelected()) {\n NrTel nrTel = new NrFix(numarTelefon);\n c.setNrTel(nrTel);\n } else if (cbMobil.isSelected()) {\n NrTel nrTel = new NrMobil(numarTelefon);\n c.setNrTel(nrTel);\n } else {\n throw new NullPointerException(\"\");\n }\n for (Contact ct : listaContacte) {\n if (ct.getNume().equals(c.getNume()) && ct.getPrenume().equals(c.getPrenume()) && ct.getDataNasterii().equals(c.getDataNasterii()) && ct.getNrTel().equals(c.getNrTel())) {\n throw new ContactExistentException(\"\");\n }\n }\n listaContacte.add(c);\n model.addElement(c);\n tfNume.setText(\"\");\n tfPrenume.setText(\"\");\n tfDataNasterii.setText(\"\");\n tfNumarTelefon.setText(\"\");\n btnGroup.clearSelection();\n btnUpdate.setVisible(true);\n diAdauga.setVisible(false);\n actualizeazaModel();\n } catch (IllegalArgumentException e) {\n JOptionPane.showMessageDialog(this, \"Numele/prenumele nu a fost introdus!\");\n } catch (NumeEronatExceptie e) {\n JOptionPane.showMessageDialog(this, \"Numele a fost introdus eronat!\");\n } catch (PrenumeEronatExceptie e) {\n JOptionPane.showMessageDialog(this, \"Prenumele a fost introdus eronat!\");\n } catch (DateTimeParseException e) {\n JOptionPane.showMessageDialog(this, \"Data nasterii nu este valida!\");\n } catch (NumarTelefonExceptie e) {\n JOptionPane.showMessageDialog(this, \"Numarul de telefon introdus este invalid!\");\n } catch (ContactExistentException e) {\n JOptionPane.showMessageDialog(this, \"Contactul exista deja in agenda!\");\n } catch (NullPointerException e) {\n JOptionPane.showMessageDialog(this, \"Nu ai selectat tipul de telefon!\");\n }\n\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == PICK_CONTACT_REQUEST) {\n // Make sure the request was successful\n if (resultCode == RESULT_OK) {\n Bundle extras = data.getExtras();\n long id = extras.getLong(\"id\");\n try {\n dbo.open();\n }\n catch (SQLException ex){\n\n }\n Usuario user = dbo.findAccount((int)id);\n miembrosGpo.add(user);\n nombres.add(user.getNombre() + \" \" + user.getApellidos());\n\n adapter.notifyDataSetChanged();\n\n if (existente){\n dbo.addPersonToGroup(grupo, user);\n }\n\n System.out.println(\"lala\");\n }\n }\n }", "public int getIdContacto() {\r\n return idContacto;\r\n }", "private void miDeschidereActionPerformed(java.awt.event.ActionEvent evt) throws Contact.NumeEronatExceptie { \n int response = JOptionPane.showConfirmDialog(this, \"Doriti sa incarcati lista de contacte?\", \"Incarcare\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n if (response == JOptionPane.YES_OPTION) {\n JFileChooser chooser = new JFileChooser();\n if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {\n File list = chooser.getSelectedFile();\n try {\n FileReader reader = new FileReader(list);\n Scanner input = new Scanner(reader);\n String[] headLine = input.nextLine().split(\",\");\n if (!headLine[0].equals(\"Nume\") || !headLine[1].equals(\"Prenume\") || !headLine[2].equals(\"Data nasterii\") || !headLine[3].equals(\"Numar Telefon\")) {\n throw new FileCSVHeaderException(\"\");\n }\n while (input.hasNextLine()) {\n String[] contactLine = input.nextLine().split(\",\");\n String nume = contactLine[0];\n String prenume = contactLine[1];\n String dataNasterii = contactLine[2];\n String numarTelefon = contactLine[3];\n Contact c = new Contact(nume, prenume, dataNasterii);\n if (numarTelefon.substring(0, 2).equals(\"02\") || numarTelefon.substring(0, 2).equals(\"03\")) {\n NrTel nrTel = new NrFix(numarTelefon);\n c.setNrTel(nrTel);\n } else if (numarTelefon.substring(0, 2).equals(\"07\")) {\n NrTel nrTel = new NrMobil(numarTelefon);\n c.setNrTel(nrTel);\n } else {\n JOptionPane.showMessageDialog(this, \"Nu ati selectat tipul de numar de telefon!\");\n }\n for (Contact ct : listaContacte) {\n if (ct.getNume().equals(c.getNume()) && ct.getPrenume().equals(c.getPrenume()) && ct.getDataNasterii().equals(c.getDataNasterii()) && ct.getNrTel().equals(c.getNrTel())) {\n throw new ContactExistentException(\"\");\n }\n }\n listaContacte.add(c);\n model.addElement(c);\n actualizeazaModel();\n }\n } catch (FileNotFoundException ex) {\n Logger.getLogger(MainForm.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IllegalArgumentException e) {\n JOptionPane.showMessageDialog(this, \"Numele/prenumele nu a fost introdus!\");\n } catch (NumeEronatExceptie e) {\n JOptionPane.showMessageDialog(this, \"Numele a fost introdus eronat!\");\n } catch (PrenumeEronatExceptie e) {\n JOptionPane.showMessageDialog(this, \"Prenumele a fost introdus eronat!\");\n } catch (DateTimeParseException e) {\n JOptionPane.showMessageDialog(this, \"Data nasterii nu este valida!\");\n } catch (NumarTelefonExceptie e) {\n JOptionPane.showMessageDialog(this, \"Numarul de telefon introdus este invalid!\");\n } catch (ContactExistentException e) {\n JOptionPane.showMessageDialog(this, \"Contactul exista deja in agenda!\");\n } catch (FileCSVHeaderException ex) {\n JOptionPane.showMessageDialog(this, \"Capul de tabul nu e formatat corect\");\n }\n }\n }\n\n\n }", "public void tocarTelefone() {\n System.out.println(\"Telefone \" + getNumero() + \" está tocando!\");\n notificarTodos();\n }", "public void domicilioAgregar() {\r\n\t\tlog.info(\"Domicilio agregar \" + nuevoDomici.getDomicilio());\r\n\t\tboolean verifica = false;\r\n\t\tmensaje = null;\r\n\t\tnuevoDomici.setTbTipoCasa(objTipoCasaService.findTipoCasa(Tipocasanuevo));\r\n\t\tnuevoDomici.setDomicilio(domicilio);\r\n\t\tnuevoDomici.setReferencia(referencia);\r\n\t\tnuevoDomici.setTbUbigeo(objUbigeoService.findUbigeo(idUbigeo));\r\n\t\tlog.info(\"TIPO-CASA-NUEVO--->\"+nuevoDomici.getTbTipoCasa().getIdtipocasa());\r\n\t\tnuevoDomici.setNuevoD(1);\r\n\t\t//aqui ponfo el ID-Domicilio a la lista Domicilio temporalmente.\r\n\t\tnuevoDomici.setIddomiciliopersona(0);\r\n\t\tnuevoDomici.setTbEstadoGeneral(objEstadoGeneralService.findEstadogeneral(15));\r\n\t\t\r\n\t\tfor (int i = 0; i < DomicilioPersonaList.size(); i++) {\r\n\t\t\tlog.info(\" \"+ DomicilioPersonaList.get(i).getDomicilio() + \" \" + nuevoDomici.getDomicilio());\r\n\t\t\tif (DomicilioPersonaList.get(i).getDomicilio().equals(nuevoDomici.getDomicilio())) {\r\n\t\t\t\tverifica = false;\r\n\t\t\t\tmensaje = \"el Domicilio ya se encuentra registrado en la lista de domiclio cliente\";\r\n\t\t\t\tbreak;\r\n\t\t\t}else {\r\n\t\t\t\tverifica = true;\r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\tif (DomicilioPersonaList.size() == 0) {\r\n\t\t\t\tverifica = true;\r\n\t\t\t\t}\r\n\t\t\tif (verifica) {\r\n\t\t\t\tnuevoDomici.setItem(\"Por Agregar\");\r\n\t\t\t\tDomicilioPersonaList.add(nuevoDomici);\r\n\t\t\t\tlog.info(\"se agrego \"+ nuevoDomici.getDomicilio());\r\n\t\t\t\t}\r\n\t\t\tif (mensaje != null) {\r\n\t\t\t\tmsg = new FacesMessage(FacesMessage.SEVERITY_FATAL,\r\n\t\t\t\tConstants.MESSAGE_ERROR_FATAL_TITULO, mensaje);\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\r\n\t\t\t\t}\r\n\t\t\tnuevoDomici = new DomicilioPersonaSie();\r\n\t\t}", "private List<ModelContacts> getContact(){\n String contenue_ecran = tableView.getText().toString().trim();\n List<ModelContacts> list = new ArrayList<>();\n if (!contenue_ecran.equals(\"\")) {\n Cursor cursor = this.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n null, null, null,\n ContactsContract.Contacts.DISPLAY_NAME + \" ASC\");\n assert cursor != null;\n cursor.moveToFirst();\n while (cursor.moveToNext()) {\n String phoneNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n String name = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));\n String image = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.PHOTO_ID));\n String formatPhoneNumber = \"<font color='#42A5F5'><b>\" + contenue_ecran + \"</b></font>\";\n String formatPhone = phoneNumber.replace(contenue_ecran, formatPhoneNumber);\n if (phoneNumber.contains(contenue_ecran)) {\n list.add(new ModelContacts(name, image, formatPhone));\n }\n }\n cursor.close();\n }\n return list;\n }", "public void telefonoAgregar() {\r\n\t\t\tlog.info(\"telefono agregar \" + nuevoTelef.getTelefono());\r\n\t\tif( nuevoTelef.getTelefono()==null||nuevoTelef.getTelefono().equals(\"\")){\r\n\t\t\tmensaje= \"Debe ingresar un número telefónico\";\r\n\t\t\tmsg = new FacesMessage(FacesMessage.SEVERITY_FATAL,\r\n\t\t\tConstants.MESSAGE_ERROR_FATAL_TITULO, mensaje);\r\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\r\n\t\t\t}\r\n\t\telse{\r\n\t\t\tlog.info(\"telefono agregar \" + nuevoTelef.getTelefono());\r\n\t\t\tboolean verifica = false;\r\n\t\t\tmensaje = null;\r\n\t\tif (TipoTelef == 1)\r\n\t\t\tnuevoTelef.setTipotelefono(\"F\");\r\n\t\telse\r\n\t\t\tnuevoTelef.setTipotelefono(\"C\");\r\n\t\t// claro\r\n\t\tif (operadorTelefonico == 1)\r\n\t\t\tnuevoTelef.setOperadorTelefonico(\"Claro\");\r\n\t\telse if (operadorTelefonico == 2)\r\n\t\t\tnuevoTelef.setOperadorTelefonico(\"Movistar\");\r\n\t\telse if (operadorTelefonico == 3)\r\n\t\t\tnuevoTelef.setOperadorTelefonico(\"Nextel\");\r\n\t\t\tnuevoTelef.setNuevoT(1);\r\n\t\t\tnuevoTelef.setIdtelefonopersona(0);\r\n\t\t\tnuevoTelef.setTbEstadoGeneral(objEstadoGeneralService.findEstadogeneral(17));\r\n\t\tfor (int i = 0; i < TelefonoPersonaList.size(); i++) {\r\n\t\t\tlog.info(\" \" + TelefonoPersonaList.get(i).getTelefono() + \" \"\t+ nuevoTelef.getTelefono());\r\n\t\t\tif (TelefonoPersonaList.get(i).getTelefono().equals(nuevoTelef.getTelefono())) {\r\n\t\t\t\tverifica = false;\r\n\t\t\t\tmensaje = \"el telefono ya se encuentra registrado en la lista de referencias\";\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tverifica = true;\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (TelefonoPersonaList.size() == 0) {\r\n\t\t\tverifica = true;\r\n\t\t\t}\r\n\t\t\tif (verifica) {\r\n\t\t\t\t//int cantidad=TelefonoPersonaList.size();\r\n\t\t\t\tnuevoTelef.setItem(\"Por Agregar\");\t\r\n\t\t\t\tTelefonoPersonaList.add(nuevoTelef);\r\n\t\t\t\tlog.info(\"se agrego \" + nuevoTelef.getTelefono());\r\n\t\t\t }\r\n\t\t\tif (mensaje != null) {\r\n\t\t\tmsg = new FacesMessage(FacesMessage.SEVERITY_FATAL,\r\n\t\t\tConstants.MESSAGE_ERROR_FATAL_TITULO, mensaje);\r\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\r\n\t\t\t}\r\n\t\t\tnuevoTelef = new TelefonoPersonaSie();\r\n\t\t\t}\r\n\t}", "private PersonaEnvio buscaPersonaPorNombre(PersonaEnvio personaRequest) throws NotariaException{\n\t\tPersonaEnvio respuesta = new PersonaEnvio();\n\t\tString nombrePersona = personaRequest.getNombrePersona().replaceAll(\"\\\\s+\", \" \").trim();\n\t\tList<DatoBusquedaPersona> lista = personaBo.findPersonaByName(nombrePersona);\n\t\tif (lista != null) {\n\t\t\trespuesta.setResultados(new ArrayList<DatoBusquedaPersona>(\n\t\t\t\t\tlista));\n\t\t\trespuesta.setNumeroResultados(lista.size());\n\t\t\trespuesta.setEstatus(\"Búsqueda correcta.\");\n\t\t\trespuesta.setExito(true);\n\t\t\treturn respuesta;\n\t\t} else {\n\t\t\trespuesta.setResultados(null);\n\t\t\trespuesta.setNumeroResultados(0);\n\t\t\trespuesta.setEstatus(\"No se encontraron resultados.\");\n\t\t\trespuesta.setExito(false);\n\t\t\treturn respuesta;\n\t\t}\n\t}", "public void findContact(){\n EtecsaDB database = new EtecsaDB(this.getContext());\n if (!database.hasDatabase()){\n Toast.makeText(this.getContext(), R.string.no_database, Toast.LENGTH_SHORT).show();\n }\n else //buscar contacto\n new Search(this.getActivity()).execute(advancedSearch);\n }", "com.spirit.crm.entity.ClienteContactoIf addClienteContacto(com.spirit.crm.entity.ClienteContactoIf model) throws GenericBusinessException;", "public void setIdContacto(String idContacto) {\r\n\t\tthis.idContacto = idContacto;\r\n\t}", "private boolean campararCorreo () {\n\t\tlistaUsuarios = UsuarioDAO.readTodos(this.mainApp.getConnection());\n\t\tString correoE = this.campoCorreo.getText();\n\t\tfor (Usuario correo : listaUsuarios) {\n\t\t\tif (correo.getCorreoElectronico().equals(correoE))\n\t\t\t\treturn false;\n\t\t}//FIN FOR\n\t\treturn true;\n\t}", "public void setIdContacto(int aIdContacto) {\r\n idContacto = aIdContacto;\r\n }", "private void btnUpdateActionPerformed(java.awt.event.ActionEvent evt) throws Contact.NumeEronatExceptie { \n try {\n //Efectuam validarea numarului de telefon inainte de a schimba datele contactului din model\n String numarTelefon = tfNumarTelefon.getText();\n if (cbFix.isSelected()) {\n NrTel nrTel = new NrFix(numarTelefon);\n } else if (cbMobil.isSelected()) {\n NrTel nrTel = new NrMobil(numarTelefon);\n } else {\n JOptionPane.showMessageDialog(this, \"Nu ati selectat tipul de numar de telefon!\");\n }\n Contact s = (Contact) model.getElementAt(ContactList.getSelectedIndex());\n listaContacte.remove(s);\n // Setam datele din model luand in considerare modificarile efectuate\n model.setElementAt(new Contact(tfNume.getText(), tfPrenume.getText(), tfDataNasterii.getText()), ContactList.getSelectedIndex());\n Contact c = (Contact) model.getElementAt(ContactList.getSelectedIndex());\n //Parcurgem din nou algoritmul de validare al numarului de telefon pentru a il seta\n if (cbFix.isSelected()) {\n NrTel nrTel = new NrFix(numarTelefon);\n c.setNrTel(nrTel);\n } else if (cbMobil.isSelected()) {\n NrTel nrTel = new NrMobil(numarTelefon);\n c.setNrTel(nrTel);\n } else {\n throw new NullPointerException(\"\");\n }\n if (c.getDataNasterii().getMonth().equals(LocalDate.now().getMonth()) && c.getDataNasterii().getDayOfMonth() == LocalDate.now().getDayOfMonth()) {\n JOptionPane.showMessageDialog(this, \"Data de nasterii a contactului este astazi!\");\n }\n for (Contact ct : listaContacte) {\n if (ct.getNume().equals(c.getNume()) && ct.getPrenume().equals(c.getPrenume()) && ct.getDataNasterii().equals(c.getDataNasterii()) && ct.getNrTel().equals(c.getNrTel())) {\n throw new ContactExistentException(\"\");\n }\n }\n // Stergem datele din campuri pentru a nu afisate cand se apasa din nou Adauga/Modifica pentru alt contact;\n listaContacte.add(c);\n tfNume.setText(\"\");\n tfPrenume.setText(\"\");\n tfDataNasterii.setText(\"\");\n tfNumarTelefon.setText(\"\");\n btnGroup.clearSelection();\n btnConfirma.setVisible(true);\n diAdauga.setVisible(false);\n actualizeazaModel();\n } catch (IllegalArgumentException e) {\n JOptionPane.showMessageDialog(this, \"Numele/prenumele nu a fost introdus!\");\n } catch (NumeEronatExceptie e) {\n JOptionPane.showMessageDialog(this, \"Numele a fost introdus eronat!\");\n } catch (PrenumeEronatExceptie e) {\n JOptionPane.showMessageDialog(this, \"Prenumele a fost introdus eronat!\");\n } catch (DateTimeParseException e) {\n JOptionPane.showMessageDialog(this, \"Data nasterii nu este valida!\");\n } catch (NumarTelefonExceptie e) {\n JOptionPane.showMessageDialog(this, \"Numarul de telefon introdus este invalid!\");\n } catch (ContactExistentException e) {\n JOptionPane.showMessageDialog(this, \"Contactul exista deja in agenda!\");\n } catch (NullPointerException e) {\n JOptionPane.showMessageDialog(this, \"Nu ai selectat tipul de telefon!\");\n }\n\n }", "public String getIdContacto() {\r\n\t\treturn idContacto;\r\n\t}", "public void recupera() {\n Cliente clienteActual;\n clienteActual=clienteDAO.buscaId(c.getId());\n if (clienteActual!=null) {\n c=clienteActual;\n } else {\n c=new Cliente();\n }\n }", "public Contactos consultarContactosId(int idContacto) {\n Contactos con = null;\r\n SessionFactory factory = HibernateUtil.getSessionFactory();\r\n Session session = factory.openSession();\r\n\r\n try {\r\n session.beginTransaction();\r\n con = (Contactos) session.get(Contactos.class, idContacto);\r\n // Query q = session.createQuery(\"from Contactos where idContacto = \"+idContacto );\r\n // listaContactos = (List<Contactos>) q.list();\r\n session.getTransaction().commit();\r\n System.out.println(\"Consultar por id Correcto ContactoMantenimiento \");\r\n } catch (Exception e) {\r\n if (session.getTransaction().isActive()) {\r\n session.getTransaction().rollback();\r\n System.out.println(\"Errro en consultar por id ContactoMantenimiento \" + e);\r\n con = null;\r\n }\r\n } finally {\r\n session.close();\r\n }\r\n return con;\r\n }", "public void AddContact(View view){\n Utils.Route_Start(ListContact.this,Contato.class);\n // Notificar, para atualizar a lista.\n\n }", "@Override\r\n\tpublic Contacto generarContacto(String usuario) {\r\n\t\tContacto contacto = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tcontacto = jdbcTemplate.queryForObject(\r\n\t\t\t\t\tSQL_SELECT_CONTACTO_INATEC, \r\n\t\t\t\t\tnew RowMapper<Contacto>() {\r\n\t\t\t\t public Contacto mapRow(ResultSet rs, int rowNum) throws SQLException {\r\n\t\t\t\t Contacto c = new Contacto();\r\n\t\t\t\t c.setUsuarioInatec(rs.getString(\"usuarioInatec\"));\r\n\t\t\t\t c.setEntidadId(rs.getInt(\"entidadId\"));\r\n\t\t\t\t c.setPrimerNombre(rs.getString(\"primerNombre\"));\r\n\t\t\t\t c.setPrimerApellido(rs.getString(\"primerApellido\"));\r\n\t\t\t\t c.setNombreCompleto(rs.getString(\"nombreCompleto\"));\r\n\t\t\t\t c.setSexo(null);\r\n\t\t\t\t c.setCorreo1(rs.getString(\"correo1\"));\r\n\t\t\t\t c.setTelefono1(rs.getString(\"telefono1\"));\r\n\t\t\t\t c.setTipoContacto(null);\r\n\t\t\t\t c.setTipoIdentificacion(null);\r\n\t\t\t\t c.setNumeroIdentificacion(rs.getString(\"numeroIdentificacion\"));\r\n\t\t\t\t c.setDireccionActual(rs.getString(\"direccionActual\"));\r\n\t\t\t\t c.setFechaRegistro(rs.getDate(\"fechaRegistro\"));\r\n\t\t\t\t c.setNacionalidadId(null);\r\n\t\t\t\t c.setLugarNacimiento(rs.getString(\"lugarNacimiento\"));\r\n\t\t\t\t c.setInatec(rs.getBoolean(\"inatec\"));\r\n\t\t\t\t c.setFuncion(rs.getString(\"funcion\"));\r\n\t\t\t\t c.setIdEmpleado(rs.getLong(\"empleadoId\"));\r\n\t\t\t\t return c;\r\n\t\t\t\t }\r\n\t\t\t\t\t},\r\n\t\t\t\t\tusuario);\t\t\r\n\t\t}\r\n\t\tcatch(EmptyResultDataAccessException e)\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn contacto;\r\n\t}", "public void setCorreo(String correo) {this.correo = correo;}", "@Test\n public void findViajeroByCorreoTest() {\n ViajeroEntity entity = data.get(0);\n ViajeroEntity newEntity = vp.findByCorreo(entity.getCorreo());\n Assert.assertNotNull(newEntity);\n Assert.assertEquals(entity.getCorreo(), newEntity.getCorreo());\n\n newEntity = vp.findByCorreo(null);\n Assert.assertNull(newEntity);\n }", "@Override\n public void importContacts() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"importContacts\");\n }\n\n for (int i = 0; i < contactsForImportation.size(); i++) {\n\n if (contactsForImportation.get(i).getObject1()) {\n ConnectathonParticipant cp = new ConnectathonParticipant();\n ConnectathonParticipantQuery query = new ConnectathonParticipantQuery();\n query.testingSession().eq(TestingSession.getSelectedTestingSession());\n query.email().eq(contactsForImportation.get(i).getObject2().getEmail());\n\n if (query.getCount() == 0) {\n\n try {\n\n cp.setEmail(contactsForImportation.get(i).getObject2().getEmail());\n cp.setFirstname(contactsForImportation.get(i).getObject2().getFirstname());\n cp.setLastname(contactsForImportation.get(i).getObject2().getLastname());\n cp.setMondayMeal(true);\n cp.setTuesdayMeal(true);\n cp.setWednesdayMeal(true);\n cp.setThursdayMeal(true);\n cp.setFridayMeal(true);\n cp.setVegetarianMeal(false);\n cp.setSocialEvent(false);\n cp.setTestingSession(TestingSession.getSelectedTestingSession());\n cp.setInstitution(contactsForImportation.get(i).getObject2().getInstitution());\n cp.setInstitutionName(contactsForImportation.get(i).getObject2().getInstitution().getName());\n\n cp.setConnectathonParticipantStatus(ConnectathonParticipantStatus.getVendorStatus());\n\n entityManager.clear();\n entityManager.persist(cp);\n entityManager.flush();\n\n FacesMessages.instance().add(StatusMessage.Severity.INFO, \"Conact \" + contactsForImportation.get(i).getObject2()\n .getLastname() + \" \" + contactsForImportation.get(i).getObject2().getEmail()\n + \" is imported\");\n renderAddPanel = false;\n getAllConnectathonParticipants();\n\n } catch (Exception e) {\n LOG.warn(USER + contactsForImportation.get(i).getObject2().getEmail()\n + \" is already added - This case case should not occur...\");\n StatusMessages.instance().addFromResourceBundle(StatusMessage.Severity.ERROR,\n \"gazelle.users.connectaton.participants.CannotImportParticipant\", cp.getFirstname(),\n cp.getLastname(), cp.getEmail());\n\n }\n } else {\n LOG.warn(USER + contactsForImportation.get(i).getObject2().getEmail()\n + \" is already added - This case case should not occur...\");\n StatusMessages.instance().addFromResourceBundle(StatusMessage.Severity.ERROR,\n \"gazelle.users.connectaton.participants.CannotImportParticipant\",\n contactsForImportation.get(i).getObject2().getFirstname(),\n contactsForImportation.get(i).getObject2().getLastname(),\n contactsForImportation.get(i).getObject2().getEmail());\n }\n }\n }\n\n }", "public void enviarCorreo() {\n try {\n\n // propuestaConvenio = propuestaConvenioService.getByIDPropuestaWithPersona(propuestaConvenio.getIdPropuesta());\n propuestaConvenio = propuestaConvenioService.getByIDPropuestaWithPersona(propuestaConvenio.getIdPropuesta());\n\n // Create data for template\n Map<String, Object> templateData = new HashMap<String, Object>();\n templateData.put(\"subJect\", \"Cambio Vigencia de Convenio\");\n\n //templateData.put(\"nameTemplate\", \"propuesta_convenio_mailTemplat.txt\");\n templateData.put(\"nameTemplate\", \"vigencia_convenio_mailTemplat.xhtml\");\n templateData.put(\"propuestaConvenio\", propuestaConvenio);\n templateData.put(\"propuestaConvenioTemp\", propuestaConvenioTemp);\n\n for (PersonaPropuesta p : propuestaConvenio.getPersonaPropuestaList()) {\n templateData.put(\"setToMail\", p.getPersona().getEmailPersona());\n mailService.sendEmailMap(templateData);\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void setCorreo(String correo){\r\n this.correo = correo;\r\n }", "private void modificarPersona(PersonaDTO persona, Set<TelefonoDTO> telefonos, Set<DireccionDTO> direcciones,\n\t\t\tSet<CorreoElectronicoDTO> correos) throws CustomValidationException, CustomErrorException, Exception {\n\t\t//Recuperamos la persona\n\t\t//Verificamos cambio de DNI\n\t\tif (persona.getIdPersona() == null) {throw new CustomErrorException(CustomErrorException.ID_INEXISTENTE_PARA_MODIFICAR,this.getClass().getSimpleName());}\n\t\t\n\t\tPersonaDTO personaPersistente = obtenerPersona(persona.getIdPersona());\n\t\tif (!personaPersistente.getNroDni().equals(persona.getNroDni())) {\n\t\t\tif (gPersona.existePersonaPorDNI(persona.getNroDni())) {\n\t\t\t\tthrow new CustomValidationException(CustomValidationException.DNI_REPETIDO);\n\t\t\t};\n\t\t}\n\t\t\n\t\tSet<TelefonoDTO> nuevosTelefonos = new HashSet<TelefonoDTO>();\n\t\teliminarBorrados(telefonos,personaPersistente.getTelefonos());\n\t\tnuevosTelefonos.addAll(agregarNuevos(telefonos));\n\t\t//vuelvo a setear la lista en persona\n\t\tpersona.setTelefonos(null);\n\t\tSet <TelefonoDTO> telefonosPersona = new HashSet<TelefonoDTO>();\n\t\ttelefonosPersona.addAll(nuevosTelefonos);\n\t\tpersona.setTelefonos(telefonosPersona);\n\t\t\n\t\tSet<DireccionDTO> nuevasDirecciones = new HashSet<DireccionDTO>();\n\t\teliminarBorrados(direcciones, personaPersistente.getDirecciones());\n\t\tnuevasDirecciones.addAll(agregarNuevos(direcciones));\n\t\tpersona.setDirecciones(null);\n\t\tSet<DireccionDTO> direccionesPersona = new HashSet<DireccionDTO>();\n\t\tdireccionesPersona.addAll(nuevasDirecciones);\n\t\tpersona.setDirecciones(direccionesPersona); \n\t\t\n\t\tSet<CorreoElectronicoDTO> nuevosCorreos = new HashSet<CorreoElectronicoDTO>();\n\t\teliminarBorrados(correos, personaPersistente.getCorreos());\n\t\tnuevosCorreos.addAll(agregarNuevos(correos));\n\t\t//vuelvo a setear la lista en persona\n\t\tpersona.setCorreos(null);\n\t\tSet<CorreoElectronicoDTO> correosPersona = new HashSet<CorreoElectronicoDTO>();\n\t\tcorreosPersona.addAll(nuevosCorreos);\n\t\tpersona.setCorreos(correosPersona); \n\t\t\n\t\t// Llamo a modify para cerrar la operación;\n\t\tfor (TelefonoDTO t: telefonos) {\n\t\t\tt.setIdTelefono(modificarTelefono(Converter.toEntity(t))); \n\t\t}\n\t\t\n\t\tfor (DireccionDTO d: direcciones) {\n\t\t\td.setIdDireccion(modificarDireccion(Converter.toEntity(d)));\n\t\t}\n\t\t\n\t\tfor (CorreoElectronicoDTO c: correos) {\n\t\t\tc.setIdCorreoElectronico(modificarCorreoElectronico(Converter.toEntity(c)));\n\t\t}\n\t\t\n\t\tgPersona.modify(Converter.toEntity(persona));\n\t\t\n\t}", "public String getContact() {\r\n return this.contact;\r\n }", "public void agregarPersona(PersonaDTO persona, Set<TelefonoDTO> telefonos, Set<DireccionDTO> direcciones,\n\t\t\tSet<CorreoElectronicoDTO> correos) throws CustomErrorException, CustomValidationException {\n\t\ttry {\n\t\t\t// Vemos si tiene lo necesario, sino salimos\n\t\t\tif (telefonos.size() == 0) {\n\t\t\t\tthrow new CustomValidationException(CustomValidationException.TELEFONO_NECESARIO);\n\t\t\t}\n\t\t\tif (direcciones.size() == 0) {\n\t\t\t\tthrow new CustomValidationException(CustomValidationException.DIRECCION_NECESARIA);\n\t\t\t}\n\t\t\tif (correos.size() == 0) {\n\t\t\t\tthrow new CustomValidationException(CustomValidationException.CORREO_NECESARIO);\n\t\t\t}\n\t\t\t//Evaluamos si se trata de un modificacion\n\t\t\tif (persona.getIdPersona() == null) {\n\t\t\t\t//Es un alta\n\t\t\t\t//Persistir las entidades agregadas\n\t\t\t\tfor (TelefonoDTO t: telefonos) {\n\t\t\t\t\tt.setIdTelefono(persistirTelefono(Converter.toEntity(t))); \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (DireccionDTO d: direcciones) {\n\t\t\t\t\td.setIdDireccion(persistirDireccion(Converter.toEntity(d)));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (CorreoElectronicoDTO c: correos) {\n\t\t\t\t\tc.setIdCorreoElectronico(persistirCorreoElectronico(Converter.toEntity(c)));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Las entidades están peristentes, asignarlas a la persona\n\t\t\t\tpersona.setTelefonos(telefonos);\n\t\t\t\tpersona.setCorreos(correos);\n\t\t\t\tpersona.setDirecciones(direcciones);\n\t\t\t\t\n\t\t\t\t//persistir la persona\n\t\t\t\tgPersona.add(Converter.toEntity(persona));\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tmodificarPersona(persona, telefonos, direcciones, correos);\n\t\t\t}\n\t\t\t\n\t\t} catch(CustomErrorException cer) {\n\t\t\tthrow cer;\n\t\t} catch (Exception e) {\n\t\t\tif(persona.getIdPersona() == null) {\n\t\t\t\ttry {\n\t\t\t\t\tfor (TelefonoDTO t : telefonos) {\n\t\t\t\t\t\tgTelefono.delete(Converter.toEntity(t));\n\t\t\t\t\t}\n\t\t\t\t\tfor (DireccionDTO d : direcciones) {\n\t\t\t\t\t\tgDireccion.delete(Converter.toEntity(d));\n\t\t\t\t\t}\n\t\t\t\t\tfor (CorreoElectronicoDTO c : correos) {\n\t\t\t\t\t\tgCorreoElectronico.delete(Converter.toEntity(c));\n\t\t\t\t\t} \n\t\t\t\t}catch (CustomErrorException cer) {\n\t\t\t\t\tthrow cer;\n\t\t\t\t}catch (Exception e2) {\n\t\t\t\t\tthrow new CustomErrorException(CustomErrorException.ERROR_SERVICIO,this.getClass().getSimpleName(),e.getStackTrace());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void llenarEntidadConLosDatosDeLosControles() {\n clienteActual.setNombre(txtNombre.getText());\n clienteActual.setApellido(txtApellido.getText());\n clienteActual.setDui(txtDui.getText());\n //clienteActual.setNumero(txtNumero.getText());\n //clienteActual.setNumero(Integer.parseInt(this.txtNumero.getText()));\n clienteActual.setNumero(Integer.parseInt(this.txtNumero.getText()));\n }", "@Override\n public void onContactSelected(Curso curso) {\n Toast.makeText(getApplicationContext(), \"Selected: \" + curso.getCodigo() + \", \" + curso.getNombre(), Toast.LENGTH_LONG).show();\n }", "private void contactUs() {\n }", "public boolean addContact(Usuario user1, String contactName) {\n\t\tif (user1 == null)\n\t\t\tif (currentUser != null)\n\t\t\t\tuser1 = currentUser;\n\t\t\telse\n\t\t\t\treturn false;\n\t\tUsuario user2 = null;\n\t\ttry {\n\t\t\tuser2 = CatalogoUsuarios.getInstance().getUser(contactName);\n\t\t} catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (user2 != null) {\n\t\t\tif (user1.hasContact(user2.getId()))\n\t\t\t\treturn false;\n\t\t\tint msgId = messageDAO.createMessageList();\n\t\t\tList<Mensaje> messageList = messageDAO.getMessageList(msgId);\n\t\t\t// adds user2 as a contact in user1\n\t\t\tint newId = Id.generateUniqueId();\n\t\t\tContacto contact1 = new ContactoIndividual(newId, msgId, user2.getId(), user2.getName(), user2.getPicture(),\n\t\t\t\t\tuser2.getPhone());\n\t\t\tcontact1.setMessages(messageList);\n\t\t\tcontactDAO.registerContact(contact1);\n\t\t\tuser1.addContact(contact1);\n\t\t\tuserCatalog.modifyUser(user1);\n\t\t\t// adds the user1 as a contact in user2\n\t\t\tnewId = Id.generateUniqueId();\n\t\t\tContacto contact2 = new ContactoIndividual(newId, msgId, user1.getId(), user1.getName(), user1.getPicture(),\n\t\t\t\t\tuser1.getPhone());\n\t\t\tcontact2.setMessages(messageList);\n\t\t\tcontactDAO.registerContact(contact2);\n\t\t\tuser2.addContact(contact2);\n\t\t\tuserCatalog.modifyUser(user2);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public String getCorreo() {return correo;}", "@Override\n public void onClick(View v) {\n String nombre = editNombre.getText().toString();\n String nacimiento = editNace.getText().toString();\n String telefono = editPhone.getText().toString();\n String email = editEmail.getText().toString();\n String descripcion = editDescript.getText().toString();\n\n //podria pasar los datos en variable directo a cada intent pero queria probar los objetos\n\n nuevo = new Contacto(nombre,telefono,email,nacimiento,descripcion);\n\n\n Intent intento = new Intent(MainActivity.this,ConfirmarActivity.class);\n /*pName es una var de texto que tiene el string \"Nombre\"\n * para mantener nuestro codigo ordenando lo uso asi\n * sin embargo tambien puedo poner por ejemplo \"nombre\"\n y de igual manera pedirlo en confirmarActivity.java*/\n intento.putExtra(getResources().getString(R.string.pName),nuevo.getNombre());\n intento.putExtra(getResources().getString(R.string.pNace), nuevo.getNacimiento());\n intento.putExtra(getResources().getString(R.string.pPhone), nuevo.getTelefono());\n intento.putExtra(getResources().getString(R.string.pEmail), nuevo.getEmail());\n intento.putExtra(getResources().getString(R.string.pDescript), nuevo.getDescript());\n startActivity(intento);\n }", "public void setEmail(String p) { this.idcorreo = p; }", "@Override\r\n public String toString() {\r\n StringBuffer sb = new StringBuffer(\"[Contacto |\");\r\n sb.append(\" idContacto=\").append(getIdContacto());\r\n sb.append(\"]\");\r\n return sb.toString();\r\n }", "@Override\r\n\tpublic List<Contacto> getContactosInatec() {\r\n\t\treturn null;\r\n\t}", "public void addContactPeupler(IContact contact) {\n\n\t\ttry {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"*******************je suis dans addContact peupler *******************************************\");\n\t\t\tsessionFactory.getCurrentSession().save(contact);\n\n\t\t} catch (HibernateException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void reabrirContrato() {\n int i;\n if (hospedesCadastrados.isEmpty()) {\n System.err.println(\"Nao existe hospedes cadastrados\\n\");\n } else {\n listarHospedes();\n int cpf = verifica();\n for (i = 0; i < hospedesCadastrados.size(); i++) {\n if (hospedesCadastrados.get(i).getCpf() == cpf) {//hospede\n if (hospedesCadastrados.get(i).getContrato().isSituacao()) {//verifica se o contrato já estpa aberto\n System.err.println(\"O contrado desse hospede já encontra-se aberto\");\n\n } else {//caso o contrato encontre-se fechado\n hospedesCadastrados.get(i).getContrato().setSituacao(true);\n System.err.println(\"Contrato reaberto, agora voce pode reusufruir de nossos servicos!\");\n }\n }\n }\n }\n }", "public long guardarContacto(Contacto c )\n {\n ContentValues initialValues=new ContentValues();\n initialValues.put(\"nombre\", c.getNombre());\n initialValues.put(\"email\", c.getEmail());\n initialValues.put(\"edad\", c.getEdad());\n return db.insert(\"contactos\", null, initialValues);\n }", "public void guardar() {\n try {\n objConec.conectar();\n objConec.Sql = objConec.con.prepareStatement(\"insert into contacto values(null,?,?,?,?,?)\");\n objConec.Sql.setString(1, getNom_con());\n objConec.Sql.setInt(2, getTel_con()); \n objConec.Sql.setString(3, getEma_con());\n objConec.Sql.setString(4, getAsu_con());\n objConec.Sql.setString(5, getMen_con());\n objConec.Sql.executeUpdate();\n objConec.cerrar();\n JOptionPane.showMessageDialog(null, \"Mensaje enviado correctamente\");\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"Error al enviar el mensaje\");\n\n }\n\n }", "private void recogerDatos() {\n\t\ttry {\n\t\t\tusuSelecc.setId(etId.getText().toString());\n\t\t\tusuSelecc.setName(etNombre.getText().toString());\n\t\t\tusuSelecc.setFirstName(etPApellido.getText().toString());\n\t\t\tusuSelecc.setLastName(etSApellido.getText().toString());\n\t\t\tusuSelecc.setEmail(etCorreo.getText().toString());\n\t\t\tusuSelecc.setCustomFields(etAuth.getText().toString());\n\t\t} catch (Exception e) {\n\t\t\t// Auto-generated catch block\n\t\t\tmostrarException(e.getMessage());\n\t\t}\n\t}", "private void permisosContactos() {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_CONTACTS) != PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_CONTACTS) != PERMISSION_GRANTED) {\n\n ActivityCompat.requestPermissions(this, new String[]{\n Manifest.permission.READ_CONTACTS, Manifest.permission.WRITE_CONTACTS\n }, CONTACTS_REQUEST_CODE);\n\n }\n\n else{\n llenarLista();\n }\n }", "public Cliente[] findWhereContactoEquals(String contacto) throws ClienteDaoException;", "public void abrirDialogoCustodio(){\n\t\tif(aut_empleado.getValor()!=null){\n\t\t\ttab_tarspaso_Custodio.limpiar();\n\t\t\ttab_tarspaso_Custodio.insertar();\n\t\t\t//tab_direccion.limpiar();\n\t\t//\ttab_direccion.insertar();\n\t\t\tdia_traspaso_custodio.dibujar();\n\t\t}\n\t\telse{\n\t\t\tutilitario.agregarMensaje(\"Inserte un Custodio\", \"\");\n\t\t}\n\n\t}", "public void setTelefono(String telefono) {\n this.telefono = telefono;\n }", "@Override\r\n public Cliente buscarCliente(String cedula) throws Exception {\r\n return entity.find(Cliente.class, cedula);//busca el cliente\r\n }", "private void makeContact() {\r\n try {\r\n System.out.println(\"Connecting...\");\r\n this.sock = new Socket(HOST, PORT);\r\n PrintWriter out = new PrintWriter(sock.getOutputStream(), true);\r\n sendInfo(out);\r\n } catch (IOException e) {\r\n this.chatClient.showMsg(\"Error de conexión con el servidor. Reconectando en breves...\");\r\n System.out.println(\"Error de conexión\");\r\n System.out.println(e);\r\n System.out.println(\"Volviendo a conectar en breves\");\r\n }\r\n\r\n }", "public void registrarPersona() {\n\t\ttry {\n\t\t\tif (validaNumDocumento(getNumDocumentPersona())) {\n\t\t\t\t\tif (validaDireccion()) {\n\t\t\t\t\t\tif (validaApellidosNombres()) {\n\t\t\t\t\t\t\tPaPersona persona = new PaPersona();\n\t\t\t\t\t\t\tif (getActualizaPersona() != null && getActualizaPersona().equals(\"N\")) {\n\t\t\t\t\t\t\t\tpersona.setPersonaId(Constante.RESULT_PENDING);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tpersona.setPersonaId(getPersonaId() == null ? Constante.RESULT_PENDING: getPersonaId());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tpersona.setTipoDocumentoId(Integer.valueOf(mapTipoDocumento.get(getTipoDocumento())));\n\t\t\t\t\t\t\tpersona.setNroDocIdentidad(getNumDocumentPersona());\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tif (persona.getTipoDocumentoId() == Constante.TIPO_DOCUMENTO_RUC_ID) {\n\t\t\t\t\t\t\t\tpersona.setRazonSocial(getRazonSocial());\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tpersona.setPrimerNombre(getPrimerNombre());\n\t\t\t\t\t\t\t\tpersona.setSegundoNombre(getSegundoNombre());\n\t\t\t\t\t\t\t\tpersona.setApePaterno(getApellidoPaterno());\n\t\t\t\t\t\t\t\tpersona.setApeMaterno(getApellidoMaterno());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tPaDireccion direccion = new PaDireccion();\n\t\t\t\t\t\t\tdireccion.setDireccionId(getDireccionId() == null ? Constante.RESULT_PENDING: getDireccionId());\n\t\t\t\t\t\t\tif (getSelectedOptBusc().intValue() == 1) {\n\t\t\t\t\t\t\t\tdireccion.setTipoViaId(mapGnTipoVia.get(getCmbtipovia().getValue()));\n\t\t\t\t\t\t\t\tdireccion.setViaId(mapGnVia.get(getCmbvia().getValue()));\n\t\t\t\t\t\t\t\tdireccion.setLugarId(null);\n\t\t\t\t\t\t\t\tdireccion.setSectorId(null);\n\t\t\t\t\t\t\t\tdireccion.setNumero(numero);\n\t\t\t\t\t\t\t\tdireccion.setPersonaId(persona.getPersonaId());\n\n\t\t\t\t\t\t\t\tString direccionCompleta = papeletaBo.getDireccionCompleta(direccion,mapIGnTipoVia, mapIGnVia);\n\t\t\t\t\t\t\t\tif (direccionCompleta != null && direccionCompleta.trim().length() > 0) {\n\t\t\t\t\t\t\t\t\tdireccion.setDireccionCompleta(direccionCompleta);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdireccion.setDireccionCompleta(getDireccionCompleta());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tBuscarPersonaDTO personaDto = getPersonaDto(persona, direccion);\n\t\t\t\t\t\t\tString personaPapeleta = (String) getSessionMap().get(\"personaPapeleta\");\n\t\t\t\t\t\t\tif (personaPapeleta != null\n\t\t\t\t\t\t\t\t\t&& personaPapeleta.equals(\"I\")) {\n\t\t\t\t\t\t\t\tRegistroPapeletasManaged registro = (RegistroPapeletasManaged) getManaged(\"registroPapeletasManaged\");\n\t\t\t\t\t\t\t\tregistro.setDatosInfractor(personaDto);\n\t\t\t\t\t\t\t} else if (personaPapeleta != null\n\t\t\t\t\t\t\t\t\t&& personaPapeleta.equals(\"P\")) {\n\t\t\t\t\t\t\t\tRegistroPapeletasManaged registro = (RegistroPapeletasManaged) getManaged(\"registroPapeletasManaged\");\n\t\t\t\t\t\t\t\tregistro.setDatosPropietario(personaDto);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlimpiar();\n\t\t\t\t\t\t\tesContribuyente = (Boolean) getSessionMap().get(\"esContribuyente\");\n\t\t\t\t\t\t\tif (esContribuyente == true) {\t\n\t\t\t\t\t\t\t\tWebMessages.messageError(\"Es un Contribeyente s�lo se Actualiz� la Direcci�n para Papeletas, los otros datos es por DJ\");\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tWebMessages\n\t\t\t\t\t\t\t\t\t.messageError(\"Apellidos y nombres no valido\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tWebMessages\n\t\t\t\t\t\t\t\t.messageError(\"Especifique la direccion de la persona\");\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tWebMessages\n\t\t\t\t\t\t.messageError(\"Número de documento de identidad no valido\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setCorreo(String aCorreo) {\r\n correo = aCorreo;\r\n }", "private void teletransportar(Personaje p, Celda destino) {\n // TODO implement here\n }", "@Override\n\tpublic void enteradoCambioMensaje(EventObject event) {\n\t\tList<MensajeWhatsApp> newMsgs = ((MensajeEvent) event).getNewMensajes();\n\t\tList<MensajeWhatsApp> oldMsgs = ((MensajeEvent) event).getOldMensajes();\n\t\t// Makes no sense to identify the contact as the person's actual name!\n\t\tif (!newMsgs.equals(oldMsgs)) {\n\t\t\tOptional<MensajeWhatsApp> WAmsg = newMsgs.stream()\n\t\t\t\t\t.filter(msg -> !msg.getAutor().equals(currentUser.getName())).findFirst();\n\t\t\tif (WAmsg != null) {\n\t\t\t\tString contactName = WAmsg.get().getAutor();\n\t\t\t\tOptional<Contacto> contact = currentUser.getContacts().stream()\n\t\t\t\t\t\t.filter(c -> c.getName().equals(contactName)).findFirst();\n\t\t\t\tif (contact.isPresent()) {\n\t\t\t\t\tnewMsgs.stream().forEach(msg -> {\n\t\t\t\t\t\tint speakerId = 0;\n\t\t\t\t\t\tif (msg.getAutor().equals(currentUser.getName()))\n\t\t\t\t\t\t\tspeakerId = currentUser.getId();\n\t\t\t\t\t\telse if (msg.getAutor().equals(contactName))\n\t\t\t\t\t\t\tspeakerId = contact.get().getId();\n\t\t\t\t\t\tif (speakerId != 0) {\n\t\t\t\t\t\t\taddMessage(msg.getTexto(), 0, contact.get());\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public String insertarOficial() {\r\n\t\tlog.info(\"LISTA DE DESHABILITADO--> \"+ TelefonoDeshabilitado.size()); \r\n\t\tlog.info(\"insertarOficial() \" + \"Id-Cliente-->\"+\" \"+ objClienteSie.getIdcliente() + \" \"+\"Nombre de Cliente\"+\" \"+ objClienteSie.getNombrecliente());\r\n\t\tString paginaretorno=\"\";\r\n\t\ttry {\r\n\t\t\tif (log.isInfoEnabled()) {\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlog.info(\"busca el Id-DNI\");\r\n\t\t\tobjClienteSie.setTbTipoDocumentoIdentidad(objTipoDocService.buscarTipoDocumento(TipoDocumento));\r\n\t\t\t\r\n\t\t\tlog.info(\"busca el Id-Ubigeo\");\r\n\t\t\tobjDomicilio.setTbUbigeo(objUbigeoService.findUbigeo(Integer.parseInt(idUbigeo1)));\r\n\t\t\t\r\n\t\t\tlog.info(\"*******AQUI ESTA SI HAY UN VALOR DENTRO DE LA LISTA TELEFONOS PARA ELIMINAR*******\");\r\n\t\t\tlog.info(\"Tel-FISICO--------->\"+ \" \"+ TelefonoDeshabilitado.size());\r\n\t\t\tlog.info(\"Tel-TEMPORAL------->\"+ \"\t\"+ TelefonoPersonaList.size());\r\n\t\t\t\r\n\t\t\tlog.info(\"*******AQUI ESTA SI HAY UN VALOR DENTRO DE LA LISTA DOMICILIO PARA ELIMINAR*******\");\r\n\t\t\tlog.info(\"Domicilio-FISICO--------->\"+ \" \"+ DomicilioPersonaDeshabilitado.size());\r\n\t\t\tlog.info(\"Domicilio-TEMPORAL------->\"+ \"\t\"+ DomicilioPersonaList.size());\r\n\t\t\tobjClienteService.updateCliente(objClienteSie,objDomicilio,idUbigeo1, idUbigeo, tipo, Tipocasanuevo,TelefonoPersona,TelefonoPersonaList, TelefonoDeshabilitado, DomicilioPersonaList, DomicilioPersonaDeshabilitado);\r\n\t\t\t\r\n\t\t\tmensaje = Constants.MESSAGE_ACTUALIZO_TITULO;\r\n\t\t\tmsg = new FacesMessage(FacesMessage.SEVERITY_INFO,\r\n\t\t\tConstants.MESSAGE_INFO_TITULO, mensaje);\r\n\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tmensaje = e.getMessage();\r\n\t\t\tmsg = new FacesMessage(FacesMessage.SEVERITY_FATAL,\r\n\t\t\tConstants.MESSAGE_ERROR_FATAL_TITULO, mensaje);\r\n\t\t\tlog.error(e.getMessage());\r\n\t}\r\n\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\r\n\t\treturn getViewList();\r\n\t}", "public void fecharConta() {\n\t\tcliente.setConta(new Conta());\r\n\t\tRepositorioCliente repositorioCliente = new FabricaRepositorio().getRepCliente();\r\n\t\trepositorioCliente.editar((ClienteIndividual)cliente);\r\n//\t\tGerenciadorContaImpl contaImpl = new GerenciadorContaImpl();\r\n//\t\ttry {\r\n//\t\t\tcontaImpl.fecharConta(cliente);\r\n//\t\t} catch (OperacaoInvalidaException e) {\r\n//\t\t\te.printStackTrace();\r\n//\t\t}\r\n\t}", "@Override\n public void onClick(View v) {\n String name = nameEditText.getText().toString();\n String phoneNumber = phoneEditText.getText().toString();\n\n //create a Contact Object to add\n Contact contact1 = new Contact(name, phoneNumber);\n\n //add contact1 object to database\n int temp = 0;\n for (Contact contact : contacts) {\n if (contact.getName().equals(name) && contact.getPhoneNumber().equals(phoneNumber)){\n Toast.makeText(MainActivity.this, \"This contact does exists\", Toast.LENGTH_SHORT).show();\n temp = 1;\n break;\n }\n if (contact.getName().equals(name)) {\n replaceContact(contact1);\n temp = 1;\n break;\n }\n }\n if (temp == 0) {\n addContact(contact1);\n }\n }", "protected void createCompaniesContacts() {\n\n log.info(\"CompaniesContactsBean => method : createCompaniesContacts()\");\n\n EntityManager em = EMF.getEM();\n EntityTransaction tx = null;\n\n try {\n tx = em.getTransaction();\n tx.begin();\n for (CompaniesEntity c : selectedCompaniesContacts) {\n CompaniesContactsEntity companiesContactsEntity1 = new CompaniesContactsEntity();\n companiesContactsEntity1.setContactsByIdContacts(contactsBean.getContactsEntity());\n companiesContactsEntity1.setCompaniesByIdCompanies(c);\n companiesContactsDao.update(em, companiesContactsEntity1);\n }\n tx.commit();\n log.info(\"Persist ok\");\n } catch (Exception ex) {\n if (tx != null && tx.isActive()) tx.rollback();\n log.info(\"Persist failed\");\n } finally {\n em.clear();\n em.clear();\n }\n\n }", "@Override\n public void onClick(View v)\n {\n contacto.setNombre(txtEditarNombre.getText().toString());\n contacto.setTelefono(Integer.parseInt(txtEditarTelefono.getText().toString()));\n\n Activity1.agenda.actualizarContacto(Integer.parseInt(intento.getSerializableExtra(\"Posicion\").toString()),contacto);\n mensaje(R.string.GuardadoCorrectamente);\n\n setResult(RESULT_OK,intento); //le decimos al activity que nos llamó que to-do está OK\n finish(); //cerramos esta activity\n\n }", "public void setCorreo(String correo) {\n this.correo = correo;\n }", "@Override\n\tpublic void beginContact(Contact c) {\n\t\tFixture fa = c.getFixtureA();\n\t\tFixture fb = c.getFixtureB();\n\t\t\n\t\tif (fa.getUserData() != null && fa.getUserData().equals(\"pies\")) {\n\t\t\tnumeroDePisadas++;\n\t\t}\n\t\tif (fb.getUserData() != null && fb.getUserData().equals(\"pies\")) {\n\t\t\tnumeroDePisadas++;\n\t\t}\n\t\t//Borrar Moneda\n\t\tif (fa.getUserData() != null && fa.getUserData().equals(\"moneda\")) {\n\t\t\tcuerposBorrar.add(fa.getBody());\n\t\t}\n\t\t\n\t\tif (fb.getUserData() != null && fb.getUserData().equals(\"moneda\")) {\n\t\t\tcuerposBorrar.add(fb.getBody());\n\t\t}\n\t\tif(fa.getUserData() != null && fa.getUserData().equals(\"mina\")) {\n\t\t\tjugadorMuerto = true;\n\t\t}\n\t\tif(fb.getUserData() != null && fb.getUserData().equals(\"mina\")) {\n\t\t\tjugadorMuerto = true;\n\t\t}\n\t\t\n\t\tif(fa.getUserData() != null && fa.getUserData().equals(\"cangrejo\")) {\n\t\t\tjugadorMuerto = true;\n\t\t}\n\t\tif(fb.getUserData() != null && fb.getUserData().equals(\"cangrejo\")) {\n\t\t\tjugadorMuerto = true;\n\t\t}\n\t\t\n\t\tif(fa.getUserData() != null && fa.getUserData().equals(\"pulpo\")) {\n\t\t\tjugadorMuerto = true;\n\t\t}\n\t\tif(fb.getUserData() != null && fb.getUserData().equals(\"pulpo\")) {\n\t\t\tjugadorMuerto = true;\n\t\t}\n\t\t//System.out.println(fa.getUserData() + \" , \" + fb.getUserData());\n\t\t\n\t}", "private void recoverUser(){\n if(auth.getCurrentUser()!=null){\n String id= auth.getCurrentUser().getUid();\n\n //Solo la igualo para poder sacarla del metodo\n idU=id;\n\n //Buscamos el id del usuario logueado en la rama contactos\n db.getReference().child(\"contactos/\" + id).addValueEventListener(\n new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot data) {\n\n adapter.clear();\n\n for(DataSnapshot child: data.getChildren()){\n Contacto contacto=child.getValue(Contacto.class);\n adapter.addContacto(contacto);\n }\n }\n\n @Override\n public void onCancelled(DatabaseError error) {\n\n }\n }\n );\n }\n }", "@Override\n\tpublic ResponseEntity<Map<String, Object>> ActualizarCliente(RegistroClienteBean bean) {\n\t\tMap<String, Object> rpta = new HashMap<>();\n\t\tPersonas personas = new Personas();\n\t\tpersonas.setApellidos(bean.getApellidos());\n\t\tpersonas.setNombres(bean.getNombres());\n\t\tpersonas.setFechaNacimiento(bean.getFechaNacimiento());\n\t\tpersonas.setId_persona(bean.getId_persona());\n\t\tpermapper.Update(personas);\n\t\tpersonas = permapper.SelectById(personas);\n\t\tClientes cli = new Clientes();\n\n\t\tcli.setFoto(bean.getFoto());\n\t\tcli.setId_cliente(bean.getId_cliente());\n\t\tclimapper.UpdateFoto(cli);\n\t\trpta.put(\"msgserver\", \"SUCCESS\");\n\t\trpta.put(\"foto\", cli.getFoto());\n\t\trpta.put(\"Persona\", personas);\n\t\tif (bean.getNombres().isEmpty()) { \n\t\t\trpta.put(\"msgserver\", \"Nombre Vacio\");\n\t\t\treturn new ResponseEntity<Map<String, Object>>(rpta, HttpStatus.BAD_GATEWAY);\n\t\t} else if (bean.getApellidos().isEmpty()) {\n\t\t\trpta.put(\"msgserver\", \"Apellido Vacio\");\n\t\t\treturn new ResponseEntity<Map<String, Object>>(rpta, HttpStatus.BAD_GATEWAY);\n\t\t} else if (bean.getDocumento().isEmpty()) {\n\t\t\trpta.put(\"msgserver\", \"Documento Vacio\");\n\t\t\treturn new ResponseEntity<Map<String, Object>>(rpta, HttpStatus.BAD_GATEWAY);\n\t\t}else {\n\t\t\treturn new ResponseEntity<Map<String, Object>>(rpta, HttpStatus.ACCEPTED);\t\n\t\t}\n\t\t\n\t}", "public void crearEntidad() throws EntidadNotFoundException {\r\n\t\tif (validarCampos(getNewEntidad())) {\r\n\t\t\tif (validarNomNitRepetidoEntidad(getNewEntidad())) {\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_WARN, \"Advertencia: \", \"Nombre, Nit o Prejifo ya existe en GIA\"));\r\n\t\t\t} else {\r\n\t\t\t\tif (entidadController.crearEntidad(getNewEntidad())) {\r\n\t\t\t\t\tmensajeGrow(\"Entidad Creada Satisfactoriamente\", getNewEntidad());\r\n\t\t\t\t\tRequestContext.getCurrentInstance().execute(\"PF('entCrearDialog').hide()\");\r\n\t\t\t\t\tsetNewEntidad(new EntidadDTO());\r\n\t\t\t\t\tresetCodigoBUA();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmensajeGrow(\"Entidad No Fue Creada\", getNewEntidad());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlistarEntidades();\r\n\t\t\t// newEntidad = new EntidadDTO();\r\n\t\t\t// fechaActual();\r\n\t\t}\r\n\r\n\t}", "public void onClick(View v) {\n datasource.open();\n Contacto c = datasource.updateContacto(idContacto, edtNome.getText().toString(), edtEmail.getText().toString(), edtTelefone.getText().toString(), loadBitmapFromView(iv));\n datasource.close();\n\n if (locationManager != null) {\n if (!provider.equals(\"\")) {\n System.out.println(\"LocationManager:\" + locationManager);\n loc = locationManager\n .getLastKnownLocation(provider);\n }\n }\n AlertDialog.Builder dialogo = new\n AlertDialog.Builder(EditarContacto.this);\n dialogo.setTitle(\"Gravado\");\n String mensagem = \"Contacto:\" + c.getNome();\n if (loc != null) {\n mensagem += \"\\nloc: \" + loc.getLatitude() + \",\" + loc.getLongitude();\n Geocoder gcd = new Geocoder(getBaseContext(), Locale.getDefault());\n List<Address> addresses;\n try {\n addresses = gcd.getFromLocation(loc.getLatitude(),\n loc.getLongitude(), 1);\n if (addresses.size() > 0) {\n System.out.println(\"##################################\");\n mensagem += \"\\nCidade:\" + addresses.get(0).getLocality();\n System.out.println(addresses.get(0).getLocality());\n System.out.println(addresses.get(0).getFeatureName());\n System.out.println(addresses.get(0).getThoroughfare());\n System.out.println(\"##################################\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n dialogo.setMessage(mensagem);\n dialogo.setNeutralButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n });\n dialogo.show();\n }", "private void fncMensajeEnviadoMensajeTo() {\n this.perfil_seleccionado = this.perfil.getStrEmail();\r\n this.yoker = session_activa.getStrEmail();\r\n \r\n \r\n if( !Storage.fncStorageBuscarUnaLinea(session_activa.stgFriends, this.perfil.getStrEmail()+Storage.identificador_amigo1) ){\r\n // Si no somos amigos nos ponemos un *\r\n perfil_seleccionado += \"*\"; // Si perfil selecciona no es amigo mio se pone un *\r\n yoker += \"*\";\r\n }\r\n \r\n // Buscar el chat\r\n boolean db_chats = Storage.fncStorageBuscarUnaLinea(session_activa.stgChats, perfil_seleccionado);\r\n boolean db_friends = Storage.fncStorageBuscarUnaLinea(session_activa.stgFriends, perfil_seleccionado+Storage.identificador_amigo1);\r\n \r\n // * Verificar estado de amistad para perfil\r\n String amistad = Storage.fncStorageVerificarAmistad(this.session_activa.stgFriends, this.perfil.getStrEmail());\r\n \r\n // * Verificar si somos amigos\r\n if( db_friends == true && db_chats == true && amistad.equals(\"amigos\") )\r\n this.fncConversacionActiva();\r\n else if( db_friends == false && db_chats == false && amistad.equals(\"none\") ) \r\n this.fncCrearConversacion();\r\n \r\n// }else if( db_friends == true && db_chats == false ){\r\n// this.fncConversacionPendientePerfil();\r\n// \r\n// }else if( db_friends == false && db_chats == true ){\r\n// this.fncConversacionPendienteSessionActiva();\r\n// \r\n// }else if( db_friends == false && db_chats == false ){\r\n// this.fncCrearConversacion();\r\n// '\r\n// }\r\n\r\n }", "public void localizarDados(int idOrcamento){\n OrcamentoCursoController orcamentoCursoController = new OrcamentoCursoController();\n this.orcamentocurso = orcamentoCursoController.consultar(idOrcamento);\n if (orcamentocurso!=null){\n ClienteController clienteController = new ClienteController();\n cliente = clienteController.consultar(orcamentocurso.getCliente());\n if (cliente!=null){\n parajTextField.setText(cliente.getEmail());\n }\n }\n }", "public void addContact(String tel, String corr){\n\t\n\t\tif(!emergencia_esta_Ocupado[0]){\n\t\t\taddView(0,tel,corr);\n\t\t}else if(!emergencia_esta_Ocupado[1]){\n\t\t\taddView(1,tel,corr);\n\t\t}\n\t}", "public void update_close_contact_list() throws Exception{\n\t\tmessage_to_send = new ArrayList<String>();\r\n\t\tmessage_to_send.add(\"positionContacts\");\r\n\t\tmessage_to_send.add(Integer.toString(5));\r\n\t\tsend_receive();\r\n\t\tSystem.out.println(!message_received.isEmpty());\r\n\t\tif (!message_received.isEmpty()){\r\n\t\t\t\r\n\t\t\t//int number_of_contacts= Integer.parseInt(message_received.get(1));\r\n\t\t\tint compteur = 1;\r\n\t\t\tSystem.out.println(message_received.size());\r\n\t\t\twhile(compteur < message_received.size()-1) {\r\n\t\t\t\tSystem.out.println(\"Index: \" + compteur);//affichage de contrôle\r\n\t\t\t\t\r\n\t\t\t\tContact contact = new Contact();\r\n\t\t\t\tSystem.out.println(\"ca chie ici !!\");\r\n\t\t\t\tcontact.id=Integer.parseInt(message_received.get(compteur));\r\n\r\n\t\t\t\tSystem.out.println(contact.id);\r\n\t\t\t\tcontact.name=message_received.get(compteur+1);\r\n\t\t\t\tSystem.out.println(contact.name);\r\n\t\t\t\tcontact.surname=message_received.get(compteur+2);\r\n\t\t\t\tSystem.out.println(contact.surname);\r\n\t\t\t\tcontact.phone_number=message_received.get(compteur+3);\r\n\t\t\t\tSystem.out.println(contact.phone_number);\r\n\t\t\t\tdouble Longitude=Double.parseDouble(message_received.get(compteur+4));\r\n\t\t\t\tdouble Latitude=Double.parseDouble(message_received.get(compteur+5));\r\n\t\t\t\tSystem.out.println(Longitude);\r\n\t\t\t\tSystem.out.println(Latitude);\r\n\t\t\t\tcontact.latlng=new LatLng(Longitude, Latitude);\r\n\t\t\t\t//String sLongitude=Location.convert(Longitude, Location.FORMAT_SECONDS);\r\n\t\t\t\t//String sLatitude=Location.convert(Latitude, Location.FORMAT_SECONDS);\r\n\t\t\t\t//contact.position.setLatitude(Latitude);\r\n\t\t\t\t//contact.position.setLatitude(Longitude);\r\n\t\t\t\tSystem.out.println(contact.latlng);\r\n\t\t\t\tcontact.position=new Location(\"Paris\");\r\n\t\t\t\tcontact.visible=true;\r\n\t\t\t\tcontact.last_connection=new Date();\r\n\t\t\t\tcontact.pseudo=\"HUG\";\r\n\t\t\t\tSystem.out.println(contact);\r\n\t\t\t\tclose_contacts.add(contact);\r\n\t\t\t\tSystem.out.println(\"on a passé l'ajout\");\r\n\t\t\t\tcompteur=compteur+6;\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\telse{\r\n\t\t\tSystem.out.println(\"error: system failed to communicate with the server\");}\t\t \r\n }", "public void setTelefono(String telefono)\r\n {\r\n this.telefono = telefono;\r\n }", "public String getContact() {\n return contact;\n }", "public String getContact() {\n return contact;\n }", "public String getContact() {\n return contact;\n }", "public String getContact() {\n return contact;\n }", "public String getContact() {\n return contact;\n }", "public ArrayList<Contact> loadContacts()\n\t{\n\t\t//TODO gestion des infos\n\t\t\n\t\t/* Requete SQL */\n\t\tCursor cursor = mainDatabase.rawQuery(\"SELECT \" + DBContract.ContactTable.CONTACT_ID[0] + \", \" +\n\t\t\t\tDBContract.ContactTable.NAME[0] + \", \" + DBContract.ContactTable.SURNAME[0] + \", \" + \n\t\t\t\tDBContract.ContactTable.BILL[0] + \" FROM \" + DBContract.ContactTable.TABLE_NAME, null);\n\t\t\n\t\tArrayList<Contact> result = new ArrayList<Contact>();\n\t\t\n\t\t/* Parcour du resultat */\n\t\tif(cursor.moveToFirst())\n\t\t{\n\t\t\t\twhile(!cursor.isAfterLast())\n\t\t\t\t{\n\t\t\t\t\t/* Instancie le nouveau contact : id-nom-prenom */\n\t\t\t\t\tContact tmp = new Contact(cursor.getInt(0), cursor.getString(1), cursor.getString(2));\n\t\t\t\t\ttmp.addToBill(cursor.getDouble(3));\t\n\t\t\t\t\tresult.add((int) (tmp.getId() - 1), tmp); //TODO mod -1 //TODO verifier qu'il n'y a pas d'id 0 et que tout se passe bien !\n\t\t\t\t\tcursor.moveToNext();\n\t\t\t\t}\n\t\t}\n\t\tcursor.close();\n\t\treturn result;\n\t}", "@Override\n\tpublic ResponseEntity<Map<String, Object>> IngresarAgachadito(String correo, String password) {\n\t\tMap<String, Object> rpta = new HashMap<>();\n\n\t\tPersonas param = new Personas();\n\t\tPersonas rptapersonas = new Personas();\n\n\t\tClientes clientes = null;\n\t\tclientes = climapper.SelectByCorreoAndPassword(correo, password);\n\t\tif (clientes != null) {\n\t\t\tparam.setId_persona(clientes.getId_persona());\n\t\t\trptapersonas = permapper.SelectById(param);\n\t\t\trptapersonas.setId_cliente(clientes.getId_cliente());\n\t\t\trpta.put(\"msgserver\", \"Bienvenido \" + rptapersonas.getNombres());\n\t\t\trpta.put(\"Persona\", rptapersonas);\n\t\t\trpta.put(\"foto\", clientes.getFoto());\n\t\t\trpta.put(\"Rol\", \"Cliente\");\n\t\t\treturn new ResponseEntity<Map<String, Object>>(rpta, HttpStatus.OK);\n\t\t} else {\n\t\t\tVendedores vendedores = null;\n\t\t\tvendedores = venmapper.SelectByCorreoAndPassword(correo, password);\n\t\t\tif (vendedores != null) {\n\t\t\t\tparam.setId_persona(vendedores.getId_persona());\n\t\t\t\trptapersonas = permapper.SelectById(param);\n\t\t\t\trptapersonas = permapper.SelectById(param);\n\t\t\t\trptapersonas.setId_cliente(vendedores.getId_vendedor());\n\t\t\t\trpta.put(\"msgserver\", \"Bienvenido \" + rptapersonas.getNombres());\n\t\t\t\trpta.put(\"Persona\", rptapersonas);\n\t\t\t\trpta.put(\"Puesto\", zonasmapper.SelectUbicacionesInnerJoinPorIdVendedor(rptapersonas.getId_cliente()));\n\t\t\t\trpta.put(\"Rol\", \"Vendedor\");\n\t\t\t\treturn new ResponseEntity<Map<String, Object>>(rpta, HttpStatus.OK);\n\t\t\t} else {\n\t\t\t\trpta.put(\"msgserver\", \"Datos no Encontrados\");\n\t\t\t\treturn new ResponseEntity<Map<String, Object>>(rpta, HttpStatus.NOT_FOUND);\n\t\t\t}\n\t\t}\n\t}", "private void onContactInvitation(final NotificationBDD notificationBDD) {\n final InvitationConnexion invitationConnexion = new InvitationConnexion();\n invitationConnexion.setDate((notificationBDD.getDate()));\n invitationConnexion.setIdFirebase(notificationBDD.getId());\n invitationConnexion.setInvite(utilisateurConnecte);\n final LocalUserProfilEBDD localUserProfilEBDD = new LocalUserProfilEBDD();\n invitationConnexionBDD.open();\n// invitationConnexionBDD.insererInvitationConnexion(invitationConnexion);\n final Position position = new Position();\n final ParametresUtilisateur parametres = new ParametresUtilisateur();\n remoteBD.getUserProfil(notificationBDD.getAskerID(), localUserProfilEBDD, new OnUserProfilReceived() {\n @Override\n public void onUserProfilReceived(UtilisateurProfilEBDD userProfilEBDD) {\n final View coordinatorLayoutView = findViewById(R.id.snackbarPosition);\n Snackbar.make(coordinatorLayoutView, \"Invitation de connexion reçue !\", Snackbar.LENGTH_LONG)\n .setAction(\"VOIR\", clickListener)\n .show();\n invitationConnexion.setExpediteur(FromEBDDToLocalClassTranslator.translateUserProfil(localUserProfilEBDD, position, notificationBDD.getAskerID(), parametres));\n invitationConnexionBDD.insererInvitationConnexion(invitationConnexion);\n invitationConnexionBDD.affichageInvitationConnexion();\n }\n });\n\n\n\n }", "private void transferContactList() throws IOException {\n dbh.open();\n try {\n String[][] contacts = dbh.getContactsArray(user.toString());\n System.out.println(Arrays.toString(contacts));\n int nbrOfContacts = contacts.length;\n oos.writeObject(\"ContactList\");\n oos.writeObject(contacts);\n oos.flush();\n logListener.logInfo(\"Transfered \" + nbrOfContacts + \" contacts to: \" + user.toString());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public Vector<MailsTO> mailContacts() throws ConnectionException, SQLException;", "public boolean existeContacto(String usuario,String contacto){\n query=\"select count(*) as cantidad from contactos where nombre='%s' and contacto='%s';\";\n query= String.format(query,usuario,contacto);\n try{\n if(miBaseDatos.executeQuery(query,\"respuesta\")){\n miBaseDatos.next(\"respuesta\");\n String aparece = miBaseDatos.getString(\"cantidad\",\"respuesta\");\n if(aparece.equals(\"1\")){\n return true;\n }else{\n return false;\n }\n }else{\n System.out.println(\"No se pudo hacer la consulta\");\n return false;\n }\n }catch(Exception e){\n System.out.println(e.getClass());\n System.out.println(e.getMessage());\n e.printStackTrace();\n return false;\n }\n }", "public void buscarComprobantesEntreFechas(){\n listaComprobantes = this.getEjbFacadeComprobantes().buscarEntreFechasConEstadoSinRendicionExterna(desde,hasta);\n \n System.out.println(\"listaComprobantes cantidad >> \" + listaComprobantes.size());\n }", "private void carregaInformacoes() {\n Pessoa pessoa = (Pessoa) getIntent().getExtras().getSerializable(\"pessoa\");\n edtNome.setText(pessoa.getNome());\n edtEmail.setText(pessoa.getEmail());\n edtTelefone.setText(pessoa.getTelefone());\n edtIdade.setText(pessoa.getIdade());\n edtCPF.setText(pessoa.getCpf());\n }", "public List<Calificar> buscar_comentario(String email){\n List<Calificar> cal = null;\n Session session = sessionFactory.openSession();\n Transaction tx = null;\n \n try{\n \n tx = session.beginTransaction();\n String hql = \"from Calificar c where c.persona.correo = :correo\";\n Query query = session.createQuery(hql);\n query.setParameter(\"correo\", email);\n cal = (List<Calificar>)query.list();\n tx.commit();\n \n } catch (Exception e) {\n if (tx != null) {\n tx.rollback();\n }\n e.printStackTrace();\n } finally {\n session.close();\n }\n \n return cal;\n }", "private boolean revisarFormatoCorreo() {\n\t\tString correoE = this.campoCorreo.getText();\n\t\tPattern pat = Pattern.compile(\"^[\\\\w-]+(\\\\.[\\\\w-]+)*@[\\\\w-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\");\n\t\tMatcher mat = pat.matcher(correoE);\n\t\tif (mat.matches()) {\n\t\t\treturn true;\n\t\t} else\n\t\t\treturn false;\n\t}", "public void cambiar(Cliente c) {\n\t\tfor (int i=0; i<noCliente; i++) {\n\t\t\tif (clientes[i].id == c.id) {\n\t\t\t\t//Cambiamos el elemento de la lista\n\t\t\t\tclientes[i] = c;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "@Override public void realizarCobro(Persona persona){\n\tpersona.cuenta.retiro(120);\n }", "@Override\r\n\tpublic Integer getId() {\n\t\treturn this.codContacto;\r\n\t}", "public String obtnerEmailClientes() {\n ArrayList tempAL = new ArrayList();\n RowKeySet rowKeys = Cliente.getClienteInstance().getClienteBinding().getTblClientes().getSelectedRowKeys();\n Iterator iterador = rowKeys.iterator();\n while (iterador.hasNext()){\n Object valor = iterador.next();\n Cliente.getClienteInstance().getClienteBinding().getTblClientes().setRowKey(valor);\n ClienteData row = (ClienteData) Cliente.getClienteInstance().getClienteBinding().getTblClientes().getRowData();\n tempAL.add(row);\n }\n String to = \"\";\n for(int i = 0; i < tempAL.size(); i++){\n to += \";\" + ((ClienteData)tempAL.get(i)).getEmail();\n }\n if(to.length() > 0){\n to = to.substring(1, to.length());\n }\n emailData.setTo(to);\n //emailData.setTo(emailBinding.getTblClientes().get);\n RequestContext rc = RequestContext.getCurrentInstance();\n rc.returnFromDialog(emailData.getTo(), null);\n //return null;\n return \"success\";\n }", "public void atenderTelefone() {\n System.out.println(\"Telefone \" + getNumero() + \" atendido!\");\n notificarTodos();\n }", "public void setContact(Contact contact) {\n this.contact = contact;\n }", "public void setContact(Contact contact) {\n this.contact = contact;\n }", "public void setTelefono(String aTelefono) {\n telefono = aTelefono;\n }", "private void muestraPersona(JSONArray genero) {\n\tJSONArray a = (JSONArray) genero.get(0);\n\t// txtId.setText(Long.toString( (Long) a.get(0)) );\n\t//txtBuscar.setText((String) a.get(1));\n\t// textFecha.setText((String) a.get(2));\n\t// textUsu.setText((String) a.get(4));\n\tcodTemporal = a.get(0).toString();\n\n\thabilita(true, false, false, false, false, true, false, true, true);\n }" ]
[ "0.6887902", "0.67177296", "0.67177296", "0.66454464", "0.66454464", "0.6581449", "0.6519273", "0.65060383", "0.64511144", "0.6380405", "0.63263905", "0.6212634", "0.60930616", "0.60909855", "0.60873383", "0.608208", "0.6061825", "0.60568583", "0.60260284", "0.60202837", "0.60191095", "0.6015262", "0.60136193", "0.60038656", "0.598889", "0.59808016", "0.5896297", "0.58836246", "0.5882143", "0.58818465", "0.5870534", "0.5865085", "0.5841554", "0.58280057", "0.5823502", "0.5819986", "0.580919", "0.58033913", "0.5758947", "0.5736333", "0.5734903", "0.572962", "0.57263243", "0.57192", "0.57107586", "0.5708268", "0.570292", "0.56940037", "0.568853", "0.56857467", "0.56730914", "0.56729144", "0.56654584", "0.56636333", "0.5658559", "0.56575704", "0.5657436", "0.56505966", "0.5639294", "0.56345326", "0.5627535", "0.56250715", "0.5623218", "0.56201965", "0.5617236", "0.5614566", "0.5611231", "0.56105006", "0.56098807", "0.55953044", "0.5592347", "0.55913293", "0.5588951", "0.5577293", "0.5571857", "0.5569953", "0.55677456", "0.55662864", "0.55662864", "0.55662864", "0.55662864", "0.55662864", "0.5544248", "0.55320835", "0.5530653", "0.5514885", "0.5509347", "0.5506184", "0.5505349", "0.5503279", "0.5501594", "0.55011797", "0.5498363", "0.5489824", "0.5482267", "0.548036", "0.5477925", "0.5470337", "0.5470337", "0.54691637", "0.5463381" ]
0.0
-1
Convierte un listado de Contactos a personas
public static ArrayList<Person> fromContacts(ArrayList<Contact> contacts){ ArrayList<Person> list = new ArrayList<>(); for(Contact c : contacts){ list.add(fromContact(c)); } return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mostrarContactos() {\n\t\tfor (int i = 0; i < this.listaContactos.size(); i++) {\n\t\t\tSystem.out.println(this.listaContactos.get(i).mostrarDatos());\n\t\t}\n\t}", "public List<Person> readContactlist()\n {\n List<Person> personList=new ArrayList<Person>();\n\n ContentResolver resolver = getContentResolver();\n Cursor cursor = resolver.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);\n\n while (cursor.moveToNext()) {\n String id = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n String name = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n\n\n Cursor phoneCursor = resolver.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"= ?\", new String[]{id}, null);\n\n\n while (phoneCursor.moveToNext()) {\n String phoneNumber = phoneCursor.getString(phoneCursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n\n personList.add(new Person(name, phoneNumber));\n }\n }\n return personList;\n }", "private List getContactNames() {\n List<Contact> contacts = new ArrayList<>();\n // Get the ContentResolver\n ContentResolver cr = getContentResolver();\n // Get the Cursor of all the contacts\n Cursor cursor = cr.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);\n while (cursor.moveToNext()) {\n\n\n //Sjekker om kontakt har et tlf nummer\n String hasNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.HAS_PHONE_NUMBER));\n String contactName = \"\";\n if (hasNumber.equals(\"1\")) {\n contactName = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));\n\n Contact contact = new Contact(contactName);\n contacts.add(contact);\n\n\n }\n }\n cursor.close();\n return contacts;\n }", "java.util.List<kr.pik.message.Profile.ProfileMessage.ContactAddress> \n getContactAddressList();", "private List<ModelContacts> getContact(){\n String contenue_ecran = tableView.getText().toString().trim();\n List<ModelContacts> list = new ArrayList<>();\n if (!contenue_ecran.equals(\"\")) {\n Cursor cursor = this.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n null, null, null,\n ContactsContract.Contacts.DISPLAY_NAME + \" ASC\");\n assert cursor != null;\n cursor.moveToFirst();\n while (cursor.moveToNext()) {\n String phoneNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n String name = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));\n String image = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.PHOTO_ID));\n String formatPhoneNumber = \"<font color='#42A5F5'><b>\" + contenue_ecran + \"</b></font>\";\n String formatPhone = phoneNumber.replace(contenue_ecran, formatPhoneNumber);\n if (phoneNumber.contains(contenue_ecran)) {\n list.add(new ModelContacts(name, image, formatPhone));\n }\n }\n cursor.close();\n }\n return list;\n }", "private ArrayList<Contact> getContactList(Context context) {\n String[] selectCol = new String[] { ContactsContract.Contacts.DISPLAY_NAME,\n ContactsContract.Contacts.HAS_PHONE_NUMBER, ContactsContract.Contacts._ID };\n\n final int COL_NAME = 0;\n final int COL_HAS_PHONE = 1;\n final int COL_ID = 2;\n\n // the selected cols for phones of a user\n String[] selPhoneCols = new String[] { ContactsContract.CommonDataKinds.Phone.NUMBER,\n ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME, ContactsContract.CommonDataKinds.Phone.TYPE };\n\n final int COL_PHONE_NUMBER = 0;\n final int COL_PHONE_NAME = 1;\n final int COL_PHONE_TYPE = 2;\n\n String select = \"((\" + Contacts.DISPLAY_NAME + \" NOTNULL) AND (\" + Contacts.HAS_PHONE_NUMBER + \"=1) AND (\"\n + Contacts.DISPLAY_NAME + \" != '' ))\";\n\n ArrayList<Contact> list = new ArrayList<Contact>();\n Cursor cursor = context.getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, selectCol, select,\n null, ContactsContract.Contacts.DISPLAY_NAME + \" COLLATE LOCALIZED ASC\");\n if (cursor == null) {\n return list;\n }\n if (cursor.getCount() == 0) {\n return list;\n }\n\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n int contactId;\n contactId = cursor.getInt(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n if (cursor.getInt(COL_HAS_PHONE) > 0) {\n // the contact has numbers\n // 获得联系人的电话号码列表\n String displayName;\n displayName = cursor.getString(COL_NAME);\n Cursor phoneCursor = context.getContentResolver().query(\n ContactsContract.CommonDataKinds.Phone.CONTENT_URI, selPhoneCols,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"=\" + contactId, null, null);\n if (phoneCursor.moveToFirst()) {\n do {\n // 遍历所有的联系人下面所有的电话号码\n String phoneNumber = phoneCursor.getString(COL_PHONE_NUMBER);\n Contact contact = new Contact(0, displayName);\n contact.phoneNumber = phoneNumber;\n list.add(contact);\n } while (phoneCursor.moveToNext());\n \n phoneCursor.close();\n }\n }\n cursor.moveToNext();\n }\n \n cursor.close();\n\n return list;\n }", "public List<Perfil> listaPerfilContacto(Perfil perfil) {\n\t\tList<Perfil> lista = perfilDAOImp.listaPerfilContacto(perfil);\n\t\treturn lista;\n\t}", "public Vector<MailsTO> mailContacts() throws ConnectionException, SQLException;", "public void addContacts(List<Contact> contactList){\n for(Contact contact:contactList){\n addContact(contact);\n }\n }", "@Override\r\n\tpublic List<Contacto> getContactosInatec() {\r\n\t\treturn null;\r\n\t}", "java.util.List<com.ubtrobot.phone.PhoneCall.Contact>\n getContactListList();", "java.util.List<com.ubtrobot.phone.PhoneCall.Contact>\n getContactListList();", "java.util.List<com.ubtrobot.phone.PhoneCall.Contact>\n getContactListList();", "java.util.List<com.ubtrobot.phone.PhoneCall.Contact>\n getContactListList();", "void setList(ArrayList<UserContactInfo> contactDeatailsList);", "private void transferContactList() throws IOException {\n dbh.open();\n try {\n String[][] contacts = dbh.getContactsArray(user.toString());\n System.out.println(Arrays.toString(contacts));\n int nbrOfContacts = contacts.length;\n oos.writeObject(\"ContactList\");\n oos.writeObject(contacts);\n oos.flush();\n logListener.logInfo(\"Transfered \" + nbrOfContacts + \" contacts to: \" + user.toString());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public List<Contact> getAllContacts();", "List<Persona> obtenerTodasLasPersona();", "private List<Contact> getContactsList() {\n\n\t\tList<Contact> contactsList = new ArrayList<>();\n\n\t\tContentResolver cr = getActivity().getContentResolver();\n\n\t\t// Obtiene toda la informarciónd de los contactos\n\t\tCursor cursor = getActivity().getContentResolver().query(\n\t\t\t\tContactsContract.Contacts.CONTENT_URI, null, null, null,\n\t\t\t\t\"display_name\");\n\t\t// Obtiene el número de la columnas que queremos almacenar.\n\t\tint idIndex = cursor.getColumnIndex(ContactsContract.Contacts._ID);\n\t\tint displayNameIndex = cursor\n\t\t\t\t.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME);\n\n\t\tcursor.moveToFirst();\n\t\twhile (cursor.moveToNext()) {\n\t\t\t// Comprueba que tenga numero de teléfono\n\t\t\tif (Integer\n\t\t\t\t\t.parseInt(cursor.getString(cursor\n\t\t\t\t\t\t\t.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER))) > 0) {\n\t\t\t\tString id = cursor.getString(idIndex);\n\t\t\t\tString name = cursor.getString(displayNameIndex);\n\t\t\t\tString phone = null;\n\n\t\t\t\tString selectionArgs = Phone.CONTACT_ID + \" = ? AND \"\n\t\t\t\t\t\t+ Phone.TYPE + \"= \" + Phone.TYPE_MOBILE;\n\n\t\t\t\tCursor pCur = cr.query(\n\t\t\t\t\t\tContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n\t\t\t\t\t\tnew String[] { Phone.NUMBER }, selectionArgs,\n\t\t\t\t\t\tnew String[] { id }, null);\n\n\t\t\t\tif (pCur.moveToFirst()) {\n\t\t\t\t\tphone = pCur.getString(0);\n\n\t\t\t\t}\n\t\t\t\tpCur.close();\n\n\t\t\t\t// Crea el objeto contact\n\t\t\t\tContact contact = new Contact(id, name, phone);\n\t\t\t\tcontactsList.add(contact);\n\t\t\t}\n\n\t\t}\n\n\t\treturn contactsList;\n\n\t}", "@Override\n\tpublic String getContactos(String nickName) throws RemoteException {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tList<String> lista = bbdd.loadContactos(nickName);\n\t\tfor(String nombre : lista){\n\t\t\tsb.append(nombre + \"\\n\");\n\t\t}\n\t\treturn sb.toString();\n\t}", "public static List<Person> getExamplePeople() {\n return Arrays.asList(\n new Person(\"1230\", \"John\", \"Smith\", LocalDate.of(1965, 1, 20), \"Some Street 3, Some City, Some Country\", \n Arrays.asList(\n new PersonContact(PersonContactType.PHONE, \"Home number\", \"+123 4567890\"),\n new PersonContact(PersonContactType.EMAIL, \"Personal e-mail\", \"some@email.nil\")\n )\n ),\n new Person(\"1231\", \"Jack\", \"Tree\", LocalDate.of(1971, 3, 20), \"Some Street 9, Some City, Some Country\", \n Arrays.asList(\n new PersonContact(PersonContactType.MOBILE, \"Personal number\", \"+123 456789011\")\n )\n ),\n new Person(\"1232\", \"Mary\", \"Jones\", LocalDate.of(1980, 2, 20), \"Some Street 7, Some City, Some Country\", \n null\n ),\n new Person(\"1233\", \"Maria\", \"Johnson\", LocalDate.of(1991, 9, 12), \"Some Street 30, Some City, Some Country\", \n Arrays.asList(\n new PersonContact(PersonContactType.PHONE, \"Work number\", \"+123 4634563\")\n )\n ),\n new Person(\"1234\", \"Luke\", \"Miller\", LocalDate.of(1986, 12, 3), \"Some Street 87, Some City, Some Country\", \n Arrays.asList(\n new PersonContact(PersonContactType.PHONE, \"Home number\", \"+123 13433653\"),\n new PersonContact(PersonContactType.EMAIL, \"Personal e-mail\", \"my@email.nil\"),\n new PersonContact(PersonContactType.MOBILE, \"Preferred contact\", \"+123 365346456\")\n )\n ),\n new Person(\"1235\", \"Michelle\", \"Smith\", LocalDate.of(1966, 6, 30), \"Some Street 3, Some City, Some Country\", \n Arrays.asList(\n new PersonContact(PersonContactType.PHONE, \"Home number\", \"+123 4567890\"),\n new PersonContact(PersonContactType.EMAIL, \"Personal e-mail\", \"other@email.nil\")\n )\n )\n );\n }", "Set<Person> getContacts();", "public void allContacts(){\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(\"./src/data/contactInfo.text\"));\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null){\n\t\t\t\tSystem.out.println(line);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private void getContactList() {\r\n\r\n\t\tgroupData.clear();\r\n\t\tchildData.clear();\r\n\t\tDataHelper dataHelper = new DataHelper(ContactsActivity.this);\r\n\t\tdataHelper.openDatabase();\r\n\t\tgroupData = dataHelper.queryZoneAndCorpInfo(childData);\r\n\t\tdataHelper.closeDatabase();\r\n\t\thandler.sendEmptyMessage(1);\r\n\r\n\t\tif (groupData == null || groupData.size() == 0) {\r\n\t\t\tDataTask task = new DataTask(ContactsActivity.this);\r\n\t\t\ttask.execute(Constants.KServerurl + \"GetAllOrgList\", \"\");\r\n\t\t}\r\n\t}", "public static List<Contact> getContacts() {\n List<Contact> contacts = new ArrayList<>();\n contacts.add(new Contact(\"Rabbit\", R.drawable.rabbit, \"4153508881\"));\n contacts.add(new Contact(\"Sheep\", R.drawable.sheep, \"4153508882\"));\n contacts.add(new Contact(\"Octopus\", R.drawable.octopus, \"4153508883\"));\n contacts.add(new Contact(\"Cat\", R.drawable.cat, \"4153508884\"));\n contacts.add(new Contact(\"Lion\", R.drawable.lion, \"4153508885\"));\n contacts.add(new Contact(\"Sheep\", R.drawable.sheep, \"4153508886\"));\n contacts.add(new Contact(\"Dog\", R.drawable.dog, \"4153508887\"));\n contacts.add(new Contact(\"Horse\", R.drawable.horse, \"4153508888\"));\n return contacts;\n }", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "public List<IContact> getContacts();", "java.util.List<org.multibit.hd.core.protobuf.MBHDContactsProtos.Contact> \n getContactList();", "public void loadContactListToView(){\r\n\t\ttry {\r\n\t\t\tclientView.clearContactList();\r\n\t\t\tHashMap <Long, String> contactList = userModel.getContactList().getClReader().getContactList();\r\n\t\t\tIterator iter = contactList.entrySet().iterator();\r\n\t\t\tMap.Entry <Long, String> pair;\r\n\t\t\tint i =0;\r\n\t\t\twhile(iter.hasNext()){\r\n\t\t\t\tSystem.out.println(i++);\r\n\t\t\t\tpair = (Map.Entry <Long, String>)iter.next();\r\n\t\t\t\t\tclientView.addNewUserToContactList(pair.getValue()+\" \"+pair.getKey());\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\tclientView.showMsg(\"Contact list can't be loaded\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public void llenarContactos() {\n\t\t SharedPreferences prefs = getSharedPreferences(\"MisPreferenciasTrackxi\",Context.MODE_PRIVATE);\n String telemer = prefs.getString(\"telemer\", null);\n String correoemer = prefs.getString(\"correoemer\", null);\n String telemer2 = prefs.getString(\"telemer2\", null);\n String correoemer2 = prefs.getString(\"correoemer2\", null);\n \n\t\taddContact(telemer,correoemer);\n\n\t\tif(telemer2!=null){\n\t\t\taddContact(telemer2,correoemer2);\n\t\t}\n\t}", "public void obtenerLista(){\n listaInformacion = new ArrayList<>();\n for (int i = 0; i < listaPersonales.size(); i++){\n listaInformacion.add(listaPersonales.get(i).getId() + \" - \" + listaPersonales.get(i).getNombre());\n }\n }", "java.util.List<com.ljzn.grpc.personinfo.PersoninfoMessage> \n getPersonInfoList();", "public void printContact(){\n for (int i = 0 ; i<contact.size() ; i++){\r\n System.out.print(contact.get(i).getFirstName());\r\n System.out.print(\"\\t\\t\"+contact.get(i).getLastName());\r\n System.out.print(\"\\t\\t\"+contact.get(i).getPhoneNumber());\r\n System.out.println(\"\\t\\t\"+contact.get(i).getAddress());\r\n }\r\n }", "public Collection<Contact> getContacts();", "private void requestContactInformation() {\n CONTACTS = new ArrayList<>();\n\n Cursor c = getContentResolver().query(ContactsContract.Contacts.CONTENT_URI,\n null, null, null,\n ContactsContract.Contacts.DISPLAY_NAME_PRIMARY + \" asc\");\n\n while(c.moveToNext()) {\n HashMap<String, String> map = new HashMap<String, String>();\n String id = c.getString(c.getColumnIndex(ContactsContract.Contacts._ID));\n String name = c.getString(c.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME_PRIMARY));\n\n Cursor phoneCursor = getContentResolver().query(\n ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n null,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \" = \" + id,\n null, null\n );\n\n if (phoneCursor.moveToFirst()) {\n String number = phoneCursor.getString(phoneCursor.getColumnIndex(\n ContactsContract.CommonDataKinds.Phone.NUMBER\n ));\n CONTACTS.add(Pair.create(name, number));\n }\n\n phoneCursor.close();\n }\n\n }", "public List<PersonaDTO> consultarPersonas() ;", "public List<PersonEntity> obtenerDatosPersonas() {\n\n\t\ttry {\n\n\t\t\tlog.info(\"Procediendo a obtener el detalle de los clientes\");\n\t\t\tStoredProcedureQuery storedProcedureQuery = entityManager\n\t\t\t\t\t\n\t\t\t\t\t// Definicion\n\t\t\t\t\t.createStoredProcedureQuery(prop.getPROCEDURE_OBTENER_PERSONAS(), PersonEntity.class);\n\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tList<PersonEntity> res = storedProcedureQuery.getResultList();\n\n\t\t\tlog.info(\"Lista consultada exitosamente\");\n\t\t\tlog.info(\"Recorriendo lista de salida...\");\n\t\t\tfor (PersonEntity p : res) {\n\t\t\t\tlog.info(\"Persona : \" + p);\n\t\t\t}\n\n\t\t\treturn res;\n\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Error al consultar procedure [\" + prop.getPROCEDURE_OBTENER_PERSONAS() + \"] , Detalle > \" + e.getMessage());\n\t\t}\n\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Contacto> listaPerfilMatch(Perfil perfil) {\n\t\tList<Contacto>lista=perfilDAOImp.listaPerfilMatch(perfil);\n\t\treturn lista;\n\t}", "@Override\n\tpublic List<Contact> getAllContact() {\n\n\t\tList<Contact> contactList = new ArrayList<>();\n\n\t\tList<ContactDetailsEntity> entityList = contactRepositeries.findAll();\n\n\t\tList<ContactDetailsEntity> filterEntity = entityList.stream()\n\t\t\t\t.filter(entity -> \"y\".equals(entity.getActiveSwitch())).collect(Collectors.toList());\n\n\t\tif (!filterEntity.isEmpty()) {\n\t\t\tfilterEntity.forEach(entity -> {\n\t\t\t\tContact c = new Contact();\n\t\t\t\tBeanUtils.copyProperties(entity, c);\n\t\t\t\tcontactList.add(c);\n\t\t\t});\n\t\t}\n\t\treturn contactList;\n\t}", "public List<String> getContactosEmpresa(String idEmpresa) {\n List<String> contactos = new ArrayList<>();\n String contacto;\n\n try{\n connection = con.connect();\n PreparedStatement stm = connection.prepareStatement(\"SELECT Contacto FROM Contactos \" +\n \"WHERE Empresa_ID = \" + idEmpresa);\n ResultSet rs = stm.executeQuery();\n\n while(rs.next()){\n contacto = rs.getString(\"Contacto\");\n contactos.add(contacto);\n }\n }\n catch (Exception e){\n e.getMessage();\n }\n finally {\n con.close(connection);\n }\n return contactos;\n }", "public void mailList() {\n for (int index = 0; index < emails.size(); index++) {\n Mensagem mensagem = emails.get(index);\n System.out.println(\"Email \" + index + \": \");\n System.out.println(\"De: \" + mensagem.remetente);\n System.out.println(\"Para: \" + mensagem.destinatario + \"\\n\");\n }\n }", "@Override\n\tpublic List<Contact> listContact() {\n\t\ttry {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"************************* je suis dans Liste des contacts *********************************\");\n\t\t\tsession = HibernateUtil.getSessionFactory().openSession();\n\t\t\ttx = session.beginTransaction();\n\n\t\t\tQuery query = session.createQuery(\"from Contact\");\n\n\t\t\tSystem.out.println(\"\\n\");\n\t\t\tSystem.out.println(\"liste des contacts: \" + String.valueOf(query.list()));\n\n\t\t\tList<Contact> lc = (List<Contact>) query.list();\n\t\t\ttx.commit();\n\t\t\tsession.close();\n\n\t\t\treturn lc;\n\n\t\t} catch (HibernateException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "private void permisosContactos() {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_CONTACTS) != PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_CONTACTS) != PERMISSION_GRANTED) {\n\n ActivityCompat.requestPermissions(this, new String[]{\n Manifest.permission.READ_CONTACTS, Manifest.permission.WRITE_CONTACTS\n }, CONTACTS_REQUEST_CODE);\n\n }\n\n else{\n llenarLista();\n }\n }", "public ArrayList<Contact> loadContacts()\n\t{\n\t\t//TODO gestion des infos\n\t\t\n\t\t/* Requete SQL */\n\t\tCursor cursor = mainDatabase.rawQuery(\"SELECT \" + DBContract.ContactTable.CONTACT_ID[0] + \", \" +\n\t\t\t\tDBContract.ContactTable.NAME[0] + \", \" + DBContract.ContactTable.SURNAME[0] + \", \" + \n\t\t\t\tDBContract.ContactTable.BILL[0] + \" FROM \" + DBContract.ContactTable.TABLE_NAME, null);\n\t\t\n\t\tArrayList<Contact> result = new ArrayList<Contact>();\n\t\t\n\t\t/* Parcour du resultat */\n\t\tif(cursor.moveToFirst())\n\t\t{\n\t\t\t\twhile(!cursor.isAfterLast())\n\t\t\t\t{\n\t\t\t\t\t/* Instancie le nouveau contact : id-nom-prenom */\n\t\t\t\t\tContact tmp = new Contact(cursor.getInt(0), cursor.getString(1), cursor.getString(2));\n\t\t\t\t\ttmp.addToBill(cursor.getDouble(3));\t\n\t\t\t\t\tresult.add((int) (tmp.getId() - 1), tmp); //TODO mod -1 //TODO verifier qu'il n'y a pas d'id 0 et que tout se passe bien !\n\t\t\t\t\tcursor.moveToNext();\n\t\t\t\t}\n\t\t}\n\t\tcursor.close();\n\t\treturn result;\n\t}", "private List<User> retrieveTravelContacts() {\n if (checkIfContactKeysExists()) {\n return SharedPrefsUtils.convertSharedPrefsToTravelContacts(context);\n }\n //TODO: display no contacts UI below header\n return new ArrayList<>();\n }", "public String getContacts() {\n return contacts;\n }", "public ArrayList<Contact> read_contact_list()\n {\n ArrayList<Contact> result = new ArrayList<Contact>();\n String[] current_data = read();\n\n for (int i = 0; i < current_data.length; i++)\n {\n String line = current_data[i];\n if (line != null)\n {\n String[] split = line.split(\":\");\n if (split.length >= 5)\n {\n result.add(new Contact(split[0], split[1], split[2], split[3], split[4]));\n }\n }\n }\n return result;\n }", "java.util.List<People>\n getFriendListList();", "@Override\n\tpublic List<Contact> listContactForGroup(Set<Contact> contactsinGroup) {\n\t\ttry {\n\t\t\tsession = HibernateUtil.getSessionFactory().openSession();\n\t\t\ttx = session.beginTransaction();\n\t\t\t\n\t\t\tArrayList<Long> listIds = new ArrayList<Long>();\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"************************* \" + listIds.toString());\n\t\t\tList<Contact> lc = null;\n\t\t\tfor (Contact c : contactsinGroup) {\n\t\t\t\tlistIds.add(c.getId());\n\t\t\t}\n\t\t\t\t\n\t\t\tif (listIds.isEmpty()) {\n\t\t\t\tQuery query = session.createQuery(\"from Contact\");\n\t\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\tSystem.out.println(\"liste des contacts: \" + String.valueOf(query.list()));\n\t\t\t\tlc = (List<Contact>) query.list();\n\t\t\t} else {\n\t\t\t\tQuery query = session.createQuery(\"from Contact where id not in (:ids)\");\n\t\t\t\tquery.setParameterList(\"ids\", listIds);\n\t\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\tSystem.out.println(\"liste des contacts: \" + String.valueOf(query.list()));\n\t\t\t\tlc = (List<Contact>) query.list();\n\t\t\t}\n\t\t\ttx.commit();\n\t\t\tsession.close();\n\n\t\t\treturn lc;\n\n\t\t} catch (HibernateException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "private static void showContacts(List<Contact> contactList) {\r\n\t\tcontactList.forEach(System.out::println);\r\n\t}", "public List<Contact> getParticipants()\n {\n return new LinkedList<Contact>(participants.values());\n }", "public void consultarListasPersonas(){\n SQLiteDatabase db = conn.getReadableDatabase();\n Personal personal = null;\n listaPersonales = new ArrayList<>();\n Cursor cursor = db.rawQuery(\"SELECT * FROM personal\", null);\n while(cursor.moveToNext()){\n personal = new Personal();\n personal.setId(cursor.getInt(0));\n personal.setNombre(cursor.getString(1));\n personal.setApellido(cursor.getString(2));\n personal.setHoraEntrada(cursor.getInt(3));\n personal.setHoraSalida(cursor.getInt(4));\n personal.setId_laboratorio(cursor.getInt(5));\n listaPersonales.add(personal);\n }\n db.close();\n obtenerLista();\n }", "public List<Persona> todasLasPersonas(){\n\n Iterable<Persona> ite=repo.findAll();\n Iterator<Persona> it=ite.iterator();\n List<Persona> actualList = new ArrayList<Persona>();\n while (it.hasNext()) {\n actualList.add(it.next());\n }\n\n return actualList;\n }", "public void loadContacts()\n {\n Contact sdhb = new Contact(\"SDHB\", \"(03) 474 00999\");\n //Hospitals\n Contact southland = new Contact(\"Southland Hospital\", \"(03) 218 1949\");\n Contact lakes = new Contact(\"Lakes District Hostpital\", \"(03) 441 0015\");\n Contact dunedin = new Contact(\"Dunedin Hospital\", \"(03) 474 0999\");\n Contact wakari = new Contact(\"Wakari Hospital\", \"(03) 476 2191\");\n //Departments\n Contact compD = new Contact(\"Complements & Complaints (Otago)\", \"(03) 470 9534\");\n Contact compS = new Contact(\"Complements & Complaints (Southland)\", \"(03) 214 5738\");\n\n contacts = new Contact[]{sdhb, dunedin, southland, lakes, wakari, compD, compS};\n }", "@Override\n public List<User> getContacts() {\n if (contacts.isEmpty()) {\n contacts.addAll(readFromFile());\n }\n\n // else return the current list of contacts\n return contacts;\n }", "public void viewList() {\n\t\tSystem.out.println(\"Your have \" + contacts.size() + \" contacts:\");\n\t\tfor (int i=0; i<contacts.size(); i++) {\n\t\t\tSystem.out.println((i+1) + \". \" \n\t\t\t\t\t+ contacts.get(i).getName() + \" number: \" \n\t\t\t\t\t+ contacts.get(i).getPhoneNum());\n\t\t}\n\t}", "private void getContactDataBefore() {\n int i = 0;\n List<String> list = new ArrayList<>();\n\n Cursor c1 = getContentResolver()\n .query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);\n\n if ((c1 != null) && c1.moveToFirst()) {\n\n // add contact id's to the mIDs list\n do {\n String id = c1.getString(c1.getColumnIndexOrThrow(ContactsContract.Contacts._ID));\n String name = c1.getString(c1.getColumnIndexOrThrow(ContactsContract.Contacts.DISPLAY_NAME));\n\n // query all contact numbers corresponding to current id\n Cursor c2 = getContentResolver()\n .query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n new String[]{ContactsContract.CommonDataKinds.Phone.NUMBER},\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"=?\",\n new String[]{id}, null);\n\n if (c2 != null && c2.moveToFirst()) {\n // Log.d(\"DEBUG\",\"name =\" + name);\n list = new ArrayList<>();\n\n if (idsHash.containsKey(name)) {\n list = idsHash.get(name);\n } else {\n mIDs.add(id);\n mNames.add(name);\n mNumbers.add(c2.getString(c2\n .getColumnIndexOrThrow(ContactsContract.CommonDataKinds.Phone.NUMBER)));\n }\n\n list.add(id);\n idsHash.put(name, list);\n\n c2.close();\n } else {\n c2.close();\n }\n\n i++;\n } while (c1.moveToNext() && i < c1.getCount());\n\n c1.close();\n }\n }", "@GET(API_ROUTE + \"/contactos-cliente/{cli_id}\")\n Call<List<Persona>> getContactsByClientId(@Path(\"cli_id\") long cli_id);", "private void processContact() {\n String[] myArray = new String[getMyContacts().size()];\n myArray = getMyContacts().toArray(myArray);\n System.out.println(Arrays.toString(myArray));\n }", "public static List<Contact> getContacts() {\n return new ArrayList<>(contacts.values());\n }", "private ArrayList<String> getContactsEmails() {\n //Credits go to \n //http://stackoverflow.com/questions/10117049/get-only-email-address-from-contact-list-android\n ArrayList<String> emlRecs = new ArrayList<String>();\n HashSet<String> emlRecsHS = new HashSet<String>();\n Context context = getBaseContext();\n ContentResolver cr = context.getContentResolver();\n String[] projection = new String[] { \n ContactsContract.RawContacts._ID, \n ContactsContract.Contacts.DISPLAY_NAME,\n ContactsContract.Contacts.PHOTO_ID,\n ContactsContract.CommonDataKinds.Email.DATA, \n ContactsContract.CommonDataKinds.Photo.CONTACT_ID };\n String order = \"CASE WHEN \" \n + ContactsContract.Contacts.DISPLAY_NAME \n + \" NOT LIKE '%@%' THEN 1 ELSE 2 END, \" \n + ContactsContract.Contacts.DISPLAY_NAME \n + \", \" \n + ContactsContract.CommonDataKinds.Email.DATA\n + \" COLLATE NOCASE\";\n String filter = ContactsContract.CommonDataKinds.Email.DATA + \" NOT LIKE ''\";\n Cursor cursor = cr.query(ContactsContract.CommonDataKinds.Email.CONTENT_URI, projection, filter, null, order);\n if (cursor.moveToFirst()) {\n do {\n // names comes in hand sometimes\n //String name = cursor.getString(1);\n String emaillAddress = cursor.getString(EMAIL_INDEX);\n\n // keep unique only\n if (emlRecsHS.add(emaillAddress.toLowerCase(Locale.US))) {\n emlRecs.add(emaillAddress.toLowerCase(Locale.US));\n }\n } while (cursor.moveToNext());\n }\n cursor.close();\n Collections.sort(emlRecs.subList(0, emlRecs.size()));\n return emlRecs;\n }", "public static List<Endereco> listar() {\n\t\t\tConnection conexao = ConectaPostgreSQL.geraConexao();\n\t\t\t// variavel lista de ass\n\t\t\tList<Endereco> acessos = new ArrayList<Endereco>();\n\t\t\t// executa o SQL no banco de endereco\n\t\t\tStatement consulta = null;\n\t\t\t// contém os endereco consultado da tabela\n\t\t\tResultSet resultado = null;\n\t\t\t// objeto as\n\t\t\t// Endereco as = null;\n\t\t\t// consulta SQL\n\t\t\tString sql = \"select distinct * from Endereco\";\n\t\t\ttry {\n\t\t\t\t// consulta => objeto que executa o SQL no banco de endereco\n\t\t\t\tconsulta = conexao.createStatement();\n\t\t\t\t// resultado => objeto que contém os endereco consultado da tabela\n\t\t\t\t// Endereco\n\t\t\t\tresultado = consulta.executeQuery(sql);\n\t\t\t\t// Lê cada as\n\n\t\t\t\twhile (resultado.next()) {\n\t\t\t\t\tEndereco endereco = new Endereco();\n\t\t\t\t\tendereco.setBairro(resultado.getString(\"bairro\"));\n\t\t\t\t\tendereco.setCep(resultado.getString(\"cep\"));\n\t\t\t\t\tendereco.setCidade(resultado.getString(\"cidade\"));\n\t\t\t\t\tendereco.setEstado(resultado.getString(\"estado\"));\n\t\t\t\t\tendereco.setNumero(resultado.getInt(\"numero\"));\n\t\t\t\t\tendereco.setRua(resultado.getString(\"rua\"));\n\t\t\t\t\t// insere o as na lista\n\t\t\t\t\tacessos.add(endereco);\n\n\t\t\t\t}\n\n\t\t\t} catch (SQLException e) {\n\t\t\t\tthrow new RuntimeException(\"Erro ao buscar um acesso a serviços: \" + e);\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tconsulta.close();\n\t\t\t\t\tresultado.close();\n\t\t\t\t\tconexao.close();\n\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\tthrow new RuntimeException(\"Erro ao fechar a conexao \" + e);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// retorna lista de ass\n\t\t\treturn acessos;\n\t\t}", "public List<PersonContact> getContacts() {\n if (this.contacts == null) {\n this.contacts = new ArrayList<>();\n }\n return contacts;\n }", "public ArrayList<CandidatoBean> listarCandidatos() {\r\n\r\n Query query = em.createNamedQuery(\"Candidato.findAll\");\r\n ArrayList<CandidatoBean> listCandidatos = new ArrayList<>();\r\n\r\n for (Candidato candidato : (List<Candidato>) query.getResultList()) {\r\n listCandidatos.add(modelMapper.map(candidato, CandidatoBean.class));\r\n }\r\n em.close();\r\n em = null;\r\n return listCandidatos;\r\n }", "private static List<String> getEmailList(){\n List<String> lista = new ArrayList<>();\n lista.add(\"meuemail@gmail.com\");\n lista.add(\"meuemail@gmail.com.\");\n lista.add(\"meuemail@gmail.com.br\");\n lista.add(\"meu.email.@gmail.com.br.\");\n lista.add(\"meu#email@gmail.com.br\");\n lista.add(\"meu!email@gmail.com.br\");\n lista.add(\"meu$email@gmail.com.br\");\n lista.add(\"meu.email@gmail.com.br\");\n lista.add(\"[meu.email@gmail.com.br\");\n lista.add(\"<meu.email.br@gmail.com.br\");\n lista.add(\"naotem@naotem.com.br\");\n lista.add(\"naoexiste@naoexiste.com\");\n lista.add(\"naopossui@outlook.com\");\n\n lista.add(\"meu.email@uol.com\");\n lista.add(\"meuemail@uol.com.br\");\n\n\n return lista;\n\n }", "public ArrayList< UsuarioVO> listaDePersonas() {\r\n\t ArrayList< UsuarioVO> miUsuario = new ArrayList< UsuarioVO>();\r\n\t Conexion conex= new Conexion();\r\n\t \r\n\t try {\r\n\t PreparedStatement consulta = conex.getConnection().prepareStatement(\"SELECT * FROM usuarios\");\r\n\t ResultSet res = consulta.executeQuery();\r\n\t while(res.next()){\r\n\t\t UsuarioVO persona= new UsuarioVO();\r\n\t persona.setCedula_usuario(Integer.parseInt(res.getString(\"cedula_usuario\")));\r\n\t persona.setEmail_usuario(res.getString(\"email_usuario\"));\r\n\t persona.setNombre_usuario(res.getString(\"nombre_usuario\"));\r\n\t persona.setPassword(res.getString(\"password\"));\r\n\t persona.setUsuario(res.getString(\"usuario\"));\r\n\t \r\n\t \r\n\t miUsuario.add(persona);\r\n\t }\r\n\t res.close();\r\n\t consulta.close();\r\n\t conex.desconectar();\r\n\t \r\n\t } catch (Exception e) {\r\n\t JOptionPane.showMessageDialog(null, \"no se pudo consultar la Persona\\n\"+e);\r\n\t }\r\n\t return miUsuario;\r\n\t }", "public List<HashMap<String,String>> contacts() {\n final Uri uriContact = ContactsContract.CommonDataKinds.Phone.CONTENT_URI;\n ContentResolver cr = getActivity().getContentResolver();\n Cursor cur = cr.query(uriContact, null, null, null, null);\n\n List<HashMap<String,String>> contacts=new ArrayList<>();\n if (cur.getCount() > 0) {\n while (cur.moveToNext()) {\n String id = cur.getString(\n cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone._ID));\n String name = cur.getString(\n cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));\n\n\n String has_phone = cur.getString(cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.HAS_PHONE_NUMBER));\n HashMap<String,String> contact=new HashMap();\n if(!has_phone.endsWith(\"0\"))\n {\n contact.put(\"name\", name);\n String phoneNumber = cur.getString(cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n contact.put(\"number\",phoneNumber);\n contacts.add(contact);\n }\n }\n }\n this.contacts_phone=contacts;\n contacts=filter_to_app(contacts);\n return contacts;\n }", "private ArrayList<VOContactRecord> getContactRecordsFromEditor()\n\t{\n\t\tArrayList<VOContactRecord> list = new ArrayList();\n\t\t\n\t\tfor(Integer type_id : contact_editors.keySet()) \n\t\t{\n\t\t\tContactEditor editor = contact_editors.get(type_id);\n\t\t\tHashMap<ContactRecord, ContactRank> contacts = editor.getContactRecords();\n\t\t\tfor(ContactRecord contact : contacts.keySet()) {\n\t\t\t\tVOContactRecord rec = new VOContactRecord();\n\t\t\t\tContactRank rank = contacts.get(contact);\n\t\t\t\trec.contact_id = contact.id;\n\t\t\t\trec.contact_type_id = type_id;\n\t\t\t\trec.contact_rank_id = rank.id;\n\t\t\t\tlist.add(rec);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn list;\n\t}", "public static void gereCandidatos() {\n\t\tString idE, titulo, op, numCandidatos, nomeP;\n\t\tScanner sc = new Scanner(System.in);\n\t\tint check = 0, num, i;\n\t\tArrayList<Pessoa> listaCandidatos = new ArrayList<>();\n\t\tString msgServer = \"\";\n\t\t\n\t\tSystem.out.println(\"\\nInsira o id da eleicao a qual pretende adicionar uma lista de candidatos:\");\n\t\tidE = sc.nextLine();\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nInsira o titulo da lista:\");\n\t\t\ttitulo = sc.nextLine();\n\t\t\tif(verificarLetras(titulo) && titulo.length()>0) {\n\t\t\t\tcheck = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nO titulo apenas pode conter letras\");\n\t\t\t}\n\t\t}while(check==0);\n\t\t\n\t\tcheck = 0;\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nO que pretende fazer?\\n(1) Adicoes (2) Remocoes\");\n\t\t\top = sc.nextLine();\n\t\t\tif(op.equals(\"1\") || op.equals(\"2\")) {\n\t\t\t\tcheck = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nA opcao so pode conter digitos de 1 a 2\");\n\t\t\t}\n\t\t}while(check==0);\n\t\tcheck = 0;\n\t\t\n\t\tswitch(op) {\n\t\t\tcase \"1\":\n\t\t\t\tdo {\n\t\t\t\t\tSystem.out.println(\"\\nInsira numero de elementos:\");\n\t\t\t\t\tnumCandidatos = sc.nextLine();\n\t\t\t\t\tif(verificarNumeros(numCandidatos)) {\n\t\t\t\t\t\tif (Integer.parseInt(numCandidatos) > 0) {\n\t\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"\\nO numero so pode conter digitos\");\n\t\t\t\t\t}\n\t\t\t\t}while(check==0);\n\t\t\t\tnum = Integer.parseInt(numCandidatos);\n\t\t\t\tcheck = 0;\n\t\t\t\t\n\t\t\t\tfor (i=0; i<num;i++) {\n\t\t\t\t\tdo {\n\t\t\t\t\t\tSystem.out.println(\"\\nInsira o nome do elemento a adicionar:\");\n\t\t\t\t\t\tnomeP = sc.nextLine();\n\t\t\t\t\t\tif(verificarLetras(nomeP) && nomeP.length()>0) {\n\t\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSystem.out.println(\"\\nO nome apenas pode conter letras\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}while(check==0);\n\t\t\t\t\tPessoa novaP = new Pessoa(nomeP);\n\t\t\t\t\tlistaCandidatos.add(novaP);\n\t\t\t\t\tcheck = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcheck = 0;\n\t\t\t\tint tries = 0;\n\t\t\t\tdo {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmsgServer = rmiserver.adicionaCandidatos(idE, titulo, listaCandidatos);\n\t\t\t\t\t\tSystem.out.println(msgServer);\n\t\t\t\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t} catch (RemoteException e1) {\n\t\t\t\t\t\t// Tratamento da Excepcao da chamada RMI addCandidatos\n\t\t\t\t\t\tif(tries == 0) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\t\t\ttries++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(tries > 0 && tries < 24) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\t\t\ttries++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(tries >= 24) {\n\t\t\t\t\t\t\tSystem.out.println(\"Impossivel realizar a operacao devido a falha tecnica (Servidores RMI desligados).\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}while(check==0);\n\t\t\t\tcheck = 0;\n\t\t\t\tbreak;\n\t\t\tcase \"2\":\n\t\t\t\tdo {\n\t\t\t\t\tSystem.out.println(\"\\nInsira numero de elementos:\");\n\t\t\t\t\tnumCandidatos = sc.nextLine();\n\t\t\t\t\tif(verificarNumeros(numCandidatos)) {\n\t\t\t\t\t\tif (Integer.parseInt(numCandidatos) > 0) {\n\t\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"\\nO numero so pode conter digitos\");\n\t\t\t\t\t}\n\t\t\t\t}while(check==0);\n\t\t\t\tnum = Integer.parseInt(numCandidatos);\n\t\t\t\tcheck = 0;\n\t\t\t\t\n\t\t\t\tfor (i=0; i<num;i++) {\n\t\t\t\t\tdo {\n\t\t\t\t\t\tSystem.out.println(\"\\nInsira o nome do elemento a remover:\");\n\t\t\t\t\t\tnomeP = sc.nextLine();\n\t\t\t\t\t\tif(verificarLetras(nomeP) && nomeP.length()>0) {\n\t\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSystem.out.println(\"\\nO nome apenas pode conter letras\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}while(check==0);\n\t\t\t\t\tPessoa novaP = new Pessoa(nomeP);\n\t\t\t\t\tlistaCandidatos.add(novaP);\n\t\t\t\t\tcheck = 0;\n\t\t\t\t}\n\t\t\t\n\t\t\t\tcheck = 0;\n\t\t\t\ttries = 0;\n\t\t\t\tdo {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmsgServer = rmiserver.removeCandidatos(idE, titulo, listaCandidatos);\n\t\t\t\t\t\tSystem.out.println(msgServer);\n\t\t\t\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t} catch (RemoteException e1) {\n\t\t\t\t\t\t// Tratamento da Excepcao da chamada RMI addCandidatos\n\t\t\t\t\t\tif(tries == 0) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\t\t\ttries++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(tries > 0 && tries < 24) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\t\t\ttries++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(tries >= 24) {\n\t\t\t\t\t\t\tSystem.out.println(\"Impossivel realizar a operacao devido a falha tecnica (Servidores RMI desligados).\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}while(check==0);\n\t\t\t\tcheck = 0;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t}\n\t}", "public java.util.List<org.multibit.hd.core.protobuf.MBHDContactsProtos.Contact> getContactList() {\n if (contactBuilder_ == null) {\n return java.util.Collections.unmodifiableList(contact_);\n } else {\n return contactBuilder_.getMessageList();\n }\n }", "public static void fileToContactObjs() {\n contactObjList.clear();\n List<String> myList = fileToList();\n String strList = String.join( \",\", myList);\n String[] strArr = strList.split(\",\");\n for(String contact : strArr) {\n contact = contact.replace(\"|\", \"&\");\n String[] contactElems = contact.split(\"&\");\n String[] nameArr = contactElems[0].split(\" \");\n //danger code. comment out for demo\n contactElems[1] = contactElems[1].replace(\"(\", \"\");\n contactElems[1] = contactElems[1].replace(\")\", \"\");\n contactElems[1] = contactElems[1].replace(\"-\", \"\");\n //\n //ArrayIndexOutOfBoundsException below.\n Contact newContact = new Contact(nameArr[0].trim(), nameArr[1].trim(), contactElems[1], contactElems[2]);\n contactObjList.add(newContact);\n }\n }", "public static void main(String[] args) {\n ArrayList<Contact> contactBook = new ArrayList();\n\n Contact contact1 = new Contact(\"Gabe Newell\", \"hl3@valve.com\");\n Contact contact2 = new Contact(\"Todd Howard\", \"itjustworks@bethesda.com\");\n\n contactBook.add(contact1);\n contactBook.add(contact2);\n \n for (Contact contacts : contactBook) {\n System.out.println(contacts.toString());\n }\n\n }", "People getFriendList(int index);", "public List<Telefono> getTelefonos(String dni);", "@Override\r\n\tpublic Map<String, MemberDto> nameList() {\n\t\tMap<String, MemberDto> list = new HashMap<>();\r\n\t\tfor (String email : emailList()) {\r\n\t\t\tlist.put(email, myInfo(email));\r\n\t\t}\r\n\t\treturn list;\r\n\t}", "public static void addContact()\n {\n System.out.println(\"Enter your firstName : \");\n String firstName = sc.nextLine();\n for (int i = 0; i < list.size(); i++)\n {\n if (list.get(i).getFirstName().equalsIgnoreCase(firstName))\n {\n System.out.println(\"Name already exists. Try another name\");\n addPersons();\n break;\n }\n }\n\n System.out.println(\"Enter your lastName : \");\n String lastName = sc.nextLine();\n System.out.println(\"Enter your address : \");\n String address = sc.nextLine();\n System.out.println(\"Enter your city : \");\n String city = sc.nextLine();\n System.out.println(\"Enter your state : \");\n String state = sc.nextLine();\n System.out.println(\"Enter your zipCode : \");\n String zip = sc.nextLine();\n System.out.println(\"Enter your phoneNo : \");\n long phoneNo = sc.nextLong();\n System.out.println(\"Enter your emailId : \");\n String email = sc.nextLine();\n Contact contact = new Contact(firstName, lastName, address, city, state, zip, phoneNo, email);\n list.add(contact);\n }", "com.ubtrobot.phone.PhoneCall.ContactOrBuilder getContactListOrBuilder(\n int index);", "com.ubtrobot.phone.PhoneCall.ContactOrBuilder getContactListOrBuilder(\n int index);", "com.ubtrobot.phone.PhoneCall.ContactOrBuilder getContactListOrBuilder(\n int index);", "com.ubtrobot.phone.PhoneCall.ContactOrBuilder getContactListOrBuilder(\n int index);", "List<PersonaDTO> PersonaListToPersonaDTOList(List<Persona> personaList);", "public void getContacts(String contactsStr) throws IOException {\n String[] contacts = contactsStr.split(\"#\");\n allClientsArr.clear();\n allClientsArr.addAll(Arrays.asList(contacts));\n clientChatController.showContacts();\n }", "public List<ContactBE> getContacts() {\n List<ContactBE> contacts = new ArrayList<>();\n\n try (ContactCurserWrapper cursor = queryContacts(null, null)) {\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n contacts.add(cursor.getContact());\n cursor.moveToNext();\n }\n }\n return contacts;\n }", "public List getChamado(String servico) {\r\n Solicitacoes e = chamadoHandler(servico);\r\n\r\n List<ChamadoEnderecos> consultas = new ArrayList<>();\r\n String sql = \"SELECT DISTINCT\\n\"\r\n + \"\tpid.cod_pid,\\n\"\r\n + \" pid.nome_estabelecimento,\\n\"\r\n + \" endereco.descricao,\\n\"\r\n + \" endereco.numero,\\n\"\r\n + \" endereco.bairro,\\n\"\r\n + \" endereco.complemento,\\n\"\r\n + \" municipio.nome_municipio,\\n\"\r\n + \" municipio.uf,\\n\"\r\n + \" municipio.cod_IBGE,\\n\"\r\n + \" solicitacoes.id_solicitacao\\n\"\r\n + \" \\n\"\r\n + \" \\n\"\r\n + \"FROM \\n\"\r\n + \"\tpid \\n\"\r\n + \" INNER JOIN contato on \t(pid.cod_pid = contato.PID_cod_pid)\\n\"\r\n + \" INNER JOIN endereco on \t(pid.cod_pid = endereco.PID_cod_pid)\\n\"\r\n + \" INNER JOIN telefone on \t(contato.id_contato = telefone.Contato_id_contato)\\n\"\r\n + \" INNER JOIN municipio on \t(endereco.Municipio_cod_IBGE = municipio.cod_IBGE)\\n\"\r\n + \" INNER JOIN solicitacoes on (pid.cod_pid= solicitacoes.PID_cod_pid)\\n\"\r\n + \" INNER JOIN servico on\t(solicitacoes.Servico_id_servico=servico.id_servico)\\n\"\r\n + \" \\n\"\r\n + \" \\n\"\r\n + \" WHERE solicitacoes.em_chamado= 3 and servico.id_servico=\" + servico + \";\";\r\n\r\n stmt = null;\r\n rs = null;\r\n \r\n try {\r\n stmt = conn.createStatement();\r\n rs = stmt.executeQuery(sql);\r\n while (rs.next()) {\r\n consultas.add(new ChamadoEnderecos(rs.getString(1),\r\n rs.getString(2),\r\n rs.getString(3),\r\n rs.getString(4),\r\n rs.getString(5),\r\n rs.getString(6),\r\n rs.getString(7),\r\n rs.getString(8),\r\n rs.getString(9),\r\n rs.getString(10)\r\n ));\r\n\r\n }\r\n\r\n } catch (SQLException | ArrayIndexOutOfBoundsException ex) {\r\n Logger.getLogger(SimpleQueries.class\r\n .getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return consultas;\r\n }", "private void showContacts() {\n // Check the SDK version and whether the permission is already granted or not.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && checkSelfPermission(Manifest.permission.READ_CONTACTS) != PackageManager.PERMISSION_GRANTED) {\n requestPermissions(new String[]{Manifest.permission.READ_CONTACTS}, PERMISSIONS_REQUEST_READ_CONTACTS);\n //After this point you wait for callback in onRequestPermissionsResult(int, String[], int[]) overriden method\n } else {\n\n // Android version is lesser than 6.0 or the permission is already granted.\n List contacts = getContactNames();\n final ContactAdapter cAdapter = new ContactAdapter(this, contacts);\n contactList.setAdapter(cAdapter);\n contactList.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n\n Intent i = new Intent(getApplicationContext(), ChatActivity.class);\n\n //Få tak i navnet på kontakten man har valgt, og send den videre til chatActivity\n String contactName = cAdapter.getItem(position).getName();\n if(!(DomainSingleton.getSingleton(ContactActivity.this).getAllConversationNames().contains(contactName))) {\n i.putExtra(CONTACT_NAME, contactName);\n startActivity(i);\n }\n else\n {\n int conversationId = DomainSingleton.getSingleton(ContactActivity.this).getConversationIdByContactName(contactName);\n i.putExtra(CONVERSATION_ID, conversationId);\n i.putExtra(CONTACT_NAME, contactName);\n startActivity(i);\n }\n\n }\n });\n\n\n }\n }", "java.util.List<com.demo.springprotobuff.Demoproto.Student.PhoneNumber> getPhoneList();", "public void displayAllContacts() {\n\n for (int i = 0; i < contacts.size(); i ++) {\n\n Contact contact = contacts.get(i);\n\n System.out.println(\" Name: \" + contact.getName());\n System.out.println(\" Title: \" + contact.getTitle());\n System.out.println(\" ID #: \" + contact.getID());\n System.out.println(\" Hoursrate: \" + contact.getHoursrate());\n System.out.println(\" Workhours \" + contact.getWorkhours());\n System.out.println(\"-------------\");\n\n\n\n Employee one = new Employee(\"A\", \"A\", \"A\", \"A\"); // I give it some contact information first.\n Employee two = new Employee(\"Bob\", \"Bob\", \"A\", \"A\");\n\n\n\n\n\n\n}\n\n\n//***************************************************************", "private List<BasicContact> getDataForListView() {\n\t\tlong groupId = getIntent().getLongExtra(Constants.INTENT_LONG_GROUP_ID, -1L);\r\n\t\tHashSet<Long> rawContactIds;\r\n\t\tif (groupId != -1) { // a group was selected\r\n\t\t\tList<Long> groupIds = new ArrayList<Long>(1);\r\n\t\t\tgroupIds.add(groupId);\r\n\t\t\trawContactIds = ContactsHelper.getRawContactIds(LabelView.this, groupIds);\r\n\t\t} else { // a tag was selected\r\n\t\t\trawContactIds = ContactsHelper.getRawContactIdsGivenTag(LabelView.this,\r\n\t\t\t\t\tmLabel);\r\n\t\t}\r\n\t\t\r\n\t\treturn ApplicationData.getBasicContacts(rawContactIds);\r\n\t}", "public void addContacts() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic Set<Contact> getContacts(){\n\t\treturn contacts;\n\t}", "public ContactList(int size) {\n\t\tcontactList = new Person[size];\n\t\tcontactCounter = 0;\n\t}", "@Override\r\n\tpublic Collection<PersonaDTO> obtenerListaPersona(Integer codigoCompania) throws ERPException{\r\n\t\treturn this.personaDAO.obtenerListaPersona(codigoCompania);\r\n\t}", "public void viewAllContacts(AddressBookDict addressBook) {\n\t\tlog.info(\"Enter the address book name of whose contact list you want to see\");\n\t\tString addressBookName = obj.next();\n\t\tList<PersonInfo> ContactList = addressBook.getContactList(addressBookName);\n\t\tif (ContactList.isEmpty()) {\n\t\t\tlog.info(\"List is empty\");\n\t\t} else {\n\t\t\tlog.info(\"Contacts in address book \" + addressBookName + \"are :\");\n\t\t\tContactList.stream().forEach((System.out::println));\n\t\t\tlog.info(\"\\n\");\n\t\t}\n\t}", "@Override\n\tpublic List<Person> getListPeople() {\n\t\tList<Person> people = new ArrayList<>();\n\t\tpeople.add(new Person(\"Juan\", 25));\n\t\tpeople.add(new Person(\"Ana\", 30));\n\t\tpeople.add(new Person(\"Eva\", 42));\n\t\tpeople.add(new Person(\"Piter\", 27));\n\t\tLOG.info(\"HELLO FROM SERVICE\");\n\t\treturn people;\n\t}", "public static void main(String[] args) {\n ContactData contactDatas = new ContactData(\"Mohon\", \"456775439\");\r\n //System.out.println(contactDatas);\r\n\r\n ContactData contactDatas1 = new ContactData(\"shihab\", \"456775439\", \"shihab@gamil.com\");\r\n\r\n ContactList list = new ContactList();\r\n list.createContact(contactDatas);\r\n list.createContact(contactDatas1);\r\n System.out.println(list);\r\n\r\n ContactData search = list.searchContact(\"mohon\");\r\n if (search != null){\r\n System.out.println(search);\r\n } else {\r\n System.out.println(\"Contact not found\");\r\n }\r\n\r\n System.out.println(list.getTotalContact());\r\n }", "void transferOwnerShipToUser(List<String> list, String toEmail);", "public void consultarListaDeContatos() {\n\t\tfor (int i = 0; i < listaDeContatos.size(); i++) {\n\t\t\tSystem.out.printf(\"%d %s \\n\", i, listaDeContatos.get(i));\n\t\t}\n\t}" ]
[ "0.71175617", "0.6833283", "0.6569346", "0.6557483", "0.64987886", "0.64863294", "0.6483343", "0.6470459", "0.64526045", "0.6440205", "0.64368314", "0.64368314", "0.64368314", "0.64368314", "0.64214045", "0.6409508", "0.6409165", "0.6391626", "0.6382327", "0.63730925", "0.63381153", "0.63372546", "0.63226604", "0.6316337", "0.6310607", "0.63027674", "0.63027674", "0.63027674", "0.63027674", "0.62664783", "0.6255419", "0.62481385", "0.6246102", "0.62388325", "0.6226307", "0.62225974", "0.62200147", "0.6219641", "0.61990774", "0.61904925", "0.616422", "0.61462325", "0.6133634", "0.6119826", "0.6101605", "0.6047102", "0.6043788", "0.60401714", "0.60198826", "0.60139674", "0.5982077", "0.5961222", "0.5942566", "0.59422576", "0.593101", "0.5929247", "0.59047955", "0.590436", "0.59042287", "0.58695173", "0.58610815", "0.58609706", "0.58608073", "0.5859844", "0.5858012", "0.5857997", "0.5853418", "0.58526677", "0.5850429", "0.5848827", "0.58413047", "0.58308053", "0.58306915", "0.5812639", "0.58065087", "0.57993454", "0.5791626", "0.57849205", "0.57812047", "0.5774425", "0.5774425", "0.5774425", "0.5774425", "0.5768617", "0.5766101", "0.57657087", "0.57621145", "0.5759105", "0.5757053", "0.5746708", "0.57415634", "0.5737555", "0.5732998", "0.5717398", "0.57169", "0.5710726", "0.57088554", "0.5688543", "0.5684701", "0.5680378" ]
0.57326907
93
Retrieves the minimum size of a string of text
@Override public Rectangle getBounds(String text) { int height = 0; int width = 0; //Initialize y to the maximum int int y = Integer.MAX_VALUE; char[] chars = text.toCharArray(); //First, find the lowest yoffset for (char c : chars) { Glyph g = getGlyph(c); if (g != null) y = Math.min(g.getYOff(), y); } for (char c : chars) { Glyph g = getGlyph(c); if (g != null) { height = Math.max(g.getHeight() + (g.getYOff() - y), height); width += g.getXAdvance(); } } return new Rectangle(0, y, width, height); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getStringWidth(String text);", "int minLength();", "public int getMinimumCharacters() {\n checkWidget();\n return minChars;\n }", "public int getMinimumNumberOfCharacters() {\n\t\treturn this.minimumNumberOfCharacters;\n\t}", "int getMaxCharSize();", "public int minBytesPerChar();", "public static int size_min() {\n return (8 / 8);\n }", "private int getMinimumWrapMarkWidth() {\n return metrics[Font.PLAIN].charWidth('W');\n }", "public Integer getMinLength() {\n\t\treturn minLength;\n\t}", "int getTextLength();", "public int minLen() {\n if (compositions == null) {\n return Math.min(maxLen(getAllele(0)), maxLen(getAllele(1)));\n } else {\n if (compositions.isEmpty())\n return 0;\n int minLen = compositions.get(0).minLen();\n for (Variant c : compositions) {\n minLen = Math.min(minLen, c.minLen());\n }\n return minLen;\n }\n }", "int getMaxStringLiteralSize();", "public int getTextLength();", "public double strLen(String str, double size) {\n return mcFont().getStringWidth(str) * size / mcFont().FONT_HEIGHT;\n }", "public int itemsetSize(String s) {\n\t StringTokenizer st=new StringTokenizer(s);\n\t return st.countTokens();\n\t}", "private static float getMaximumWidth(final String text, final Paint paint) {\n float width = 0;\n for (String token : text.split(\"\\n\")) {\n final float textWidth = paint.measureText(token);\n if (textWidth > width) {\n width = textWidth;\n }\n }\n\n return width;\n }", "static void minMaxLengthWords(String input) \n {\n int len = input.length(); \n int si = 0, ei = 0; \n int min_length = len, min_start_index = 0, \n max_length = 0, max_start_index = 0; \n \n // Loop while input string is not empty \n while (ei <= len) \n { \n if (ei < len && input.charAt(ei) != ' ') \n { \n ei++; \n } \n else\n { \n // end of a word \n // find curr word length \n int curr_length = ei - si; \n \n if (curr_length < min_length) \n { \n min_length = curr_length; \n min_start_index = si; \n } \n \n if (curr_length > max_length) \n { \n max_length = curr_length; \n max_start_index = si; \n } \n ei++; \n si = ei; \n } \n } \n \n // store minimum and maximum length words \n minWord = input.substring(min_start_index, min_start_index + min_length); \n maxWord = input.substring(max_start_index, max_start_index + max_length); \n }", "public float getTextSizePx() {\n return mPaint.getTextSize();\n }", "public String getMinimumPasswordLength() {\n return (String) get(\"minimum_password_length\");\n }", "public static String cutToSize(String textIn, float targetWidth, BitmapFont fontIn){\n String out=textIn;\n for(int i = textIn.length();i>0;i--) {\n String cutText = out.substring(0, i);\n if (textWidth(fontIn, cutText) <= targetWidth) {\n return cutText;\n }\n }\n return \"\";\n }", "int calcStringLength(String str) {\n return this.lang.a(str);\n }", "private int calculateTextWidth(String[] lines, FontMetrics fm)\r\n {\r\n int numChars = 0;\r\n String maxString = \"\";\r\n // calculate the number of characters in the line\r\n for (String lineNo : lines)\r\n {\r\n if (numChars < lineNo.length())\r\n {\r\n numChars = lineNo.length();\r\n maxString = lineNo;\r\n }\r\n }\r\n // width will be the numChars * text metrics for the font\r\n int maxWidth = fm.stringWidth(maxString);\r\n return maxWidth;\r\n }", "public static String Shortest(String s) {\n\t\tArrayList<String> str = new ArrayList<String>();\n\t\tString[] spl = s.split(\" \");\n\t\tfor (int i = 0; i < spl.length; i++) {\n\t\t\tstr.add(spl[i]);\n\t\t}\n\t\t//set variables\n\t\tString total = \"\";\n\t\tString small;\n\t\t// sort through the list and compare each set of three\n\t\tfor (int i = 0; i < str.size(); i+=3) {\n\t\t\tif (str.get(i).length() <= str.get(i+1).length()) {\n\t\t\t\tsmall = str.get(i);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsmall = str.get(i+1);\n\t\t\t}\n\t\t\tif (str.get(i+2).length() < small.length()) {\n\t\t\t\tsmall = str.get(i+2);\n\t\t\t}\n\t\t\ttotal += (small + \" \");\n\t\t}\n\t\treturn total;\n\t}", "abstract public int getMinWidth();", "private int computeTextWidth_oneShot(String text) {\n text = BindingTextUtils.withoutNul(text);\n \n return backingTextWidth(text);\n }", "public static float textWidth(BitmapFont fntIn, String sIn){\n return new GlyphLayout(fntIn,sIn).width;\n }", "public int getMinSize() {\n return minSize;\n }", "public int getPreferredWidth() \n {\n Font font = Font.getDefault().derive( Font.BOLD, FONT_SIZE );\n return font.getAdvance( m_text ) + HMARGIN;\n }", "public Integer getClientWidth(final String title, final String text) {\n\t\tint[] clientSize = getClientSize(title, text);\n\t\treturn (clientSize == null) ? null : clientSize[0];\n\t}", "public static int getStringLength(CharSequence s) {\r\n int n = 0;\r\n for (int i = 0; i < s.length(); i++) {\r\n int c = (int) s.charAt(i);\r\n if (c < 55296 || c > 56319) n++; // don't count high surrogates, i.e. D800 to DBFF\r\n }\r\n return n;\r\n }", "public int defaultSize(String mnemo) {\n\t\treturn 4;\n\t}", "int getLocalSize();", "public static int estimateMemoryUsage(String s) {\n long size = s == null ? 0 : 48 + (long)s.length() * 2;\n if (size > Integer.MAX_VALUE) {\n LOG.debug(\"Estimated memory footprint larger than Integer.MAX_VALUE: {}.\", size);\n size = Integer.MAX_VALUE;\n }\n return (int) size;\n }", "public int getSetSize(){ return Integer.parseInt(setSize.getText()); }", "public Dimension getMinimumSize(JComponent c) {\n Document doc = editor.getDocument();\n Insets i = c.getInsets();\n Dimension d = new Dimension();\n if (doc instanceof AbstractDocument) {\n ((AbstractDocument)doc).readLock();\n }\n try {\n d.width = (int) rootView.getMinimumSpan(View.X_AXIS) + i.left + i.right + caretMargin;\n d.height = (int) rootView.getMinimumSpan(View.Y_AXIS) + i.top + i.bottom;\n } finally {\n if (doc instanceof AbstractDocument) {\n ((AbstractDocument)doc).readUnlock();\n }\n }\n return d;\n }", "public int getMaxLength();", "public int minLength(String s, Set<String> dict) {\n StringBuilder sb = new StringBuilder();\n sb.append(s);\n sb.delete(sb.indexOf(s), sb.lastIndexOf(s));\n for (String st : dict) {\n s.replaceAll(st, \"\");\n }\n return 1;\n }", "public Dimension getMinimumSize() {\r\n\t\treturn (this.getPreferredSize());\r\n\t}", "public int getLocalSize();", "public float getTextSize() {\n return mTextSize;\n }", "public static int size_estLength() {\n return (8 / 8);\n }", "private int getNormalTextSizeWeight() {\n return Integer.parseInt(getMessage(\"report.tabular.normal.text.size.weight\"));\n }", "public int minCut(String s) {\n \n if(s == null || s.length() == 0) {\n return 0;\n }\n return minCutHelper(s);\n \n }", "public int minReadLength() {\n return mMinReadLength;\n }", "public String minWindow(String s, String t) {\n if (t.length() > s.length()) {\n return \"\";\n }\n\n Map<Character, Integer> pattern = new HashMap<>();\n int count = 0;\n\n for (char c : t.toCharArray()) {\n if (!pattern.containsKey(c)) {\n count++;\n }\n pattern.put(c, pattern.getOrDefault(c, 0) + 1);\n }\n\n int right = 0, left = 0;\n int minStart = -1, minEnd = -1;\n int minLength = Integer.MAX_VALUE;\n\n while (right < s.length()) {\n char c = s.charAt(right);\n\n if (pattern.containsKey(c)) {\n pattern.put(c, pattern.get(c) - 1);\n if (pattern.get(c) == 0) {\n count--;\n }\n }\n\n while (left < right && count == 0) {\n // left == right || pattern.containsKey\n char cleft = s.charAt(left);\n if (right - left + 1 < minLength) {\n minStart = left;\n minEnd = right;\n minLength = right - left + 1;\n }\n\n if (pattern.containsKey(cleft)) {\n pattern.put(cleft, pattern.get(cleft) + 1);\n if (pattern.get(cleft) > 0) {\n count++;\n }\n }\n left++;\n }\n\n right++;\n }\n\n return minStart == -1 || minEnd == -1 ? \"\" : s.substring(minStart, minEnd + 1);\n }", "@Override\n public Dimension getMinimumSize() {\n final Dimension size;\n synchronized (getDelegateLock()) {\n size = getDelegate().getMinimumSize();\n }\n return validateSize(size);\n }", "public String minWindow(String s, String t) {\n if (t.length() == 0 || s.length() == 0) {\n return \"\";\n }\n int[] map = new int[128];\n for (char c : t.toCharArray()) map[c]++;\n\n int min = Integer.MAX_VALUE;\n\n int left = 0, right = 0;\n int[] map2 = new int[128];\n\n int minStart = 0;\n int minEnd = 0;\n while (right < s.length()) {\n map2[s.charAt(right)]++;\n right++; //extending right boundary\n\n while (matches(map, map2)) {\n //the current valid window is [left, right-1], notice the minus 1\n int length = right - left;\n if (length < min) {\n min = length;\n minStart = left;\n minEnd = right; // minEnd is exclusive for calling substring\n }\n //shrink left boundary\n map2[s.charAt(left)]--;\n left++;\n }\n }\n return s.substring(minStart, minEnd);\n }", "public float getTextSize() {\n return mTextContainer.getTextSize();\n }", "public static Size m97137a(String str) {\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(str, options);\n return new Size(options.outWidth, options.outHeight);\n }", "public int stringWidth(String str) {\r\n\t\treturn substringWidth(str, 0, str.length());\r\n\t}", "@Override\n\tpublic int getSize() {\n\t\treturn mString.size();\n\t}", "public String getSizeTextField(){\n\t\treturn textField.getText();\n\t}", "public synchronized int getLowerSizeLimit() {\n \t\treturn lower;\n \t}", "public long getMinFree() {\n return params.getMinimumFree() * 1024 * 1024;\n }", "public static int getMin(String str){\n\t\tStack<Character> st = new Stack<>();\n\t\tint count = 0;\n\t\tfor(char c: str.toCharArray()){\n\t\t if(c == ')'){\n\t\t if(st.size() > 0){\n\t\t st.pop();\n\t\t }\n\t\t else{\n\t\t count++;\n\t\t }\n\t\t }\n\t\t else{\n\t\t st.push(c);\n\t\t }\n\t\t}\n\t\treturn count + st.size();\n\t}", "public int getMaxTextLength() {\n/* 529 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "String getWidth();", "String getWidth();", "public int promptSIZE(){\n\t\tString strlen = JOptionPane.showInputDialog(frame, \"Input the integral size of the board (5~19)\", \"Message Board\", JOptionPane.QUESTION_MESSAGE);\n\t\tint intLen = 0;\n\t\t\n\t\ttry{\n\t\t\tintLen = Integer.parseInt(strlen);\n\t\t}catch(Exception e){\n\t\t\tJOptionPane.showMessageDialog(frame, \"Input should be in integral format\");\n\t\t\treturn promptSIZE();\n\t\t}\n\t\t\n\t\tif(intLen<5 || intLen>19){\n\t\t\tJOptionPane.showMessageDialog(frame, \"Input should be 5~19\");\n\t\t\treturn promptSIZE();\n\t\t}\n\t\t\n\t\treturn intLen;\n\t}", "short getFitWidth();", "public double getMinWidth(double aValue) { Double w = (Double)get(\"MinWidth\"); return w!=null? w : 0; }", "private int _parseSize(\n String value\n )\n {\n if (value == null)\n return -1;\n\n try\n {\n return Integer.parseInt(value);\n }\n catch (NumberFormatException e)\n {\n ;\n }\n\n _LOG.warning(_SIZE_ERROR);\n\n return -1;\n }", "public int getMinMatchLength() {\n int[] allele = {getAllele(0), getAllele(1)};\n byte[][] alt = {getAlt(allele[0]).getSequence(), getAlt(allele[1]).getSequence()};\n byte[] ref = getReference();\n\n int[] matchLength = {0, 0};\n for (int i = 0; i < 2; i++) {\n for (int j = 0; j < Math.min(ref.length, alt[i].length); j++) {\n if (alt[i][j] == ref[j]) {\n matchLength[i]++;\n } else {\n break;\n }\n }\n }\n return Math.min(matchLength[0], matchLength[1]);\n }", "public int size() {\n return text.size();\n }", "public int minWordBreak(String s, Set<String> dict) {\n Map<String, List<String>> map = new HashMap<String, List<String>>();\n List<String> possibles = wordBreakHelper(s,dict,map);\n int minCut = s.length();\n for (String possible: possibles) {\n int cut = possible.split(\" \").length;\n if (minCut > cut)\n minCut = cut;\n }\n return minCut;\n}", "int getPenultimateOutputSize() {\n\t\treturn lastStrLen[0];\n\t}", "static int size_of_cm(String passed){\n\t\treturn 3;\n\t}", "private Bounds textWidth(double size, SensorValue sensorValue)\r\n\t{\n\t\t\r\n\t\tString showValue = sensorValue.getCurrentValue() + \" \" + sensorValue.getMeasurementUnit();\r\n\t\t\r\n\t\tif(fontBase == null)\r\n\t\t\tfontBase = new Font(\"Verdana\", 12);\r\n\t\tText text = new Text(showValue);\r\n\t\tFont font = Font.font(fontBase.getFamily(), size);\r\n text.setFont(font);\r\n return text.getBoundsInLocal();\r\n\t}", "public String minWindow(String s, String t) {\n String res = \"\";\n if (t.length() > s.length()) return res;\n Map<Character, Integer> dict = new HashMap<>();\n int count=t.length();\n for (char ch : t.toCharArray()) {\n dict.put(ch, dict.getOrDefault(ch,0)+1);\n }\n int start=0, end=0, d=Integer.MAX_VALUE, head=0;\n while (end < s.length()) {\n if (dict.containsKey(s.charAt(end))) {\n if (dict.get(s.charAt(end)) > 0) {\n count--;\n }\n dict.put(s.charAt(end), dict.get(s.charAt(end)) - 1);\n }\n end++;\n while (count == 0) {\n if (end - start < d) {\n res = s.substring(start,end);\n d = end - start;\n }\n // make it invalid;\n // notice that we could seize the essence????\n // to make it invalid, we only care if the counter is positive or not;\n // we don't care about the char at end if it is changed;\n if (dict.containsKey(s.charAt(start))) {\n if (dict.get(s.charAt(start)) >= 0) {\n count++;\n }\n dict.put(s.charAt(start), dict.get(s.charAt(start)) + 1);\n }\n start++;\n }\n }\n return res;\n }", "private void calculateCharSize() {\n int charMaxAscent;\n int charLeading;\n FontMetrics fm = getFontMetrics(getFont());\n charWidth = -1; // !!! Does not seem to work: fm.getMaxAdvance();\n charHeight = fm.getHeight() + lineSpaceDelta;\n charMaxAscent = fm.getMaxAscent();\n fm.getMaxDescent();\n charLeading = fm.getLeading();\n baselineIndex = charMaxAscent + charLeading - 1;\n\n if (charWidth == -1) {\n int widths[] = fm.getWidths();\n for (int i=32; i<127; i++) {\n if (widths[i] > charWidth) {\n charWidth = widths[i];\n }\n }\n }\n }", "public int minEntrySize() {\n\t\tint min = Integer.MAX_VALUE;\n\t\tfor (int i = 0; (i < table.length); i++) {\n\t\t\tif (table [i] != null) {\n\t\t\t\tif (table[i].size() < min)\n\t\t\t\t\tmin = table[i].size();\n\t\t\t}\n\t\t}\n\t\treturn min;\n\t}", "public int getSizeWord(){\r\n\t\tint size;\r\n\t\tif (wordSelected != null)\r\n\t\t\tsize = wordSelected.length();\t\t\r\n\t\telse\r\n\t\t\tsize = 0;\r\n\t\t\r\n\t\treturn size;\t\t\r\n\t}", "static int size_of_jm(String passed){\n\t\treturn 3;\n\t}", "public String minimumWindowSubstring(String s, String t) {\n\t\tif (s == null || t == null || s.length() < t.length() || t.length() == 0) return \"\";\n\t\tint[] charCnt = new int[256];\n\t\tint cnt = 0; // the number of different characters in t\n\t\tfor (char c: t.toCharArray()) {\n\t\t\tif (charCnt[c] == 0) cnt++;\n\t\t\tcharCnt[c]++;\n\t\t}\n\t\tchar[] S = s.toCharArray();\n\t\tString res = \"\";\n\t\tfor (int start = 0, end = 0; start < S.length; start++) {\n\t\t\twhile(end < S.length && cnt != 0) {\n\t\t\t\tcharCnt[S[end]]--;\n\t\t\t\tif (charCnt[S[end]] == 0) cnt--;\n\t\t\t\tend++;\n\t\t\t}\n\t\t\tif (cnt == 0 && \n\t\t\t (res.length() == 0 || res.length() > end - start)) res = s.substring(start, end);\n\t\t\tif (charCnt[S[start]] == 0) cnt++;\n\t\t\tcharCnt[S[start]]++;\n\t\t}\n\t\treturn res;\n\t}", "public Integer getBodyMinWidth() {\r\n return getAttributeAsInt(\"bodyMinWidth\");\r\n }", "static protected int calcRecommendedCharBufferSize(RecordingInputStream inStream) {\n return (int) Math.min(inStream.getRecordedBufferLength()/2, inStream.getSize());\n }", "public String getSize() {\r\n return size;\r\n }", "public short getTextLength()\n {\n return field_6_textLength;\n }", "public static int SPgetMessageTextSizePercentage(Context context){\n SharedPreferences pref = context.getSharedPreferences(\"DEFAULTS\", Context.MODE_PRIVATE);\n return pref.getInt(\"messageTextSize\", 70);\n }", "int getStrLngth(String name){\r\n int l= name.length();\r\n return l;}", "public Dimension getMinimumSize() {\n\t\treturn new Dimension(10, 10);\n\t}", "int calcHeightForText(String str) {\n\t\tFontMetrics metrics = self.getGraphics().getFontMetrics(self.getFont());\n\t\tint hgt = metrics.getHeight();\n\t\tint adv = metrics.stringWidth(str);\n\t\tfinal int PIXEL_PADDING = 6;\n\t\tDimension size = new Dimension(adv, hgt + PIXEL_PADDING);\n\t\tfinal float PADDING_PERCENT = 1.1f;\n\t\t// calculate modifier to line wrapping so we can display the wrapped message\n\t\tint mult = (int) Math.floor(size.width / (textArea.getSize().width * PADDING_PERCENT));\n\t\t// System.out.println(mult);\n\t\tmult++;\n\t\treturn size.height * mult;\n\t}", "private int computePreferredMinimumSize(boolean width,\r\n\t\t\tint availablePerpendicular) {\r\n\t\tint minSize;\r\n\t\tint hint = availablePerpendicular == INFINITE ? SWT.DEFAULT\r\n\t\t\t\t: availablePerpendicular;\r\n\t\tif (width) {\r\n\t\t\tminSize = folder.getTabFolder().computeSize(SWT.DEFAULT, hint).x;\r\n\t\t} else {\r\n\t\t\tminSize = folder.getTabFolder().computeSize(hint, SWT.DEFAULT).y;\r\n\t\t}\r\n\t\treturn minSize;\r\n\t}", "public String getCharacterSize() {\n\t\tString result = null;\n\t\tRaces dropDownText = (Races) race.getSelectedItem();\n\n\t\tif (dropDownText.equals(Races.DWARF)) {\n\t\t\tresult = Races.DWARF.getSize();\n\t\t} else if (dropDownText.equals(Races.ELF)) {\n\t\t\tresult = Races.ELF.getSize();\n\t\t} else if (dropDownText.equals(Races.GNOME)) {\n\t\t\tresult = Races.GNOME.getSize();\n\t\t} else if (dropDownText.equals(Races.HALFELF)) {\n\t\t\tresult = Races.HALFELF.getSize();\n\t\t} else if (dropDownText.equals(Races.HALFORC)) {\n\t\t\tresult = Races.HALFORC.getSize();\n\t\t} else if (dropDownText.equals(Races.HALFLING)) {\n\t\t\tresult = Races.HALFLING.getSize();\n\t\t} else if (dropDownText.equals(Races.HUMAN)) {\n\t\t\tresult = Races.HUMAN.getSize();\n\t\t}\n\n\t\treturn result;\n\t}", "public float getMinWidth() {\r\n return width.min;\r\n }", "String size();", "public String getSize() {\n return size;\n }", "public String getSize() {\n return size;\n }", "public static String minWindow(String s, String t) \n {\n String ans = \"\";\n int[] ascii = new int[128]; // fill the ascii, \n for(char e: t.toCharArray())\n {\n \t ascii[e]++; // letters in String T contribute positive value to the ascii array\n }\n \n int counter = t.length(), begin = 0, end = 0,minLen = Integer.MAX_VALUE, head = 0;\n// we need to keep track of the letter left in t, where it starts and where it end.\n while(end<s.length())\n {\n \t if(ascii[s.charAt(end)]>0) \n \t {\n \t\t counter--; // find one letter from String t in String s, counter--,\n \t }\n \t ascii[s.charAt(end)]--; // letters in String S contribute negative value to the ascii array\n\t\t end++; // keep moving end to the last index of String s. \n\t\t // end index records the last index of the possible window.\n \t\t \n/*\n * once the letters in t are all traversed, counter should be zero, and we have found a possible window\n * the while loop below is to update the begin index of the window\n * while ascii[char] is above 0, which means a letter in string T is found in string S\n * then counter++ and letters in String S \n * after a possible window is found now contribute positive values to ascii\n * while traverse each letter in String, update the length of minimum window. \n * \n */\n \t while(counter ==0) \n \t { \n \t\t if(end - begin < minLen)\n \t\t {\n \t\t\t head = begin;\n \t\t\t minLen = end-begin;\n \t\t }\n \t\t \n \t\t ascii[s.charAt(begin)]++;\n \t\t if(ascii[s.charAt(begin)]>0)\n \t\t {\n \t\t\t counter++;\n \t\t }\n \t\t begin++;\n \t }\n }\n \n if(minLen != Integer.MAX_VALUE)\n \t ans = s.substring(head, head+minLen);\n return ans;\n }", "private long stringSize(Instance instance) {\n return instance.getObjectSize() + stringValueField.getValue(instance).getObjectSize();\n }", "public int askSize(String sizeName, int min, int max, String titel);", "public int minCut(String s) {\n boolean[][] b=table(s);\n int[] cut=new int[s.length()+1];\n cut[s.length()]=0;\n for(int i=s.length()-1;i>=0;i--){\n cut[i]=s.length()-i;\n for(int r=i;r<s.length();r++){\n if(b[i][r])\n cut[i]=Math.min(cut[r+1]+1,cut[i]);\n }\n }\n \n return cut[0]-1;\n }", "public String minWindow(String s, String t) {\n if (s.length() < t.length()) return \"\";\n char[] tc = t.toCharArray();\n HashMap<Character, Integer> tm = new HashMap<>(tc.length);\n for (char c : tc) {\n Integer n = tm.get(c);\n if (n == null) n = 0;\n tm.put(c, n+1);\n }\n int l = 0, r = 0, count = 0;\n int start = 0, window = Integer.MAX_VALUE;\n for (r = 0; r < s.length(); r++) {\n char c = s.charAt(r);\n Integer n = tm.get(c);\n if (n == null) continue;\n tm.put(c, n-1);\n if (n <= 0) continue;\n count++;\n while (count == tc.length) {\n c = s.charAt(l++);\n n = tm.get(c);\n if (n == null) continue;\n tm.put(c, n+1);\n if (n < 0) continue;\n count--;\n int newWindow = r-l+2;\n if (newWindow <= window) {\n start = l-1;\n window = newWindow;\n }\n }\n }\n if (window == Integer.MAX_VALUE) return \"\";\n return s.substring(start, start + window);\n }", "public double getMinWidth() { return getMinWidth(-1); }", "public static float textHeight(BitmapFont fntIn, String sIn){\n return new GlyphLayout(fntIn,sIn).height;\n }", "public int stringWidth(String str) {\n\t\tint strWidth = 0;\n\t\tCharsetString[] cs = gpf.makeMultiCharsetString(str);\n\t\t\n\t\tfor(int i=0;i<cs.length;i++)\n\t\t{\n\t\t\tbyte[] s = new byte[cs[i].length*3];\n\t\t\tint len;\n\t\t\t\n\t\t\ttry {\n\t\t\t\tlen = cs[i].fontDescriptor.fontCharset.convertAny(cs[i].charsetChars, cs[i].offset, cs[i].length, s, 0, s.length);\n\t\t\t} catch(Exception e)\n\t\t\t{\n\t\t\t\t/* FIXME ... */\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tint gdkfont = gpf.getGdkFont(cs[i].fontDescriptor);\n\t\t\tstrWidth += stringWidthNative(s, len, gdkfont);\n\t\t\t\n\t\t}\n\t\t\n\t\treturn strWidth;\n }", "public int getMinimumWidth() {\n return LEFT_MARGIN + (mMaxDurationLength + CONTEXT_PADDING) * mContextCount;\n }", "public Point getMinimumSize() {\n checkWidget();\n return parent.fixPoint( minimumWidth, minimumHeight );\n }", "public int get_length();", "public abstract int getMaxLength();", "public int minCut4(String s) {\n boolean[][] dp = new boolean[s.length()][s.length()];\n for (int len = 1; len <= s.length(); len++) {\n for (int i = 0; i <= s.length() - len; i++) {\n int j = i + len - 1;\n dp[i][j] = s.charAt(i) == s.charAt(j) && (len < 3 || dp[i + 1][j - 1]);\n }\n }\n\n Map<Integer, Integer> memo = new HashMap<>();\n\n int[] res = new int[1];\n res[0] = Integer.MAX_VALUE;\n\n helper3(s, 0, res, 0, dp, memo);\n return res[0];\n }" ]
[ "0.7155683", "0.6805748", "0.6566738", "0.6554667", "0.6456334", "0.6435019", "0.6350059", "0.6318803", "0.629176", "0.6281088", "0.6249111", "0.62382394", "0.6208826", "0.61455476", "0.6145413", "0.61090183", "0.6095435", "0.6077895", "0.60756594", "0.607445", "0.60696137", "0.60157627", "0.5954752", "0.5952355", "0.5943719", "0.5914906", "0.59085095", "0.5903643", "0.589206", "0.5857251", "0.5837781", "0.5830892", "0.582789", "0.58256257", "0.5820861", "0.58208543", "0.58105415", "0.5805555", "0.57783973", "0.5776474", "0.5772619", "0.57672143", "0.57660466", "0.57589936", "0.5757393", "0.57480973", "0.574416", "0.57398427", "0.5736844", "0.57280636", "0.57161653", "0.5715357", "0.56940365", "0.5689609", "0.56856656", "0.56821984", "0.5669541", "0.5669541", "0.566005", "0.5657247", "0.56470835", "0.5646704", "0.56441087", "0.5635371", "0.5635113", "0.563487", "0.5617849", "0.56051326", "0.56017625", "0.5594801", "0.5586468", "0.55821013", "0.55808306", "0.55779785", "0.5568712", "0.5566498", "0.55614364", "0.5553445", "0.55506504", "0.55490357", "0.5545615", "0.5527847", "0.55197984", "0.55168927", "0.5511092", "0.55073", "0.5503141", "0.5503141", "0.5502145", "0.54891473", "0.5487469", "0.5486864", "0.54852086", "0.54801154", "0.5478662", "0.54724616", "0.5466491", "0.5464952", "0.5464628", "0.5459732", "0.54557276" ]
0.0
-1
/ / / / /
public boolean isRemoteInterface(Class paramClass) { /* 98 */ boolean bool = true; /* */ try { /* 100 */ validateRemoteInterface(paramClass); /* 101 */ } catch (IDLTypeException iDLTypeException) { /* 102 */ bool = false; /* */ } /* */ /* 105 */ return bool; /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void divide() {\n\t\t\n\t}", "private int parent(int i){return (i-1)/2;}", "public abstract void bepaalGrootte();", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "public void gored() {\n\t\t\n\t}", "public static void bottomHalf() {\n\n for(int i = 1; i <= SIZE; i++) {\n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\" \");\n }\n \n\t System.out.print(\"\\\\_\");\n\t for(int j = 3*SIZE-i; j >= i; j--) {\n\t System.out.print(\"/\\\\\");\n\t }\n\t System.out.println(\"_/\");\n }\n }", "public abstract String division();", "private int leftChild(int i){return 2*i+1;}", "public static void slashes() {\n\t\tSystem.out.println(\"//////////////////////\");\r\n\r\n\t}", "double passer();", "public String ring();", "private int rightChild(int i){return 2*i+2;}", "public String toString(){ return \"DIV\";}", "laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }", "public void division() {\n\t\tx=1;\n\t\ty=0;\n\t\tz=x/y;\n\t\t\t\t\n\t}", "static void pyramid(){\n\t}", "public static void main(String[] args) {\n\n\n for(int a=0; a<7;a++){\n for(int b=0;b<7-a;b++){\n System.out.print(\" \");\n }\n for(int c=0; c<=a;c++){\n System.out.print(\"* \");\n }\n System.out.println(\" \");\n }\n\n }", "public void stg() {\n\n\t}", "void mo33732Px();", "Operations operations();", "void sharpen();", "void sharpen();", "public void skystonePos4() {\n }", "private static void breadcrumbArrow(int width, int height, int indent, int c1, int c2) {\n\n\t\tdouble x0 = 0, y0 = height / 2d;\n\t\tdouble x1 = indent, y1 = 0;\n\t\tdouble x2 = indent, y2 = height / 2d;\n\t\tdouble x3 = indent, y3 = height;\n\t\tdouble x4 = width, y4 = 0;\n\t\tdouble x5 = width, y5 = height / 2d;\n\t\tdouble x6 = width, y6 = height;\n\t\tdouble x7 = indent + width, y7 = 0;\n\t\tdouble x8 = indent + width, y8 = height;\n\n\t\tint fc1 = ColorHelper.mixAlphaColors(c1, c2, 0);\n\t\tint fc2 = ColorHelper.mixAlphaColors(c1, c2, (indent)/(width + 2f * indent));\n\t\tint fc3 = ColorHelper.mixAlphaColors(c1, c2, (indent + width)/(width + 2f * indent));\n\t\tint fc4 = ColorHelper.mixAlphaColors(c1, c2, 1);\n\n\t\tRenderSystem.disableTexture();\n\t\tRenderSystem.enableBlend();\n\t\tRenderSystem.disableAlphaTest();\n\t\tRenderSystem.defaultBlendFunc();\n\t\tRenderSystem.shadeModel(GL11.GL_SMOOTH);\n\n\t\tTessellator tessellator = Tessellator.getInstance();\n\t\tBufferBuilder bufferbuilder = tessellator.getBuffer();\n\t\tbufferbuilder.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR);\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x7, y7, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x8, y8, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\ttessellator.draw();\n\t\tRenderSystem.shadeModel(GL11.GL_FLAT);\n\t\tRenderSystem.disableBlend();\n\t\tRenderSystem.enableAlphaTest();\n\t\tRenderSystem.enableTexture();\n\t}", "double volume(){\n return width*height*depth;\n }", "private void pointer(Graphics image,int x,int y,int height,int b,int dir) {\n\n\t\tint[] xt=new int[3];\n\t\tint[] yt=new int[3];\n\n\t\tif(dir==0) {\n\t\t\txt[0]=x;\n\t\t\txt[1]=xt[2]=x+height;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=y+b/2;\n\t\t\tyt[2]=y-b/2;\n\t\t} else {\n\t\t\txt[0]=x;\n\t\t\txt[1]=x+b/2;\n\t\t\txt[2]=x-b/2;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=yt[2]=y-height;\n\t\t}\n\t\timage.fillPolygon(xt,yt,3);\n\t}", "private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }", "public int generateRoshambo(){\n ;]\n\n }", "@Override\n public void bfs() {\n\n }", "public static void part2(){\n\t\n System.out.println(\"\\\\\"); //Outer wall\n System.out.println(\"\\\\\");\n System.out.println(\"\\\\\");\n for(int i = 0; i <= 16; i++){ //loop created to display top of the door\n\n \tSystem.out.print(\"-\");\n\n\t}\n System.out.println(\"\");\n System.out.println(\"\\\\\\t\\t| \\t(\\\")\"); //The door and the stick figure\n System.out.println(\"\\\\\\t\\t|\\t-|-\");\n System.out.println(\"\\\\\\t o | \\t |\");\n System.out.println(\"\\\\\\t\\t|\\t /\\\\\");\n System.out.println(\"\\\\\\t\\t|\\t/ \\\\\");\n\t\t\n }", "public static void main(String[] args) {\n\t\tfor(int j=0;j<8;j++){\n\t\t\tfor(int i=0;i<8;i++){\n\t\t\t\t//上下两侧\n\t\t\t\tif(j==0||j==7){\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}else{\n\t\t\t\t\t//中间\n\t\t\t\t\tif(i>0&&i<7){\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}", "int getWidth() {return width;}", "public void draw(){\n for(int i = 1; i <= height; i++){\n for(int s = 1; s <= i; s++)\n System.out.print(\"*\");\n System.out.println();\n }\n }", "public double getWidth() {\n return this.left.getLeft(0) - this.right.getRight(0); \n }", "Parallelogram(){\n length = width = height = 0;\n }", "public static void main(String[] args) {\n\t\tScanner obj=new Scanner(System.in);\r\n\t\tint a=0;\r\n\t\tint count=0;\r\n System.out.println(\"enter size\");\r\n\t\ta=obj.nextInt();\r\n\t\tint m=2*a+1;\r\n\t\tint n=2*a+2;\r\n\t\tint mid=(m+1)/2;\r\n\t\tfor(int i=1;i<=m;i++)\r\n\t\t{\r\n\t\t\tcount=0;\r\n\t\t\tfor(int j=1;j<=n;j++)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tif((i==1)||(i==m)||(j==1)||(j==n))//frame begin\r\n\t\t\t\t{\r\n\t\t\t\t\tif((i==1)||(i==m))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"+\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t {\r\n\t\t\t\t\t\t\tSystem.out.print(\"|\");//frame left and right\r\n\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//frame end\r\n\t\t\t\telse if (i<mid)//upper-half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t for(int l=1;l<=2*i-4;l++)\r\n\t\t\t\t {\r\n\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\tSystem.out.print(\"\\\\\");\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end of upper half\r\n\t\t\t\telse if(i>mid)//lower half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tfor(int k=mid;k<i;k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t System.out.print(\"\\\\\");\r\n\t\t\t\t\t for(int l=2*m-6;l>2*i-4;l--)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t else\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t }\r\n\t\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t\t for(int k=mid;k<i;k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t\t\t}//end of lower half\r\n\t\t\t\telse if(i==mid)//middle part\r\n\t\t\t\t{\r\n\t\t\t\t\tif(j==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\"<\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(j==n-1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\">\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(i%2==0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"=\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end\r\n\t\t\t}//end-of-j\r\n\t\t\tSystem.out.println();\r\n\t\t}//end\r\n\r\n\t}", "void ringBell() {\n\n }", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "public static void unionPathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze two = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\tSystem.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = two.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber+n) != S.findAndCompress(randomNumber)){\n\t\t\t\t\t\tS.union(randomNumber+n, randomNumber);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'u');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.union(randomNumber, randomNumber+1);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(two, n);\n\t\tuserSelection_SolveMaze(n);\n\n\n\t\tStdDraw.show(0);\n\t\ttwo.draw();\n\t\ttwo.printCellNumbers();\n\t}", "void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2)\r\n/* 100: */ {\r\n/* 101: 99 */ int s2 = sides << 1 & 0x2A | sides >> 1 & 0x15;\r\n/* 102: */ \r\n/* 103:101 */ this.context.renderBox(sides, x1, y1, z1, x2, y2, z2);\r\n/* 104:102 */ this.context.renderBox(s2, x2, y2, z2, x1, y1, z1);\r\n/* 105: */ }", "int width();", "private boolean slash() {\r\n return MARK(OPERATOR) && CHAR('/') && gap();\r\n }", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "void walk() {\n\t\t\n\t}", "double getPerimeter(){\n return 2*height+width;\n }", "private static Object[] newPath(int length, Object[] leaf) {\n Object[] node = leaf;\n for (int i = 0; i < length; i += 5) {\n node = new Object[] { node };\n }\n return node;\n }", "public double getWidth() { return _width<0? -_width : _width; }", "public static void main(String[] args) {\n\t\tint n=5;\n\t\tfor(int i=n-1;i>=0;i--)\n\t\t{\n\t\t\tfor(int space=0;space<n-1-i;space++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int j=0;j<=i*2;j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\n\t\tSystem.out.println();\n\t}\n\n}", "public void draw4x4 (char design){\n System.out.println(\"\"+design+design+design+design);\n System.out.println(design+\" \"+design);\n System.out.println(design+\" \"+design);\n System.out.println(\"\"+design+design+design+design);\n}", "private void createPath(Direction d, int width, Point p1, Point p2) {\n\t\t// Determine how far away from the center the corners are\n\t\tint sideOneOffset = 0;\t// Top or Left depending on path direction\n\t\tint sideTwoOffset = 0;\t// Bot or Right depending on path direction\n\t\t// If the width is odd, balance the offsets\n\t\tif (width % 2 != 0) {\t\n\t\t\tsideOneOffset = sideTwoOffset = ((width / 2) + 1);\n\t\t} else {\n\t\t\t// If the width is even, the offsets will be off by 1\n\t\t\tsideOneOffset = width;\n\t\t\tsideTwoOffset = width - 1;\n\t\t}\n\t\tif (d == Direction.LEFT || d == Direction.RIGHT) {\n\t\t\t// If the direction is left then we want to swap the points\n\t\t\t// to pretend like the direction was right (so the following code works)\n\t\t\tif (d == Direction.LEFT) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p1.x, p1.y + sideTwoOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p2.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x, p1.y + sideTwoOffset)));\n\t\t\t// Set the left and right walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.y is the center of the path (top to bottom)\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x, p1.y + (i - width/2))));\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p2.x, p2.y + (i - width/2))));\n\t\t\t}\n\t\t\t// Set middle path and top/bottom padding (horizontal Oreo!)\n\t\t\tfor (int col = p1.x + 1, endCol = p2.x; col < endCol; col++) {\n\t\t\t\t// Add the top wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(col, p1.y - sideOneOffset)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(col, p1.y + (i - width /2))));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the bottom wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(col, p1.y + sideTwoOffset)));\n\t\t\t}\n\t\t} else {\n\t\t\t// If the direction is up then we want to swap the points\n\t\t\t// to pretend like the direction was down (so the following code works)\n\t\t\tif (d == Direction.UP) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x - sideOneOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p2.x - sideOneOffset, p2.y)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p1.x + sideTwoOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x + sideTwoOffset, p2.y)));\n\t\t\t// Set the top and bottom walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.x is the center of the path (left to right)\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(p1.x + (i - width /2), p1.y)));\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(p2.x + (i - width /2), p2.y)));\n\t\t\t}\n\t\t\t// Set middle path and left/right padding (vertical Oreo!)\n\t\t\tfor (int row = p1.y + 1, endRow = p2.y; row < endRow; row++) {\n\t\t\t\t// Add the left wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x - sideOneOffset, row)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(p1.x + (i - width /2), row)));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the right wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p1.x + sideTwoOffset, row)));\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "@Override\npublic void processDirection() {\n\t\n}", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "public void renderCenterBlock(int cons, int side, int end)\r\n/* 143: */ {\r\n/* 144:135 */ if (cons == 0)\r\n/* 145: */ {\r\n/* 146:136 */ this.context.setTex(end);\r\n/* 147:137 */ doubleBox(63, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 148:138 */ return;\r\n/* 149: */ }\r\n/* 150:139 */ if (cons == 3)\r\n/* 151: */ {\r\n/* 152:140 */ this.context.setTexFlags(1773);\r\n/* 153:141 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 154:142 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 155:143 */ return;\r\n/* 156: */ }\r\n/* 157:144 */ if (cons == 12)\r\n/* 158: */ {\r\n/* 159:145 */ this.context.setTexFlags(184365);\r\n/* 160:146 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 161:147 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 1.0F);\r\n/* 162:148 */ return;\r\n/* 163: */ }\r\n/* 164:149 */ if (cons == 48)\r\n/* 165: */ {\r\n/* 166:150 */ this.context.setTexFlags(187200);\r\n/* 167:151 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 168:152 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 169:153 */ return;\r\n/* 170: */ }\r\n/* 171:155 */ this.context.setTex(end);\r\n/* 172:156 */ doubleBox(0x3F ^ cons, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 173:157 */ if ((cons & 0x1) > 0)\r\n/* 174: */ {\r\n/* 175:158 */ this.context.setTexFlags(1773);\r\n/* 176:159 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 177:160 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 0.375F, 0.625F);\r\n/* 178: */ }\r\n/* 179:162 */ if ((cons & 0x2) > 0)\r\n/* 180: */ {\r\n/* 181:163 */ this.context.setTexFlags(1773);\r\n/* 182:164 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 183:165 */ doubleBox(60, 0.375F, 0.625F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 184: */ }\r\n/* 185:167 */ if ((cons & 0x4) > 0)\r\n/* 186: */ {\r\n/* 187:168 */ this.context.setTexFlags(184365);\r\n/* 188:169 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 189:170 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 0.375F);\r\n/* 190: */ }\r\n/* 191:172 */ if ((cons & 0x8) > 0)\r\n/* 192: */ {\r\n/* 193:173 */ this.context.setTexFlags(184365);\r\n/* 194:174 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 195:175 */ doubleBox(51, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F, 1.0F);\r\n/* 196: */ }\r\n/* 197:177 */ if ((cons & 0x10) > 0)\r\n/* 198: */ {\r\n/* 199:178 */ this.context.setTexFlags(187200);\r\n/* 200:179 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 201:180 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F);\r\n/* 202: */ }\r\n/* 203:182 */ if ((cons & 0x20) > 0)\r\n/* 204: */ {\r\n/* 205:183 */ this.context.setTexFlags(187200);\r\n/* 206:184 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 207:185 */ doubleBox(15, 0.625F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 208: */ }\r\n/* 209: */ }", "public static String makeShapeA() {\n\tString result = \"\";\n\t\tfor (int i = 0; i < 8 ; i++) {\n\t\t\tresult+=printHash(i);\n\t\t\t\n\t\t}return result;\n\t\t\t//System.out.println(printHash(i));\n\t\t}", "private void traverseBayeredPatternHalfSizeRGB(){\n int originalPositionX = 0;\n int originalPositionY = 1;\n\n for (int newX = 0; originalPositionX < originalImageHeight -1; newX++){\n for (int newY = 0; originalPositionY < originalImageWidth -1; newY++){\n Point newPosition = new Point(newX,newY);\n int newAbsoultPosition = getAbsolutPixelPosition(newPosition, originalImageHeight / 2, originalImageWidth / 2);\n halfSizePixRGB[newAbsoultPosition] = getAverageRGB(new Point(originalPositionX,originalPositionY));\n originalPositionY += 2;\n }\n originalPositionY = 0;\n originalPositionX += 2;\n }\n }", "public void foundLeaf(int width, int height, int level, int currX, int currY, int location) {\n level = level +2;\n if (location == 1) {\n\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - ( (new Double(spatialHeight / Math.pow(2, level ))).intValue()),\n currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY * 2,\n Color.BLACK);\n\n\n canvas.addLine(((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue())) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n currX,\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n\n }\n\n if (location == 2) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n ( currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n (currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n\n\n }\n\n if (location == 3) {\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY,\n Color.BLACK);\n\n\n\n canvas.addLine((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n\tcurrY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n (currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n }\n\n if (location == 4) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY,\n Color.BLACK);\n\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue() + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), Color.BLACK);\n\n\n }\n\n\n\n\n }", "double volume() {\n\treturn width*height*depth;\n}", "@Override\r\n public void draw()\r\n {\n\r\n }", "@Override\n protected void paint2d(Graphics2D g) {\n \n }", "public static void method1(){\n System.out.println(\"*****\");\n System.out.println(\"*****\");\n System.out.println(\" * *\");\n System.out.println(\" *\");\n System.out.println(\" * *\");\n }", "@Override\n\tpublic void draw3() {\n\n\t}", "private void renderPath(Node n)\n {\n\tGraphics g = getGraphics();\n\tboolean painting;\n\tColor nc,lc;\n\n\tpainting = (n.paths_passing==0);\n\twhile (n != null) {\n\t if (painting)\n\t\tn.paths_passing++;\n\t else {\n\t\tn.paths_passing--;\n\t }\n\t \n// \t nc = (n.paths_passing > 0)?hilitcolor:normalcolor;\n// \t lc = (n.paths_passing > 0)?hilitcolor:linecolor;\n\t nc = (n.paths_passing > 0)?n.path_color:normalcolor;\n\t lc = (n.paths_passing > 0)?n.path_color:linecolor;\n\t \n\t if (n.parent == null) {\n\t\tsetRenderColor(g,nc);\n\t\trenderNode(g,n);\n\t\tbreak;\n\t }\n\n\t // Double line width\n\t //setRenderColor(g,(n.paths_passing>0)?hilitcolor:Color.white);\n\t setRenderColor(g,(n.paths_passing>0)?n.path_color:Color.white);\n\t renderLine(g,n.x-1,n.y,n.parent.x-1,n.parent.y);\t\n\n\t setRenderColor(g,lc);\n\t renderLine(g,n.x,n.y,n.parent.x,n.parent.y);\n\n\t setRenderColor(g,nc);\n\t renderNode(g,n);\n\t n = n.parent;\n\t}\n }", "int fi(int x, int y) {\n\t\treturn (x + 1) + (width + 2) * (y + 1);\n\t}", "double defendre();", "public void getTile_B8();", "public void SubRect(){\n\t\n}", "public static void sizePathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze five = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\t//System.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = five.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber + n)){\n\t\t\t\t\t\tS.unionBySize(randomNumber+n, randomNumber);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'u');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+1);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(five, n);\n\t\tuserSelection_SolveMaze(n);\n\n\t\tStdDraw.show(0);\n\t\tfive.draw();\n\t\tfive.printCellNumbers();\t\n\t}", "void mo21076g();", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "public double getWidth() {\n return this.size * 2.0; \n }", "public void skystonePos2() {\n }", "public void skystonePos5() {\n }", "public double getPerimiter(){return (2*height +2*width);}", "int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}", "public static void topHalf() {\n \t\n for( int i = 1; i <= SIZE; i++){\n for(int spaces = 1; spaces <= 3*SIZE - 3*i; spaces++) {\n System.out.print(\" \"); \n }\n \n for(int j = 1; j <= 1; j++) {\n System.out.print(\"__/\");\n }\n \n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\":::\");\n }\n \n System.out.print(\"||\");\n \n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\":::\");\n }\n \n for(int j = 1; j <= 1; j++) {\n System.out.print(\"\\\\__\");\n }\n \n System.out.println();\n }\n \n System.out.print(\"|\");\n \n for(int i = 1; i <= 6 * SIZE; i++) {\n System.out.print(\"\\\"\");\n }\n \n System.out.println(\"|\");\n }", "public static void body() {\n \tfor(int i = 1; i <= SIZE*SIZE; i++) {\n for(int j = 1; j <= 3*SIZE-(SIZE-1); j++) {\n System.out.print(\" \");\n }\n \n System.out.print(\"|\");\n for(int j = 1; j <= SIZE-2; j++) {\n \tSystem.out.print(\"%\");\n }\n System.out.print(\"||\");\n for(int j = 1; j <= SIZE-2; j++) {\n \tSystem.out.print(\"%\");\n }\n System.out.print(\"|\");\n \n System.out.println();\n }\n }", "public void skystonePos3() {\n }", "double seBlesser();", "public wall() { //default constructor makes a 10x10 square extending right and down from the pixel located at 5,5\r\n x = 5;\r\n y = 5;\r\n height = 10;\r\n width = 10;\r\n }", "void block(Directions dir);", "public void lowerFlatbed(){\n flatbed.lowerFlatbed();\n }", "public static void main(String[] args) {\nint i,j,k;\r\nint num=5;\r\nfor(i=0;i<num;i++){\r\n\tfor(j=0;j<i;j++){\r\n\t\tSystem.out.print(\" \");\r\n\t}\r\n\tfor(k=num; k>=2*i-1; k--){\r\n\t\tSystem.out.print(\"*\");\r\n\t}\r\n\t\r\n\tSystem.out.println();\r\n}\r\n\t}", "public RMPath getPath() { return RMPath.unitRectPath; }", "public int upright();", "private int uniquePaths(int x, int y, int[][] dp) {\n \t\tif (x == 0 || y == 0) return 1;\n \t\tif (dp[x][y] == 0)\n \t\t\tdp[x][y] = uniquePaths(x - 1, y, dp) + uniquePaths(x, y - 1, dp);\n \t\treturn dp[x][y];\n \t}", "public Integer getWidth(){return this.width;}", "public void skystonePos6() {\n }", "void GenerateBoardPath() {\n\t\t\t\n\t\t\tint rows = board.getRowsNum();\n\t\t\tint columns = board.getColsNum();\n\t\t\tint space_number = 1; \n\t\t\t\n\t\t\t\n\t\t\tfor (int i = rows - 1; i >= 0; i--) \n\t\t\t\t//If the row is an odd-number, move L-R\n\t\t\t\tif (i % 2 != 0) {\n\t\t\t\t\tfor (int j = 0; j < columns; j++) \n\t\t\t\t\t\tBoardPathRepository.put(space_number++, board.getTile(i, j));}\n\t\t\t\telse {\n\t\t\t\t\tfor (int j = columns-1; j >=0; j--) \n\t\t\t\t\t\tBoardPathRepository.put(space_number++, board.getTile(i, j));\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t}", "private byte r() {\r\n\t\treturn (left_map == 0 ) ? (byte) 1 : 0;\r\n\t}", "private void render() {\n StringBuilder builder = new StringBuilder();\n builder.append(horizontalEdge).append(\"\\n\");\n for (int i = 0; i < this.height; i++) {\n builder.append(VERTICAL_CHAR);\n for (int j = 0; j < this.width; j++) {\n builder.append(pixels[i][j]);\n }\n builder.append(VERTICAL_CHAR);\n builder.append(\"\\n\");\n }\n builder.append(horizontalEdge);\n System.out.printf(builder.toString());\n }", "@Override\n\tpublic void breath() {\n\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "public\nstatic\nvoid\nmain(String args[]) \n\n{ \n\nBinaryTree tree = \nnew\nBinaryTree(); \n\ntree.root = \nnew\nNode(\n20\n); \n\ntree.root.left = \nnew\nNode(\n8\n); \n\ntree.root.left.left = \nnew\nNode(\n4\n); \n\ntree.root.left.right = \nnew\nNode(\n12\n); \n\ntree.root.left.right.left = \nnew\nNode(\n10\n); \n\ntree.root.left.right.right = \nnew\nNode(\n14\n); \n\ntree.root.right = \nnew\nNode(\n22\n); \n\ntree.root.right.right = \nnew\nNode(\n25\n); \n\ntree.printBoundary(tree.root); \n\n}", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tint n = 7;\r\n\t\tfor (int i = n; i >= 0; i--) {\r\n\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t for(int j=0; j<n-i; j++) {\r\n\t\t\t \r\n\t\t\t System.out.print(\" \");\r\n\t\t\t \r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t \r\n\r\n\t\t\tfor (int j = n; j >= n-i; j--) {\r\n\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t}\r\n\r\n\t\t\r\n\t}", "@Override\n\tpublic void draw() {\n\t}", "private void division()\n\t{\n\t\tFun = Function.DIVIDE; //Function set to determine what action should be taken later.\n\t\t\n\t\t\tsetLeftValue();\n\t\t\tentry.grabFocus();\n\t\t\n\t}" ]
[ "0.5654086", "0.5282051", "0.5270874", "0.5268489", "0.5230159", "0.5229372", "0.5205559", "0.51923394", "0.51524484", "0.50993294", "0.50948834", "0.5071109", "0.5043058", "0.5009983", "0.5006536", "0.49739555", "0.49691963", "0.4959123", "0.49568397", "0.49425906", "0.49421698", "0.49421698", "0.4903223", "0.4897176", "0.48879617", "0.48803073", "0.48741165", "0.48718095", "0.48679698", "0.48646608", "0.48598114", "0.48402584", "0.48362267", "0.48321876", "0.48310882", "0.4825809", "0.48227587", "0.48175377", "0.48045233", "0.48045233", "0.48002362", "0.47911668", "0.47906598", "0.4776121", "0.47734705", "0.47673976", "0.475685", "0.47517157", "0.47446346", "0.47364715", "0.47353277", "0.47321412", "0.47242466", "0.4721296", "0.47190621", "0.47164857", "0.47148356", "0.47142458", "0.47103566", "0.47027764", "0.47023293", "0.4701804", "0.46992764", "0.46985114", "0.46954885", "0.4695406", "0.46914175", "0.4690724", "0.46901584", "0.4686765", "0.4682771", "0.46786475", "0.46786475", "0.4676364", "0.46714565", "0.46710065", "0.46701837", "0.46698236", "0.46671712", "0.466633", "0.4663725", "0.46617198", "0.46599096", "0.46593648", "0.4654308", "0.46481097", "0.46472353", "0.46443266", "0.46441418", "0.46438584", "0.4642061", "0.46387514", "0.46382058", "0.46375832", "0.4636777", "0.46365395", "0.46365395", "0.46359038", "0.4635539", "0.46332848", "0.46326485" ]
0.0
-1
/ / / / / /
public boolean isPrimitive(Class paramClass) { /* 113 */ if (paramClass == null) { /* 114 */ throw new IllegalArgumentException(); /* */ } /* */ /* 117 */ return paramClass.isPrimitive(); /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void divide() {\n\t\t\n\t}", "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "public abstract void bepaalGrootte();", "public static void bottomHalf() {\n\n for(int i = 1; i <= SIZE; i++) {\n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\" \");\n }\n \n\t System.out.print(\"\\\\_\");\n\t for(int j = 3*SIZE-i; j >= i; j--) {\n\t System.out.print(\"/\\\\\");\n\t }\n\t System.out.println(\"_/\");\n }\n }", "private int rightChild(int i){return 2*i+2;}", "public void gored() {\n\t\t\n\t}", "double passer();", "public abstract String division();", "public String ring();", "laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }", "public String toString(){ return \"DIV\";}", "private void pointer(Graphics image,int x,int y,int height,int b,int dir) {\n\n\t\tint[] xt=new int[3];\n\t\tint[] yt=new int[3];\n\n\t\tif(dir==0) {\n\t\t\txt[0]=x;\n\t\t\txt[1]=xt[2]=x+height;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=y+b/2;\n\t\t\tyt[2]=y-b/2;\n\t\t} else {\n\t\t\txt[0]=x;\n\t\t\txt[1]=x+b/2;\n\t\t\txt[2]=x-b/2;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=yt[2]=y-height;\n\t\t}\n\t\timage.fillPolygon(xt,yt,3);\n\t}", "public static void main(String[] args) {\n\n\n for(int a=0; a<7;a++){\n for(int b=0;b<7-a;b++){\n System.out.print(\" \");\n }\n for(int c=0; c<=a;c++){\n System.out.print(\"* \");\n }\n System.out.println(\" \");\n }\n\n }", "void sharpen();", "void sharpen();", "public double getWidth() {\n return this.left.getLeft(0) - this.right.getRight(0); \n }", "static void pyramid(){\n\t}", "int getWidth() {return width;}", "Operations operations();", "private static void breadcrumbArrow(int width, int height, int indent, int c1, int c2) {\n\n\t\tdouble x0 = 0, y0 = height / 2d;\n\t\tdouble x1 = indent, y1 = 0;\n\t\tdouble x2 = indent, y2 = height / 2d;\n\t\tdouble x3 = indent, y3 = height;\n\t\tdouble x4 = width, y4 = 0;\n\t\tdouble x5 = width, y5 = height / 2d;\n\t\tdouble x6 = width, y6 = height;\n\t\tdouble x7 = indent + width, y7 = 0;\n\t\tdouble x8 = indent + width, y8 = height;\n\n\t\tint fc1 = ColorHelper.mixAlphaColors(c1, c2, 0);\n\t\tint fc2 = ColorHelper.mixAlphaColors(c1, c2, (indent)/(width + 2f * indent));\n\t\tint fc3 = ColorHelper.mixAlphaColors(c1, c2, (indent + width)/(width + 2f * indent));\n\t\tint fc4 = ColorHelper.mixAlphaColors(c1, c2, 1);\n\n\t\tRenderSystem.disableTexture();\n\t\tRenderSystem.enableBlend();\n\t\tRenderSystem.disableAlphaTest();\n\t\tRenderSystem.defaultBlendFunc();\n\t\tRenderSystem.shadeModel(GL11.GL_SMOOTH);\n\n\t\tTessellator tessellator = Tessellator.getInstance();\n\t\tBufferBuilder bufferbuilder = tessellator.getBuffer();\n\t\tbufferbuilder.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR);\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x7, y7, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x8, y8, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\ttessellator.draw();\n\t\tRenderSystem.shadeModel(GL11.GL_FLAT);\n\t\tRenderSystem.disableBlend();\n\t\tRenderSystem.enableAlphaTest();\n\t\tRenderSystem.enableTexture();\n\t}", "double volume(){\n return width*height*depth;\n }", "@Override\n public void bfs() {\n\n }", "void mo33732Px();", "private static Object[] newPath(int length, Object[] leaf) {\n Object[] node = leaf;\n for (int i = 0; i < length; i += 5) {\n node = new Object[] { node };\n }\n return node;\n }", "public static void slashes() {\n\t\tSystem.out.println(\"//////////////////////\");\r\n\r\n\t}", "public void stg() {\n\n\t}", "public void skystonePos4() {\n }", "public int generateRoshambo(){\n ;]\n\n }", "public void draw(){\n for(int i = 1; i <= height; i++){\n for(int s = 1; s <= i; s++)\n System.out.print(\"*\");\n System.out.println();\n }\n }", "public void getTile_B8();", "int width();", "public static void main(String[] args) {\n\t\tfor(int j=0;j<8;j++){\n\t\t\tfor(int i=0;i<8;i++){\n\t\t\t\t//上下两侧\n\t\t\t\tif(j==0||j==7){\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}else{\n\t\t\t\t\t//中间\n\t\t\t\t\tif(i>0&&i<7){\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public static void unionPathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze two = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\tSystem.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = two.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber+n) != S.findAndCompress(randomNumber)){\n\t\t\t\t\t\tS.union(randomNumber+n, randomNumber);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'u');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.union(randomNumber, randomNumber+1);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(two, n);\n\t\tuserSelection_SolveMaze(n);\n\n\n\t\tStdDraw.show(0);\n\t\ttwo.draw();\n\t\ttwo.printCellNumbers();\n\t}", "public static void part2(){\n\t\n System.out.println(\"\\\\\"); //Outer wall\n System.out.println(\"\\\\\");\n System.out.println(\"\\\\\");\n for(int i = 0; i <= 16; i++){ //loop created to display top of the door\n\n \tSystem.out.print(\"-\");\n\n\t}\n System.out.println(\"\");\n System.out.println(\"\\\\\\t\\t| \\t(\\\")\"); //The door and the stick figure\n System.out.println(\"\\\\\\t\\t|\\t-|-\");\n System.out.println(\"\\\\\\t o | \\t |\");\n System.out.println(\"\\\\\\t\\t|\\t /\\\\\");\n System.out.println(\"\\\\\\t\\t|\\t/ \\\\\");\n\t\t\n }", "private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}", "Parallelogram(){\n length = width = height = 0;\n }", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "public static void main(String[] args) {\n\t\tScanner obj=new Scanner(System.in);\r\n\t\tint a=0;\r\n\t\tint count=0;\r\n System.out.println(\"enter size\");\r\n\t\ta=obj.nextInt();\r\n\t\tint m=2*a+1;\r\n\t\tint n=2*a+2;\r\n\t\tint mid=(m+1)/2;\r\n\t\tfor(int i=1;i<=m;i++)\r\n\t\t{\r\n\t\t\tcount=0;\r\n\t\t\tfor(int j=1;j<=n;j++)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tif((i==1)||(i==m)||(j==1)||(j==n))//frame begin\r\n\t\t\t\t{\r\n\t\t\t\t\tif((i==1)||(i==m))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"+\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t {\r\n\t\t\t\t\t\t\tSystem.out.print(\"|\");//frame left and right\r\n\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//frame end\r\n\t\t\t\telse if (i<mid)//upper-half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t for(int l=1;l<=2*i-4;l++)\r\n\t\t\t\t {\r\n\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\tSystem.out.print(\"\\\\\");\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end of upper half\r\n\t\t\t\telse if(i>mid)//lower half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tfor(int k=mid;k<i;k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t System.out.print(\"\\\\\");\r\n\t\t\t\t\t for(int l=2*m-6;l>2*i-4;l--)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t else\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t }\r\n\t\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t\t for(int k=mid;k<i;k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t\t\t}//end of lower half\r\n\t\t\t\telse if(i==mid)//middle part\r\n\t\t\t\t{\r\n\t\t\t\t\tif(j==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\"<\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(j==n-1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\">\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(i%2==0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"=\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end\r\n\t\t\t}//end-of-j\r\n\t\t\tSystem.out.println();\r\n\t\t}//end\r\n\r\n\t}", "public double getWidth() {\n return this.size * 2.0; \n }", "private void traverseBayeredPatternHalfSizeRGB(){\n int originalPositionX = 0;\n int originalPositionY = 1;\n\n for (int newX = 0; originalPositionX < originalImageHeight -1; newX++){\n for (int newY = 0; originalPositionY < originalImageWidth -1; newY++){\n Point newPosition = new Point(newX,newY);\n int newAbsoultPosition = getAbsolutPixelPosition(newPosition, originalImageHeight / 2, originalImageWidth / 2);\n halfSizePixRGB[newAbsoultPosition] = getAverageRGB(new Point(originalPositionX,originalPositionY));\n originalPositionY += 2;\n }\n originalPositionY = 0;\n originalPositionX += 2;\n }\n }", "@Override\npublic void processDirection() {\n\t\n}", "void walk() {\n\t\t\n\t}", "void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2)\r\n/* 100: */ {\r\n/* 101: 99 */ int s2 = sides << 1 & 0x2A | sides >> 1 & 0x15;\r\n/* 102: */ \r\n/* 103:101 */ this.context.renderBox(sides, x1, y1, z1, x2, y2, z2);\r\n/* 104:102 */ this.context.renderBox(s2, x2, y2, z2, x1, y1, z1);\r\n/* 105: */ }", "public void SubRect(){\n\t\n}", "public void division() {\n\t\tx=1;\n\t\ty=0;\n\t\tz=x/y;\n\t\t\t\t\n\t}", "public void foundLeaf(int width, int height, int level, int currX, int currY, int location) {\n level = level +2;\n if (location == 1) {\n\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - ( (new Double(spatialHeight / Math.pow(2, level ))).intValue()),\n currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY * 2,\n Color.BLACK);\n\n\n canvas.addLine(((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue())) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n currX,\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n\n }\n\n if (location == 2) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n ( currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n (currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n\n\n }\n\n if (location == 3) {\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY,\n Color.BLACK);\n\n\n\n canvas.addLine((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n\tcurrY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n (currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n }\n\n if (location == 4) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY,\n Color.BLACK);\n\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue() + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), Color.BLACK);\n\n\n }\n\n\n\n\n }", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "public double getWidth() { return _width<0? -_width : _width; }", "public static void sizePathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze five = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\t//System.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = five.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber + n)){\n\t\t\t\t\t\tS.unionBySize(randomNumber+n, randomNumber);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'u');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+1);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(five, n);\n\t\tuserSelection_SolveMaze(n);\n\n\t\tStdDraw.show(0);\n\t\tfive.draw();\n\t\tfive.printCellNumbers();\t\n\t}", "double getPerimeter(){\n return 2*height+width;\n }", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "public Integer getWidth(){return this.width;}", "@Override\n protected void paint2d(Graphics2D g) {\n \n }", "private void createPath(Direction d, int width, Point p1, Point p2) {\n\t\t// Determine how far away from the center the corners are\n\t\tint sideOneOffset = 0;\t// Top or Left depending on path direction\n\t\tint sideTwoOffset = 0;\t// Bot or Right depending on path direction\n\t\t// If the width is odd, balance the offsets\n\t\tif (width % 2 != 0) {\t\n\t\t\tsideOneOffset = sideTwoOffset = ((width / 2) + 1);\n\t\t} else {\n\t\t\t// If the width is even, the offsets will be off by 1\n\t\t\tsideOneOffset = width;\n\t\t\tsideTwoOffset = width - 1;\n\t\t}\n\t\tif (d == Direction.LEFT || d == Direction.RIGHT) {\n\t\t\t// If the direction is left then we want to swap the points\n\t\t\t// to pretend like the direction was right (so the following code works)\n\t\t\tif (d == Direction.LEFT) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p1.x, p1.y + sideTwoOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p2.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x, p1.y + sideTwoOffset)));\n\t\t\t// Set the left and right walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.y is the center of the path (top to bottom)\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x, p1.y + (i - width/2))));\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p2.x, p2.y + (i - width/2))));\n\t\t\t}\n\t\t\t// Set middle path and top/bottom padding (horizontal Oreo!)\n\t\t\tfor (int col = p1.x + 1, endCol = p2.x; col < endCol; col++) {\n\t\t\t\t// Add the top wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(col, p1.y - sideOneOffset)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(col, p1.y + (i - width /2))));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the bottom wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(col, p1.y + sideTwoOffset)));\n\t\t\t}\n\t\t} else {\n\t\t\t// If the direction is up then we want to swap the points\n\t\t\t// to pretend like the direction was down (so the following code works)\n\t\t\tif (d == Direction.UP) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x - sideOneOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p2.x - sideOneOffset, p2.y)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p1.x + sideTwoOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x + sideTwoOffset, p2.y)));\n\t\t\t// Set the top and bottom walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.x is the center of the path (left to right)\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(p1.x + (i - width /2), p1.y)));\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(p2.x + (i - width /2), p2.y)));\n\t\t\t}\n\t\t\t// Set middle path and left/right padding (vertical Oreo!)\n\t\t\tfor (int row = p1.y + 1, endRow = p2.y; row < endRow; row++) {\n\t\t\t\t// Add the left wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x - sideOneOffset, row)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(p1.x + (i - width /2), row)));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the right wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p1.x + sideTwoOffset, row)));\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public void draw4x4 (char design){\n System.out.println(\"\"+design+design+design+design);\n System.out.println(design+\" \"+design);\n System.out.println(design+\" \"+design);\n System.out.println(\"\"+design+design+design+design);\n}", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "public void renderCenterBlock(int cons, int side, int end)\r\n/* 143: */ {\r\n/* 144:135 */ if (cons == 0)\r\n/* 145: */ {\r\n/* 146:136 */ this.context.setTex(end);\r\n/* 147:137 */ doubleBox(63, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 148:138 */ return;\r\n/* 149: */ }\r\n/* 150:139 */ if (cons == 3)\r\n/* 151: */ {\r\n/* 152:140 */ this.context.setTexFlags(1773);\r\n/* 153:141 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 154:142 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 155:143 */ return;\r\n/* 156: */ }\r\n/* 157:144 */ if (cons == 12)\r\n/* 158: */ {\r\n/* 159:145 */ this.context.setTexFlags(184365);\r\n/* 160:146 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 161:147 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 1.0F);\r\n/* 162:148 */ return;\r\n/* 163: */ }\r\n/* 164:149 */ if (cons == 48)\r\n/* 165: */ {\r\n/* 166:150 */ this.context.setTexFlags(187200);\r\n/* 167:151 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 168:152 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 169:153 */ return;\r\n/* 170: */ }\r\n/* 171:155 */ this.context.setTex(end);\r\n/* 172:156 */ doubleBox(0x3F ^ cons, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 173:157 */ if ((cons & 0x1) > 0)\r\n/* 174: */ {\r\n/* 175:158 */ this.context.setTexFlags(1773);\r\n/* 176:159 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 177:160 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 0.375F, 0.625F);\r\n/* 178: */ }\r\n/* 179:162 */ if ((cons & 0x2) > 0)\r\n/* 180: */ {\r\n/* 181:163 */ this.context.setTexFlags(1773);\r\n/* 182:164 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 183:165 */ doubleBox(60, 0.375F, 0.625F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 184: */ }\r\n/* 185:167 */ if ((cons & 0x4) > 0)\r\n/* 186: */ {\r\n/* 187:168 */ this.context.setTexFlags(184365);\r\n/* 188:169 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 189:170 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 0.375F);\r\n/* 190: */ }\r\n/* 191:172 */ if ((cons & 0x8) > 0)\r\n/* 192: */ {\r\n/* 193:173 */ this.context.setTexFlags(184365);\r\n/* 194:174 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 195:175 */ doubleBox(51, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F, 1.0F);\r\n/* 196: */ }\r\n/* 197:177 */ if ((cons & 0x10) > 0)\r\n/* 198: */ {\r\n/* 199:178 */ this.context.setTexFlags(187200);\r\n/* 200:179 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 201:180 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F);\r\n/* 202: */ }\r\n/* 203:182 */ if ((cons & 0x20) > 0)\r\n/* 204: */ {\r\n/* 205:183 */ this.context.setTexFlags(187200);\r\n/* 206:184 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 207:185 */ doubleBox(15, 0.625F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 208: */ }\r\n/* 209: */ }", "int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}", "public double getPerimiter(){return (2*height +2*width);}", "int fi(int x, int y) {\n\t\treturn (x + 1) + (width + 2) * (y + 1);\n\t}", "void ringBell() {\n\n }", "public static String makeShapeA() {\n\tString result = \"\";\n\t\tfor (int i = 0; i < 8 ; i++) {\n\t\t\tresult+=printHash(i);\n\t\t\t\n\t\t}return result;\n\t\t\t//System.out.println(printHash(i));\n\t\t}", "@Override\r\n public void draw()\r\n {\n\r\n }", "private int leftChild(int index){\n\t\treturn (2*index) +1;\n\t}", "@Override\r\n\tpublic void walk() {\n\r\n\t}", "public double getWidth() {\n return this.getRight(this.tree.getRight(0)) - this.getLeft(this.tree.getLeft(0)); \n }", "void block(Directions dir);", "public void lowerFlatbed(){\n flatbed.lowerFlatbed();\n }", "private void render() {\n StringBuilder builder = new StringBuilder();\n builder.append(horizontalEdge).append(\"\\n\");\n for (int i = 0; i < this.height; i++) {\n builder.append(VERTICAL_CHAR);\n for (int j = 0; j < this.width; j++) {\n builder.append(pixels[i][j]);\n }\n builder.append(VERTICAL_CHAR);\n builder.append(\"\\n\");\n }\n builder.append(horizontalEdge);\n System.out.printf(builder.toString());\n }", "@Override\n\tpublic void draw3() {\n\n\t}", "public static void main(String[] args) {\n\t\tint n=5;\n\t\tfor(int i=n-1;i>=0;i--)\n\t\t{\n\t\t\tfor(int space=0;space<n-1-i;space++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int j=0;j<=i*2;j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\n\t\tSystem.out.println();\n\t}\n\n}", "private int get_right_child(int index){\r\n return 2 * index + 2;\r\n }", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "double seBlesser();", "private void renderPath(Node n)\n {\n\tGraphics g = getGraphics();\n\tboolean painting;\n\tColor nc,lc;\n\n\tpainting = (n.paths_passing==0);\n\twhile (n != null) {\n\t if (painting)\n\t\tn.paths_passing++;\n\t else {\n\t\tn.paths_passing--;\n\t }\n\t \n// \t nc = (n.paths_passing > 0)?hilitcolor:normalcolor;\n// \t lc = (n.paths_passing > 0)?hilitcolor:linecolor;\n\t nc = (n.paths_passing > 0)?n.path_color:normalcolor;\n\t lc = (n.paths_passing > 0)?n.path_color:linecolor;\n\t \n\t if (n.parent == null) {\n\t\tsetRenderColor(g,nc);\n\t\trenderNode(g,n);\n\t\tbreak;\n\t }\n\n\t // Double line width\n\t //setRenderColor(g,(n.paths_passing>0)?hilitcolor:Color.white);\n\t setRenderColor(g,(n.paths_passing>0)?n.path_color:Color.white);\n\t renderLine(g,n.x-1,n.y,n.parent.x-1,n.parent.y);\t\n\n\t setRenderColor(g,lc);\n\t renderLine(g,n.x,n.y,n.parent.x,n.parent.y);\n\n\t setRenderColor(g,nc);\n\t renderNode(g,n);\n\t n = n.parent;\n\t}\n }", "public void skystonePos2() {\n }", "double volume() {\n\treturn width*height*depth;\n}", "private void buildPath() {\r\n int xNext = 1;\r\n int yNext = map.getStartPos() + 1;\r\n CellLayered before = cells[yNext][xNext];\r\n while(true)\r\n {\r\n Byte[] xy = map.getDirection(xNext-1, yNext-1);\r\n xNext = xNext + xy[0];\r\n yNext = yNext + xy[1];\r\n\r\n CellLayered next = cells[yNext][xNext];\r\n\r\n if(xy[0]==-1)\r\n before.setRight(false);\r\n else\r\n before.setRight(true);\r\n before.setPath(true);\r\n if(next==null)\r\n break;\r\n\r\n before.setNextInPath(next);\r\n before = next;\r\n }\r\n }", "void table(){\n fill(0);\n rect(width/2, height/2, 600, 350); // boarder\n fill(100, 0 ,0);\n rect(width/2, height/2, 550, 300); //Felt\n \n \n}", "@Override\n\tpublic void walk() {\n\t\t\n\t}", "public\nstatic\nvoid\nmain(String args[]) \n\n{ \n\nBinaryTree tree = \nnew\nBinaryTree(); \n\ntree.root = \nnew\nNode(\n20\n); \n\ntree.root.left = \nnew\nNode(\n8\n); \n\ntree.root.left.left = \nnew\nNode(\n4\n); \n\ntree.root.left.right = \nnew\nNode(\n12\n); \n\ntree.root.left.right.left = \nnew\nNode(\n10\n); \n\ntree.root.left.right.right = \nnew\nNode(\n14\n); \n\ntree.root.right = \nnew\nNode(\n22\n); \n\ntree.root.right.right = \nnew\nNode(\n25\n); \n\ntree.printBoundary(tree.root); \n\n}", "public wall() { //default constructor makes a 10x10 square extending right and down from the pixel located at 5,5\r\n x = 5;\r\n y = 5;\r\n height = 10;\r\n width = 10;\r\n }", "double getNewWidth();", "public int upright();", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic double perimeter() {\n\t\treturn 2*length*breadth;\r\n\t}", "public void skystonePos3() {\n }", "public void leerPlanesDietas();", "long getWidth();", "public static void body() {\n \tfor(int i = 1; i <= SIZE*SIZE; i++) {\n for(int j = 1; j <= 3*SIZE-(SIZE-1); j++) {\n System.out.print(\" \");\n }\n \n System.out.print(\"|\");\n for(int j = 1; j <= SIZE-2; j++) {\n \tSystem.out.print(\"%\");\n }\n System.out.print(\"||\");\n for(int j = 1; j <= SIZE-2; j++) {\n \tSystem.out.print(\"%\");\n }\n System.out.print(\"|\");\n \n System.out.println();\n }\n }", "public void snare();", "public void strength1(float x, float y){\n noStroke();\n fill(80);\n rect(x+7,y,66,6);\n bezier(x+7,y,x,y+1,x,y+5,x+7,y+6);\n bezier(x+73,y,x+80,y+1,x+80,y+5,x+73,y+6);\n rect(x+7,y+1,13,3);//1st blue ba\n bezier(x+7,y+1,x+1,y+2.5f,x+1,y+3.5f,x+7,y+4);\n}", "public void skystonePos5() {\n }", "void GenerateBoardPath() {\n\t\t\t\n\t\t\tint rows = board.getRowsNum();\n\t\t\tint columns = board.getColsNum();\n\t\t\tint space_number = 1; \n\t\t\t\n\t\t\t\n\t\t\tfor (int i = rows - 1; i >= 0; i--) \n\t\t\t\t//If the row is an odd-number, move L-R\n\t\t\t\tif (i % 2 != 0) {\n\t\t\t\t\tfor (int j = 0; j < columns; j++) \n\t\t\t\t\t\tBoardPathRepository.put(space_number++, board.getTile(i, j));}\n\t\t\t\telse {\n\t\t\t\t\tfor (int j = columns-1; j >=0; j--) \n\t\t\t\t\t\tBoardPathRepository.put(space_number++, board.getTile(i, j));\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t}" ]
[ "0.5472371", "0.5383522", "0.52979374", "0.5293668", "0.5211566", "0.51842105", "0.5161626", "0.51377255", "0.5100369", "0.5067393", "0.5064298", "0.50376177", "0.49875325", "0.49361488", "0.49140826", "0.49058613", "0.49058613", "0.48946288", "0.48945552", "0.48931476", "0.48904693", "0.48880374", "0.48798734", "0.48695773", "0.48647928", "0.48638737", "0.48618442", "0.48618138", "0.48505476", "0.48302734", "0.48278588", "0.48275942", "0.48218134", "0.48208144", "0.48172593", "0.4813516", "0.48124653", "0.4811937", "0.4811937", "0.48115787", "0.4811212", "0.48030958", "0.47998473", "0.4795484", "0.47894648", "0.47886366", "0.47878242", "0.47855106", "0.4777816", "0.47706896", "0.47695553", "0.4766223", "0.47616836", "0.4760893", "0.47604054", "0.47590306", "0.47488394", "0.4736708", "0.47364867", "0.47344264", "0.47324577", "0.47303045", "0.47301307", "0.47227973", "0.4722473", "0.4719981", "0.47176844", "0.47143498", "0.4712692", "0.47071925", "0.47001678", "0.46935824", "0.46934032", "0.46931094", "0.46875677", "0.46873635", "0.4686461", "0.46827722", "0.46827722", "0.46827522", "0.46788132", "0.46628743", "0.46617907", "0.46604863", "0.4657533", "0.46526098", "0.46518275", "0.46497184", "0.46489906", "0.46484554", "0.46466392", "0.46466392", "0.46454313", "0.46434125", "0.46428928", "0.46424708", "0.4639808", "0.46373105", "0.46368903", "0.46341428", "0.46330282" ]
0.0
-1
/ / / / / /
public boolean isValue(Class<?> paramClass) { /* 125 */ if (paramClass == null) { /* 126 */ throw new IllegalArgumentException(); /* */ } /* */ /* 129 */ return ( /* 130 */ !paramClass.isInterface() && Serializable.class /* 131 */ .isAssignableFrom(paramClass) && /* 132 */ !Remote.class.isAssignableFrom(paramClass)); /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void divide() {\n\t\t\n\t}", "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "public abstract void bepaalGrootte();", "public static void bottomHalf() {\n\n for(int i = 1; i <= SIZE; i++) {\n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\" \");\n }\n \n\t System.out.print(\"\\\\_\");\n\t for(int j = 3*SIZE-i; j >= i; j--) {\n\t System.out.print(\"/\\\\\");\n\t }\n\t System.out.println(\"_/\");\n }\n }", "private int rightChild(int i){return 2*i+2;}", "public void gored() {\n\t\t\n\t}", "double passer();", "public abstract String division();", "public String ring();", "laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }", "public String toString(){ return \"DIV\";}", "private void pointer(Graphics image,int x,int y,int height,int b,int dir) {\n\n\t\tint[] xt=new int[3];\n\t\tint[] yt=new int[3];\n\n\t\tif(dir==0) {\n\t\t\txt[0]=x;\n\t\t\txt[1]=xt[2]=x+height;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=y+b/2;\n\t\t\tyt[2]=y-b/2;\n\t\t} else {\n\t\t\txt[0]=x;\n\t\t\txt[1]=x+b/2;\n\t\t\txt[2]=x-b/2;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=yt[2]=y-height;\n\t\t}\n\t\timage.fillPolygon(xt,yt,3);\n\t}", "public static void main(String[] args) {\n\n\n for(int a=0; a<7;a++){\n for(int b=0;b<7-a;b++){\n System.out.print(\" \");\n }\n for(int c=0; c<=a;c++){\n System.out.print(\"* \");\n }\n System.out.println(\" \");\n }\n\n }", "void sharpen();", "void sharpen();", "public double getWidth() {\n return this.left.getLeft(0) - this.right.getRight(0); \n }", "static void pyramid(){\n\t}", "int getWidth() {return width;}", "Operations operations();", "private static void breadcrumbArrow(int width, int height, int indent, int c1, int c2) {\n\n\t\tdouble x0 = 0, y0 = height / 2d;\n\t\tdouble x1 = indent, y1 = 0;\n\t\tdouble x2 = indent, y2 = height / 2d;\n\t\tdouble x3 = indent, y3 = height;\n\t\tdouble x4 = width, y4 = 0;\n\t\tdouble x5 = width, y5 = height / 2d;\n\t\tdouble x6 = width, y6 = height;\n\t\tdouble x7 = indent + width, y7 = 0;\n\t\tdouble x8 = indent + width, y8 = height;\n\n\t\tint fc1 = ColorHelper.mixAlphaColors(c1, c2, 0);\n\t\tint fc2 = ColorHelper.mixAlphaColors(c1, c2, (indent)/(width + 2f * indent));\n\t\tint fc3 = ColorHelper.mixAlphaColors(c1, c2, (indent + width)/(width + 2f * indent));\n\t\tint fc4 = ColorHelper.mixAlphaColors(c1, c2, 1);\n\n\t\tRenderSystem.disableTexture();\n\t\tRenderSystem.enableBlend();\n\t\tRenderSystem.disableAlphaTest();\n\t\tRenderSystem.defaultBlendFunc();\n\t\tRenderSystem.shadeModel(GL11.GL_SMOOTH);\n\n\t\tTessellator tessellator = Tessellator.getInstance();\n\t\tBufferBuilder bufferbuilder = tessellator.getBuffer();\n\t\tbufferbuilder.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR);\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x7, y7, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x8, y8, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\ttessellator.draw();\n\t\tRenderSystem.shadeModel(GL11.GL_FLAT);\n\t\tRenderSystem.disableBlend();\n\t\tRenderSystem.enableAlphaTest();\n\t\tRenderSystem.enableTexture();\n\t}", "double volume(){\n return width*height*depth;\n }", "@Override\n public void bfs() {\n\n }", "void mo33732Px();", "private static Object[] newPath(int length, Object[] leaf) {\n Object[] node = leaf;\n for (int i = 0; i < length; i += 5) {\n node = new Object[] { node };\n }\n return node;\n }", "public static void slashes() {\n\t\tSystem.out.println(\"//////////////////////\");\r\n\r\n\t}", "public void stg() {\n\n\t}", "public void skystonePos4() {\n }", "public int generateRoshambo(){\n ;]\n\n }", "public void draw(){\n for(int i = 1; i <= height; i++){\n for(int s = 1; s <= i; s++)\n System.out.print(\"*\");\n System.out.println();\n }\n }", "public void getTile_B8();", "int width();", "public static void main(String[] args) {\n\t\tfor(int j=0;j<8;j++){\n\t\t\tfor(int i=0;i<8;i++){\n\t\t\t\t//上下两侧\n\t\t\t\tif(j==0||j==7){\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}else{\n\t\t\t\t\t//中间\n\t\t\t\t\tif(i>0&&i<7){\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public static void unionPathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze two = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\tSystem.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = two.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber+n) != S.findAndCompress(randomNumber)){\n\t\t\t\t\t\tS.union(randomNumber+n, randomNumber);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'u');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.union(randomNumber, randomNumber+1);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(two, n);\n\t\tuserSelection_SolveMaze(n);\n\n\n\t\tStdDraw.show(0);\n\t\ttwo.draw();\n\t\ttwo.printCellNumbers();\n\t}", "public static void part2(){\n\t\n System.out.println(\"\\\\\"); //Outer wall\n System.out.println(\"\\\\\");\n System.out.println(\"\\\\\");\n for(int i = 0; i <= 16; i++){ //loop created to display top of the door\n\n \tSystem.out.print(\"-\");\n\n\t}\n System.out.println(\"\");\n System.out.println(\"\\\\\\t\\t| \\t(\\\")\"); //The door and the stick figure\n System.out.println(\"\\\\\\t\\t|\\t-|-\");\n System.out.println(\"\\\\\\t o | \\t |\");\n System.out.println(\"\\\\\\t\\t|\\t /\\\\\");\n System.out.println(\"\\\\\\t\\t|\\t/ \\\\\");\n\t\t\n }", "private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}", "Parallelogram(){\n length = width = height = 0;\n }", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "public static void main(String[] args) {\n\t\tScanner obj=new Scanner(System.in);\r\n\t\tint a=0;\r\n\t\tint count=0;\r\n System.out.println(\"enter size\");\r\n\t\ta=obj.nextInt();\r\n\t\tint m=2*a+1;\r\n\t\tint n=2*a+2;\r\n\t\tint mid=(m+1)/2;\r\n\t\tfor(int i=1;i<=m;i++)\r\n\t\t{\r\n\t\t\tcount=0;\r\n\t\t\tfor(int j=1;j<=n;j++)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tif((i==1)||(i==m)||(j==1)||(j==n))//frame begin\r\n\t\t\t\t{\r\n\t\t\t\t\tif((i==1)||(i==m))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"+\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t {\r\n\t\t\t\t\t\t\tSystem.out.print(\"|\");//frame left and right\r\n\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//frame end\r\n\t\t\t\telse if (i<mid)//upper-half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t for(int l=1;l<=2*i-4;l++)\r\n\t\t\t\t {\r\n\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\tSystem.out.print(\"\\\\\");\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end of upper half\r\n\t\t\t\telse if(i>mid)//lower half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tfor(int k=mid;k<i;k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t System.out.print(\"\\\\\");\r\n\t\t\t\t\t for(int l=2*m-6;l>2*i-4;l--)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t else\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t }\r\n\t\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t\t for(int k=mid;k<i;k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t\t\t}//end of lower half\r\n\t\t\t\telse if(i==mid)//middle part\r\n\t\t\t\t{\r\n\t\t\t\t\tif(j==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\"<\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(j==n-1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\">\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(i%2==0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"=\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end\r\n\t\t\t}//end-of-j\r\n\t\t\tSystem.out.println();\r\n\t\t}//end\r\n\r\n\t}", "public double getWidth() {\n return this.size * 2.0; \n }", "private void traverseBayeredPatternHalfSizeRGB(){\n int originalPositionX = 0;\n int originalPositionY = 1;\n\n for (int newX = 0; originalPositionX < originalImageHeight -1; newX++){\n for (int newY = 0; originalPositionY < originalImageWidth -1; newY++){\n Point newPosition = new Point(newX,newY);\n int newAbsoultPosition = getAbsolutPixelPosition(newPosition, originalImageHeight / 2, originalImageWidth / 2);\n halfSizePixRGB[newAbsoultPosition] = getAverageRGB(new Point(originalPositionX,originalPositionY));\n originalPositionY += 2;\n }\n originalPositionY = 0;\n originalPositionX += 2;\n }\n }", "@Override\npublic void processDirection() {\n\t\n}", "void walk() {\n\t\t\n\t}", "void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2)\r\n/* 100: */ {\r\n/* 101: 99 */ int s2 = sides << 1 & 0x2A | sides >> 1 & 0x15;\r\n/* 102: */ \r\n/* 103:101 */ this.context.renderBox(sides, x1, y1, z1, x2, y2, z2);\r\n/* 104:102 */ this.context.renderBox(s2, x2, y2, z2, x1, y1, z1);\r\n/* 105: */ }", "public void SubRect(){\n\t\n}", "public void division() {\n\t\tx=1;\n\t\ty=0;\n\t\tz=x/y;\n\t\t\t\t\n\t}", "public void foundLeaf(int width, int height, int level, int currX, int currY, int location) {\n level = level +2;\n if (location == 1) {\n\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - ( (new Double(spatialHeight / Math.pow(2, level ))).intValue()),\n currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY * 2,\n Color.BLACK);\n\n\n canvas.addLine(((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue())) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n currX,\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n\n }\n\n if (location == 2) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n ( currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n (currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n\n\n }\n\n if (location == 3) {\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY,\n Color.BLACK);\n\n\n\n canvas.addLine((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n\tcurrY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n (currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n }\n\n if (location == 4) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY,\n Color.BLACK);\n\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue() + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), Color.BLACK);\n\n\n }\n\n\n\n\n }", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "public double getWidth() { return _width<0? -_width : _width; }", "public static void sizePathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze five = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\t//System.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = five.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber + n)){\n\t\t\t\t\t\tS.unionBySize(randomNumber+n, randomNumber);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'u');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+1);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(five, n);\n\t\tuserSelection_SolveMaze(n);\n\n\t\tStdDraw.show(0);\n\t\tfive.draw();\n\t\tfive.printCellNumbers();\t\n\t}", "double getPerimeter(){\n return 2*height+width;\n }", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "public Integer getWidth(){return this.width;}", "@Override\n protected void paint2d(Graphics2D g) {\n \n }", "private void createPath(Direction d, int width, Point p1, Point p2) {\n\t\t// Determine how far away from the center the corners are\n\t\tint sideOneOffset = 0;\t// Top or Left depending on path direction\n\t\tint sideTwoOffset = 0;\t// Bot or Right depending on path direction\n\t\t// If the width is odd, balance the offsets\n\t\tif (width % 2 != 0) {\t\n\t\t\tsideOneOffset = sideTwoOffset = ((width / 2) + 1);\n\t\t} else {\n\t\t\t// If the width is even, the offsets will be off by 1\n\t\t\tsideOneOffset = width;\n\t\t\tsideTwoOffset = width - 1;\n\t\t}\n\t\tif (d == Direction.LEFT || d == Direction.RIGHT) {\n\t\t\t// If the direction is left then we want to swap the points\n\t\t\t// to pretend like the direction was right (so the following code works)\n\t\t\tif (d == Direction.LEFT) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p1.x, p1.y + sideTwoOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p2.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x, p1.y + sideTwoOffset)));\n\t\t\t// Set the left and right walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.y is the center of the path (top to bottom)\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x, p1.y + (i - width/2))));\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p2.x, p2.y + (i - width/2))));\n\t\t\t}\n\t\t\t// Set middle path and top/bottom padding (horizontal Oreo!)\n\t\t\tfor (int col = p1.x + 1, endCol = p2.x; col < endCol; col++) {\n\t\t\t\t// Add the top wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(col, p1.y - sideOneOffset)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(col, p1.y + (i - width /2))));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the bottom wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(col, p1.y + sideTwoOffset)));\n\t\t\t}\n\t\t} else {\n\t\t\t// If the direction is up then we want to swap the points\n\t\t\t// to pretend like the direction was down (so the following code works)\n\t\t\tif (d == Direction.UP) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x - sideOneOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p2.x - sideOneOffset, p2.y)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p1.x + sideTwoOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x + sideTwoOffset, p2.y)));\n\t\t\t// Set the top and bottom walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.x is the center of the path (left to right)\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(p1.x + (i - width /2), p1.y)));\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(p2.x + (i - width /2), p2.y)));\n\t\t\t}\n\t\t\t// Set middle path and left/right padding (vertical Oreo!)\n\t\t\tfor (int row = p1.y + 1, endRow = p2.y; row < endRow; row++) {\n\t\t\t\t// Add the left wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x - sideOneOffset, row)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(p1.x + (i - width /2), row)));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the right wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p1.x + sideTwoOffset, row)));\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public void draw4x4 (char design){\n System.out.println(\"\"+design+design+design+design);\n System.out.println(design+\" \"+design);\n System.out.println(design+\" \"+design);\n System.out.println(\"\"+design+design+design+design);\n}", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "public void renderCenterBlock(int cons, int side, int end)\r\n/* 143: */ {\r\n/* 144:135 */ if (cons == 0)\r\n/* 145: */ {\r\n/* 146:136 */ this.context.setTex(end);\r\n/* 147:137 */ doubleBox(63, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 148:138 */ return;\r\n/* 149: */ }\r\n/* 150:139 */ if (cons == 3)\r\n/* 151: */ {\r\n/* 152:140 */ this.context.setTexFlags(1773);\r\n/* 153:141 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 154:142 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 155:143 */ return;\r\n/* 156: */ }\r\n/* 157:144 */ if (cons == 12)\r\n/* 158: */ {\r\n/* 159:145 */ this.context.setTexFlags(184365);\r\n/* 160:146 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 161:147 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 1.0F);\r\n/* 162:148 */ return;\r\n/* 163: */ }\r\n/* 164:149 */ if (cons == 48)\r\n/* 165: */ {\r\n/* 166:150 */ this.context.setTexFlags(187200);\r\n/* 167:151 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 168:152 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 169:153 */ return;\r\n/* 170: */ }\r\n/* 171:155 */ this.context.setTex(end);\r\n/* 172:156 */ doubleBox(0x3F ^ cons, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 173:157 */ if ((cons & 0x1) > 0)\r\n/* 174: */ {\r\n/* 175:158 */ this.context.setTexFlags(1773);\r\n/* 176:159 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 177:160 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 0.375F, 0.625F);\r\n/* 178: */ }\r\n/* 179:162 */ if ((cons & 0x2) > 0)\r\n/* 180: */ {\r\n/* 181:163 */ this.context.setTexFlags(1773);\r\n/* 182:164 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 183:165 */ doubleBox(60, 0.375F, 0.625F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 184: */ }\r\n/* 185:167 */ if ((cons & 0x4) > 0)\r\n/* 186: */ {\r\n/* 187:168 */ this.context.setTexFlags(184365);\r\n/* 188:169 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 189:170 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 0.375F);\r\n/* 190: */ }\r\n/* 191:172 */ if ((cons & 0x8) > 0)\r\n/* 192: */ {\r\n/* 193:173 */ this.context.setTexFlags(184365);\r\n/* 194:174 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 195:175 */ doubleBox(51, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F, 1.0F);\r\n/* 196: */ }\r\n/* 197:177 */ if ((cons & 0x10) > 0)\r\n/* 198: */ {\r\n/* 199:178 */ this.context.setTexFlags(187200);\r\n/* 200:179 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 201:180 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F);\r\n/* 202: */ }\r\n/* 203:182 */ if ((cons & 0x20) > 0)\r\n/* 204: */ {\r\n/* 205:183 */ this.context.setTexFlags(187200);\r\n/* 206:184 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 207:185 */ doubleBox(15, 0.625F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 208: */ }\r\n/* 209: */ }", "int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}", "public double getPerimiter(){return (2*height +2*width);}", "int fi(int x, int y) {\n\t\treturn (x + 1) + (width + 2) * (y + 1);\n\t}", "void ringBell() {\n\n }", "public static String makeShapeA() {\n\tString result = \"\";\n\t\tfor (int i = 0; i < 8 ; i++) {\n\t\t\tresult+=printHash(i);\n\t\t\t\n\t\t}return result;\n\t\t\t//System.out.println(printHash(i));\n\t\t}", "@Override\r\n public void draw()\r\n {\n\r\n }", "private int leftChild(int index){\n\t\treturn (2*index) +1;\n\t}", "@Override\r\n\tpublic void walk() {\n\r\n\t}", "public double getWidth() {\n return this.getRight(this.tree.getRight(0)) - this.getLeft(this.tree.getLeft(0)); \n }", "void block(Directions dir);", "public void lowerFlatbed(){\n flatbed.lowerFlatbed();\n }", "private void render() {\n StringBuilder builder = new StringBuilder();\n builder.append(horizontalEdge).append(\"\\n\");\n for (int i = 0; i < this.height; i++) {\n builder.append(VERTICAL_CHAR);\n for (int j = 0; j < this.width; j++) {\n builder.append(pixels[i][j]);\n }\n builder.append(VERTICAL_CHAR);\n builder.append(\"\\n\");\n }\n builder.append(horizontalEdge);\n System.out.printf(builder.toString());\n }", "@Override\n\tpublic void draw3() {\n\n\t}", "public static void main(String[] args) {\n\t\tint n=5;\n\t\tfor(int i=n-1;i>=0;i--)\n\t\t{\n\t\t\tfor(int space=0;space<n-1-i;space++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int j=0;j<=i*2;j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\n\t\tSystem.out.println();\n\t}\n\n}", "private int get_right_child(int index){\r\n return 2 * index + 2;\r\n }", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "double seBlesser();", "private void renderPath(Node n)\n {\n\tGraphics g = getGraphics();\n\tboolean painting;\n\tColor nc,lc;\n\n\tpainting = (n.paths_passing==0);\n\twhile (n != null) {\n\t if (painting)\n\t\tn.paths_passing++;\n\t else {\n\t\tn.paths_passing--;\n\t }\n\t \n// \t nc = (n.paths_passing > 0)?hilitcolor:normalcolor;\n// \t lc = (n.paths_passing > 0)?hilitcolor:linecolor;\n\t nc = (n.paths_passing > 0)?n.path_color:normalcolor;\n\t lc = (n.paths_passing > 0)?n.path_color:linecolor;\n\t \n\t if (n.parent == null) {\n\t\tsetRenderColor(g,nc);\n\t\trenderNode(g,n);\n\t\tbreak;\n\t }\n\n\t // Double line width\n\t //setRenderColor(g,(n.paths_passing>0)?hilitcolor:Color.white);\n\t setRenderColor(g,(n.paths_passing>0)?n.path_color:Color.white);\n\t renderLine(g,n.x-1,n.y,n.parent.x-1,n.parent.y);\t\n\n\t setRenderColor(g,lc);\n\t renderLine(g,n.x,n.y,n.parent.x,n.parent.y);\n\n\t setRenderColor(g,nc);\n\t renderNode(g,n);\n\t n = n.parent;\n\t}\n }", "public void skystonePos2() {\n }", "double volume() {\n\treturn width*height*depth;\n}", "private void buildPath() {\r\n int xNext = 1;\r\n int yNext = map.getStartPos() + 1;\r\n CellLayered before = cells[yNext][xNext];\r\n while(true)\r\n {\r\n Byte[] xy = map.getDirection(xNext-1, yNext-1);\r\n xNext = xNext + xy[0];\r\n yNext = yNext + xy[1];\r\n\r\n CellLayered next = cells[yNext][xNext];\r\n\r\n if(xy[0]==-1)\r\n before.setRight(false);\r\n else\r\n before.setRight(true);\r\n before.setPath(true);\r\n if(next==null)\r\n break;\r\n\r\n before.setNextInPath(next);\r\n before = next;\r\n }\r\n }", "void table(){\n fill(0);\n rect(width/2, height/2, 600, 350); // boarder\n fill(100, 0 ,0);\n rect(width/2, height/2, 550, 300); //Felt\n \n \n}", "@Override\n\tpublic void walk() {\n\t\t\n\t}", "public\nstatic\nvoid\nmain(String args[]) \n\n{ \n\nBinaryTree tree = \nnew\nBinaryTree(); \n\ntree.root = \nnew\nNode(\n20\n); \n\ntree.root.left = \nnew\nNode(\n8\n); \n\ntree.root.left.left = \nnew\nNode(\n4\n); \n\ntree.root.left.right = \nnew\nNode(\n12\n); \n\ntree.root.left.right.left = \nnew\nNode(\n10\n); \n\ntree.root.left.right.right = \nnew\nNode(\n14\n); \n\ntree.root.right = \nnew\nNode(\n22\n); \n\ntree.root.right.right = \nnew\nNode(\n25\n); \n\ntree.printBoundary(tree.root); \n\n}", "public wall() { //default constructor makes a 10x10 square extending right and down from the pixel located at 5,5\r\n x = 5;\r\n y = 5;\r\n height = 10;\r\n width = 10;\r\n }", "double getNewWidth();", "public int upright();", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic double perimeter() {\n\t\treturn 2*length*breadth;\r\n\t}", "public void skystonePos3() {\n }", "public void leerPlanesDietas();", "long getWidth();", "public static void body() {\n \tfor(int i = 1; i <= SIZE*SIZE; i++) {\n for(int j = 1; j <= 3*SIZE-(SIZE-1); j++) {\n System.out.print(\" \");\n }\n \n System.out.print(\"|\");\n for(int j = 1; j <= SIZE-2; j++) {\n \tSystem.out.print(\"%\");\n }\n System.out.print(\"||\");\n for(int j = 1; j <= SIZE-2; j++) {\n \tSystem.out.print(\"%\");\n }\n System.out.print(\"|\");\n \n System.out.println();\n }\n }", "public void snare();", "public void strength1(float x, float y){\n noStroke();\n fill(80);\n rect(x+7,y,66,6);\n bezier(x+7,y,x,y+1,x,y+5,x+7,y+6);\n bezier(x+73,y,x+80,y+1,x+80,y+5,x+73,y+6);\n rect(x+7,y+1,13,3);//1st blue ba\n bezier(x+7,y+1,x+1,y+2.5f,x+1,y+3.5f,x+7,y+4);\n}", "public void skystonePos5() {\n }", "void GenerateBoardPath() {\n\t\t\t\n\t\t\tint rows = board.getRowsNum();\n\t\t\tint columns = board.getColsNum();\n\t\t\tint space_number = 1; \n\t\t\t\n\t\t\t\n\t\t\tfor (int i = rows - 1; i >= 0; i--) \n\t\t\t\t//If the row is an odd-number, move L-R\n\t\t\t\tif (i % 2 != 0) {\n\t\t\t\t\tfor (int j = 0; j < columns; j++) \n\t\t\t\t\t\tBoardPathRepository.put(space_number++, board.getTile(i, j));}\n\t\t\t\telse {\n\t\t\t\t\tfor (int j = columns-1; j >=0; j--) \n\t\t\t\t\t\tBoardPathRepository.put(space_number++, board.getTile(i, j));\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t}" ]
[ "0.5472371", "0.5383522", "0.52979374", "0.5293668", "0.5211566", "0.51842105", "0.5161626", "0.51377255", "0.5100369", "0.5067393", "0.5064298", "0.50376177", "0.49875325", "0.49361488", "0.49140826", "0.49058613", "0.49058613", "0.48946288", "0.48945552", "0.48931476", "0.48904693", "0.48880374", "0.48798734", "0.48695773", "0.48647928", "0.48638737", "0.48618442", "0.48618138", "0.48505476", "0.48302734", "0.48278588", "0.48275942", "0.48218134", "0.48208144", "0.48172593", "0.4813516", "0.48124653", "0.4811937", "0.4811937", "0.48115787", "0.4811212", "0.48030958", "0.47998473", "0.4795484", "0.47894648", "0.47886366", "0.47878242", "0.47855106", "0.4777816", "0.47706896", "0.47695553", "0.4766223", "0.47616836", "0.4760893", "0.47604054", "0.47590306", "0.47488394", "0.4736708", "0.47364867", "0.47344264", "0.47324577", "0.47303045", "0.47301307", "0.47227973", "0.4722473", "0.4719981", "0.47176844", "0.47143498", "0.4712692", "0.47071925", "0.47001678", "0.46935824", "0.46934032", "0.46931094", "0.46875677", "0.46873635", "0.4686461", "0.46827722", "0.46827722", "0.46827522", "0.46788132", "0.46628743", "0.46617907", "0.46604863", "0.4657533", "0.46526098", "0.46518275", "0.46497184", "0.46489906", "0.46484554", "0.46466392", "0.46466392", "0.46454313", "0.46434125", "0.46428928", "0.46424708", "0.4639808", "0.46373105", "0.46368903", "0.46341428", "0.46330282" ]
0.0
-1
/ / / / / /
public boolean isArray(Class paramClass) { /* 140 */ boolean bool = false; /* */ /* 142 */ if (paramClass == null) { /* 143 */ throw new IllegalArgumentException(); /* */ } /* */ /* 146 */ if (paramClass.isArray()) { /* 147 */ Class<?> clazz = paramClass.getComponentType(); /* */ /* */ /* */ /* 151 */ bool = (isPrimitive(clazz) || isRemoteInterface(clazz) || isEntity(clazz) || isException(clazz) || isValue(clazz) || isObjectReference(clazz)) ? true : false; /* */ } /* */ /* 154 */ return bool; /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void divide() {\n\t\t\n\t}", "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "public abstract void bepaalGrootte();", "public static void bottomHalf() {\n\n for(int i = 1; i <= SIZE; i++) {\n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\" \");\n }\n \n\t System.out.print(\"\\\\_\");\n\t for(int j = 3*SIZE-i; j >= i; j--) {\n\t System.out.print(\"/\\\\\");\n\t }\n\t System.out.println(\"_/\");\n }\n }", "private int rightChild(int i){return 2*i+2;}", "public void gored() {\n\t\t\n\t}", "double passer();", "public abstract String division();", "public String ring();", "laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }", "public String toString(){ return \"DIV\";}", "private void pointer(Graphics image,int x,int y,int height,int b,int dir) {\n\n\t\tint[] xt=new int[3];\n\t\tint[] yt=new int[3];\n\n\t\tif(dir==0) {\n\t\t\txt[0]=x;\n\t\t\txt[1]=xt[2]=x+height;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=y+b/2;\n\t\t\tyt[2]=y-b/2;\n\t\t} else {\n\t\t\txt[0]=x;\n\t\t\txt[1]=x+b/2;\n\t\t\txt[2]=x-b/2;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=yt[2]=y-height;\n\t\t}\n\t\timage.fillPolygon(xt,yt,3);\n\t}", "public static void main(String[] args) {\n\n\n for(int a=0; a<7;a++){\n for(int b=0;b<7-a;b++){\n System.out.print(\" \");\n }\n for(int c=0; c<=a;c++){\n System.out.print(\"* \");\n }\n System.out.println(\" \");\n }\n\n }", "void sharpen();", "void sharpen();", "public double getWidth() {\n return this.left.getLeft(0) - this.right.getRight(0); \n }", "static void pyramid(){\n\t}", "int getWidth() {return width;}", "Operations operations();", "private static void breadcrumbArrow(int width, int height, int indent, int c1, int c2) {\n\n\t\tdouble x0 = 0, y0 = height / 2d;\n\t\tdouble x1 = indent, y1 = 0;\n\t\tdouble x2 = indent, y2 = height / 2d;\n\t\tdouble x3 = indent, y3 = height;\n\t\tdouble x4 = width, y4 = 0;\n\t\tdouble x5 = width, y5 = height / 2d;\n\t\tdouble x6 = width, y6 = height;\n\t\tdouble x7 = indent + width, y7 = 0;\n\t\tdouble x8 = indent + width, y8 = height;\n\n\t\tint fc1 = ColorHelper.mixAlphaColors(c1, c2, 0);\n\t\tint fc2 = ColorHelper.mixAlphaColors(c1, c2, (indent)/(width + 2f * indent));\n\t\tint fc3 = ColorHelper.mixAlphaColors(c1, c2, (indent + width)/(width + 2f * indent));\n\t\tint fc4 = ColorHelper.mixAlphaColors(c1, c2, 1);\n\n\t\tRenderSystem.disableTexture();\n\t\tRenderSystem.enableBlend();\n\t\tRenderSystem.disableAlphaTest();\n\t\tRenderSystem.defaultBlendFunc();\n\t\tRenderSystem.shadeModel(GL11.GL_SMOOTH);\n\n\t\tTessellator tessellator = Tessellator.getInstance();\n\t\tBufferBuilder bufferbuilder = tessellator.getBuffer();\n\t\tbufferbuilder.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR);\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x7, y7, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x8, y8, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\ttessellator.draw();\n\t\tRenderSystem.shadeModel(GL11.GL_FLAT);\n\t\tRenderSystem.disableBlend();\n\t\tRenderSystem.enableAlphaTest();\n\t\tRenderSystem.enableTexture();\n\t}", "double volume(){\n return width*height*depth;\n }", "@Override\n public void bfs() {\n\n }", "void mo33732Px();", "private static Object[] newPath(int length, Object[] leaf) {\n Object[] node = leaf;\n for (int i = 0; i < length; i += 5) {\n node = new Object[] { node };\n }\n return node;\n }", "public static void slashes() {\n\t\tSystem.out.println(\"//////////////////////\");\r\n\r\n\t}", "public void stg() {\n\n\t}", "public void skystonePos4() {\n }", "public int generateRoshambo(){\n ;]\n\n }", "public void draw(){\n for(int i = 1; i <= height; i++){\n for(int s = 1; s <= i; s++)\n System.out.print(\"*\");\n System.out.println();\n }\n }", "public void getTile_B8();", "int width();", "public static void main(String[] args) {\n\t\tfor(int j=0;j<8;j++){\n\t\t\tfor(int i=0;i<8;i++){\n\t\t\t\t//上下两侧\n\t\t\t\tif(j==0||j==7){\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}else{\n\t\t\t\t\t//中间\n\t\t\t\t\tif(i>0&&i<7){\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public static void unionPathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze two = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\tSystem.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = two.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber+n) != S.findAndCompress(randomNumber)){\n\t\t\t\t\t\tS.union(randomNumber+n, randomNumber);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'u');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.union(randomNumber, randomNumber+1);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(two, n);\n\t\tuserSelection_SolveMaze(n);\n\n\n\t\tStdDraw.show(0);\n\t\ttwo.draw();\n\t\ttwo.printCellNumbers();\n\t}", "public static void part2(){\n\t\n System.out.println(\"\\\\\"); //Outer wall\n System.out.println(\"\\\\\");\n System.out.println(\"\\\\\");\n for(int i = 0; i <= 16; i++){ //loop created to display top of the door\n\n \tSystem.out.print(\"-\");\n\n\t}\n System.out.println(\"\");\n System.out.println(\"\\\\\\t\\t| \\t(\\\")\"); //The door and the stick figure\n System.out.println(\"\\\\\\t\\t|\\t-|-\");\n System.out.println(\"\\\\\\t o | \\t |\");\n System.out.println(\"\\\\\\t\\t|\\t /\\\\\");\n System.out.println(\"\\\\\\t\\t|\\t/ \\\\\");\n\t\t\n }", "private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}", "Parallelogram(){\n length = width = height = 0;\n }", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "public static void main(String[] args) {\n\t\tScanner obj=new Scanner(System.in);\r\n\t\tint a=0;\r\n\t\tint count=0;\r\n System.out.println(\"enter size\");\r\n\t\ta=obj.nextInt();\r\n\t\tint m=2*a+1;\r\n\t\tint n=2*a+2;\r\n\t\tint mid=(m+1)/2;\r\n\t\tfor(int i=1;i<=m;i++)\r\n\t\t{\r\n\t\t\tcount=0;\r\n\t\t\tfor(int j=1;j<=n;j++)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tif((i==1)||(i==m)||(j==1)||(j==n))//frame begin\r\n\t\t\t\t{\r\n\t\t\t\t\tif((i==1)||(i==m))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"+\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t {\r\n\t\t\t\t\t\t\tSystem.out.print(\"|\");//frame left and right\r\n\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//frame end\r\n\t\t\t\telse if (i<mid)//upper-half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t for(int l=1;l<=2*i-4;l++)\r\n\t\t\t\t {\r\n\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\tSystem.out.print(\"\\\\\");\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end of upper half\r\n\t\t\t\telse if(i>mid)//lower half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tfor(int k=mid;k<i;k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t System.out.print(\"\\\\\");\r\n\t\t\t\t\t for(int l=2*m-6;l>2*i-4;l--)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t else\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t }\r\n\t\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t\t for(int k=mid;k<i;k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t\t\t}//end of lower half\r\n\t\t\t\telse if(i==mid)//middle part\r\n\t\t\t\t{\r\n\t\t\t\t\tif(j==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\"<\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(j==n-1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\">\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(i%2==0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"=\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end\r\n\t\t\t}//end-of-j\r\n\t\t\tSystem.out.println();\r\n\t\t}//end\r\n\r\n\t}", "public double getWidth() {\n return this.size * 2.0; \n }", "private void traverseBayeredPatternHalfSizeRGB(){\n int originalPositionX = 0;\n int originalPositionY = 1;\n\n for (int newX = 0; originalPositionX < originalImageHeight -1; newX++){\n for (int newY = 0; originalPositionY < originalImageWidth -1; newY++){\n Point newPosition = new Point(newX,newY);\n int newAbsoultPosition = getAbsolutPixelPosition(newPosition, originalImageHeight / 2, originalImageWidth / 2);\n halfSizePixRGB[newAbsoultPosition] = getAverageRGB(new Point(originalPositionX,originalPositionY));\n originalPositionY += 2;\n }\n originalPositionY = 0;\n originalPositionX += 2;\n }\n }", "@Override\npublic void processDirection() {\n\t\n}", "void walk() {\n\t\t\n\t}", "void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2)\r\n/* 100: */ {\r\n/* 101: 99 */ int s2 = sides << 1 & 0x2A | sides >> 1 & 0x15;\r\n/* 102: */ \r\n/* 103:101 */ this.context.renderBox(sides, x1, y1, z1, x2, y2, z2);\r\n/* 104:102 */ this.context.renderBox(s2, x2, y2, z2, x1, y1, z1);\r\n/* 105: */ }", "public void SubRect(){\n\t\n}", "public void division() {\n\t\tx=1;\n\t\ty=0;\n\t\tz=x/y;\n\t\t\t\t\n\t}", "public void foundLeaf(int width, int height, int level, int currX, int currY, int location) {\n level = level +2;\n if (location == 1) {\n\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - ( (new Double(spatialHeight / Math.pow(2, level ))).intValue()),\n currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY * 2,\n Color.BLACK);\n\n\n canvas.addLine(((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue())) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n currX,\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n\n }\n\n if (location == 2) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n ( currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n (currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n\n\n }\n\n if (location == 3) {\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY,\n Color.BLACK);\n\n\n\n canvas.addLine((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n\tcurrY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n (currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n }\n\n if (location == 4) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY,\n Color.BLACK);\n\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue() + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), Color.BLACK);\n\n\n }\n\n\n\n\n }", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "public double getWidth() { return _width<0? -_width : _width; }", "public static void sizePathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze five = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\t//System.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = five.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber + n)){\n\t\t\t\t\t\tS.unionBySize(randomNumber+n, randomNumber);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'u');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+1);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(five, n);\n\t\tuserSelection_SolveMaze(n);\n\n\t\tStdDraw.show(0);\n\t\tfive.draw();\n\t\tfive.printCellNumbers();\t\n\t}", "double getPerimeter(){\n return 2*height+width;\n }", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "public Integer getWidth(){return this.width;}", "@Override\n protected void paint2d(Graphics2D g) {\n \n }", "private void createPath(Direction d, int width, Point p1, Point p2) {\n\t\t// Determine how far away from the center the corners are\n\t\tint sideOneOffset = 0;\t// Top or Left depending on path direction\n\t\tint sideTwoOffset = 0;\t// Bot or Right depending on path direction\n\t\t// If the width is odd, balance the offsets\n\t\tif (width % 2 != 0) {\t\n\t\t\tsideOneOffset = sideTwoOffset = ((width / 2) + 1);\n\t\t} else {\n\t\t\t// If the width is even, the offsets will be off by 1\n\t\t\tsideOneOffset = width;\n\t\t\tsideTwoOffset = width - 1;\n\t\t}\n\t\tif (d == Direction.LEFT || d == Direction.RIGHT) {\n\t\t\t// If the direction is left then we want to swap the points\n\t\t\t// to pretend like the direction was right (so the following code works)\n\t\t\tif (d == Direction.LEFT) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p1.x, p1.y + sideTwoOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p2.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x, p1.y + sideTwoOffset)));\n\t\t\t// Set the left and right walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.y is the center of the path (top to bottom)\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x, p1.y + (i - width/2))));\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p2.x, p2.y + (i - width/2))));\n\t\t\t}\n\t\t\t// Set middle path and top/bottom padding (horizontal Oreo!)\n\t\t\tfor (int col = p1.x + 1, endCol = p2.x; col < endCol; col++) {\n\t\t\t\t// Add the top wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(col, p1.y - sideOneOffset)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(col, p1.y + (i - width /2))));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the bottom wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(col, p1.y + sideTwoOffset)));\n\t\t\t}\n\t\t} else {\n\t\t\t// If the direction is up then we want to swap the points\n\t\t\t// to pretend like the direction was down (so the following code works)\n\t\t\tif (d == Direction.UP) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x - sideOneOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p2.x - sideOneOffset, p2.y)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p1.x + sideTwoOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x + sideTwoOffset, p2.y)));\n\t\t\t// Set the top and bottom walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.x is the center of the path (left to right)\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(p1.x + (i - width /2), p1.y)));\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(p2.x + (i - width /2), p2.y)));\n\t\t\t}\n\t\t\t// Set middle path and left/right padding (vertical Oreo!)\n\t\t\tfor (int row = p1.y + 1, endRow = p2.y; row < endRow; row++) {\n\t\t\t\t// Add the left wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x - sideOneOffset, row)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(p1.x + (i - width /2), row)));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the right wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p1.x + sideTwoOffset, row)));\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public void draw4x4 (char design){\n System.out.println(\"\"+design+design+design+design);\n System.out.println(design+\" \"+design);\n System.out.println(design+\" \"+design);\n System.out.println(\"\"+design+design+design+design);\n}", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "public void renderCenterBlock(int cons, int side, int end)\r\n/* 143: */ {\r\n/* 144:135 */ if (cons == 0)\r\n/* 145: */ {\r\n/* 146:136 */ this.context.setTex(end);\r\n/* 147:137 */ doubleBox(63, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 148:138 */ return;\r\n/* 149: */ }\r\n/* 150:139 */ if (cons == 3)\r\n/* 151: */ {\r\n/* 152:140 */ this.context.setTexFlags(1773);\r\n/* 153:141 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 154:142 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 155:143 */ return;\r\n/* 156: */ }\r\n/* 157:144 */ if (cons == 12)\r\n/* 158: */ {\r\n/* 159:145 */ this.context.setTexFlags(184365);\r\n/* 160:146 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 161:147 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 1.0F);\r\n/* 162:148 */ return;\r\n/* 163: */ }\r\n/* 164:149 */ if (cons == 48)\r\n/* 165: */ {\r\n/* 166:150 */ this.context.setTexFlags(187200);\r\n/* 167:151 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 168:152 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 169:153 */ return;\r\n/* 170: */ }\r\n/* 171:155 */ this.context.setTex(end);\r\n/* 172:156 */ doubleBox(0x3F ^ cons, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 173:157 */ if ((cons & 0x1) > 0)\r\n/* 174: */ {\r\n/* 175:158 */ this.context.setTexFlags(1773);\r\n/* 176:159 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 177:160 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 0.375F, 0.625F);\r\n/* 178: */ }\r\n/* 179:162 */ if ((cons & 0x2) > 0)\r\n/* 180: */ {\r\n/* 181:163 */ this.context.setTexFlags(1773);\r\n/* 182:164 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 183:165 */ doubleBox(60, 0.375F, 0.625F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 184: */ }\r\n/* 185:167 */ if ((cons & 0x4) > 0)\r\n/* 186: */ {\r\n/* 187:168 */ this.context.setTexFlags(184365);\r\n/* 188:169 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 189:170 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 0.375F);\r\n/* 190: */ }\r\n/* 191:172 */ if ((cons & 0x8) > 0)\r\n/* 192: */ {\r\n/* 193:173 */ this.context.setTexFlags(184365);\r\n/* 194:174 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 195:175 */ doubleBox(51, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F, 1.0F);\r\n/* 196: */ }\r\n/* 197:177 */ if ((cons & 0x10) > 0)\r\n/* 198: */ {\r\n/* 199:178 */ this.context.setTexFlags(187200);\r\n/* 200:179 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 201:180 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F);\r\n/* 202: */ }\r\n/* 203:182 */ if ((cons & 0x20) > 0)\r\n/* 204: */ {\r\n/* 205:183 */ this.context.setTexFlags(187200);\r\n/* 206:184 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 207:185 */ doubleBox(15, 0.625F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 208: */ }\r\n/* 209: */ }", "int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}", "public double getPerimiter(){return (2*height +2*width);}", "int fi(int x, int y) {\n\t\treturn (x + 1) + (width + 2) * (y + 1);\n\t}", "void ringBell() {\n\n }", "public static String makeShapeA() {\n\tString result = \"\";\n\t\tfor (int i = 0; i < 8 ; i++) {\n\t\t\tresult+=printHash(i);\n\t\t\t\n\t\t}return result;\n\t\t\t//System.out.println(printHash(i));\n\t\t}", "@Override\r\n public void draw()\r\n {\n\r\n }", "private int leftChild(int index){\n\t\treturn (2*index) +1;\n\t}", "@Override\r\n\tpublic void walk() {\n\r\n\t}", "public double getWidth() {\n return this.getRight(this.tree.getRight(0)) - this.getLeft(this.tree.getLeft(0)); \n }", "void block(Directions dir);", "public void lowerFlatbed(){\n flatbed.lowerFlatbed();\n }", "private void render() {\n StringBuilder builder = new StringBuilder();\n builder.append(horizontalEdge).append(\"\\n\");\n for (int i = 0; i < this.height; i++) {\n builder.append(VERTICAL_CHAR);\n for (int j = 0; j < this.width; j++) {\n builder.append(pixels[i][j]);\n }\n builder.append(VERTICAL_CHAR);\n builder.append(\"\\n\");\n }\n builder.append(horizontalEdge);\n System.out.printf(builder.toString());\n }", "@Override\n\tpublic void draw3() {\n\n\t}", "public static void main(String[] args) {\n\t\tint n=5;\n\t\tfor(int i=n-1;i>=0;i--)\n\t\t{\n\t\t\tfor(int space=0;space<n-1-i;space++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int j=0;j<=i*2;j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\n\t\tSystem.out.println();\n\t}\n\n}", "private int get_right_child(int index){\r\n return 2 * index + 2;\r\n }", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "double seBlesser();", "private void renderPath(Node n)\n {\n\tGraphics g = getGraphics();\n\tboolean painting;\n\tColor nc,lc;\n\n\tpainting = (n.paths_passing==0);\n\twhile (n != null) {\n\t if (painting)\n\t\tn.paths_passing++;\n\t else {\n\t\tn.paths_passing--;\n\t }\n\t \n// \t nc = (n.paths_passing > 0)?hilitcolor:normalcolor;\n// \t lc = (n.paths_passing > 0)?hilitcolor:linecolor;\n\t nc = (n.paths_passing > 0)?n.path_color:normalcolor;\n\t lc = (n.paths_passing > 0)?n.path_color:linecolor;\n\t \n\t if (n.parent == null) {\n\t\tsetRenderColor(g,nc);\n\t\trenderNode(g,n);\n\t\tbreak;\n\t }\n\n\t // Double line width\n\t //setRenderColor(g,(n.paths_passing>0)?hilitcolor:Color.white);\n\t setRenderColor(g,(n.paths_passing>0)?n.path_color:Color.white);\n\t renderLine(g,n.x-1,n.y,n.parent.x-1,n.parent.y);\t\n\n\t setRenderColor(g,lc);\n\t renderLine(g,n.x,n.y,n.parent.x,n.parent.y);\n\n\t setRenderColor(g,nc);\n\t renderNode(g,n);\n\t n = n.parent;\n\t}\n }", "public void skystonePos2() {\n }", "double volume() {\n\treturn width*height*depth;\n}", "private void buildPath() {\r\n int xNext = 1;\r\n int yNext = map.getStartPos() + 1;\r\n CellLayered before = cells[yNext][xNext];\r\n while(true)\r\n {\r\n Byte[] xy = map.getDirection(xNext-1, yNext-1);\r\n xNext = xNext + xy[0];\r\n yNext = yNext + xy[1];\r\n\r\n CellLayered next = cells[yNext][xNext];\r\n\r\n if(xy[0]==-1)\r\n before.setRight(false);\r\n else\r\n before.setRight(true);\r\n before.setPath(true);\r\n if(next==null)\r\n break;\r\n\r\n before.setNextInPath(next);\r\n before = next;\r\n }\r\n }", "void table(){\n fill(0);\n rect(width/2, height/2, 600, 350); // boarder\n fill(100, 0 ,0);\n rect(width/2, height/2, 550, 300); //Felt\n \n \n}", "@Override\n\tpublic void walk() {\n\t\t\n\t}", "public\nstatic\nvoid\nmain(String args[]) \n\n{ \n\nBinaryTree tree = \nnew\nBinaryTree(); \n\ntree.root = \nnew\nNode(\n20\n); \n\ntree.root.left = \nnew\nNode(\n8\n); \n\ntree.root.left.left = \nnew\nNode(\n4\n); \n\ntree.root.left.right = \nnew\nNode(\n12\n); \n\ntree.root.left.right.left = \nnew\nNode(\n10\n); \n\ntree.root.left.right.right = \nnew\nNode(\n14\n); \n\ntree.root.right = \nnew\nNode(\n22\n); \n\ntree.root.right.right = \nnew\nNode(\n25\n); \n\ntree.printBoundary(tree.root); \n\n}", "public wall() { //default constructor makes a 10x10 square extending right and down from the pixel located at 5,5\r\n x = 5;\r\n y = 5;\r\n height = 10;\r\n width = 10;\r\n }", "double getNewWidth();", "public int upright();", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic double perimeter() {\n\t\treturn 2*length*breadth;\r\n\t}", "public void skystonePos3() {\n }", "public void leerPlanesDietas();", "long getWidth();", "public static void body() {\n \tfor(int i = 1; i <= SIZE*SIZE; i++) {\n for(int j = 1; j <= 3*SIZE-(SIZE-1); j++) {\n System.out.print(\" \");\n }\n \n System.out.print(\"|\");\n for(int j = 1; j <= SIZE-2; j++) {\n \tSystem.out.print(\"%\");\n }\n System.out.print(\"||\");\n for(int j = 1; j <= SIZE-2; j++) {\n \tSystem.out.print(\"%\");\n }\n System.out.print(\"|\");\n \n System.out.println();\n }\n }", "public void snare();", "public void strength1(float x, float y){\n noStroke();\n fill(80);\n rect(x+7,y,66,6);\n bezier(x+7,y,x,y+1,x,y+5,x+7,y+6);\n bezier(x+73,y,x+80,y+1,x+80,y+5,x+73,y+6);\n rect(x+7,y+1,13,3);//1st blue ba\n bezier(x+7,y+1,x+1,y+2.5f,x+1,y+3.5f,x+7,y+4);\n}", "public void skystonePos5() {\n }", "void GenerateBoardPath() {\n\t\t\t\n\t\t\tint rows = board.getRowsNum();\n\t\t\tint columns = board.getColsNum();\n\t\t\tint space_number = 1; \n\t\t\t\n\t\t\t\n\t\t\tfor (int i = rows - 1; i >= 0; i--) \n\t\t\t\t//If the row is an odd-number, move L-R\n\t\t\t\tif (i % 2 != 0) {\n\t\t\t\t\tfor (int j = 0; j < columns; j++) \n\t\t\t\t\t\tBoardPathRepository.put(space_number++, board.getTile(i, j));}\n\t\t\t\telse {\n\t\t\t\t\tfor (int j = columns-1; j >=0; j--) \n\t\t\t\t\t\tBoardPathRepository.put(space_number++, board.getTile(i, j));\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t}" ]
[ "0.5472371", "0.5383522", "0.52979374", "0.5293668", "0.5211566", "0.51842105", "0.5161626", "0.51377255", "0.5100369", "0.5067393", "0.5064298", "0.50376177", "0.49875325", "0.49361488", "0.49140826", "0.49058613", "0.49058613", "0.48946288", "0.48945552", "0.48931476", "0.48904693", "0.48880374", "0.48798734", "0.48695773", "0.48647928", "0.48638737", "0.48618442", "0.48618138", "0.48505476", "0.48302734", "0.48278588", "0.48275942", "0.48218134", "0.48208144", "0.48172593", "0.4813516", "0.48124653", "0.4811937", "0.4811937", "0.48115787", "0.4811212", "0.48030958", "0.47998473", "0.4795484", "0.47894648", "0.47886366", "0.47878242", "0.47855106", "0.4777816", "0.47706896", "0.47695553", "0.4766223", "0.47616836", "0.4760893", "0.47604054", "0.47590306", "0.47488394", "0.4736708", "0.47364867", "0.47344264", "0.47324577", "0.47303045", "0.47301307", "0.47227973", "0.4722473", "0.4719981", "0.47176844", "0.47143498", "0.4712692", "0.47071925", "0.47001678", "0.46935824", "0.46934032", "0.46931094", "0.46875677", "0.46873635", "0.4686461", "0.46827722", "0.46827722", "0.46827522", "0.46788132", "0.46628743", "0.46617907", "0.46604863", "0.4657533", "0.46526098", "0.46518275", "0.46497184", "0.46489906", "0.46484554", "0.46466392", "0.46466392", "0.46454313", "0.46434125", "0.46428928", "0.46424708", "0.4639808", "0.46373105", "0.46368903", "0.46341428", "0.46330282" ]
0.0
-1
/ / / / / /
public boolean isException(Class paramClass) { /* 162 */ if (paramClass == null) { /* 163 */ throw new IllegalArgumentException(); /* */ } /* */ /* */ /* */ /* 168 */ return (isCheckedException(paramClass) && !isRemoteException(paramClass) && isValue(paramClass)); /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void divide() {\n\t\t\n\t}", "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "public abstract void bepaalGrootte();", "public static void bottomHalf() {\n\n for(int i = 1; i <= SIZE; i++) {\n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\" \");\n }\n \n\t System.out.print(\"\\\\_\");\n\t for(int j = 3*SIZE-i; j >= i; j--) {\n\t System.out.print(\"/\\\\\");\n\t }\n\t System.out.println(\"_/\");\n }\n }", "private int rightChild(int i){return 2*i+2;}", "public void gored() {\n\t\t\n\t}", "double passer();", "public abstract String division();", "public String ring();", "laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }", "public String toString(){ return \"DIV\";}", "private void pointer(Graphics image,int x,int y,int height,int b,int dir) {\n\n\t\tint[] xt=new int[3];\n\t\tint[] yt=new int[3];\n\n\t\tif(dir==0) {\n\t\t\txt[0]=x;\n\t\t\txt[1]=xt[2]=x+height;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=y+b/2;\n\t\t\tyt[2]=y-b/2;\n\t\t} else {\n\t\t\txt[0]=x;\n\t\t\txt[1]=x+b/2;\n\t\t\txt[2]=x-b/2;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=yt[2]=y-height;\n\t\t}\n\t\timage.fillPolygon(xt,yt,3);\n\t}", "public static void main(String[] args) {\n\n\n for(int a=0; a<7;a++){\n for(int b=0;b<7-a;b++){\n System.out.print(\" \");\n }\n for(int c=0; c<=a;c++){\n System.out.print(\"* \");\n }\n System.out.println(\" \");\n }\n\n }", "void sharpen();", "void sharpen();", "public double getWidth() {\n return this.left.getLeft(0) - this.right.getRight(0); \n }", "static void pyramid(){\n\t}", "int getWidth() {return width;}", "Operations operations();", "private static void breadcrumbArrow(int width, int height, int indent, int c1, int c2) {\n\n\t\tdouble x0 = 0, y0 = height / 2d;\n\t\tdouble x1 = indent, y1 = 0;\n\t\tdouble x2 = indent, y2 = height / 2d;\n\t\tdouble x3 = indent, y3 = height;\n\t\tdouble x4 = width, y4 = 0;\n\t\tdouble x5 = width, y5 = height / 2d;\n\t\tdouble x6 = width, y6 = height;\n\t\tdouble x7 = indent + width, y7 = 0;\n\t\tdouble x8 = indent + width, y8 = height;\n\n\t\tint fc1 = ColorHelper.mixAlphaColors(c1, c2, 0);\n\t\tint fc2 = ColorHelper.mixAlphaColors(c1, c2, (indent)/(width + 2f * indent));\n\t\tint fc3 = ColorHelper.mixAlphaColors(c1, c2, (indent + width)/(width + 2f * indent));\n\t\tint fc4 = ColorHelper.mixAlphaColors(c1, c2, 1);\n\n\t\tRenderSystem.disableTexture();\n\t\tRenderSystem.enableBlend();\n\t\tRenderSystem.disableAlphaTest();\n\t\tRenderSystem.defaultBlendFunc();\n\t\tRenderSystem.shadeModel(GL11.GL_SMOOTH);\n\n\t\tTessellator tessellator = Tessellator.getInstance();\n\t\tBufferBuilder bufferbuilder = tessellator.getBuffer();\n\t\tbufferbuilder.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR);\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x7, y7, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x8, y8, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\ttessellator.draw();\n\t\tRenderSystem.shadeModel(GL11.GL_FLAT);\n\t\tRenderSystem.disableBlend();\n\t\tRenderSystem.enableAlphaTest();\n\t\tRenderSystem.enableTexture();\n\t}", "double volume(){\n return width*height*depth;\n }", "@Override\n public void bfs() {\n\n }", "void mo33732Px();", "private static Object[] newPath(int length, Object[] leaf) {\n Object[] node = leaf;\n for (int i = 0; i < length; i += 5) {\n node = new Object[] { node };\n }\n return node;\n }", "public static void slashes() {\n\t\tSystem.out.println(\"//////////////////////\");\r\n\r\n\t}", "public void stg() {\n\n\t}", "public void skystonePos4() {\n }", "public int generateRoshambo(){\n ;]\n\n }", "public void draw(){\n for(int i = 1; i <= height; i++){\n for(int s = 1; s <= i; s++)\n System.out.print(\"*\");\n System.out.println();\n }\n }", "public void getTile_B8();", "int width();", "public static void main(String[] args) {\n\t\tfor(int j=0;j<8;j++){\n\t\t\tfor(int i=0;i<8;i++){\n\t\t\t\t//上下两侧\n\t\t\t\tif(j==0||j==7){\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}else{\n\t\t\t\t\t//中间\n\t\t\t\t\tif(i>0&&i<7){\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public static void unionPathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze two = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\tSystem.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = two.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber+n) != S.findAndCompress(randomNumber)){\n\t\t\t\t\t\tS.union(randomNumber+n, randomNumber);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'u');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.union(randomNumber, randomNumber+1);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(two, n);\n\t\tuserSelection_SolveMaze(n);\n\n\n\t\tStdDraw.show(0);\n\t\ttwo.draw();\n\t\ttwo.printCellNumbers();\n\t}", "public static void part2(){\n\t\n System.out.println(\"\\\\\"); //Outer wall\n System.out.println(\"\\\\\");\n System.out.println(\"\\\\\");\n for(int i = 0; i <= 16; i++){ //loop created to display top of the door\n\n \tSystem.out.print(\"-\");\n\n\t}\n System.out.println(\"\");\n System.out.println(\"\\\\\\t\\t| \\t(\\\")\"); //The door and the stick figure\n System.out.println(\"\\\\\\t\\t|\\t-|-\");\n System.out.println(\"\\\\\\t o | \\t |\");\n System.out.println(\"\\\\\\t\\t|\\t /\\\\\");\n System.out.println(\"\\\\\\t\\t|\\t/ \\\\\");\n\t\t\n }", "private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}", "Parallelogram(){\n length = width = height = 0;\n }", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "public static void main(String[] args) {\n\t\tScanner obj=new Scanner(System.in);\r\n\t\tint a=0;\r\n\t\tint count=0;\r\n System.out.println(\"enter size\");\r\n\t\ta=obj.nextInt();\r\n\t\tint m=2*a+1;\r\n\t\tint n=2*a+2;\r\n\t\tint mid=(m+1)/2;\r\n\t\tfor(int i=1;i<=m;i++)\r\n\t\t{\r\n\t\t\tcount=0;\r\n\t\t\tfor(int j=1;j<=n;j++)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tif((i==1)||(i==m)||(j==1)||(j==n))//frame begin\r\n\t\t\t\t{\r\n\t\t\t\t\tif((i==1)||(i==m))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"+\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t {\r\n\t\t\t\t\t\t\tSystem.out.print(\"|\");//frame left and right\r\n\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//frame end\r\n\t\t\t\telse if (i<mid)//upper-half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t for(int l=1;l<=2*i-4;l++)\r\n\t\t\t\t {\r\n\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\tSystem.out.print(\"\\\\\");\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end of upper half\r\n\t\t\t\telse if(i>mid)//lower half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tfor(int k=mid;k<i;k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t System.out.print(\"\\\\\");\r\n\t\t\t\t\t for(int l=2*m-6;l>2*i-4;l--)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t else\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t }\r\n\t\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t\t for(int k=mid;k<i;k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t\t\t}//end of lower half\r\n\t\t\t\telse if(i==mid)//middle part\r\n\t\t\t\t{\r\n\t\t\t\t\tif(j==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\"<\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(j==n-1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\">\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(i%2==0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"=\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end\r\n\t\t\t}//end-of-j\r\n\t\t\tSystem.out.println();\r\n\t\t}//end\r\n\r\n\t}", "public double getWidth() {\n return this.size * 2.0; \n }", "private void traverseBayeredPatternHalfSizeRGB(){\n int originalPositionX = 0;\n int originalPositionY = 1;\n\n for (int newX = 0; originalPositionX < originalImageHeight -1; newX++){\n for (int newY = 0; originalPositionY < originalImageWidth -1; newY++){\n Point newPosition = new Point(newX,newY);\n int newAbsoultPosition = getAbsolutPixelPosition(newPosition, originalImageHeight / 2, originalImageWidth / 2);\n halfSizePixRGB[newAbsoultPosition] = getAverageRGB(new Point(originalPositionX,originalPositionY));\n originalPositionY += 2;\n }\n originalPositionY = 0;\n originalPositionX += 2;\n }\n }", "@Override\npublic void processDirection() {\n\t\n}", "void walk() {\n\t\t\n\t}", "void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2)\r\n/* 100: */ {\r\n/* 101: 99 */ int s2 = sides << 1 & 0x2A | sides >> 1 & 0x15;\r\n/* 102: */ \r\n/* 103:101 */ this.context.renderBox(sides, x1, y1, z1, x2, y2, z2);\r\n/* 104:102 */ this.context.renderBox(s2, x2, y2, z2, x1, y1, z1);\r\n/* 105: */ }", "public void SubRect(){\n\t\n}", "public void division() {\n\t\tx=1;\n\t\ty=0;\n\t\tz=x/y;\n\t\t\t\t\n\t}", "public void foundLeaf(int width, int height, int level, int currX, int currY, int location) {\n level = level +2;\n if (location == 1) {\n\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - ( (new Double(spatialHeight / Math.pow(2, level ))).intValue()),\n currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY * 2,\n Color.BLACK);\n\n\n canvas.addLine(((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue())) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n currX,\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n\n }\n\n if (location == 2) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n ( currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n (currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n\n\n }\n\n if (location == 3) {\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY,\n Color.BLACK);\n\n\n\n canvas.addLine((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n\tcurrY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n (currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n }\n\n if (location == 4) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY,\n Color.BLACK);\n\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue() + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), Color.BLACK);\n\n\n }\n\n\n\n\n }", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "public double getWidth() { return _width<0? -_width : _width; }", "public static void sizePathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze five = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\t//System.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = five.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber + n)){\n\t\t\t\t\t\tS.unionBySize(randomNumber+n, randomNumber);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'u');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+1);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(five, n);\n\t\tuserSelection_SolveMaze(n);\n\n\t\tStdDraw.show(0);\n\t\tfive.draw();\n\t\tfive.printCellNumbers();\t\n\t}", "double getPerimeter(){\n return 2*height+width;\n }", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "public Integer getWidth(){return this.width;}", "@Override\n protected void paint2d(Graphics2D g) {\n \n }", "private void createPath(Direction d, int width, Point p1, Point p2) {\n\t\t// Determine how far away from the center the corners are\n\t\tint sideOneOffset = 0;\t// Top or Left depending on path direction\n\t\tint sideTwoOffset = 0;\t// Bot or Right depending on path direction\n\t\t// If the width is odd, balance the offsets\n\t\tif (width % 2 != 0) {\t\n\t\t\tsideOneOffset = sideTwoOffset = ((width / 2) + 1);\n\t\t} else {\n\t\t\t// If the width is even, the offsets will be off by 1\n\t\t\tsideOneOffset = width;\n\t\t\tsideTwoOffset = width - 1;\n\t\t}\n\t\tif (d == Direction.LEFT || d == Direction.RIGHT) {\n\t\t\t// If the direction is left then we want to swap the points\n\t\t\t// to pretend like the direction was right (so the following code works)\n\t\t\tif (d == Direction.LEFT) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p1.x, p1.y + sideTwoOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p2.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x, p1.y + sideTwoOffset)));\n\t\t\t// Set the left and right walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.y is the center of the path (top to bottom)\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x, p1.y + (i - width/2))));\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p2.x, p2.y + (i - width/2))));\n\t\t\t}\n\t\t\t// Set middle path and top/bottom padding (horizontal Oreo!)\n\t\t\tfor (int col = p1.x + 1, endCol = p2.x; col < endCol; col++) {\n\t\t\t\t// Add the top wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(col, p1.y - sideOneOffset)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(col, p1.y + (i - width /2))));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the bottom wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(col, p1.y + sideTwoOffset)));\n\t\t\t}\n\t\t} else {\n\t\t\t// If the direction is up then we want to swap the points\n\t\t\t// to pretend like the direction was down (so the following code works)\n\t\t\tif (d == Direction.UP) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x - sideOneOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p2.x - sideOneOffset, p2.y)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p1.x + sideTwoOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x + sideTwoOffset, p2.y)));\n\t\t\t// Set the top and bottom walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.x is the center of the path (left to right)\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(p1.x + (i - width /2), p1.y)));\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(p2.x + (i - width /2), p2.y)));\n\t\t\t}\n\t\t\t// Set middle path and left/right padding (vertical Oreo!)\n\t\t\tfor (int row = p1.y + 1, endRow = p2.y; row < endRow; row++) {\n\t\t\t\t// Add the left wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x - sideOneOffset, row)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(p1.x + (i - width /2), row)));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the right wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p1.x + sideTwoOffset, row)));\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public void draw4x4 (char design){\n System.out.println(\"\"+design+design+design+design);\n System.out.println(design+\" \"+design);\n System.out.println(design+\" \"+design);\n System.out.println(\"\"+design+design+design+design);\n}", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "public void renderCenterBlock(int cons, int side, int end)\r\n/* 143: */ {\r\n/* 144:135 */ if (cons == 0)\r\n/* 145: */ {\r\n/* 146:136 */ this.context.setTex(end);\r\n/* 147:137 */ doubleBox(63, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 148:138 */ return;\r\n/* 149: */ }\r\n/* 150:139 */ if (cons == 3)\r\n/* 151: */ {\r\n/* 152:140 */ this.context.setTexFlags(1773);\r\n/* 153:141 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 154:142 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 155:143 */ return;\r\n/* 156: */ }\r\n/* 157:144 */ if (cons == 12)\r\n/* 158: */ {\r\n/* 159:145 */ this.context.setTexFlags(184365);\r\n/* 160:146 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 161:147 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 1.0F);\r\n/* 162:148 */ return;\r\n/* 163: */ }\r\n/* 164:149 */ if (cons == 48)\r\n/* 165: */ {\r\n/* 166:150 */ this.context.setTexFlags(187200);\r\n/* 167:151 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 168:152 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 169:153 */ return;\r\n/* 170: */ }\r\n/* 171:155 */ this.context.setTex(end);\r\n/* 172:156 */ doubleBox(0x3F ^ cons, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 173:157 */ if ((cons & 0x1) > 0)\r\n/* 174: */ {\r\n/* 175:158 */ this.context.setTexFlags(1773);\r\n/* 176:159 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 177:160 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 0.375F, 0.625F);\r\n/* 178: */ }\r\n/* 179:162 */ if ((cons & 0x2) > 0)\r\n/* 180: */ {\r\n/* 181:163 */ this.context.setTexFlags(1773);\r\n/* 182:164 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 183:165 */ doubleBox(60, 0.375F, 0.625F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 184: */ }\r\n/* 185:167 */ if ((cons & 0x4) > 0)\r\n/* 186: */ {\r\n/* 187:168 */ this.context.setTexFlags(184365);\r\n/* 188:169 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 189:170 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 0.375F);\r\n/* 190: */ }\r\n/* 191:172 */ if ((cons & 0x8) > 0)\r\n/* 192: */ {\r\n/* 193:173 */ this.context.setTexFlags(184365);\r\n/* 194:174 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 195:175 */ doubleBox(51, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F, 1.0F);\r\n/* 196: */ }\r\n/* 197:177 */ if ((cons & 0x10) > 0)\r\n/* 198: */ {\r\n/* 199:178 */ this.context.setTexFlags(187200);\r\n/* 200:179 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 201:180 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F);\r\n/* 202: */ }\r\n/* 203:182 */ if ((cons & 0x20) > 0)\r\n/* 204: */ {\r\n/* 205:183 */ this.context.setTexFlags(187200);\r\n/* 206:184 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 207:185 */ doubleBox(15, 0.625F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 208: */ }\r\n/* 209: */ }", "int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}", "public double getPerimiter(){return (2*height +2*width);}", "int fi(int x, int y) {\n\t\treturn (x + 1) + (width + 2) * (y + 1);\n\t}", "void ringBell() {\n\n }", "public static String makeShapeA() {\n\tString result = \"\";\n\t\tfor (int i = 0; i < 8 ; i++) {\n\t\t\tresult+=printHash(i);\n\t\t\t\n\t\t}return result;\n\t\t\t//System.out.println(printHash(i));\n\t\t}", "@Override\r\n public void draw()\r\n {\n\r\n }", "private int leftChild(int index){\n\t\treturn (2*index) +1;\n\t}", "@Override\r\n\tpublic void walk() {\n\r\n\t}", "public double getWidth() {\n return this.getRight(this.tree.getRight(0)) - this.getLeft(this.tree.getLeft(0)); \n }", "void block(Directions dir);", "public void lowerFlatbed(){\n flatbed.lowerFlatbed();\n }", "private void render() {\n StringBuilder builder = new StringBuilder();\n builder.append(horizontalEdge).append(\"\\n\");\n for (int i = 0; i < this.height; i++) {\n builder.append(VERTICAL_CHAR);\n for (int j = 0; j < this.width; j++) {\n builder.append(pixels[i][j]);\n }\n builder.append(VERTICAL_CHAR);\n builder.append(\"\\n\");\n }\n builder.append(horizontalEdge);\n System.out.printf(builder.toString());\n }", "@Override\n\tpublic void draw3() {\n\n\t}", "public static void main(String[] args) {\n\t\tint n=5;\n\t\tfor(int i=n-1;i>=0;i--)\n\t\t{\n\t\t\tfor(int space=0;space<n-1-i;space++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int j=0;j<=i*2;j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\n\t\tSystem.out.println();\n\t}\n\n}", "private int get_right_child(int index){\r\n return 2 * index + 2;\r\n }", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "double seBlesser();", "private void renderPath(Node n)\n {\n\tGraphics g = getGraphics();\n\tboolean painting;\n\tColor nc,lc;\n\n\tpainting = (n.paths_passing==0);\n\twhile (n != null) {\n\t if (painting)\n\t\tn.paths_passing++;\n\t else {\n\t\tn.paths_passing--;\n\t }\n\t \n// \t nc = (n.paths_passing > 0)?hilitcolor:normalcolor;\n// \t lc = (n.paths_passing > 0)?hilitcolor:linecolor;\n\t nc = (n.paths_passing > 0)?n.path_color:normalcolor;\n\t lc = (n.paths_passing > 0)?n.path_color:linecolor;\n\t \n\t if (n.parent == null) {\n\t\tsetRenderColor(g,nc);\n\t\trenderNode(g,n);\n\t\tbreak;\n\t }\n\n\t // Double line width\n\t //setRenderColor(g,(n.paths_passing>0)?hilitcolor:Color.white);\n\t setRenderColor(g,(n.paths_passing>0)?n.path_color:Color.white);\n\t renderLine(g,n.x-1,n.y,n.parent.x-1,n.parent.y);\t\n\n\t setRenderColor(g,lc);\n\t renderLine(g,n.x,n.y,n.parent.x,n.parent.y);\n\n\t setRenderColor(g,nc);\n\t renderNode(g,n);\n\t n = n.parent;\n\t}\n }", "public void skystonePos2() {\n }", "double volume() {\n\treturn width*height*depth;\n}", "private void buildPath() {\r\n int xNext = 1;\r\n int yNext = map.getStartPos() + 1;\r\n CellLayered before = cells[yNext][xNext];\r\n while(true)\r\n {\r\n Byte[] xy = map.getDirection(xNext-1, yNext-1);\r\n xNext = xNext + xy[0];\r\n yNext = yNext + xy[1];\r\n\r\n CellLayered next = cells[yNext][xNext];\r\n\r\n if(xy[0]==-1)\r\n before.setRight(false);\r\n else\r\n before.setRight(true);\r\n before.setPath(true);\r\n if(next==null)\r\n break;\r\n\r\n before.setNextInPath(next);\r\n before = next;\r\n }\r\n }", "void table(){\n fill(0);\n rect(width/2, height/2, 600, 350); // boarder\n fill(100, 0 ,0);\n rect(width/2, height/2, 550, 300); //Felt\n \n \n}", "@Override\n\tpublic void walk() {\n\t\t\n\t}", "public\nstatic\nvoid\nmain(String args[]) \n\n{ \n\nBinaryTree tree = \nnew\nBinaryTree(); \n\ntree.root = \nnew\nNode(\n20\n); \n\ntree.root.left = \nnew\nNode(\n8\n); \n\ntree.root.left.left = \nnew\nNode(\n4\n); \n\ntree.root.left.right = \nnew\nNode(\n12\n); \n\ntree.root.left.right.left = \nnew\nNode(\n10\n); \n\ntree.root.left.right.right = \nnew\nNode(\n14\n); \n\ntree.root.right = \nnew\nNode(\n22\n); \n\ntree.root.right.right = \nnew\nNode(\n25\n); \n\ntree.printBoundary(tree.root); \n\n}", "public wall() { //default constructor makes a 10x10 square extending right and down from the pixel located at 5,5\r\n x = 5;\r\n y = 5;\r\n height = 10;\r\n width = 10;\r\n }", "double getNewWidth();", "public int upright();", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic double perimeter() {\n\t\treturn 2*length*breadth;\r\n\t}", "public void skystonePos3() {\n }", "public void leerPlanesDietas();", "long getWidth();", "public static void body() {\n \tfor(int i = 1; i <= SIZE*SIZE; i++) {\n for(int j = 1; j <= 3*SIZE-(SIZE-1); j++) {\n System.out.print(\" \");\n }\n \n System.out.print(\"|\");\n for(int j = 1; j <= SIZE-2; j++) {\n \tSystem.out.print(\"%\");\n }\n System.out.print(\"||\");\n for(int j = 1; j <= SIZE-2; j++) {\n \tSystem.out.print(\"%\");\n }\n System.out.print(\"|\");\n \n System.out.println();\n }\n }", "public void snare();", "public void strength1(float x, float y){\n noStroke();\n fill(80);\n rect(x+7,y,66,6);\n bezier(x+7,y,x,y+1,x,y+5,x+7,y+6);\n bezier(x+73,y,x+80,y+1,x+80,y+5,x+73,y+6);\n rect(x+7,y+1,13,3);//1st blue ba\n bezier(x+7,y+1,x+1,y+2.5f,x+1,y+3.5f,x+7,y+4);\n}", "public void skystonePos5() {\n }", "void GenerateBoardPath() {\n\t\t\t\n\t\t\tint rows = board.getRowsNum();\n\t\t\tint columns = board.getColsNum();\n\t\t\tint space_number = 1; \n\t\t\t\n\t\t\t\n\t\t\tfor (int i = rows - 1; i >= 0; i--) \n\t\t\t\t//If the row is an odd-number, move L-R\n\t\t\t\tif (i % 2 != 0) {\n\t\t\t\t\tfor (int j = 0; j < columns; j++) \n\t\t\t\t\t\tBoardPathRepository.put(space_number++, board.getTile(i, j));}\n\t\t\t\telse {\n\t\t\t\t\tfor (int j = columns-1; j >=0; j--) \n\t\t\t\t\t\tBoardPathRepository.put(space_number++, board.getTile(i, j));\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t}" ]
[ "0.5472371", "0.5383522", "0.52979374", "0.5293668", "0.5211566", "0.51842105", "0.5161626", "0.51377255", "0.5100369", "0.5067393", "0.5064298", "0.50376177", "0.49875325", "0.49361488", "0.49140826", "0.49058613", "0.49058613", "0.48946288", "0.48945552", "0.48931476", "0.48904693", "0.48880374", "0.48798734", "0.48695773", "0.48647928", "0.48638737", "0.48618442", "0.48618138", "0.48505476", "0.48302734", "0.48278588", "0.48275942", "0.48218134", "0.48208144", "0.48172593", "0.4813516", "0.48124653", "0.4811937", "0.4811937", "0.48115787", "0.4811212", "0.48030958", "0.47998473", "0.4795484", "0.47894648", "0.47886366", "0.47878242", "0.47855106", "0.4777816", "0.47706896", "0.47695553", "0.4766223", "0.47616836", "0.4760893", "0.47604054", "0.47590306", "0.47488394", "0.4736708", "0.47364867", "0.47344264", "0.47324577", "0.47303045", "0.47301307", "0.47227973", "0.4722473", "0.4719981", "0.47176844", "0.47143498", "0.4712692", "0.47071925", "0.47001678", "0.46935824", "0.46934032", "0.46931094", "0.46875677", "0.46873635", "0.4686461", "0.46827722", "0.46827722", "0.46827522", "0.46788132", "0.46628743", "0.46617907", "0.46604863", "0.4657533", "0.46526098", "0.46518275", "0.46497184", "0.46489906", "0.46484554", "0.46466392", "0.46466392", "0.46454313", "0.46434125", "0.46428928", "0.46424708", "0.4639808", "0.46373105", "0.46368903", "0.46341428", "0.46330282" ]
0.0
-1
/ / / / / /
public boolean isObjectReference(Class<?> paramClass) { /* 196 */ if (paramClass == null) { /* 197 */ throw new IllegalArgumentException(); /* */ } /* */ /* 200 */ return (paramClass.isInterface() && Object.class /* 201 */ .isAssignableFrom(paramClass)); /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void divide() {\n\t\t\n\t}", "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "public abstract void bepaalGrootte();", "public static void bottomHalf() {\n\n for(int i = 1; i <= SIZE; i++) {\n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\" \");\n }\n \n\t System.out.print(\"\\\\_\");\n\t for(int j = 3*SIZE-i; j >= i; j--) {\n\t System.out.print(\"/\\\\\");\n\t }\n\t System.out.println(\"_/\");\n }\n }", "private int rightChild(int i){return 2*i+2;}", "public void gored() {\n\t\t\n\t}", "double passer();", "public abstract String division();", "public String ring();", "laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }", "public String toString(){ return \"DIV\";}", "private void pointer(Graphics image,int x,int y,int height,int b,int dir) {\n\n\t\tint[] xt=new int[3];\n\t\tint[] yt=new int[3];\n\n\t\tif(dir==0) {\n\t\t\txt[0]=x;\n\t\t\txt[1]=xt[2]=x+height;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=y+b/2;\n\t\t\tyt[2]=y-b/2;\n\t\t} else {\n\t\t\txt[0]=x;\n\t\t\txt[1]=x+b/2;\n\t\t\txt[2]=x-b/2;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=yt[2]=y-height;\n\t\t}\n\t\timage.fillPolygon(xt,yt,3);\n\t}", "public static void main(String[] args) {\n\n\n for(int a=0; a<7;a++){\n for(int b=0;b<7-a;b++){\n System.out.print(\" \");\n }\n for(int c=0; c<=a;c++){\n System.out.print(\"* \");\n }\n System.out.println(\" \");\n }\n\n }", "void sharpen();", "void sharpen();", "public double getWidth() {\n return this.left.getLeft(0) - this.right.getRight(0); \n }", "static void pyramid(){\n\t}", "int getWidth() {return width;}", "Operations operations();", "private static void breadcrumbArrow(int width, int height, int indent, int c1, int c2) {\n\n\t\tdouble x0 = 0, y0 = height / 2d;\n\t\tdouble x1 = indent, y1 = 0;\n\t\tdouble x2 = indent, y2 = height / 2d;\n\t\tdouble x3 = indent, y3 = height;\n\t\tdouble x4 = width, y4 = 0;\n\t\tdouble x5 = width, y5 = height / 2d;\n\t\tdouble x6 = width, y6 = height;\n\t\tdouble x7 = indent + width, y7 = 0;\n\t\tdouble x8 = indent + width, y8 = height;\n\n\t\tint fc1 = ColorHelper.mixAlphaColors(c1, c2, 0);\n\t\tint fc2 = ColorHelper.mixAlphaColors(c1, c2, (indent)/(width + 2f * indent));\n\t\tint fc3 = ColorHelper.mixAlphaColors(c1, c2, (indent + width)/(width + 2f * indent));\n\t\tint fc4 = ColorHelper.mixAlphaColors(c1, c2, 1);\n\n\t\tRenderSystem.disableTexture();\n\t\tRenderSystem.enableBlend();\n\t\tRenderSystem.disableAlphaTest();\n\t\tRenderSystem.defaultBlendFunc();\n\t\tRenderSystem.shadeModel(GL11.GL_SMOOTH);\n\n\t\tTessellator tessellator = Tessellator.getInstance();\n\t\tBufferBuilder bufferbuilder = tessellator.getBuffer();\n\t\tbufferbuilder.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR);\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x7, y7, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x8, y8, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\ttessellator.draw();\n\t\tRenderSystem.shadeModel(GL11.GL_FLAT);\n\t\tRenderSystem.disableBlend();\n\t\tRenderSystem.enableAlphaTest();\n\t\tRenderSystem.enableTexture();\n\t}", "double volume(){\n return width*height*depth;\n }", "@Override\n public void bfs() {\n\n }", "void mo33732Px();", "private static Object[] newPath(int length, Object[] leaf) {\n Object[] node = leaf;\n for (int i = 0; i < length; i += 5) {\n node = new Object[] { node };\n }\n return node;\n }", "public static void slashes() {\n\t\tSystem.out.println(\"//////////////////////\");\r\n\r\n\t}", "public void stg() {\n\n\t}", "public void skystonePos4() {\n }", "public int generateRoshambo(){\n ;]\n\n }", "public void draw(){\n for(int i = 1; i <= height; i++){\n for(int s = 1; s <= i; s++)\n System.out.print(\"*\");\n System.out.println();\n }\n }", "public void getTile_B8();", "int width();", "public static void main(String[] args) {\n\t\tfor(int j=0;j<8;j++){\n\t\t\tfor(int i=0;i<8;i++){\n\t\t\t\t//上下两侧\n\t\t\t\tif(j==0||j==7){\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}else{\n\t\t\t\t\t//中间\n\t\t\t\t\tif(i>0&&i<7){\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public static void unionPathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze two = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\tSystem.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = two.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber+n) != S.findAndCompress(randomNumber)){\n\t\t\t\t\t\tS.union(randomNumber+n, randomNumber);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'u');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.union(randomNumber, randomNumber+1);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(two, n);\n\t\tuserSelection_SolveMaze(n);\n\n\n\t\tStdDraw.show(0);\n\t\ttwo.draw();\n\t\ttwo.printCellNumbers();\n\t}", "public static void part2(){\n\t\n System.out.println(\"\\\\\"); //Outer wall\n System.out.println(\"\\\\\");\n System.out.println(\"\\\\\");\n for(int i = 0; i <= 16; i++){ //loop created to display top of the door\n\n \tSystem.out.print(\"-\");\n\n\t}\n System.out.println(\"\");\n System.out.println(\"\\\\\\t\\t| \\t(\\\")\"); //The door and the stick figure\n System.out.println(\"\\\\\\t\\t|\\t-|-\");\n System.out.println(\"\\\\\\t o | \\t |\");\n System.out.println(\"\\\\\\t\\t|\\t /\\\\\");\n System.out.println(\"\\\\\\t\\t|\\t/ \\\\\");\n\t\t\n }", "private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}", "Parallelogram(){\n length = width = height = 0;\n }", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "public static void main(String[] args) {\n\t\tScanner obj=new Scanner(System.in);\r\n\t\tint a=0;\r\n\t\tint count=0;\r\n System.out.println(\"enter size\");\r\n\t\ta=obj.nextInt();\r\n\t\tint m=2*a+1;\r\n\t\tint n=2*a+2;\r\n\t\tint mid=(m+1)/2;\r\n\t\tfor(int i=1;i<=m;i++)\r\n\t\t{\r\n\t\t\tcount=0;\r\n\t\t\tfor(int j=1;j<=n;j++)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tif((i==1)||(i==m)||(j==1)||(j==n))//frame begin\r\n\t\t\t\t{\r\n\t\t\t\t\tif((i==1)||(i==m))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"+\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t {\r\n\t\t\t\t\t\t\tSystem.out.print(\"|\");//frame left and right\r\n\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//frame end\r\n\t\t\t\telse if (i<mid)//upper-half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t for(int l=1;l<=2*i-4;l++)\r\n\t\t\t\t {\r\n\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\tSystem.out.print(\"\\\\\");\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end of upper half\r\n\t\t\t\telse if(i>mid)//lower half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tfor(int k=mid;k<i;k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t System.out.print(\"\\\\\");\r\n\t\t\t\t\t for(int l=2*m-6;l>2*i-4;l--)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t else\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t }\r\n\t\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t\t for(int k=mid;k<i;k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t\t\t}//end of lower half\r\n\t\t\t\telse if(i==mid)//middle part\r\n\t\t\t\t{\r\n\t\t\t\t\tif(j==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\"<\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(j==n-1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\">\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(i%2==0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"=\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end\r\n\t\t\t}//end-of-j\r\n\t\t\tSystem.out.println();\r\n\t\t}//end\r\n\r\n\t}", "public double getWidth() {\n return this.size * 2.0; \n }", "private void traverseBayeredPatternHalfSizeRGB(){\n int originalPositionX = 0;\n int originalPositionY = 1;\n\n for (int newX = 0; originalPositionX < originalImageHeight -1; newX++){\n for (int newY = 0; originalPositionY < originalImageWidth -1; newY++){\n Point newPosition = new Point(newX,newY);\n int newAbsoultPosition = getAbsolutPixelPosition(newPosition, originalImageHeight / 2, originalImageWidth / 2);\n halfSizePixRGB[newAbsoultPosition] = getAverageRGB(new Point(originalPositionX,originalPositionY));\n originalPositionY += 2;\n }\n originalPositionY = 0;\n originalPositionX += 2;\n }\n }", "@Override\npublic void processDirection() {\n\t\n}", "void walk() {\n\t\t\n\t}", "void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2)\r\n/* 100: */ {\r\n/* 101: 99 */ int s2 = sides << 1 & 0x2A | sides >> 1 & 0x15;\r\n/* 102: */ \r\n/* 103:101 */ this.context.renderBox(sides, x1, y1, z1, x2, y2, z2);\r\n/* 104:102 */ this.context.renderBox(s2, x2, y2, z2, x1, y1, z1);\r\n/* 105: */ }", "public void SubRect(){\n\t\n}", "public void division() {\n\t\tx=1;\n\t\ty=0;\n\t\tz=x/y;\n\t\t\t\t\n\t}", "public void foundLeaf(int width, int height, int level, int currX, int currY, int location) {\n level = level +2;\n if (location == 1) {\n\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - ( (new Double(spatialHeight / Math.pow(2, level ))).intValue()),\n currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY * 2,\n Color.BLACK);\n\n\n canvas.addLine(((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue())) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n currX,\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n\n }\n\n if (location == 2) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n ( currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n (currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n\n\n }\n\n if (location == 3) {\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY,\n Color.BLACK);\n\n\n\n canvas.addLine((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n\tcurrY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n (currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n }\n\n if (location == 4) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY,\n Color.BLACK);\n\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue() + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), Color.BLACK);\n\n\n }\n\n\n\n\n }", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "public double getWidth() { return _width<0? -_width : _width; }", "public static void sizePathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze five = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\t//System.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = five.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber + n)){\n\t\t\t\t\t\tS.unionBySize(randomNumber+n, randomNumber);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'u');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+1);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(five, n);\n\t\tuserSelection_SolveMaze(n);\n\n\t\tStdDraw.show(0);\n\t\tfive.draw();\n\t\tfive.printCellNumbers();\t\n\t}", "double getPerimeter(){\n return 2*height+width;\n }", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "public Integer getWidth(){return this.width;}", "@Override\n protected void paint2d(Graphics2D g) {\n \n }", "private void createPath(Direction d, int width, Point p1, Point p2) {\n\t\t// Determine how far away from the center the corners are\n\t\tint sideOneOffset = 0;\t// Top or Left depending on path direction\n\t\tint sideTwoOffset = 0;\t// Bot or Right depending on path direction\n\t\t// If the width is odd, balance the offsets\n\t\tif (width % 2 != 0) {\t\n\t\t\tsideOneOffset = sideTwoOffset = ((width / 2) + 1);\n\t\t} else {\n\t\t\t// If the width is even, the offsets will be off by 1\n\t\t\tsideOneOffset = width;\n\t\t\tsideTwoOffset = width - 1;\n\t\t}\n\t\tif (d == Direction.LEFT || d == Direction.RIGHT) {\n\t\t\t// If the direction is left then we want to swap the points\n\t\t\t// to pretend like the direction was right (so the following code works)\n\t\t\tif (d == Direction.LEFT) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p1.x, p1.y + sideTwoOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p2.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x, p1.y + sideTwoOffset)));\n\t\t\t// Set the left and right walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.y is the center of the path (top to bottom)\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x, p1.y + (i - width/2))));\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p2.x, p2.y + (i - width/2))));\n\t\t\t}\n\t\t\t// Set middle path and top/bottom padding (horizontal Oreo!)\n\t\t\tfor (int col = p1.x + 1, endCol = p2.x; col < endCol; col++) {\n\t\t\t\t// Add the top wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(col, p1.y - sideOneOffset)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(col, p1.y + (i - width /2))));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the bottom wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(col, p1.y + sideTwoOffset)));\n\t\t\t}\n\t\t} else {\n\t\t\t// If the direction is up then we want to swap the points\n\t\t\t// to pretend like the direction was down (so the following code works)\n\t\t\tif (d == Direction.UP) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x - sideOneOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p2.x - sideOneOffset, p2.y)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p1.x + sideTwoOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x + sideTwoOffset, p2.y)));\n\t\t\t// Set the top and bottom walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.x is the center of the path (left to right)\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(p1.x + (i - width /2), p1.y)));\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(p2.x + (i - width /2), p2.y)));\n\t\t\t}\n\t\t\t// Set middle path and left/right padding (vertical Oreo!)\n\t\t\tfor (int row = p1.y + 1, endRow = p2.y; row < endRow; row++) {\n\t\t\t\t// Add the left wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x - sideOneOffset, row)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(p1.x + (i - width /2), row)));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the right wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p1.x + sideTwoOffset, row)));\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public void draw4x4 (char design){\n System.out.println(\"\"+design+design+design+design);\n System.out.println(design+\" \"+design);\n System.out.println(design+\" \"+design);\n System.out.println(\"\"+design+design+design+design);\n}", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "public void renderCenterBlock(int cons, int side, int end)\r\n/* 143: */ {\r\n/* 144:135 */ if (cons == 0)\r\n/* 145: */ {\r\n/* 146:136 */ this.context.setTex(end);\r\n/* 147:137 */ doubleBox(63, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 148:138 */ return;\r\n/* 149: */ }\r\n/* 150:139 */ if (cons == 3)\r\n/* 151: */ {\r\n/* 152:140 */ this.context.setTexFlags(1773);\r\n/* 153:141 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 154:142 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 155:143 */ return;\r\n/* 156: */ }\r\n/* 157:144 */ if (cons == 12)\r\n/* 158: */ {\r\n/* 159:145 */ this.context.setTexFlags(184365);\r\n/* 160:146 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 161:147 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 1.0F);\r\n/* 162:148 */ return;\r\n/* 163: */ }\r\n/* 164:149 */ if (cons == 48)\r\n/* 165: */ {\r\n/* 166:150 */ this.context.setTexFlags(187200);\r\n/* 167:151 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 168:152 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 169:153 */ return;\r\n/* 170: */ }\r\n/* 171:155 */ this.context.setTex(end);\r\n/* 172:156 */ doubleBox(0x3F ^ cons, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 173:157 */ if ((cons & 0x1) > 0)\r\n/* 174: */ {\r\n/* 175:158 */ this.context.setTexFlags(1773);\r\n/* 176:159 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 177:160 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 0.375F, 0.625F);\r\n/* 178: */ }\r\n/* 179:162 */ if ((cons & 0x2) > 0)\r\n/* 180: */ {\r\n/* 181:163 */ this.context.setTexFlags(1773);\r\n/* 182:164 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 183:165 */ doubleBox(60, 0.375F, 0.625F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 184: */ }\r\n/* 185:167 */ if ((cons & 0x4) > 0)\r\n/* 186: */ {\r\n/* 187:168 */ this.context.setTexFlags(184365);\r\n/* 188:169 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 189:170 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 0.375F);\r\n/* 190: */ }\r\n/* 191:172 */ if ((cons & 0x8) > 0)\r\n/* 192: */ {\r\n/* 193:173 */ this.context.setTexFlags(184365);\r\n/* 194:174 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 195:175 */ doubleBox(51, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F, 1.0F);\r\n/* 196: */ }\r\n/* 197:177 */ if ((cons & 0x10) > 0)\r\n/* 198: */ {\r\n/* 199:178 */ this.context.setTexFlags(187200);\r\n/* 200:179 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 201:180 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F);\r\n/* 202: */ }\r\n/* 203:182 */ if ((cons & 0x20) > 0)\r\n/* 204: */ {\r\n/* 205:183 */ this.context.setTexFlags(187200);\r\n/* 206:184 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 207:185 */ doubleBox(15, 0.625F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 208: */ }\r\n/* 209: */ }", "int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}", "public double getPerimiter(){return (2*height +2*width);}", "int fi(int x, int y) {\n\t\treturn (x + 1) + (width + 2) * (y + 1);\n\t}", "void ringBell() {\n\n }", "public static String makeShapeA() {\n\tString result = \"\";\n\t\tfor (int i = 0; i < 8 ; i++) {\n\t\t\tresult+=printHash(i);\n\t\t\t\n\t\t}return result;\n\t\t\t//System.out.println(printHash(i));\n\t\t}", "@Override\r\n public void draw()\r\n {\n\r\n }", "private int leftChild(int index){\n\t\treturn (2*index) +1;\n\t}", "@Override\r\n\tpublic void walk() {\n\r\n\t}", "public double getWidth() {\n return this.getRight(this.tree.getRight(0)) - this.getLeft(this.tree.getLeft(0)); \n }", "void block(Directions dir);", "public void lowerFlatbed(){\n flatbed.lowerFlatbed();\n }", "private void render() {\n StringBuilder builder = new StringBuilder();\n builder.append(horizontalEdge).append(\"\\n\");\n for (int i = 0; i < this.height; i++) {\n builder.append(VERTICAL_CHAR);\n for (int j = 0; j < this.width; j++) {\n builder.append(pixels[i][j]);\n }\n builder.append(VERTICAL_CHAR);\n builder.append(\"\\n\");\n }\n builder.append(horizontalEdge);\n System.out.printf(builder.toString());\n }", "@Override\n\tpublic void draw3() {\n\n\t}", "public static void main(String[] args) {\n\t\tint n=5;\n\t\tfor(int i=n-1;i>=0;i--)\n\t\t{\n\t\t\tfor(int space=0;space<n-1-i;space++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int j=0;j<=i*2;j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\n\t\tSystem.out.println();\n\t}\n\n}", "private int get_right_child(int index){\r\n return 2 * index + 2;\r\n }", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "double seBlesser();", "private void renderPath(Node n)\n {\n\tGraphics g = getGraphics();\n\tboolean painting;\n\tColor nc,lc;\n\n\tpainting = (n.paths_passing==0);\n\twhile (n != null) {\n\t if (painting)\n\t\tn.paths_passing++;\n\t else {\n\t\tn.paths_passing--;\n\t }\n\t \n// \t nc = (n.paths_passing > 0)?hilitcolor:normalcolor;\n// \t lc = (n.paths_passing > 0)?hilitcolor:linecolor;\n\t nc = (n.paths_passing > 0)?n.path_color:normalcolor;\n\t lc = (n.paths_passing > 0)?n.path_color:linecolor;\n\t \n\t if (n.parent == null) {\n\t\tsetRenderColor(g,nc);\n\t\trenderNode(g,n);\n\t\tbreak;\n\t }\n\n\t // Double line width\n\t //setRenderColor(g,(n.paths_passing>0)?hilitcolor:Color.white);\n\t setRenderColor(g,(n.paths_passing>0)?n.path_color:Color.white);\n\t renderLine(g,n.x-1,n.y,n.parent.x-1,n.parent.y);\t\n\n\t setRenderColor(g,lc);\n\t renderLine(g,n.x,n.y,n.parent.x,n.parent.y);\n\n\t setRenderColor(g,nc);\n\t renderNode(g,n);\n\t n = n.parent;\n\t}\n }", "public void skystonePos2() {\n }", "double volume() {\n\treturn width*height*depth;\n}", "private void buildPath() {\r\n int xNext = 1;\r\n int yNext = map.getStartPos() + 1;\r\n CellLayered before = cells[yNext][xNext];\r\n while(true)\r\n {\r\n Byte[] xy = map.getDirection(xNext-1, yNext-1);\r\n xNext = xNext + xy[0];\r\n yNext = yNext + xy[1];\r\n\r\n CellLayered next = cells[yNext][xNext];\r\n\r\n if(xy[0]==-1)\r\n before.setRight(false);\r\n else\r\n before.setRight(true);\r\n before.setPath(true);\r\n if(next==null)\r\n break;\r\n\r\n before.setNextInPath(next);\r\n before = next;\r\n }\r\n }", "void table(){\n fill(0);\n rect(width/2, height/2, 600, 350); // boarder\n fill(100, 0 ,0);\n rect(width/2, height/2, 550, 300); //Felt\n \n \n}", "@Override\n\tpublic void walk() {\n\t\t\n\t}", "public\nstatic\nvoid\nmain(String args[]) \n\n{ \n\nBinaryTree tree = \nnew\nBinaryTree(); \n\ntree.root = \nnew\nNode(\n20\n); \n\ntree.root.left = \nnew\nNode(\n8\n); \n\ntree.root.left.left = \nnew\nNode(\n4\n); \n\ntree.root.left.right = \nnew\nNode(\n12\n); \n\ntree.root.left.right.left = \nnew\nNode(\n10\n); \n\ntree.root.left.right.right = \nnew\nNode(\n14\n); \n\ntree.root.right = \nnew\nNode(\n22\n); \n\ntree.root.right.right = \nnew\nNode(\n25\n); \n\ntree.printBoundary(tree.root); \n\n}", "public wall() { //default constructor makes a 10x10 square extending right and down from the pixel located at 5,5\r\n x = 5;\r\n y = 5;\r\n height = 10;\r\n width = 10;\r\n }", "double getNewWidth();", "public int upright();", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic double perimeter() {\n\t\treturn 2*length*breadth;\r\n\t}", "public void skystonePos3() {\n }", "public void leerPlanesDietas();", "long getWidth();", "public static void body() {\n \tfor(int i = 1; i <= SIZE*SIZE; i++) {\n for(int j = 1; j <= 3*SIZE-(SIZE-1); j++) {\n System.out.print(\" \");\n }\n \n System.out.print(\"|\");\n for(int j = 1; j <= SIZE-2; j++) {\n \tSystem.out.print(\"%\");\n }\n System.out.print(\"||\");\n for(int j = 1; j <= SIZE-2; j++) {\n \tSystem.out.print(\"%\");\n }\n System.out.print(\"|\");\n \n System.out.println();\n }\n }", "public void snare();", "public void strength1(float x, float y){\n noStroke();\n fill(80);\n rect(x+7,y,66,6);\n bezier(x+7,y,x,y+1,x,y+5,x+7,y+6);\n bezier(x+73,y,x+80,y+1,x+80,y+5,x+73,y+6);\n rect(x+7,y+1,13,3);//1st blue ba\n bezier(x+7,y+1,x+1,y+2.5f,x+1,y+3.5f,x+7,y+4);\n}", "public void skystonePos5() {\n }", "void GenerateBoardPath() {\n\t\t\t\n\t\t\tint rows = board.getRowsNum();\n\t\t\tint columns = board.getColsNum();\n\t\t\tint space_number = 1; \n\t\t\t\n\t\t\t\n\t\t\tfor (int i = rows - 1; i >= 0; i--) \n\t\t\t\t//If the row is an odd-number, move L-R\n\t\t\t\tif (i % 2 != 0) {\n\t\t\t\t\tfor (int j = 0; j < columns; j++) \n\t\t\t\t\t\tBoardPathRepository.put(space_number++, board.getTile(i, j));}\n\t\t\t\telse {\n\t\t\t\t\tfor (int j = columns-1; j >=0; j--) \n\t\t\t\t\t\tBoardPathRepository.put(space_number++, board.getTile(i, j));\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t}" ]
[ "0.5472371", "0.5383522", "0.52979374", "0.5293668", "0.5211566", "0.51842105", "0.5161626", "0.51377255", "0.5100369", "0.5067393", "0.5064298", "0.50376177", "0.49875325", "0.49361488", "0.49140826", "0.49058613", "0.49058613", "0.48946288", "0.48945552", "0.48931476", "0.48904693", "0.48880374", "0.48798734", "0.48695773", "0.48647928", "0.48638737", "0.48618442", "0.48618138", "0.48505476", "0.48302734", "0.48278588", "0.48275942", "0.48218134", "0.48208144", "0.48172593", "0.4813516", "0.48124653", "0.4811937", "0.4811937", "0.48115787", "0.4811212", "0.48030958", "0.47998473", "0.4795484", "0.47894648", "0.47886366", "0.47878242", "0.47855106", "0.4777816", "0.47706896", "0.47695553", "0.4766223", "0.47616836", "0.4760893", "0.47604054", "0.47590306", "0.47488394", "0.4736708", "0.47364867", "0.47344264", "0.47324577", "0.47303045", "0.47301307", "0.47227973", "0.4722473", "0.4719981", "0.47176844", "0.47143498", "0.4712692", "0.47071925", "0.47001678", "0.46935824", "0.46934032", "0.46931094", "0.46875677", "0.46873635", "0.4686461", "0.46827722", "0.46827722", "0.46827522", "0.46788132", "0.46628743", "0.46617907", "0.46604863", "0.4657533", "0.46526098", "0.46518275", "0.46497184", "0.46489906", "0.46484554", "0.46466392", "0.46466392", "0.46454313", "0.46434125", "0.46428928", "0.46424708", "0.4639808", "0.46373105", "0.46368903", "0.46341428", "0.46330282" ]
0.0
-1
/ / / / / /
public boolean isEntity(Class<?> paramClass) { /* 209 */ if (paramClass == null) { /* 210 */ throw new IllegalArgumentException(); /* */ } /* */ /* 213 */ Class clazz = paramClass.getSuperclass(); /* 214 */ return (!paramClass.isInterface() && clazz != null && IDLEntity.class /* */ /* 216 */ .isAssignableFrom(paramClass)); /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void divide() {\n\t\t\n\t}", "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "public abstract void bepaalGrootte();", "public static void bottomHalf() {\n\n for(int i = 1; i <= SIZE; i++) {\n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\" \");\n }\n \n\t System.out.print(\"\\\\_\");\n\t for(int j = 3*SIZE-i; j >= i; j--) {\n\t System.out.print(\"/\\\\\");\n\t }\n\t System.out.println(\"_/\");\n }\n }", "private int rightChild(int i){return 2*i+2;}", "public void gored() {\n\t\t\n\t}", "double passer();", "public abstract String division();", "public String ring();", "laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }", "public String toString(){ return \"DIV\";}", "private void pointer(Graphics image,int x,int y,int height,int b,int dir) {\n\n\t\tint[] xt=new int[3];\n\t\tint[] yt=new int[3];\n\n\t\tif(dir==0) {\n\t\t\txt[0]=x;\n\t\t\txt[1]=xt[2]=x+height;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=y+b/2;\n\t\t\tyt[2]=y-b/2;\n\t\t} else {\n\t\t\txt[0]=x;\n\t\t\txt[1]=x+b/2;\n\t\t\txt[2]=x-b/2;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=yt[2]=y-height;\n\t\t}\n\t\timage.fillPolygon(xt,yt,3);\n\t}", "public static void main(String[] args) {\n\n\n for(int a=0; a<7;a++){\n for(int b=0;b<7-a;b++){\n System.out.print(\" \");\n }\n for(int c=0; c<=a;c++){\n System.out.print(\"* \");\n }\n System.out.println(\" \");\n }\n\n }", "void sharpen();", "void sharpen();", "public double getWidth() {\n return this.left.getLeft(0) - this.right.getRight(0); \n }", "static void pyramid(){\n\t}", "int getWidth() {return width;}", "Operations operations();", "private static void breadcrumbArrow(int width, int height, int indent, int c1, int c2) {\n\n\t\tdouble x0 = 0, y0 = height / 2d;\n\t\tdouble x1 = indent, y1 = 0;\n\t\tdouble x2 = indent, y2 = height / 2d;\n\t\tdouble x3 = indent, y3 = height;\n\t\tdouble x4 = width, y4 = 0;\n\t\tdouble x5 = width, y5 = height / 2d;\n\t\tdouble x6 = width, y6 = height;\n\t\tdouble x7 = indent + width, y7 = 0;\n\t\tdouble x8 = indent + width, y8 = height;\n\n\t\tint fc1 = ColorHelper.mixAlphaColors(c1, c2, 0);\n\t\tint fc2 = ColorHelper.mixAlphaColors(c1, c2, (indent)/(width + 2f * indent));\n\t\tint fc3 = ColorHelper.mixAlphaColors(c1, c2, (indent + width)/(width + 2f * indent));\n\t\tint fc4 = ColorHelper.mixAlphaColors(c1, c2, 1);\n\n\t\tRenderSystem.disableTexture();\n\t\tRenderSystem.enableBlend();\n\t\tRenderSystem.disableAlphaTest();\n\t\tRenderSystem.defaultBlendFunc();\n\t\tRenderSystem.shadeModel(GL11.GL_SMOOTH);\n\n\t\tTessellator tessellator = Tessellator.getInstance();\n\t\tBufferBuilder bufferbuilder = tessellator.getBuffer();\n\t\tbufferbuilder.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR);\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x7, y7, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x8, y8, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\ttessellator.draw();\n\t\tRenderSystem.shadeModel(GL11.GL_FLAT);\n\t\tRenderSystem.disableBlend();\n\t\tRenderSystem.enableAlphaTest();\n\t\tRenderSystem.enableTexture();\n\t}", "double volume(){\n return width*height*depth;\n }", "@Override\n public void bfs() {\n\n }", "void mo33732Px();", "private static Object[] newPath(int length, Object[] leaf) {\n Object[] node = leaf;\n for (int i = 0; i < length; i += 5) {\n node = new Object[] { node };\n }\n return node;\n }", "public static void slashes() {\n\t\tSystem.out.println(\"//////////////////////\");\r\n\r\n\t}", "public void stg() {\n\n\t}", "public void skystonePos4() {\n }", "public int generateRoshambo(){\n ;]\n\n }", "public void draw(){\n for(int i = 1; i <= height; i++){\n for(int s = 1; s <= i; s++)\n System.out.print(\"*\");\n System.out.println();\n }\n }", "public void getTile_B8();", "int width();", "public static void main(String[] args) {\n\t\tfor(int j=0;j<8;j++){\n\t\t\tfor(int i=0;i<8;i++){\n\t\t\t\t//上下两侧\n\t\t\t\tif(j==0||j==7){\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}else{\n\t\t\t\t\t//中间\n\t\t\t\t\tif(i>0&&i<7){\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public static void unionPathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze two = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\tSystem.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = two.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber+n) != S.findAndCompress(randomNumber)){\n\t\t\t\t\t\tS.union(randomNumber+n, randomNumber);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'u');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.union(randomNumber, randomNumber+1);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(two, n);\n\t\tuserSelection_SolveMaze(n);\n\n\n\t\tStdDraw.show(0);\n\t\ttwo.draw();\n\t\ttwo.printCellNumbers();\n\t}", "public static void part2(){\n\t\n System.out.println(\"\\\\\"); //Outer wall\n System.out.println(\"\\\\\");\n System.out.println(\"\\\\\");\n for(int i = 0; i <= 16; i++){ //loop created to display top of the door\n\n \tSystem.out.print(\"-\");\n\n\t}\n System.out.println(\"\");\n System.out.println(\"\\\\\\t\\t| \\t(\\\")\"); //The door and the stick figure\n System.out.println(\"\\\\\\t\\t|\\t-|-\");\n System.out.println(\"\\\\\\t o | \\t |\");\n System.out.println(\"\\\\\\t\\t|\\t /\\\\\");\n System.out.println(\"\\\\\\t\\t|\\t/ \\\\\");\n\t\t\n }", "private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}", "Parallelogram(){\n length = width = height = 0;\n }", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "public static void main(String[] args) {\n\t\tScanner obj=new Scanner(System.in);\r\n\t\tint a=0;\r\n\t\tint count=0;\r\n System.out.println(\"enter size\");\r\n\t\ta=obj.nextInt();\r\n\t\tint m=2*a+1;\r\n\t\tint n=2*a+2;\r\n\t\tint mid=(m+1)/2;\r\n\t\tfor(int i=1;i<=m;i++)\r\n\t\t{\r\n\t\t\tcount=0;\r\n\t\t\tfor(int j=1;j<=n;j++)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tif((i==1)||(i==m)||(j==1)||(j==n))//frame begin\r\n\t\t\t\t{\r\n\t\t\t\t\tif((i==1)||(i==m))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"+\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t {\r\n\t\t\t\t\t\t\tSystem.out.print(\"|\");//frame left and right\r\n\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//frame end\r\n\t\t\t\telse if (i<mid)//upper-half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t for(int l=1;l<=2*i-4;l++)\r\n\t\t\t\t {\r\n\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\tSystem.out.print(\"\\\\\");\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end of upper half\r\n\t\t\t\telse if(i>mid)//lower half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tfor(int k=mid;k<i;k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t System.out.print(\"\\\\\");\r\n\t\t\t\t\t for(int l=2*m-6;l>2*i-4;l--)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t else\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t }\r\n\t\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t\t for(int k=mid;k<i;k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t\t\t}//end of lower half\r\n\t\t\t\telse if(i==mid)//middle part\r\n\t\t\t\t{\r\n\t\t\t\t\tif(j==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\"<\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(j==n-1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\">\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(i%2==0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"=\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end\r\n\t\t\t}//end-of-j\r\n\t\t\tSystem.out.println();\r\n\t\t}//end\r\n\r\n\t}", "public double getWidth() {\n return this.size * 2.0; \n }", "private void traverseBayeredPatternHalfSizeRGB(){\n int originalPositionX = 0;\n int originalPositionY = 1;\n\n for (int newX = 0; originalPositionX < originalImageHeight -1; newX++){\n for (int newY = 0; originalPositionY < originalImageWidth -1; newY++){\n Point newPosition = new Point(newX,newY);\n int newAbsoultPosition = getAbsolutPixelPosition(newPosition, originalImageHeight / 2, originalImageWidth / 2);\n halfSizePixRGB[newAbsoultPosition] = getAverageRGB(new Point(originalPositionX,originalPositionY));\n originalPositionY += 2;\n }\n originalPositionY = 0;\n originalPositionX += 2;\n }\n }", "@Override\npublic void processDirection() {\n\t\n}", "void walk() {\n\t\t\n\t}", "void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2)\r\n/* 100: */ {\r\n/* 101: 99 */ int s2 = sides << 1 & 0x2A | sides >> 1 & 0x15;\r\n/* 102: */ \r\n/* 103:101 */ this.context.renderBox(sides, x1, y1, z1, x2, y2, z2);\r\n/* 104:102 */ this.context.renderBox(s2, x2, y2, z2, x1, y1, z1);\r\n/* 105: */ }", "public void SubRect(){\n\t\n}", "public void division() {\n\t\tx=1;\n\t\ty=0;\n\t\tz=x/y;\n\t\t\t\t\n\t}", "public void foundLeaf(int width, int height, int level, int currX, int currY, int location) {\n level = level +2;\n if (location == 1) {\n\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - ( (new Double(spatialHeight / Math.pow(2, level ))).intValue()),\n currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY * 2,\n Color.BLACK);\n\n\n canvas.addLine(((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue())) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n currX,\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n\n }\n\n if (location == 2) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n ( currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n (currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n\n\n }\n\n if (location == 3) {\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY,\n Color.BLACK);\n\n\n\n canvas.addLine((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n\tcurrY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n (currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n }\n\n if (location == 4) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY,\n Color.BLACK);\n\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue() + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), Color.BLACK);\n\n\n }\n\n\n\n\n }", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "public double getWidth() { return _width<0? -_width : _width; }", "public static void sizePathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze five = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\t//System.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = five.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber + n)){\n\t\t\t\t\t\tS.unionBySize(randomNumber+n, randomNumber);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'u');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+1);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(five, n);\n\t\tuserSelection_SolveMaze(n);\n\n\t\tStdDraw.show(0);\n\t\tfive.draw();\n\t\tfive.printCellNumbers();\t\n\t}", "double getPerimeter(){\n return 2*height+width;\n }", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "public Integer getWidth(){return this.width;}", "@Override\n protected void paint2d(Graphics2D g) {\n \n }", "private void createPath(Direction d, int width, Point p1, Point p2) {\n\t\t// Determine how far away from the center the corners are\n\t\tint sideOneOffset = 0;\t// Top or Left depending on path direction\n\t\tint sideTwoOffset = 0;\t// Bot or Right depending on path direction\n\t\t// If the width is odd, balance the offsets\n\t\tif (width % 2 != 0) {\t\n\t\t\tsideOneOffset = sideTwoOffset = ((width / 2) + 1);\n\t\t} else {\n\t\t\t// If the width is even, the offsets will be off by 1\n\t\t\tsideOneOffset = width;\n\t\t\tsideTwoOffset = width - 1;\n\t\t}\n\t\tif (d == Direction.LEFT || d == Direction.RIGHT) {\n\t\t\t// If the direction is left then we want to swap the points\n\t\t\t// to pretend like the direction was right (so the following code works)\n\t\t\tif (d == Direction.LEFT) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p1.x, p1.y + sideTwoOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p2.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x, p1.y + sideTwoOffset)));\n\t\t\t// Set the left and right walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.y is the center of the path (top to bottom)\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x, p1.y + (i - width/2))));\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p2.x, p2.y + (i - width/2))));\n\t\t\t}\n\t\t\t// Set middle path and top/bottom padding (horizontal Oreo!)\n\t\t\tfor (int col = p1.x + 1, endCol = p2.x; col < endCol; col++) {\n\t\t\t\t// Add the top wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(col, p1.y - sideOneOffset)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(col, p1.y + (i - width /2))));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the bottom wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(col, p1.y + sideTwoOffset)));\n\t\t\t}\n\t\t} else {\n\t\t\t// If the direction is up then we want to swap the points\n\t\t\t// to pretend like the direction was down (so the following code works)\n\t\t\tif (d == Direction.UP) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x - sideOneOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p2.x - sideOneOffset, p2.y)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p1.x + sideTwoOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x + sideTwoOffset, p2.y)));\n\t\t\t// Set the top and bottom walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.x is the center of the path (left to right)\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(p1.x + (i - width /2), p1.y)));\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(p2.x + (i - width /2), p2.y)));\n\t\t\t}\n\t\t\t// Set middle path and left/right padding (vertical Oreo!)\n\t\t\tfor (int row = p1.y + 1, endRow = p2.y; row < endRow; row++) {\n\t\t\t\t// Add the left wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x - sideOneOffset, row)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(p1.x + (i - width /2), row)));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the right wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p1.x + sideTwoOffset, row)));\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public void draw4x4 (char design){\n System.out.println(\"\"+design+design+design+design);\n System.out.println(design+\" \"+design);\n System.out.println(design+\" \"+design);\n System.out.println(\"\"+design+design+design+design);\n}", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "public void renderCenterBlock(int cons, int side, int end)\r\n/* 143: */ {\r\n/* 144:135 */ if (cons == 0)\r\n/* 145: */ {\r\n/* 146:136 */ this.context.setTex(end);\r\n/* 147:137 */ doubleBox(63, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 148:138 */ return;\r\n/* 149: */ }\r\n/* 150:139 */ if (cons == 3)\r\n/* 151: */ {\r\n/* 152:140 */ this.context.setTexFlags(1773);\r\n/* 153:141 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 154:142 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 155:143 */ return;\r\n/* 156: */ }\r\n/* 157:144 */ if (cons == 12)\r\n/* 158: */ {\r\n/* 159:145 */ this.context.setTexFlags(184365);\r\n/* 160:146 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 161:147 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 1.0F);\r\n/* 162:148 */ return;\r\n/* 163: */ }\r\n/* 164:149 */ if (cons == 48)\r\n/* 165: */ {\r\n/* 166:150 */ this.context.setTexFlags(187200);\r\n/* 167:151 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 168:152 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 169:153 */ return;\r\n/* 170: */ }\r\n/* 171:155 */ this.context.setTex(end);\r\n/* 172:156 */ doubleBox(0x3F ^ cons, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 173:157 */ if ((cons & 0x1) > 0)\r\n/* 174: */ {\r\n/* 175:158 */ this.context.setTexFlags(1773);\r\n/* 176:159 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 177:160 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 0.375F, 0.625F);\r\n/* 178: */ }\r\n/* 179:162 */ if ((cons & 0x2) > 0)\r\n/* 180: */ {\r\n/* 181:163 */ this.context.setTexFlags(1773);\r\n/* 182:164 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 183:165 */ doubleBox(60, 0.375F, 0.625F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 184: */ }\r\n/* 185:167 */ if ((cons & 0x4) > 0)\r\n/* 186: */ {\r\n/* 187:168 */ this.context.setTexFlags(184365);\r\n/* 188:169 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 189:170 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 0.375F);\r\n/* 190: */ }\r\n/* 191:172 */ if ((cons & 0x8) > 0)\r\n/* 192: */ {\r\n/* 193:173 */ this.context.setTexFlags(184365);\r\n/* 194:174 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 195:175 */ doubleBox(51, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F, 1.0F);\r\n/* 196: */ }\r\n/* 197:177 */ if ((cons & 0x10) > 0)\r\n/* 198: */ {\r\n/* 199:178 */ this.context.setTexFlags(187200);\r\n/* 200:179 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 201:180 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F);\r\n/* 202: */ }\r\n/* 203:182 */ if ((cons & 0x20) > 0)\r\n/* 204: */ {\r\n/* 205:183 */ this.context.setTexFlags(187200);\r\n/* 206:184 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 207:185 */ doubleBox(15, 0.625F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 208: */ }\r\n/* 209: */ }", "int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}", "public double getPerimiter(){return (2*height +2*width);}", "int fi(int x, int y) {\n\t\treturn (x + 1) + (width + 2) * (y + 1);\n\t}", "void ringBell() {\n\n }", "public static String makeShapeA() {\n\tString result = \"\";\n\t\tfor (int i = 0; i < 8 ; i++) {\n\t\t\tresult+=printHash(i);\n\t\t\t\n\t\t}return result;\n\t\t\t//System.out.println(printHash(i));\n\t\t}", "@Override\r\n public void draw()\r\n {\n\r\n }", "private int leftChild(int index){\n\t\treturn (2*index) +1;\n\t}", "@Override\r\n\tpublic void walk() {\n\r\n\t}", "public double getWidth() {\n return this.getRight(this.tree.getRight(0)) - this.getLeft(this.tree.getLeft(0)); \n }", "void block(Directions dir);", "public void lowerFlatbed(){\n flatbed.lowerFlatbed();\n }", "private void render() {\n StringBuilder builder = new StringBuilder();\n builder.append(horizontalEdge).append(\"\\n\");\n for (int i = 0; i < this.height; i++) {\n builder.append(VERTICAL_CHAR);\n for (int j = 0; j < this.width; j++) {\n builder.append(pixels[i][j]);\n }\n builder.append(VERTICAL_CHAR);\n builder.append(\"\\n\");\n }\n builder.append(horizontalEdge);\n System.out.printf(builder.toString());\n }", "@Override\n\tpublic void draw3() {\n\n\t}", "public static void main(String[] args) {\n\t\tint n=5;\n\t\tfor(int i=n-1;i>=0;i--)\n\t\t{\n\t\t\tfor(int space=0;space<n-1-i;space++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int j=0;j<=i*2;j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\n\t\tSystem.out.println();\n\t}\n\n}", "private int get_right_child(int index){\r\n return 2 * index + 2;\r\n }", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "double seBlesser();", "private void renderPath(Node n)\n {\n\tGraphics g = getGraphics();\n\tboolean painting;\n\tColor nc,lc;\n\n\tpainting = (n.paths_passing==0);\n\twhile (n != null) {\n\t if (painting)\n\t\tn.paths_passing++;\n\t else {\n\t\tn.paths_passing--;\n\t }\n\t \n// \t nc = (n.paths_passing > 0)?hilitcolor:normalcolor;\n// \t lc = (n.paths_passing > 0)?hilitcolor:linecolor;\n\t nc = (n.paths_passing > 0)?n.path_color:normalcolor;\n\t lc = (n.paths_passing > 0)?n.path_color:linecolor;\n\t \n\t if (n.parent == null) {\n\t\tsetRenderColor(g,nc);\n\t\trenderNode(g,n);\n\t\tbreak;\n\t }\n\n\t // Double line width\n\t //setRenderColor(g,(n.paths_passing>0)?hilitcolor:Color.white);\n\t setRenderColor(g,(n.paths_passing>0)?n.path_color:Color.white);\n\t renderLine(g,n.x-1,n.y,n.parent.x-1,n.parent.y);\t\n\n\t setRenderColor(g,lc);\n\t renderLine(g,n.x,n.y,n.parent.x,n.parent.y);\n\n\t setRenderColor(g,nc);\n\t renderNode(g,n);\n\t n = n.parent;\n\t}\n }", "public void skystonePos2() {\n }", "double volume() {\n\treturn width*height*depth;\n}", "private void buildPath() {\r\n int xNext = 1;\r\n int yNext = map.getStartPos() + 1;\r\n CellLayered before = cells[yNext][xNext];\r\n while(true)\r\n {\r\n Byte[] xy = map.getDirection(xNext-1, yNext-1);\r\n xNext = xNext + xy[0];\r\n yNext = yNext + xy[1];\r\n\r\n CellLayered next = cells[yNext][xNext];\r\n\r\n if(xy[0]==-1)\r\n before.setRight(false);\r\n else\r\n before.setRight(true);\r\n before.setPath(true);\r\n if(next==null)\r\n break;\r\n\r\n before.setNextInPath(next);\r\n before = next;\r\n }\r\n }", "void table(){\n fill(0);\n rect(width/2, height/2, 600, 350); // boarder\n fill(100, 0 ,0);\n rect(width/2, height/2, 550, 300); //Felt\n \n \n}", "@Override\n\tpublic void walk() {\n\t\t\n\t}", "public\nstatic\nvoid\nmain(String args[]) \n\n{ \n\nBinaryTree tree = \nnew\nBinaryTree(); \n\ntree.root = \nnew\nNode(\n20\n); \n\ntree.root.left = \nnew\nNode(\n8\n); \n\ntree.root.left.left = \nnew\nNode(\n4\n); \n\ntree.root.left.right = \nnew\nNode(\n12\n); \n\ntree.root.left.right.left = \nnew\nNode(\n10\n); \n\ntree.root.left.right.right = \nnew\nNode(\n14\n); \n\ntree.root.right = \nnew\nNode(\n22\n); \n\ntree.root.right.right = \nnew\nNode(\n25\n); \n\ntree.printBoundary(tree.root); \n\n}", "public wall() { //default constructor makes a 10x10 square extending right and down from the pixel located at 5,5\r\n x = 5;\r\n y = 5;\r\n height = 10;\r\n width = 10;\r\n }", "double getNewWidth();", "public int upright();", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic double perimeter() {\n\t\treturn 2*length*breadth;\r\n\t}", "public void skystonePos3() {\n }", "public void leerPlanesDietas();", "long getWidth();", "public static void body() {\n \tfor(int i = 1; i <= SIZE*SIZE; i++) {\n for(int j = 1; j <= 3*SIZE-(SIZE-1); j++) {\n System.out.print(\" \");\n }\n \n System.out.print(\"|\");\n for(int j = 1; j <= SIZE-2; j++) {\n \tSystem.out.print(\"%\");\n }\n System.out.print(\"||\");\n for(int j = 1; j <= SIZE-2; j++) {\n \tSystem.out.print(\"%\");\n }\n System.out.print(\"|\");\n \n System.out.println();\n }\n }", "public void snare();", "public void strength1(float x, float y){\n noStroke();\n fill(80);\n rect(x+7,y,66,6);\n bezier(x+7,y,x,y+1,x,y+5,x+7,y+6);\n bezier(x+73,y,x+80,y+1,x+80,y+5,x+73,y+6);\n rect(x+7,y+1,13,3);//1st blue ba\n bezier(x+7,y+1,x+1,y+2.5f,x+1,y+3.5f,x+7,y+4);\n}", "public void skystonePos5() {\n }", "void GenerateBoardPath() {\n\t\t\t\n\t\t\tint rows = board.getRowsNum();\n\t\t\tint columns = board.getColsNum();\n\t\t\tint space_number = 1; \n\t\t\t\n\t\t\t\n\t\t\tfor (int i = rows - 1; i >= 0; i--) \n\t\t\t\t//If the row is an odd-number, move L-R\n\t\t\t\tif (i % 2 != 0) {\n\t\t\t\t\tfor (int j = 0; j < columns; j++) \n\t\t\t\t\t\tBoardPathRepository.put(space_number++, board.getTile(i, j));}\n\t\t\t\telse {\n\t\t\t\t\tfor (int j = columns-1; j >=0; j--) \n\t\t\t\t\t\tBoardPathRepository.put(space_number++, board.getTile(i, j));\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t}" ]
[ "0.5472371", "0.5383522", "0.52979374", "0.5293668", "0.5211566", "0.51842105", "0.5161626", "0.51377255", "0.5100369", "0.5067393", "0.5064298", "0.50376177", "0.49875325", "0.49361488", "0.49140826", "0.49058613", "0.49058613", "0.48946288", "0.48945552", "0.48931476", "0.48904693", "0.48880374", "0.48798734", "0.48695773", "0.48647928", "0.48638737", "0.48618442", "0.48618138", "0.48505476", "0.48302734", "0.48278588", "0.48275942", "0.48218134", "0.48208144", "0.48172593", "0.4813516", "0.48124653", "0.4811937", "0.4811937", "0.48115787", "0.4811212", "0.48030958", "0.47998473", "0.4795484", "0.47894648", "0.47886366", "0.47878242", "0.47855106", "0.4777816", "0.47706896", "0.47695553", "0.4766223", "0.47616836", "0.4760893", "0.47604054", "0.47590306", "0.47488394", "0.4736708", "0.47364867", "0.47344264", "0.47324577", "0.47303045", "0.47301307", "0.47227973", "0.4722473", "0.4719981", "0.47176844", "0.47143498", "0.4712692", "0.47071925", "0.47001678", "0.46935824", "0.46934032", "0.46931094", "0.46875677", "0.46873635", "0.4686461", "0.46827722", "0.46827722", "0.46827522", "0.46788132", "0.46628743", "0.46617907", "0.46604863", "0.4657533", "0.46526098", "0.46518275", "0.46497184", "0.46489906", "0.46484554", "0.46466392", "0.46466392", "0.46454313", "0.46434125", "0.46428928", "0.46424708", "0.4639808", "0.46373105", "0.46368903", "0.46341428", "0.46330282" ]
0.0
-1
/ / / / / / /
public boolean isPropertyAccessorMethod(Method paramMethod, Class paramClass) { /* 225 */ String str1 = paramMethod.getName(); /* 226 */ Class<?> clazz = paramMethod.getReturnType(); /* 227 */ Class[] arrayOfClass1 = paramMethod.getParameterTypes(); /* 228 */ Class[] arrayOfClass2 = paramMethod.getExceptionTypes(); /* 229 */ String str2 = null; /* */ /* 231 */ if (str1.startsWith("get")) { /* */ /* 233 */ if (arrayOfClass1.length == 0 && clazz != void.class && /* 234 */ !readHasCorrespondingIsProperty(paramMethod, paramClass)) { /* 235 */ str2 = "get"; /* */ } /* */ } /* 238 */ else if (str1.startsWith("set")) { /* */ /* 240 */ if (clazz == void.class && arrayOfClass1.length == 1 && ( /* 241 */ hasCorrespondingReadProperty(paramMethod, paramClass, "get") || /* 242 */ hasCorrespondingReadProperty(paramMethod, paramClass, "is"))) { /* 243 */ str2 = "set"; /* */ /* */ } /* */ } /* 247 */ else if (str1.startsWith("is") && /* 248 */ arrayOfClass1.length == 0 && clazz == boolean.class && /* 249 */ !isHasCorrespondingReadProperty(paramMethod, paramClass)) { /* 250 */ str2 = "is"; /* */ } /* */ /* */ /* */ /* 255 */ if (str2 != null && ( /* 256 */ !validPropertyExceptions(paramMethod) || str1 /* 257 */ .length() <= str2.length())) { /* 258 */ str2 = null; /* */ } /* */ /* */ /* 262 */ return (str2 != null); /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "public void divide() {\n\t\t\n\t}", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "private int rightChild(int i){return 2*i+2;}", "public abstract void bepaalGrootte();", "public static void bottomHalf() {\n\n for(int i = 1; i <= SIZE; i++) {\n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\" \");\n }\n \n\t System.out.print(\"\\\\_\");\n\t for(int j = 3*SIZE-i; j >= i; j--) {\n\t System.out.print(\"/\\\\\");\n\t }\n\t System.out.println(\"_/\");\n }\n }", "double passer();", "public void gored() {\n\t\t\n\t}", "public String ring();", "laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }", "public abstract String division();", "public String toString(){ return \"DIV\";}", "public double getWidth() {\n return this.left.getLeft(0) - this.right.getRight(0); \n }", "private static Object[] newPath(int length, Object[] leaf) {\n Object[] node = leaf;\n for (int i = 0; i < length; i += 5) {\n node = new Object[] { node };\n }\n return node;\n }", "int getWidth() {return width;}", "private void pointer(Graphics image,int x,int y,int height,int b,int dir) {\n\n\t\tint[] xt=new int[3];\n\t\tint[] yt=new int[3];\n\n\t\tif(dir==0) {\n\t\t\txt[0]=x;\n\t\t\txt[1]=xt[2]=x+height;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=y+b/2;\n\t\t\tyt[2]=y-b/2;\n\t\t} else {\n\t\t\txt[0]=x;\n\t\t\txt[1]=x+b/2;\n\t\t\txt[2]=x-b/2;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=yt[2]=y-height;\n\t\t}\n\t\timage.fillPolygon(xt,yt,3);\n\t}", "public void getTile_B8();", "public double getWidth() {\n return this.size * 2.0; \n }", "double volume(){\n return width*height*depth;\n }", "@Override\n public void bfs() {\n\n }", "public static void main(String[] args) {\n\n\n for(int a=0; a<7;a++){\n for(int b=0;b<7-a;b++){\n System.out.print(\" \");\n }\n for(int c=0; c<=a;c++){\n System.out.print(\"* \");\n }\n System.out.println(\" \");\n }\n\n }", "int width();", "Operations operations();", "void sharpen();", "void sharpen();", "private static void breadcrumbArrow(int width, int height, int indent, int c1, int c2) {\n\n\t\tdouble x0 = 0, y0 = height / 2d;\n\t\tdouble x1 = indent, y1 = 0;\n\t\tdouble x2 = indent, y2 = height / 2d;\n\t\tdouble x3 = indent, y3 = height;\n\t\tdouble x4 = width, y4 = 0;\n\t\tdouble x5 = width, y5 = height / 2d;\n\t\tdouble x6 = width, y6 = height;\n\t\tdouble x7 = indent + width, y7 = 0;\n\t\tdouble x8 = indent + width, y8 = height;\n\n\t\tint fc1 = ColorHelper.mixAlphaColors(c1, c2, 0);\n\t\tint fc2 = ColorHelper.mixAlphaColors(c1, c2, (indent)/(width + 2f * indent));\n\t\tint fc3 = ColorHelper.mixAlphaColors(c1, c2, (indent + width)/(width + 2f * indent));\n\t\tint fc4 = ColorHelper.mixAlphaColors(c1, c2, 1);\n\n\t\tRenderSystem.disableTexture();\n\t\tRenderSystem.enableBlend();\n\t\tRenderSystem.disableAlphaTest();\n\t\tRenderSystem.defaultBlendFunc();\n\t\tRenderSystem.shadeModel(GL11.GL_SMOOTH);\n\n\t\tTessellator tessellator = Tessellator.getInstance();\n\t\tBufferBuilder bufferbuilder = tessellator.getBuffer();\n\t\tbufferbuilder.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR);\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x7, y7, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x8, y8, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\ttessellator.draw();\n\t\tRenderSystem.shadeModel(GL11.GL_FLAT);\n\t\tRenderSystem.disableBlend();\n\t\tRenderSystem.enableAlphaTest();\n\t\tRenderSystem.enableTexture();\n\t}", "static void pyramid(){\n\t}", "public Integer getWidth(){return this.width;}", "private void traverseBayeredPatternHalfSizeRGB(){\n int originalPositionX = 0;\n int originalPositionY = 1;\n\n for (int newX = 0; originalPositionX < originalImageHeight -1; newX++){\n for (int newY = 0; originalPositionY < originalImageWidth -1; newY++){\n Point newPosition = new Point(newX,newY);\n int newAbsoultPosition = getAbsolutPixelPosition(newPosition, originalImageHeight / 2, originalImageWidth / 2);\n halfSizePixRGB[newAbsoultPosition] = getAverageRGB(new Point(originalPositionX,originalPositionY));\n originalPositionY += 2;\n }\n originalPositionY = 0;\n originalPositionX += 2;\n }\n }", "@Override\npublic void processDirection() {\n\t\n}", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "public int generateRoshambo(){\n ;]\n\n }", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "public void skystonePos4() {\n }", "void mo33732Px();", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}", "public void SubRect(){\n\t\n}", "public static void unionPathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze two = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\tSystem.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = two.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber+n) != S.findAndCompress(randomNumber)){\n\t\t\t\t\t\tS.union(randomNumber+n, randomNumber);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'u');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.union(randomNumber, randomNumber+1);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(two, n);\n\t\tuserSelection_SolveMaze(n);\n\n\n\t\tStdDraw.show(0);\n\t\ttwo.draw();\n\t\ttwo.printCellNumbers();\n\t}", "private int leftChild(int index){\n\t\treturn (2*index) +1;\n\t}", "void walk() {\n\t\t\n\t}", "public static void sizePathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze five = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\t//System.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = five.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber + n)){\n\t\t\t\t\t\tS.unionBySize(randomNumber+n, randomNumber);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'u');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+1);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(five, n);\n\t\tuserSelection_SolveMaze(n);\n\n\t\tStdDraw.show(0);\n\t\tfive.draw();\n\t\tfive.printCellNumbers();\t\n\t}", "public double getWidth() { return _width<0? -_width : _width; }", "public void draw(){\n for(int i = 1; i <= height; i++){\n for(int s = 1; s <= i; s++)\n System.out.print(\"*\");\n System.out.println();\n }\n }", "public void stg() {\n\n\t}", "Parallelogram(){\n length = width = height = 0;\n }", "private int get_right_child(int index){\r\n return 2 * index + 2;\r\n }", "public void foundLeaf(int width, int height, int level, int currX, int currY, int location) {\n level = level +2;\n if (location == 1) {\n\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - ( (new Double(spatialHeight / Math.pow(2, level ))).intValue()),\n currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY * 2,\n Color.BLACK);\n\n\n canvas.addLine(((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue())) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n currX,\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n\n }\n\n if (location == 2) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n ( currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n (currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n\n\n }\n\n if (location == 3) {\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY,\n Color.BLACK);\n\n\n\n canvas.addLine((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n\tcurrY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n (currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n }\n\n if (location == 4) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY,\n Color.BLACK);\n\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue() + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), Color.BLACK);\n\n\n }\n\n\n\n\n }", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tScanner obj=new Scanner(System.in);\r\n\t\tint a=0;\r\n\t\tint count=0;\r\n System.out.println(\"enter size\");\r\n\t\ta=obj.nextInt();\r\n\t\tint m=2*a+1;\r\n\t\tint n=2*a+2;\r\n\t\tint mid=(m+1)/2;\r\n\t\tfor(int i=1;i<=m;i++)\r\n\t\t{\r\n\t\t\tcount=0;\r\n\t\t\tfor(int j=1;j<=n;j++)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tif((i==1)||(i==m)||(j==1)||(j==n))//frame begin\r\n\t\t\t\t{\r\n\t\t\t\t\tif((i==1)||(i==m))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"+\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t {\r\n\t\t\t\t\t\t\tSystem.out.print(\"|\");//frame left and right\r\n\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//frame end\r\n\t\t\t\telse if (i<mid)//upper-half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t for(int l=1;l<=2*i-4;l++)\r\n\t\t\t\t {\r\n\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\tSystem.out.print(\"\\\\\");\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end of upper half\r\n\t\t\t\telse if(i>mid)//lower half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tfor(int k=mid;k<i;k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t System.out.print(\"\\\\\");\r\n\t\t\t\t\t for(int l=2*m-6;l>2*i-4;l--)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t else\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t }\r\n\t\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t\t for(int k=mid;k<i;k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t\t\t}//end of lower half\r\n\t\t\t\telse if(i==mid)//middle part\r\n\t\t\t\t{\r\n\t\t\t\t\tif(j==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\"<\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(j==n-1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\">\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(i%2==0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"=\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end\r\n\t\t\t}//end-of-j\r\n\t\t\tSystem.out.println();\r\n\t\t}//end\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tfor(int j=0;j<8;j++){\n\t\t\tfor(int i=0;i<8;i++){\n\t\t\t\t//上下两侧\n\t\t\t\tif(j==0||j==7){\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}else{\n\t\t\t\t\t//中间\n\t\t\t\t\tif(i>0&&i<7){\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }", "public double getWidth() {\n return this.getRight(this.tree.getRight(0)) - this.getLeft(this.tree.getLeft(0)); \n }", "double getPerimeter(){\n return 2*height+width;\n }", "public static void part2(){\n\t\n System.out.println(\"\\\\\"); //Outer wall\n System.out.println(\"\\\\\");\n System.out.println(\"\\\\\");\n for(int i = 0; i <= 16; i++){ //loop created to display top of the door\n\n \tSystem.out.print(\"-\");\n\n\t}\n System.out.println(\"\");\n System.out.println(\"\\\\\\t\\t| \\t(\\\")\"); //The door and the stick figure\n System.out.println(\"\\\\\\t\\t|\\t-|-\");\n System.out.println(\"\\\\\\t o | \\t |\");\n System.out.println(\"\\\\\\t\\t|\\t /\\\\\");\n System.out.println(\"\\\\\\t\\t|\\t/ \\\\\");\n\t\t\n }", "public double getPerimiter(){return (2*height +2*width);}", "@Override\r\n\tpublic void walk() {\n\r\n\t}", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}", "void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2)\r\n/* 100: */ {\r\n/* 101: 99 */ int s2 = sides << 1 & 0x2A | sides >> 1 & 0x15;\r\n/* 102: */ \r\n/* 103:101 */ this.context.renderBox(sides, x1, y1, z1, x2, y2, z2);\r\n/* 104:102 */ this.context.renderBox(s2, x2, y2, z2, x1, y1, z1);\r\n/* 105: */ }", "@Override\n protected void paint2d(Graphics2D g) {\n \n }", "public static String makeShapeA() {\n\tString result = \"\";\n\t\tfor (int i = 0; i < 8 ; i++) {\n\t\t\tresult+=printHash(i);\n\t\t\t\n\t\t}return result;\n\t\t\t//System.out.println(printHash(i));\n\t\t}", "double getNewWidth();", "public void draw4x4 (char design){\n System.out.println(\"\"+design+design+design+design);\n System.out.println(design+\" \"+design);\n System.out.println(design+\" \"+design);\n System.out.println(\"\"+design+design+design+design);\n}", "public void lowerFlatbed(){\n flatbed.lowerFlatbed();\n }", "int fi(int x, int y) {\n\t\treturn (x + 1) + (width + 2) * (y + 1);\n\t}", "private void createPath(Direction d, int width, Point p1, Point p2) {\n\t\t// Determine how far away from the center the corners are\n\t\tint sideOneOffset = 0;\t// Top or Left depending on path direction\n\t\tint sideTwoOffset = 0;\t// Bot or Right depending on path direction\n\t\t// If the width is odd, balance the offsets\n\t\tif (width % 2 != 0) {\t\n\t\t\tsideOneOffset = sideTwoOffset = ((width / 2) + 1);\n\t\t} else {\n\t\t\t// If the width is even, the offsets will be off by 1\n\t\t\tsideOneOffset = width;\n\t\t\tsideTwoOffset = width - 1;\n\t\t}\n\t\tif (d == Direction.LEFT || d == Direction.RIGHT) {\n\t\t\t// If the direction is left then we want to swap the points\n\t\t\t// to pretend like the direction was right (so the following code works)\n\t\t\tif (d == Direction.LEFT) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p1.x, p1.y + sideTwoOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p2.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x, p1.y + sideTwoOffset)));\n\t\t\t// Set the left and right walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.y is the center of the path (top to bottom)\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x, p1.y + (i - width/2))));\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p2.x, p2.y + (i - width/2))));\n\t\t\t}\n\t\t\t// Set middle path and top/bottom padding (horizontal Oreo!)\n\t\t\tfor (int col = p1.x + 1, endCol = p2.x; col < endCol; col++) {\n\t\t\t\t// Add the top wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(col, p1.y - sideOneOffset)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(col, p1.y + (i - width /2))));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the bottom wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(col, p1.y + sideTwoOffset)));\n\t\t\t}\n\t\t} else {\n\t\t\t// If the direction is up then we want to swap the points\n\t\t\t// to pretend like the direction was down (so the following code works)\n\t\t\tif (d == Direction.UP) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x - sideOneOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p2.x - sideOneOffset, p2.y)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p1.x + sideTwoOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x + sideTwoOffset, p2.y)));\n\t\t\t// Set the top and bottom walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.x is the center of the path (left to right)\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(p1.x + (i - width /2), p1.y)));\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(p2.x + (i - width /2), p2.y)));\n\t\t\t}\n\t\t\t// Set middle path and left/right padding (vertical Oreo!)\n\t\t\tfor (int row = p1.y + 1, endRow = p2.y; row < endRow; row++) {\n\t\t\t\t// Add the left wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x - sideOneOffset, row)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(p1.x + (i - width /2), row)));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the right wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p1.x + sideTwoOffset, row)));\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void walk() {\n\t\t\n\t}", "public void renderCenterBlock(int cons, int side, int end)\r\n/* 143: */ {\r\n/* 144:135 */ if (cons == 0)\r\n/* 145: */ {\r\n/* 146:136 */ this.context.setTex(end);\r\n/* 147:137 */ doubleBox(63, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 148:138 */ return;\r\n/* 149: */ }\r\n/* 150:139 */ if (cons == 3)\r\n/* 151: */ {\r\n/* 152:140 */ this.context.setTexFlags(1773);\r\n/* 153:141 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 154:142 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 155:143 */ return;\r\n/* 156: */ }\r\n/* 157:144 */ if (cons == 12)\r\n/* 158: */ {\r\n/* 159:145 */ this.context.setTexFlags(184365);\r\n/* 160:146 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 161:147 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 1.0F);\r\n/* 162:148 */ return;\r\n/* 163: */ }\r\n/* 164:149 */ if (cons == 48)\r\n/* 165: */ {\r\n/* 166:150 */ this.context.setTexFlags(187200);\r\n/* 167:151 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 168:152 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 169:153 */ return;\r\n/* 170: */ }\r\n/* 171:155 */ this.context.setTex(end);\r\n/* 172:156 */ doubleBox(0x3F ^ cons, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 173:157 */ if ((cons & 0x1) > 0)\r\n/* 174: */ {\r\n/* 175:158 */ this.context.setTexFlags(1773);\r\n/* 176:159 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 177:160 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 0.375F, 0.625F);\r\n/* 178: */ }\r\n/* 179:162 */ if ((cons & 0x2) > 0)\r\n/* 180: */ {\r\n/* 181:163 */ this.context.setTexFlags(1773);\r\n/* 182:164 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 183:165 */ doubleBox(60, 0.375F, 0.625F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 184: */ }\r\n/* 185:167 */ if ((cons & 0x4) > 0)\r\n/* 186: */ {\r\n/* 187:168 */ this.context.setTexFlags(184365);\r\n/* 188:169 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 189:170 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 0.375F);\r\n/* 190: */ }\r\n/* 191:172 */ if ((cons & 0x8) > 0)\r\n/* 192: */ {\r\n/* 193:173 */ this.context.setTexFlags(184365);\r\n/* 194:174 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 195:175 */ doubleBox(51, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F, 1.0F);\r\n/* 196: */ }\r\n/* 197:177 */ if ((cons & 0x10) > 0)\r\n/* 198: */ {\r\n/* 199:178 */ this.context.setTexFlags(187200);\r\n/* 200:179 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 201:180 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F);\r\n/* 202: */ }\r\n/* 203:182 */ if ((cons & 0x20) > 0)\r\n/* 204: */ {\r\n/* 205:183 */ this.context.setTexFlags(187200);\r\n/* 206:184 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 207:185 */ doubleBox(15, 0.625F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 208: */ }\r\n/* 209: */ }", "double seBlesser();", "long getWidth();", "public int getWidth() {\r\n\treturn this.width;\r\n}", "private void render() {\n StringBuilder builder = new StringBuilder();\n builder.append(horizontalEdge).append(\"\\n\");\n for (int i = 0; i < this.height; i++) {\n builder.append(VERTICAL_CHAR);\n for (int j = 0; j < this.width; j++) {\n builder.append(pixels[i][j]);\n }\n builder.append(VERTICAL_CHAR);\n builder.append(\"\\n\");\n }\n builder.append(horizontalEdge);\n System.out.printf(builder.toString());\n }", "public void leerPlanesDietas();", "@Override\r\n public void draw()\r\n {\n\r\n }", "private void buildPath() {\r\n int xNext = 1;\r\n int yNext = map.getStartPos() + 1;\r\n CellLayered before = cells[yNext][xNext];\r\n while(true)\r\n {\r\n Byte[] xy = map.getDirection(xNext-1, yNext-1);\r\n xNext = xNext + xy[0];\r\n yNext = yNext + xy[1];\r\n\r\n CellLayered next = cells[yNext][xNext];\r\n\r\n if(xy[0]==-1)\r\n before.setRight(false);\r\n else\r\n before.setRight(true);\r\n before.setPath(true);\r\n if(next==null)\r\n break;\r\n\r\n before.setNextInPath(next);\r\n before = next;\r\n }\r\n }", "void block(Directions dir);", "public static void slashes() {\n\t\tSystem.out.println(\"//////////////////////\");\r\n\r\n\t}", "public String getRing();", "@Override\r\n\tpublic double perimeter() {\n\t\treturn 2*length*breadth;\r\n\t}", "public\nstatic\nvoid\nmain(String args[]) \n\n{ \n\nBinaryTree tree = \nnew\nBinaryTree(); \n\ntree.root = \nnew\nNode(\n20\n); \n\ntree.root.left = \nnew\nNode(\n8\n); \n\ntree.root.left.left = \nnew\nNode(\n4\n); \n\ntree.root.left.right = \nnew\nNode(\n12\n); \n\ntree.root.left.right.left = \nnew\nNode(\n10\n); \n\ntree.root.left.right.right = \nnew\nNode(\n14\n); \n\ntree.root.right = \nnew\nNode(\n22\n); \n\ntree.root.right.right = \nnew\nNode(\n25\n); \n\ntree.printBoundary(tree.root); \n\n}", "public int getEdgeCount() \n {\n return 3;\n }", "public int getWidth(){\n return width;\n }", "public int upright();", "protected int parent(int i) { return (i - 1) / 2; }", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "protected int getWidth()\n\t{\n\t\treturn 0;\n\t}", "public int getDireccion(Pixel p) {\r\n\t\tif (x == p.x && y < p.y)\r\n\t\t\treturn DIR_N;\r\n\t\tif (x > p.x && y < p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_NE;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_NE;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_E;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_N;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x < p.x && y < p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_NO;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_NO;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_O;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_N;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x == p.x && y > p.y)\r\n\t\t\treturn DIR_S;\r\n\t\tif (x > p.x && y > p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_SE;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_SE;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_E;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_S;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x < p.x && y > p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_SO;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_SO;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_O;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_S;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x > p.x && y == p.y)\r\n\t\t\treturn DIR_E;\r\n\t\tif (x < p.x && y == p.y)\r\n\t\t\treturn DIR_O;\r\n\t\treturn -1;\r\n\t}", "private void renderPath(Node n)\n {\n\tGraphics g = getGraphics();\n\tboolean painting;\n\tColor nc,lc;\n\n\tpainting = (n.paths_passing==0);\n\twhile (n != null) {\n\t if (painting)\n\t\tn.paths_passing++;\n\t else {\n\t\tn.paths_passing--;\n\t }\n\t \n// \t nc = (n.paths_passing > 0)?hilitcolor:normalcolor;\n// \t lc = (n.paths_passing > 0)?hilitcolor:linecolor;\n\t nc = (n.paths_passing > 0)?n.path_color:normalcolor;\n\t lc = (n.paths_passing > 0)?n.path_color:linecolor;\n\t \n\t if (n.parent == null) {\n\t\tsetRenderColor(g,nc);\n\t\trenderNode(g,n);\n\t\tbreak;\n\t }\n\n\t // Double line width\n\t //setRenderColor(g,(n.paths_passing>0)?hilitcolor:Color.white);\n\t setRenderColor(g,(n.paths_passing>0)?n.path_color:Color.white);\n\t renderLine(g,n.x-1,n.y,n.parent.x-1,n.parent.y);\t\n\n\t setRenderColor(g,lc);\n\t renderLine(g,n.x,n.y,n.parent.x,n.parent.y);\n\n\t setRenderColor(g,nc);\n\t renderNode(g,n);\n\t n = n.parent;\n\t}\n }", "double volume() {\n\treturn width*height*depth;\n}", "void table(){\n fill(0);\n rect(width/2, height/2, 600, 350); // boarder\n fill(100, 0 ,0);\n rect(width/2, height/2, 550, 300); //Felt\n \n \n}", "public void snare();", "void ringBell() {\n\n }", "public static void main(String[] args) {\n\t\tint n=5;\n\t\tfor(int i=n-1;i>=0;i--)\n\t\t{\n\t\t\tfor(int space=0;space<n-1-i;space++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int j=0;j<=i*2;j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\n\t\tSystem.out.println();\n\t}\n\n}", "private byte r() {\r\n\t\treturn (left_map == 0 ) ? (byte) 1 : 0;\r\n\t}", "public void skystonePos2() {\n }", "public int my_leaf_count();", "@Override\n\tpublic void draw3() {\n\n\t}" ]
[ "0.54567957", "0.53680295", "0.53644985", "0.52577376", "0.52142847", "0.51725817", "0.514088", "0.50868535", "0.5072305", "0.504888", "0.502662", "0.50005764", "0.49740013", "0.4944243", "0.4941118", "0.4937142", "0.49095523", "0.48940238", "0.48719338", "0.48613623", "0.48604724", "0.48558092", "0.48546165", "0.48490012", "0.4843668", "0.4843668", "0.48420057", "0.4839597", "0.4832105", "0.4817357", "0.481569", "0.48122767", "0.48085573", "0.48065376", "0.48032433", "0.48032212", "0.4799707", "0.4798766", "0.47978994", "0.47978172", "0.47921672", "0.47903922", "0.4790111", "0.47886384", "0.47843018", "0.47837785", "0.47828907", "0.47826976", "0.4776919", "0.47767594", "0.47767594", "0.47766045", "0.4764252", "0.47560593", "0.4753577", "0.4752732", "0.47510985", "0.47496924", "0.47485355", "0.4748455", "0.4746839", "0.4744132", "0.47203988", "0.4713808", "0.4711382", "0.47113234", "0.47096533", "0.47075558", "0.47029856", "0.4701444", "0.47014076", "0.46973658", "0.46969122", "0.4692372", "0.46897912", "0.4683049", "0.4681391", "0.46810925", "0.46750805", "0.46722633", "0.46681988", "0.466349", "0.46618745", "0.46606532", "0.46533036", "0.46485004", "0.46464643", "0.46447286", "0.46447286", "0.46438906", "0.46405315", "0.46397775", "0.4634643", "0.46339533", "0.4633923", "0.4632826", "0.4631328", "0.46299514", "0.46285036", "0.46276402", "0.4625902" ]
0.0
-1
/ / / /
private boolean hasCorrespondingReadProperty(Method paramMethod, Class paramClass, String paramString) { /* 268 */ String str = paramMethod.getName(); /* 269 */ Class[] arrayOfClass = paramMethod.getParameterTypes(); /* 270 */ boolean bool = false; /* */ /* */ /* */ /* */ /* */ try { /* 276 */ String str1 = str.replaceFirst("set", paramString); /* 277 */ Method method = paramClass.getMethod(str1, new Class[0]); /* */ /* */ /* */ /* 281 */ bool = (isPropertyAccessorMethod(method, paramClass) && method.getReturnType() == arrayOfClass[0]) ? true : false; /* */ } /* 283 */ catch (Exception exception) {} /* */ /* */ /* */ /* 287 */ return bool; /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void divide() {\n\t\t\n\t}", "public static void slashes() {\n\t\tSystem.out.println(\"//////////////////////\");\r\n\r\n\t}", "public abstract String division();", "public void division() {\n\t\tx=1;\n\t\ty=0;\n\t\tz=x/y;\n\t\t\t\t\n\t}", "private boolean slash() {\r\n return MARK(OPERATOR) && CHAR('/') && gap();\r\n }", "public abstract void bepaalGrootte();", "public static void bottomHalf() {\n\n for(int i = 1; i <= SIZE; i++) {\n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\" \");\n }\n \n\t System.out.print(\"\\\\_\");\n\t for(int j = 3*SIZE-i; j >= i; j--) {\n\t System.out.print(\"/\\\\\");\n\t }\n\t System.out.println(\"_/\");\n }\n }", "public void gored() {\n\t\t\n\t}", "public String toString(){ return \"DIV\";}", "private int parent(int i){return (i-1)/2;}", "public String ring();", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "private int leftChild(int i){return 2*i+1;}", "double passer();", "static void pyramid(){\n\t}", "public void stg() {\n\n\t}", "public static void main(String[] args) {\n\n\n for(int a=0; a<7;a++){\n for(int b=0;b<7-a;b++){\n System.out.print(\" \");\n }\n for(int c=0; c<=a;c++){\n System.out.print(\"* \");\n }\n System.out.println(\" \");\n }\n\n }", "void mo33732Px();", "Operations operations();", "private int rightChild(int i){return 2*i+2;}", "private void division()\n\t{\n\t\tFun = Function.DIVIDE; //Function set to determine what action should be taken later.\n\t\t\n\t\t\tsetLeftValue();\n\t\t\tentry.grabFocus();\n\t\t\n\t}", "@Override\n\tpublic float dividir(float op1, float op2) {\n\t\treturn op1 / op2;\n\t}", "void sharpen();", "void sharpen();", "double defendre();", "public int generateRoshambo(){\n ;]\n\n }", "private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }", "public static void part2(){\n\t\n System.out.println(\"\\\\\"); //Outer wall\n System.out.println(\"\\\\\");\n System.out.println(\"\\\\\");\n for(int i = 0; i <= 16; i++){ //loop created to display top of the door\n\n \tSystem.out.print(\"-\");\n\n\t}\n System.out.println(\"\");\n System.out.println(\"\\\\\\t\\t| \\t(\\\")\"); //The door and the stick figure\n System.out.println(\"\\\\\\t\\t|\\t-|-\");\n System.out.println(\"\\\\\\t o | \\t |\");\n System.out.println(\"\\\\\\t\\t|\\t /\\\\\");\n System.out.println(\"\\\\\\t\\t|\\t/ \\\\\");\n\t\t\n }", "String divideAtWhite()[]{ return null; }", "protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}", "double volume(){\n return width*height*depth;\n }", "public void skystonePos4() {\n }", "void ringBell() {\n\n }", "laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }", "private static void breadcrumbArrow(int width, int height, int indent, int c1, int c2) {\n\n\t\tdouble x0 = 0, y0 = height / 2d;\n\t\tdouble x1 = indent, y1 = 0;\n\t\tdouble x2 = indent, y2 = height / 2d;\n\t\tdouble x3 = indent, y3 = height;\n\t\tdouble x4 = width, y4 = 0;\n\t\tdouble x5 = width, y5 = height / 2d;\n\t\tdouble x6 = width, y6 = height;\n\t\tdouble x7 = indent + width, y7 = 0;\n\t\tdouble x8 = indent + width, y8 = height;\n\n\t\tint fc1 = ColorHelper.mixAlphaColors(c1, c2, 0);\n\t\tint fc2 = ColorHelper.mixAlphaColors(c1, c2, (indent)/(width + 2f * indent));\n\t\tint fc3 = ColorHelper.mixAlphaColors(c1, c2, (indent + width)/(width + 2f * indent));\n\t\tint fc4 = ColorHelper.mixAlphaColors(c1, c2, 1);\n\n\t\tRenderSystem.disableTexture();\n\t\tRenderSystem.enableBlend();\n\t\tRenderSystem.disableAlphaTest();\n\t\tRenderSystem.defaultBlendFunc();\n\t\tRenderSystem.shadeModel(GL11.GL_SMOOTH);\n\n\t\tTessellator tessellator = Tessellator.getInstance();\n\t\tBufferBuilder bufferbuilder = tessellator.getBuffer();\n\t\tbufferbuilder.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR);\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x7, y7, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x8, y8, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\ttessellator.draw();\n\t\tRenderSystem.shadeModel(GL11.GL_FLAT);\n\t\tRenderSystem.disableBlend();\n\t\tRenderSystem.enableAlphaTest();\n\t\tRenderSystem.enableTexture();\n\t}", "public static void main(String[] args) {\n\t\tfor(int j=0;j<8;j++){\n\t\t\tfor(int i=0;i<8;i++){\n\t\t\t\t//上下两侧\n\t\t\t\tif(j==0||j==7){\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}else{\n\t\t\t\t\t//中间\n\t\t\t\t\tif(i>0&&i<7){\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tScanner obj=new Scanner(System.in);\r\n\t\tint a=0;\r\n\t\tint count=0;\r\n System.out.println(\"enter size\");\r\n\t\ta=obj.nextInt();\r\n\t\tint m=2*a+1;\r\n\t\tint n=2*a+2;\r\n\t\tint mid=(m+1)/2;\r\n\t\tfor(int i=1;i<=m;i++)\r\n\t\t{\r\n\t\t\tcount=0;\r\n\t\t\tfor(int j=1;j<=n;j++)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tif((i==1)||(i==m)||(j==1)||(j==n))//frame begin\r\n\t\t\t\t{\r\n\t\t\t\t\tif((i==1)||(i==m))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"+\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t {\r\n\t\t\t\t\t\t\tSystem.out.print(\"|\");//frame left and right\r\n\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//frame end\r\n\t\t\t\telse if (i<mid)//upper-half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t for(int l=1;l<=2*i-4;l++)\r\n\t\t\t\t {\r\n\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\tSystem.out.print(\"\\\\\");\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end of upper half\r\n\t\t\t\telse if(i>mid)//lower half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tfor(int k=mid;k<i;k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t System.out.print(\"\\\\\");\r\n\t\t\t\t\t for(int l=2*m-6;l>2*i-4;l--)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t else\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t }\r\n\t\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t\t for(int k=mid;k<i;k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t\t\t}//end of lower half\r\n\t\t\t\telse if(i==mid)//middle part\r\n\t\t\t\t{\r\n\t\t\t\t\tif(j==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\"<\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(j==n-1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\">\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(i%2==0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"=\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end\r\n\t\t\t}//end-of-j\r\n\t\t\tSystem.out.println();\r\n\t\t}//end\r\n\r\n\t}", "public static void method1(){\n System.out.println(\"*****\");\n System.out.println(\"*****\");\n System.out.println(\" * *\");\n System.out.println(\" *\");\n System.out.println(\" * *\");\n }", "public int division(int x,int y){\n System.out.println(\"division methods\");\n int d=x/y;\n return d;\n\n }", "void mo21076g();", "private boolean dividingByZero(String operator){\n if (numStack.peek() == 0 && operator.equals(\"/\")){\n return true;\n }\n return false;\n }", "@Override\n public void bfs() {\n\n }", "public double getWidth() {\n return this.left.getLeft(0) - this.right.getRight(0); \n }", "Parallelogram(){\n length = width = height = 0;\n }", "public Divide(){\n }", "public void draw(){\n for(int i = 1; i <= height; i++){\n for(int s = 1; s <= i; s++)\n System.out.print(\"*\");\n System.out.println();\n }\n }", "@Override\r\n\tpublic void div(int x, int y) {\n\t\t\r\n\t}", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "@Override\npublic void div(int a, int b) {\n\t\n}", "private double triangleBase() {\n return cellWidth() / BASE_WIDTH;\n }", "double volume() {\n\treturn width*height*depth;\n}", "public static void main(String[] args) {\n\t\tint n=5;\n\t\tfor(int i=n-1;i>=0;i--)\n\t\t{\n\t\t\tfor(int space=0;space<n-1-i;space++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int j=0;j<=i*2;j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\n\t\tSystem.out.println();\n\t}\n\n}", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "int getWidth() {return width;}", "int width();", "public void divide(int dirOp1, int dirOp2, int dirRes) {\n //traduce casos de direccionamiento indirecto\n dirOp1 = traduceDirIndirecto(dirOp1);\n dirOp2 = traduceDirIndirecto(dirOp2);\n if (ManejadorMemoria.isConstante(dirOp1)) { // OPERANDO 1 CTE\n String valor1 = this.directorioProcedimientos.getConstantes().get(dirOp1).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirOp2)) { // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)) { // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n } else { // OPERANDO 2 LOCAL\n String valor2 = this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { //RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n }\n } else if (ManejadorMemoria.isGlobal(dirOp1)) { // OPERANDO 1 GLOBAL\n String valor1 = this.registroGlobal.getValor(dirOp1);\n if (ManejadorMemoria.isGlobal(dirOp2)) { // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)) { // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n } else { // OPERANDO 2 LOCAL\n String valor2 = this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n }\n } else { // OPERANDO 1 LOCAL\n String valor1 = this.pilaRegistros.peek().getValor(dirOp1);\n if (ManejadorMemoria.isGlobal(dirOp2)) { // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { // RES 2 LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)) { // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n } else { //OPERANDO 2 LOCAL\n String valor2 = this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n }\n }\n }", "public static void main(String[] args) {\n\n\n\n System.out.println(4 * (1.0 - (1 / 3) + (1 / 5) - (1 / 7) + (1 / 9) - (1 / 11)));\n\n System.out.println(4 * (1.0 - (1/3) + (1/5) - (1/7)\n + (1 / 9) - (1/11) + (1/13)));\n }", "public static void topHalf() {\n \t\n for( int i = 1; i <= SIZE; i++){\n for(int spaces = 1; spaces <= 3*SIZE - 3*i; spaces++) {\n System.out.print(\" \"); \n }\n \n for(int j = 1; j <= 1; j++) {\n System.out.print(\"__/\");\n }\n \n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\":::\");\n }\n \n System.out.print(\"||\");\n \n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\":::\");\n }\n \n for(int j = 1; j <= 1; j++) {\n System.out.print(\"\\\\__\");\n }\n \n System.out.println();\n }\n \n System.out.print(\"|\");\n \n for(int i = 1; i <= 6 * SIZE; i++) {\n System.out.print(\"\\\"\");\n }\n \n System.out.println(\"|\");\n }", "@Override\r\n\tpublic int div() {\n\t\treturn 0;\r\n\t}", "private void renderPath(Node n)\n {\n\tGraphics g = getGraphics();\n\tboolean painting;\n\tColor nc,lc;\n\n\tpainting = (n.paths_passing==0);\n\twhile (n != null) {\n\t if (painting)\n\t\tn.paths_passing++;\n\t else {\n\t\tn.paths_passing--;\n\t }\n\t \n// \t nc = (n.paths_passing > 0)?hilitcolor:normalcolor;\n// \t lc = (n.paths_passing > 0)?hilitcolor:linecolor;\n\t nc = (n.paths_passing > 0)?n.path_color:normalcolor;\n\t lc = (n.paths_passing > 0)?n.path_color:linecolor;\n\t \n\t if (n.parent == null) {\n\t\tsetRenderColor(g,nc);\n\t\trenderNode(g,n);\n\t\tbreak;\n\t }\n\n\t // Double line width\n\t //setRenderColor(g,(n.paths_passing>0)?hilitcolor:Color.white);\n\t setRenderColor(g,(n.paths_passing>0)?n.path_color:Color.white);\n\t renderLine(g,n.x-1,n.y,n.parent.x-1,n.parent.y);\t\n\n\t setRenderColor(g,lc);\n\t renderLine(g,n.x,n.y,n.parent.x,n.parent.y);\n\n\t setRenderColor(g,nc);\n\t renderNode(g,n);\n\t n = n.parent;\n\t}\n }", "public double getWidth() { return _width<0? -_width : _width; }", "double getPerimeter(){\n return 2*height+width;\n }", "public void mo3376r() {\n }", "public static void unionPathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze two = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\tSystem.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = two.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber+n) != S.findAndCompress(randomNumber)){\n\t\t\t\t\t\tS.union(randomNumber+n, randomNumber);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'u');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.union(randomNumber, randomNumber+1);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(two, n);\n\t\tuserSelection_SolveMaze(n);\n\n\n\t\tStdDraw.show(0);\n\t\ttwo.draw();\n\t\ttwo.printCellNumbers();\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic double divide(double in1, double in2) {\n\t\treturn 0;\n\t}", "void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2)\r\n/* 100: */ {\r\n/* 101: 99 */ int s2 = sides << 1 & 0x2A | sides >> 1 & 0x15;\r\n/* 102: */ \r\n/* 103:101 */ this.context.renderBox(sides, x1, y1, z1, x2, y2, z2);\r\n/* 104:102 */ this.context.renderBox(s2, x2, y2, z2, x1, y1, z1);\r\n/* 105: */ }", "public static void main (String[] args){\n Scanner s=new Scanner(System.in);\n int n=s.nextInt();\n if(n%2==1)\n {\n n=n/2;\n n++;\n }\n else\n {\n n=n/2;\n }\n for(int i=1;i<=n;i++)\n {\n for(int k=1;k<=i-1;k++)\n {\n System.out.print(\" \");\n }\n for(int j=1;j<=((2*n-1)-2*(i-1));j++)\n {\n if(j==1||j==((2*n-1)-2*(i-1)))\n System.out.print(\"*\");\n else\n System.out.print(\" \");\n }\n System.out.println();\n }\n for(int i=2;i<=n;i++)\n {\n for(int k=1;k<=n-i;k++)\n {\n System.out.print(\" \");\n }\n for(int j=1;j<i*2;j++)\n {\n if(j==1||j==(i*2-1))\n System.out.print(\"*\");\n else\n System.out.print(\" \");\n }\n System.out.println();\n }\n\t}", "public RMPath getPath() { return RMPath.unitRectPath; }", "void walk() {\n\t\t\n\t}", "public static void giant() {\n System.out.println(\" --------- \");\n System.out.println(\" | / \\\\| \");\n System.out.println(\" ZZZZZH | O | HZZZZZ \");\n System.out.println(\" H ----------- H \");\n System.out.println(\" ZZZZZHHHHHHHHHHHHHHHHHHHHHZZZZZ \");\n System.out.println(\" H HHHHHHHHHHH H \");\n System.out.println(\" ZZZZZH HHHHHHHHHHH HZZZZZ \");\n System.out.println(\" HHHHHHHHHHH \");\n System.out.println(\" HHH HHH \");\n System.out.println(\" HHH HHH \");\n }", "public void title ()\n {\n\tprintSlow (\" _ __\");\n\tprintSlow (\" ___ | ' \\\\\");\n\tprintSlow (\" ___ \\\\ / ___ ,'\\\\_ | .-. \\\\ /|\");\n\tprintSlow (\" \\\\ / | |,'__ \\\\ ,'\\\\_ | \\\\ | | | | ,' |_ /|\");\n\tprintSlow (\" _ | | | |\\\\/ \\\\ \\\\ | \\\\ | |\\\\_| _ | |_| | _ '-. .-',' |_ _\");\n\tprintSlow (\" // | | | |____| | | |\\\\_|| |__ // | | ,'_`. | | '-. .-',' `. ,'\\\\_\");\n\tprintSlow (\" \\\\\\\\_| |_,' .-, _ | | | | |\\\\ \\\\ // .| |\\\\_/ | / \\\\ || | | | / |\\\\ \\\\| \\\\\");\n\tprintSlow (\" `-. .-'| |/ / | | | | | | \\\\ \\\\// | | | | | || | | | | |_\\\\ || |\\\\_|\");\n\tprintSlow (\" | | | || \\\\_| | | | /_\\\\ \\\\ / | |` | | | || | | | | .---'| |\");\n\tprintSlow (\" | | | |\\\\___,_\\\\ /_\\\\ _ // | | | \\\\_/ || | | | | | /\\\\| |\");\n\tprintSlow (\" /_\\\\ | | //_____// .||` `._,' | | | | \\\\ `-' /| |\");\n\tprintSlow (\" /_\\\\ `------' \\\\ | AND `.\\\\ | | `._,' /_\\\\\");\n\tprintSlow (\" \\\\| HIS `.\\\\\");\n\tprintSlow (\" __ __ _ _ _ _ \");\n\tprintSlow (\" | \\\\/ | (_) | | /\\\\ | | | | \");\n\tprintSlow (\" | \\\\ / | __ _ __ _ _ ___ __ _| | / \\\\ __| |_ _____ _ __ | |_ _ _ _ __ ___ \");\n\tprintSlow (\" | |\\\\/| |/ _` |/ _` | |/ __/ _` | | / /\\\\ \\\\ / _` \\\\ \\\\ / / _ \\\\ '_ \\\\| __| | | | '__/ _ \\\\\");\n\tprintSlow (\" | | | | (_| | (_| | | (_| (_| | | / ____ \\\\ (_| |\\\\ V / __/ | | | |_| |_| | | | __/\");\n\tprintSlow (\" |_| |_|\\\\__,_|\\\\__, |_|\\\\___\\\\__,_|_| /_/ \\\\_\\\\__,_| \\\\_/ \\\\___|_| |_|\\\\__|\\\\__,_|_| \\\\___|\");\n\tprintSlow (\" __/ | \");\n\tprintSlow (\" |___/ \\n\\n\\n\");\n\n\n }", "public static String makeShapeA() {\n\tString result = \"\";\n\t\tfor (int i = 0; i < 8 ; i++) {\n\t\t\tresult+=printHash(i);\n\t\t\t\n\t\t}return result;\n\t\t\t//System.out.println(printHash(i));\n\t\t}", "public void draw4x4 (char design){\n System.out.println(\"\"+design+design+design+design);\n System.out.println(design+\" \"+design);\n System.out.println(design+\" \"+design);\n System.out.println(\"\"+design+design+design+design);\n}", "double area() {\nSystem.out.println(\"Inside Area for Triangle.\");\nreturn dim1 * dim2 / 2;\n}", "private void pointer(Graphics image,int x,int y,int height,int b,int dir) {\n\n\t\tint[] xt=new int[3];\n\t\tint[] yt=new int[3];\n\n\t\tif(dir==0) {\n\t\t\txt[0]=x;\n\t\t\txt[1]=xt[2]=x+height;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=y+b/2;\n\t\t\tyt[2]=y-b/2;\n\t\t} else {\n\t\t\txt[0]=x;\n\t\t\txt[1]=x+b/2;\n\t\t\txt[2]=x-b/2;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=yt[2]=y-height;\n\t\t}\n\t\timage.fillPolygon(xt,yt,3);\n\t}", "public int mo9774x() {\n /*\n r5 = this;\n int r0 = r5.f9082i\n int r1 = r5.f9080g\n if (r1 != r0) goto L_0x0007\n goto L_0x006a\n L_0x0007:\n byte[] r2 = r5.f9079f\n int r3 = r0 + 1\n byte r0 = r2[r0]\n if (r0 < 0) goto L_0x0012\n r5.f9082i = r3\n return r0\n L_0x0012:\n int r1 = r1 - r3\n r4 = 9\n if (r1 >= r4) goto L_0x0018\n goto L_0x006a\n L_0x0018:\n int r1 = r3 + 1\n byte r3 = r2[r3]\n int r3 = r3 << 7\n r0 = r0 ^ r3\n if (r0 >= 0) goto L_0x0024\n r0 = r0 ^ -128(0xffffffffffffff80, float:NaN)\n goto L_0x0070\n L_0x0024:\n int r3 = r1 + 1\n byte r1 = r2[r1]\n int r1 = r1 << 14\n r0 = r0 ^ r1\n if (r0 < 0) goto L_0x0031\n r0 = r0 ^ 16256(0x3f80, float:2.278E-41)\n L_0x002f:\n r1 = r3\n goto L_0x0070\n L_0x0031:\n int r1 = r3 + 1\n byte r3 = r2[r3]\n int r3 = r3 << 21\n r0 = r0 ^ r3\n if (r0 >= 0) goto L_0x003f\n r2 = -2080896(0xffffffffffe03f80, float:NaN)\n r0 = r0 ^ r2\n goto L_0x0070\n L_0x003f:\n int r3 = r1 + 1\n byte r1 = r2[r1]\n int r4 = r1 << 28\n r0 = r0 ^ r4\n r4 = 266354560(0xfe03f80, float:2.2112565E-29)\n r0 = r0 ^ r4\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r3 = r2[r3]\n if (r3 >= 0) goto L_0x0070\n int r3 = r1 + 1\n byte r1 = r2[r1]\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r3 = r2[r3]\n if (r3 >= 0) goto L_0x0070\n int r3 = r1 + 1\n byte r1 = r2[r1]\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r2 = r2[r3]\n if (r2 >= 0) goto L_0x0070\n L_0x006a:\n long r0 = r5.mo9776z()\n int r0 = (int) r0\n return r0\n L_0x0070:\n r5.f9082i = r1\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p213q.p217b.p301c.p302a.p311j0.p312a.C3656k.C3659c.mo9774x():int\");\n }", "public SoNode \ngetCurPathTail() \n{\n//#ifdef DEBUG\n if (currentpath.getTail() != (SoFullPath.cast(getCurPath())).getTail()){\n SoDebugError.post(\"SoAction::getCurPathTail\\n\", \n \"Inconsistent path tail. Did you change the scene graph\\n\"+\n \"During traversal?\\n\");\n }\n//#endif /*DEBUG*/\n return(currentpath.getTail());\n}", "@Override\n\tpublic void breath() {\n\n\t}", "public static void main(String[] args) {\nint i,j,k;\r\nint num=5;\r\nfor(i=0;i<num;i++){\r\n\tfor(j=0;j<i;j++){\r\n\t\tSystem.out.print(\" \");\r\n\t}\r\n\tfor(k=num; k>=2*i-1; k--){\r\n\t\tSystem.out.print(\"*\");\r\n\t}\r\n\t\r\n\tSystem.out.println();\r\n}\r\n\t}", "@Override\n\tpublic void div(double dx, double dy) {\n\t\t\n\t}", "public PathCode getCurPathCode() { return /*appliedTo.curPathCode*/currentpathcode;}", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "private void createPath(Direction d, int width, Point p1, Point p2) {\n\t\t// Determine how far away from the center the corners are\n\t\tint sideOneOffset = 0;\t// Top or Left depending on path direction\n\t\tint sideTwoOffset = 0;\t// Bot or Right depending on path direction\n\t\t// If the width is odd, balance the offsets\n\t\tif (width % 2 != 0) {\t\n\t\t\tsideOneOffset = sideTwoOffset = ((width / 2) + 1);\n\t\t} else {\n\t\t\t// If the width is even, the offsets will be off by 1\n\t\t\tsideOneOffset = width;\n\t\t\tsideTwoOffset = width - 1;\n\t\t}\n\t\tif (d == Direction.LEFT || d == Direction.RIGHT) {\n\t\t\t// If the direction is left then we want to swap the points\n\t\t\t// to pretend like the direction was right (so the following code works)\n\t\t\tif (d == Direction.LEFT) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p1.x, p1.y + sideTwoOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p2.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x, p1.y + sideTwoOffset)));\n\t\t\t// Set the left and right walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.y is the center of the path (top to bottom)\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x, p1.y + (i - width/2))));\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p2.x, p2.y + (i - width/2))));\n\t\t\t}\n\t\t\t// Set middle path and top/bottom padding (horizontal Oreo!)\n\t\t\tfor (int col = p1.x + 1, endCol = p2.x; col < endCol; col++) {\n\t\t\t\t// Add the top wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(col, p1.y - sideOneOffset)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(col, p1.y + (i - width /2))));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the bottom wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(col, p1.y + sideTwoOffset)));\n\t\t\t}\n\t\t} else {\n\t\t\t// If the direction is up then we want to swap the points\n\t\t\t// to pretend like the direction was down (so the following code works)\n\t\t\tif (d == Direction.UP) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x - sideOneOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p2.x - sideOneOffset, p2.y)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p1.x + sideTwoOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x + sideTwoOffset, p2.y)));\n\t\t\t// Set the top and bottom walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.x is the center of the path (left to right)\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(p1.x + (i - width /2), p1.y)));\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(p2.x + (i - width /2), p2.y)));\n\t\t\t}\n\t\t\t// Set middle path and left/right padding (vertical Oreo!)\n\t\t\tfor (int row = p1.y + 1, endRow = p2.y; row < endRow; row++) {\n\t\t\t\t// Add the left wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x - sideOneOffset, row)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(p1.x + (i - width /2), row)));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the right wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p1.x + sideTwoOffset, row)));\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "private byte r() {\r\n\t\treturn (left_map == 0 ) ? (byte) 1 : 0;\r\n\t}", "static String division (String s1, String s2) {\r\n if (s2==null || s2.length()==0) return s1;\r\n return product (s1, invert(s2));\r\n }", "public static void body() {\n \tfor(int i = 1; i <= SIZE*SIZE; i++) {\n for(int j = 1; j <= 3*SIZE-(SIZE-1); j++) {\n System.out.print(\" \");\n }\n \n System.out.print(\"|\");\n for(int j = 1; j <= SIZE-2; j++) {\n \tSystem.out.print(\"%\");\n }\n System.out.print(\"||\");\n for(int j = 1; j <= SIZE-2; j++) {\n \tSystem.out.print(\"%\");\n }\n System.out.print(\"|\");\n \n System.out.println();\n }\n }", "private int uniquePaths(int x, int y, int[][] dp) {\n \t\tif (x == 0 || y == 0) return 1;\n \t\tif (dp[x][y] == 0)\n \t\t\tdp[x][y] = uniquePaths(x - 1, y, dp) + uniquePaths(x, y - 1, dp);\n \t\treturn dp[x][y];\n \t}", "public void star(float x, float y, float r, float R) {\n float angle = TWO_PI / 5;\n float halfAngle = angle/2.0f;\n beginShape();\n noStroke();\n for (float a = 0; a < TWO_PI; a += angle) {\n float sx = x + cos(a) * r;\n float sy = y + sin(a) * r;\n vertex(sx, sy);\n sx = x + cos(a+halfAngle) * R;\n sy = y + sin(a+halfAngle) * R;\n vertex(sx, sy);\n }\n endShape(CLOSE);\n}", "@Override\r\n\tpublic void CalcPeri() {\n\t\tSystem.out.println(4*side);\t\r\n\t}", "public int upright();", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tint n = 7;\r\n\t\tfor (int i = n; i >= 0; i--) {\r\n\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t for(int j=0; j<n-i; j++) {\r\n\t\t\t \r\n\t\t\t System.out.print(\" \");\r\n\t\t\t \r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t \r\n\r\n\t\t\tfor (int j = n; j >= n-i; j--) {\r\n\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t}\r\n\r\n\t\t\r\n\t}", "public\nstatic\nvoid\nmain(String args[]) \n\n{ \n\nBinaryTree tree = \nnew\nBinaryTree(); \n\ntree.root = \nnew\nNode(\n20\n); \n\ntree.root.left = \nnew\nNode(\n8\n); \n\ntree.root.left.left = \nnew\nNode(\n4\n); \n\ntree.root.left.right = \nnew\nNode(\n12\n); \n\ntree.root.left.right.left = \nnew\nNode(\n10\n); \n\ntree.root.left.right.right = \nnew\nNode(\n14\n); \n\ntree.root.right = \nnew\nNode(\n22\n); \n\ntree.root.right.right = \nnew\nNode(\n25\n); \n\ntree.printBoundary(tree.root); \n\n}", "public void backSlash() {\n text.append(\"\\\\\");\n }", "public static void main(String[] args){\t\n\t\tchar op = '/';\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"첫번째 정수입니다.\");\n\t\tint num1 = scan.nextInt();\n\t\t\n\t\tSystem.out.println(\"두번째 정수입니다.\");\n\t\tint num2 = scan.nextInt();\n\t\tint num3=0;\n\t\tif(op=='+'){\n\t\t\tnum3 = num1+num2;\n\t\t}\n\t\telse if(op=='-'){\n\t\t\tnum3 = num1-num2;\n\t\t}\n\t\telse if(op=='*'){\n\t\t\tnum3 = num1*num2;\n\t\t}\n\t\telse if(op=='/'){\n\t\t\tif(num2==0){\n\t\t\tSystem.out.println(\"오류입니다.\");\n\t\t}\n\t\t\t\n\t\t\tnum3 = num1/num2;\n\t\t}\n\t\tSystem.out.printf(\"%d%c%d=%d\" ,num1,op,num2,num3);\n\t\t\n\t\t\n\t}", "public final void testSlash() \n\t\t\tthrows ParserConfigurationException, IOException, SAXException \n\t{\n//\t\tassertSingleDocWithValue(\"8\", fldName, \"nnðýþnn\");\n//\t\tassertSingleDocWithValue(\"8\", fldName, \"nnønn\");\n\t\tassertSingleResult(\"8\", fldName, \"nnunn\");\n\t}", "AngleResource inclination();", "public abstract void squareRootThis();", "public UniquePathsII() {\n\t\t// Initialization here. \n\t\t//\t\tcount = 0;\n\t}", "@Override\n\tpublic void space() {\n\t\t\n\t}" ]
[ "0.5906264", "0.55749613", "0.5428019", "0.53241616", "0.5294036", "0.527193", "0.52582306", "0.5256754", "0.51585066", "0.5141374", "0.51100975", "0.5097357", "0.5026707", "0.50235814", "0.50100124", "0.49757177", "0.4967908", "0.49668512", "0.4931213", "0.49272057", "0.49150687", "0.4878608", "0.4873821", "0.4873821", "0.48564616", "0.48415148", "0.4840844", "0.48408422", "0.48392275", "0.48380315", "0.48342562", "0.48335755", "0.48189583", "0.4816532", "0.4803844", "0.47991633", "0.4790358", "0.4785782", "0.47707185", "0.47659388", "0.47607136", "0.4756167", "0.47525582", "0.4750556", "0.47465262", "0.47439283", "0.47427607", "0.47368544", "0.47283906", "0.4719052", "0.4715935", "0.4711951", "0.47046372", "0.47023433", "0.46957722", "0.46894073", "0.46882662", "0.46872112", "0.46870187", "0.46838596", "0.46826214", "0.46721044", "0.4671648", "0.46691796", "0.46658975", "0.46658975", "0.46634644", "0.46593347", "0.46569487", "0.46532407", "0.46484405", "0.46472803", "0.4647124", "0.46426368", "0.46379653", "0.4635675", "0.46356165", "0.46343538", "0.46343073", "0.46324328", "0.46307802", "0.46292034", "0.46249497", "0.46220893", "0.46138567", "0.46130696", "0.46125302", "0.4608751", "0.46084386", "0.4605762", "0.46052104", "0.4602023", "0.46015334", "0.45995793", "0.45948967", "0.459342", "0.45930445", "0.45923406", "0.45910415", "0.45878932", "0.45863274" ]
0.0
-1
/ / / / /
private boolean readHasCorrespondingIsProperty(Method paramMethod, Class paramClass) { /* 294 */ return false; /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void divide() {\n\t\t\n\t}", "private int parent(int i){return (i-1)/2;}", "public abstract void bepaalGrootte();", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "public void gored() {\n\t\t\n\t}", "public static void bottomHalf() {\n\n for(int i = 1; i <= SIZE; i++) {\n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\" \");\n }\n \n\t System.out.print(\"\\\\_\");\n\t for(int j = 3*SIZE-i; j >= i; j--) {\n\t System.out.print(\"/\\\\\");\n\t }\n\t System.out.println(\"_/\");\n }\n }", "public abstract String division();", "private int leftChild(int i){return 2*i+1;}", "public static void slashes() {\n\t\tSystem.out.println(\"//////////////////////\");\r\n\r\n\t}", "double passer();", "public String ring();", "private int rightChild(int i){return 2*i+2;}", "public String toString(){ return \"DIV\";}", "laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }", "public void division() {\n\t\tx=1;\n\t\ty=0;\n\t\tz=x/y;\n\t\t\t\t\n\t}", "static void pyramid(){\n\t}", "public static void main(String[] args) {\n\n\n for(int a=0; a<7;a++){\n for(int b=0;b<7-a;b++){\n System.out.print(\" \");\n }\n for(int c=0; c<=a;c++){\n System.out.print(\"* \");\n }\n System.out.println(\" \");\n }\n\n }", "public void stg() {\n\n\t}", "void mo33732Px();", "Operations operations();", "void sharpen();", "void sharpen();", "public void skystonePos4() {\n }", "private static void breadcrumbArrow(int width, int height, int indent, int c1, int c2) {\n\n\t\tdouble x0 = 0, y0 = height / 2d;\n\t\tdouble x1 = indent, y1 = 0;\n\t\tdouble x2 = indent, y2 = height / 2d;\n\t\tdouble x3 = indent, y3 = height;\n\t\tdouble x4 = width, y4 = 0;\n\t\tdouble x5 = width, y5 = height / 2d;\n\t\tdouble x6 = width, y6 = height;\n\t\tdouble x7 = indent + width, y7 = 0;\n\t\tdouble x8 = indent + width, y8 = height;\n\n\t\tint fc1 = ColorHelper.mixAlphaColors(c1, c2, 0);\n\t\tint fc2 = ColorHelper.mixAlphaColors(c1, c2, (indent)/(width + 2f * indent));\n\t\tint fc3 = ColorHelper.mixAlphaColors(c1, c2, (indent + width)/(width + 2f * indent));\n\t\tint fc4 = ColorHelper.mixAlphaColors(c1, c2, 1);\n\n\t\tRenderSystem.disableTexture();\n\t\tRenderSystem.enableBlend();\n\t\tRenderSystem.disableAlphaTest();\n\t\tRenderSystem.defaultBlendFunc();\n\t\tRenderSystem.shadeModel(GL11.GL_SMOOTH);\n\n\t\tTessellator tessellator = Tessellator.getInstance();\n\t\tBufferBuilder bufferbuilder = tessellator.getBuffer();\n\t\tbufferbuilder.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR);\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x7, y7, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x8, y8, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\ttessellator.draw();\n\t\tRenderSystem.shadeModel(GL11.GL_FLAT);\n\t\tRenderSystem.disableBlend();\n\t\tRenderSystem.enableAlphaTest();\n\t\tRenderSystem.enableTexture();\n\t}", "double volume(){\n return width*height*depth;\n }", "private void pointer(Graphics image,int x,int y,int height,int b,int dir) {\n\n\t\tint[] xt=new int[3];\n\t\tint[] yt=new int[3];\n\n\t\tif(dir==0) {\n\t\t\txt[0]=x;\n\t\t\txt[1]=xt[2]=x+height;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=y+b/2;\n\t\t\tyt[2]=y-b/2;\n\t\t} else {\n\t\t\txt[0]=x;\n\t\t\txt[1]=x+b/2;\n\t\t\txt[2]=x-b/2;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=yt[2]=y-height;\n\t\t}\n\t\timage.fillPolygon(xt,yt,3);\n\t}", "private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }", "public int generateRoshambo(){\n ;]\n\n }", "@Override\n public void bfs() {\n\n }", "public static void part2(){\n\t\n System.out.println(\"\\\\\"); //Outer wall\n System.out.println(\"\\\\\");\n System.out.println(\"\\\\\");\n for(int i = 0; i <= 16; i++){ //loop created to display top of the door\n\n \tSystem.out.print(\"-\");\n\n\t}\n System.out.println(\"\");\n System.out.println(\"\\\\\\t\\t| \\t(\\\")\"); //The door and the stick figure\n System.out.println(\"\\\\\\t\\t|\\t-|-\");\n System.out.println(\"\\\\\\t o | \\t |\");\n System.out.println(\"\\\\\\t\\t|\\t /\\\\\");\n System.out.println(\"\\\\\\t\\t|\\t/ \\\\\");\n\t\t\n }", "public static void main(String[] args) {\n\t\tfor(int j=0;j<8;j++){\n\t\t\tfor(int i=0;i<8;i++){\n\t\t\t\t//上下两侧\n\t\t\t\tif(j==0||j==7){\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}else{\n\t\t\t\t\t//中间\n\t\t\t\t\tif(i>0&&i<7){\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}", "int getWidth() {return width;}", "public void draw(){\n for(int i = 1; i <= height; i++){\n for(int s = 1; s <= i; s++)\n System.out.print(\"*\");\n System.out.println();\n }\n }", "public double getWidth() {\n return this.left.getLeft(0) - this.right.getRight(0); \n }", "Parallelogram(){\n length = width = height = 0;\n }", "public static void main(String[] args) {\n\t\tScanner obj=new Scanner(System.in);\r\n\t\tint a=0;\r\n\t\tint count=0;\r\n System.out.println(\"enter size\");\r\n\t\ta=obj.nextInt();\r\n\t\tint m=2*a+1;\r\n\t\tint n=2*a+2;\r\n\t\tint mid=(m+1)/2;\r\n\t\tfor(int i=1;i<=m;i++)\r\n\t\t{\r\n\t\t\tcount=0;\r\n\t\t\tfor(int j=1;j<=n;j++)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tif((i==1)||(i==m)||(j==1)||(j==n))//frame begin\r\n\t\t\t\t{\r\n\t\t\t\t\tif((i==1)||(i==m))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"+\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t {\r\n\t\t\t\t\t\t\tSystem.out.print(\"|\");//frame left and right\r\n\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//frame end\r\n\t\t\t\telse if (i<mid)//upper-half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t for(int l=1;l<=2*i-4;l++)\r\n\t\t\t\t {\r\n\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\tSystem.out.print(\"\\\\\");\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end of upper half\r\n\t\t\t\telse if(i>mid)//lower half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tfor(int k=mid;k<i;k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t System.out.print(\"\\\\\");\r\n\t\t\t\t\t for(int l=2*m-6;l>2*i-4;l--)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t else\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t }\r\n\t\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t\t for(int k=mid;k<i;k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t\t\t}//end of lower half\r\n\t\t\t\telse if(i==mid)//middle part\r\n\t\t\t\t{\r\n\t\t\t\t\tif(j==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\"<\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(j==n-1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\">\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(i%2==0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"=\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end\r\n\t\t\t}//end-of-j\r\n\t\t\tSystem.out.println();\r\n\t\t}//end\r\n\r\n\t}", "void ringBell() {\n\n }", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "public static void unionPathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze two = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\tSystem.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = two.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber+n) != S.findAndCompress(randomNumber)){\n\t\t\t\t\t\tS.union(randomNumber+n, randomNumber);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'u');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.union(randomNumber, randomNumber+1);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(two, n);\n\t\tuserSelection_SolveMaze(n);\n\n\n\t\tStdDraw.show(0);\n\t\ttwo.draw();\n\t\ttwo.printCellNumbers();\n\t}", "void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2)\r\n/* 100: */ {\r\n/* 101: 99 */ int s2 = sides << 1 & 0x2A | sides >> 1 & 0x15;\r\n/* 102: */ \r\n/* 103:101 */ this.context.renderBox(sides, x1, y1, z1, x2, y2, z2);\r\n/* 104:102 */ this.context.renderBox(s2, x2, y2, z2, x1, y1, z1);\r\n/* 105: */ }", "int width();", "private boolean slash() {\r\n return MARK(OPERATOR) && CHAR('/') && gap();\r\n }", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "void walk() {\n\t\t\n\t}", "double getPerimeter(){\n return 2*height+width;\n }", "private static Object[] newPath(int length, Object[] leaf) {\n Object[] node = leaf;\n for (int i = 0; i < length; i += 5) {\n node = new Object[] { node };\n }\n return node;\n }", "public double getWidth() { return _width<0? -_width : _width; }", "public static void main(String[] args) {\n\t\tint n=5;\n\t\tfor(int i=n-1;i>=0;i--)\n\t\t{\n\t\t\tfor(int space=0;space<n-1-i;space++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int j=0;j<=i*2;j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\n\t\tSystem.out.println();\n\t}\n\n}", "public void draw4x4 (char design){\n System.out.println(\"\"+design+design+design+design);\n System.out.println(design+\" \"+design);\n System.out.println(design+\" \"+design);\n System.out.println(\"\"+design+design+design+design);\n}", "private void createPath(Direction d, int width, Point p1, Point p2) {\n\t\t// Determine how far away from the center the corners are\n\t\tint sideOneOffset = 0;\t// Top or Left depending on path direction\n\t\tint sideTwoOffset = 0;\t// Bot or Right depending on path direction\n\t\t// If the width is odd, balance the offsets\n\t\tif (width % 2 != 0) {\t\n\t\t\tsideOneOffset = sideTwoOffset = ((width / 2) + 1);\n\t\t} else {\n\t\t\t// If the width is even, the offsets will be off by 1\n\t\t\tsideOneOffset = width;\n\t\t\tsideTwoOffset = width - 1;\n\t\t}\n\t\tif (d == Direction.LEFT || d == Direction.RIGHT) {\n\t\t\t// If the direction is left then we want to swap the points\n\t\t\t// to pretend like the direction was right (so the following code works)\n\t\t\tif (d == Direction.LEFT) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p1.x, p1.y + sideTwoOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p2.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x, p1.y + sideTwoOffset)));\n\t\t\t// Set the left and right walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.y is the center of the path (top to bottom)\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x, p1.y + (i - width/2))));\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p2.x, p2.y + (i - width/2))));\n\t\t\t}\n\t\t\t// Set middle path and top/bottom padding (horizontal Oreo!)\n\t\t\tfor (int col = p1.x + 1, endCol = p2.x; col < endCol; col++) {\n\t\t\t\t// Add the top wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(col, p1.y - sideOneOffset)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(col, p1.y + (i - width /2))));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the bottom wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(col, p1.y + sideTwoOffset)));\n\t\t\t}\n\t\t} else {\n\t\t\t// If the direction is up then we want to swap the points\n\t\t\t// to pretend like the direction was down (so the following code works)\n\t\t\tif (d == Direction.UP) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x - sideOneOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p2.x - sideOneOffset, p2.y)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p1.x + sideTwoOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x + sideTwoOffset, p2.y)));\n\t\t\t// Set the top and bottom walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.x is the center of the path (left to right)\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(p1.x + (i - width /2), p1.y)));\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(p2.x + (i - width /2), p2.y)));\n\t\t\t}\n\t\t\t// Set middle path and left/right padding (vertical Oreo!)\n\t\t\tfor (int row = p1.y + 1, endRow = p2.y; row < endRow; row++) {\n\t\t\t\t// Add the left wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x - sideOneOffset, row)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(p1.x + (i - width /2), row)));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the right wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p1.x + sideTwoOffset, row)));\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "@Override\npublic void processDirection() {\n\t\n}", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "public void renderCenterBlock(int cons, int side, int end)\r\n/* 143: */ {\r\n/* 144:135 */ if (cons == 0)\r\n/* 145: */ {\r\n/* 146:136 */ this.context.setTex(end);\r\n/* 147:137 */ doubleBox(63, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 148:138 */ return;\r\n/* 149: */ }\r\n/* 150:139 */ if (cons == 3)\r\n/* 151: */ {\r\n/* 152:140 */ this.context.setTexFlags(1773);\r\n/* 153:141 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 154:142 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 155:143 */ return;\r\n/* 156: */ }\r\n/* 157:144 */ if (cons == 12)\r\n/* 158: */ {\r\n/* 159:145 */ this.context.setTexFlags(184365);\r\n/* 160:146 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 161:147 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 1.0F);\r\n/* 162:148 */ return;\r\n/* 163: */ }\r\n/* 164:149 */ if (cons == 48)\r\n/* 165: */ {\r\n/* 166:150 */ this.context.setTexFlags(187200);\r\n/* 167:151 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 168:152 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 169:153 */ return;\r\n/* 170: */ }\r\n/* 171:155 */ this.context.setTex(end);\r\n/* 172:156 */ doubleBox(0x3F ^ cons, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 173:157 */ if ((cons & 0x1) > 0)\r\n/* 174: */ {\r\n/* 175:158 */ this.context.setTexFlags(1773);\r\n/* 176:159 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 177:160 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 0.375F, 0.625F);\r\n/* 178: */ }\r\n/* 179:162 */ if ((cons & 0x2) > 0)\r\n/* 180: */ {\r\n/* 181:163 */ this.context.setTexFlags(1773);\r\n/* 182:164 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 183:165 */ doubleBox(60, 0.375F, 0.625F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 184: */ }\r\n/* 185:167 */ if ((cons & 0x4) > 0)\r\n/* 186: */ {\r\n/* 187:168 */ this.context.setTexFlags(184365);\r\n/* 188:169 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 189:170 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 0.375F);\r\n/* 190: */ }\r\n/* 191:172 */ if ((cons & 0x8) > 0)\r\n/* 192: */ {\r\n/* 193:173 */ this.context.setTexFlags(184365);\r\n/* 194:174 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 195:175 */ doubleBox(51, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F, 1.0F);\r\n/* 196: */ }\r\n/* 197:177 */ if ((cons & 0x10) > 0)\r\n/* 198: */ {\r\n/* 199:178 */ this.context.setTexFlags(187200);\r\n/* 200:179 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 201:180 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F);\r\n/* 202: */ }\r\n/* 203:182 */ if ((cons & 0x20) > 0)\r\n/* 204: */ {\r\n/* 205:183 */ this.context.setTexFlags(187200);\r\n/* 206:184 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 207:185 */ doubleBox(15, 0.625F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 208: */ }\r\n/* 209: */ }", "public static String makeShapeA() {\n\tString result = \"\";\n\t\tfor (int i = 0; i < 8 ; i++) {\n\t\t\tresult+=printHash(i);\n\t\t\t\n\t\t}return result;\n\t\t\t//System.out.println(printHash(i));\n\t\t}", "private void traverseBayeredPatternHalfSizeRGB(){\n int originalPositionX = 0;\n int originalPositionY = 1;\n\n for (int newX = 0; originalPositionX < originalImageHeight -1; newX++){\n for (int newY = 0; originalPositionY < originalImageWidth -1; newY++){\n Point newPosition = new Point(newX,newY);\n int newAbsoultPosition = getAbsolutPixelPosition(newPosition, originalImageHeight / 2, originalImageWidth / 2);\n halfSizePixRGB[newAbsoultPosition] = getAverageRGB(new Point(originalPositionX,originalPositionY));\n originalPositionY += 2;\n }\n originalPositionY = 0;\n originalPositionX += 2;\n }\n }", "public void foundLeaf(int width, int height, int level, int currX, int currY, int location) {\n level = level +2;\n if (location == 1) {\n\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - ( (new Double(spatialHeight / Math.pow(2, level ))).intValue()),\n currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY * 2,\n Color.BLACK);\n\n\n canvas.addLine(((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue())) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n currX,\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n\n }\n\n if (location == 2) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n ( currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n (currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n\n\n }\n\n if (location == 3) {\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY,\n Color.BLACK);\n\n\n\n canvas.addLine((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n\tcurrY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n (currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n }\n\n if (location == 4) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY,\n Color.BLACK);\n\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue() + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), Color.BLACK);\n\n\n }\n\n\n\n\n }", "double volume() {\n\treturn width*height*depth;\n}", "@Override\r\n public void draw()\r\n {\n\r\n }", "@Override\n protected void paint2d(Graphics2D g) {\n \n }", "public static void method1(){\n System.out.println(\"*****\");\n System.out.println(\"*****\");\n System.out.println(\" * *\");\n System.out.println(\" *\");\n System.out.println(\" * *\");\n }", "@Override\n\tpublic void draw3() {\n\n\t}", "private void renderPath(Node n)\n {\n\tGraphics g = getGraphics();\n\tboolean painting;\n\tColor nc,lc;\n\n\tpainting = (n.paths_passing==0);\n\twhile (n != null) {\n\t if (painting)\n\t\tn.paths_passing++;\n\t else {\n\t\tn.paths_passing--;\n\t }\n\t \n// \t nc = (n.paths_passing > 0)?hilitcolor:normalcolor;\n// \t lc = (n.paths_passing > 0)?hilitcolor:linecolor;\n\t nc = (n.paths_passing > 0)?n.path_color:normalcolor;\n\t lc = (n.paths_passing > 0)?n.path_color:linecolor;\n\t \n\t if (n.parent == null) {\n\t\tsetRenderColor(g,nc);\n\t\trenderNode(g,n);\n\t\tbreak;\n\t }\n\n\t // Double line width\n\t //setRenderColor(g,(n.paths_passing>0)?hilitcolor:Color.white);\n\t setRenderColor(g,(n.paths_passing>0)?n.path_color:Color.white);\n\t renderLine(g,n.x-1,n.y,n.parent.x-1,n.parent.y);\t\n\n\t setRenderColor(g,lc);\n\t renderLine(g,n.x,n.y,n.parent.x,n.parent.y);\n\n\t setRenderColor(g,nc);\n\t renderNode(g,n);\n\t n = n.parent;\n\t}\n }", "int fi(int x, int y) {\n\t\treturn (x + 1) + (width + 2) * (y + 1);\n\t}", "double defendre();", "public void getTile_B8();", "public void SubRect(){\n\t\n}", "public static void sizePathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze five = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\t//System.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = five.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber + n)){\n\t\t\t\t\t\tS.unionBySize(randomNumber+n, randomNumber);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'u');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+1);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(five, n);\n\t\tuserSelection_SolveMaze(n);\n\n\t\tStdDraw.show(0);\n\t\tfive.draw();\n\t\tfive.printCellNumbers();\t\n\t}", "void mo21076g();", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "public double getWidth() {\n return this.size * 2.0; \n }", "public void skystonePos2() {\n }", "public void skystonePos5() {\n }", "public double getPerimiter(){return (2*height +2*width);}", "int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}", "public static void topHalf() {\n \t\n for( int i = 1; i <= SIZE; i++){\n for(int spaces = 1; spaces <= 3*SIZE - 3*i; spaces++) {\n System.out.print(\" \"); \n }\n \n for(int j = 1; j <= 1; j++) {\n System.out.print(\"__/\");\n }\n \n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\":::\");\n }\n \n System.out.print(\"||\");\n \n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\":::\");\n }\n \n for(int j = 1; j <= 1; j++) {\n System.out.print(\"\\\\__\");\n }\n \n System.out.println();\n }\n \n System.out.print(\"|\");\n \n for(int i = 1; i <= 6 * SIZE; i++) {\n System.out.print(\"\\\"\");\n }\n \n System.out.println(\"|\");\n }", "public static void body() {\n \tfor(int i = 1; i <= SIZE*SIZE; i++) {\n for(int j = 1; j <= 3*SIZE-(SIZE-1); j++) {\n System.out.print(\" \");\n }\n \n System.out.print(\"|\");\n for(int j = 1; j <= SIZE-2; j++) {\n \tSystem.out.print(\"%\");\n }\n System.out.print(\"||\");\n for(int j = 1; j <= SIZE-2; j++) {\n \tSystem.out.print(\"%\");\n }\n System.out.print(\"|\");\n \n System.out.println();\n }\n }", "public void skystonePos3() {\n }", "double seBlesser();", "public wall() { //default constructor makes a 10x10 square extending right and down from the pixel located at 5,5\r\n x = 5;\r\n y = 5;\r\n height = 10;\r\n width = 10;\r\n }", "void block(Directions dir);", "public void lowerFlatbed(){\n flatbed.lowerFlatbed();\n }", "public static void main(String[] args) {\nint i,j,k;\r\nint num=5;\r\nfor(i=0;i<num;i++){\r\n\tfor(j=0;j<i;j++){\r\n\t\tSystem.out.print(\" \");\r\n\t}\r\n\tfor(k=num; k>=2*i-1; k--){\r\n\t\tSystem.out.print(\"*\");\r\n\t}\r\n\t\r\n\tSystem.out.println();\r\n}\r\n\t}", "public RMPath getPath() { return RMPath.unitRectPath; }", "public int upright();", "private int uniquePaths(int x, int y, int[][] dp) {\n \t\tif (x == 0 || y == 0) return 1;\n \t\tif (dp[x][y] == 0)\n \t\t\tdp[x][y] = uniquePaths(x - 1, y, dp) + uniquePaths(x, y - 1, dp);\n \t\treturn dp[x][y];\n \t}", "public Integer getWidth(){return this.width;}", "public void skystonePos6() {\n }", "void GenerateBoardPath() {\n\t\t\t\n\t\t\tint rows = board.getRowsNum();\n\t\t\tint columns = board.getColsNum();\n\t\t\tint space_number = 1; \n\t\t\t\n\t\t\t\n\t\t\tfor (int i = rows - 1; i >= 0; i--) \n\t\t\t\t//If the row is an odd-number, move L-R\n\t\t\t\tif (i % 2 != 0) {\n\t\t\t\t\tfor (int j = 0; j < columns; j++) \n\t\t\t\t\t\tBoardPathRepository.put(space_number++, board.getTile(i, j));}\n\t\t\t\telse {\n\t\t\t\t\tfor (int j = columns-1; j >=0; j--) \n\t\t\t\t\t\tBoardPathRepository.put(space_number++, board.getTile(i, j));\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t}", "private byte r() {\r\n\t\treturn (left_map == 0 ) ? (byte) 1 : 0;\r\n\t}", "private void render() {\n StringBuilder builder = new StringBuilder();\n builder.append(horizontalEdge).append(\"\\n\");\n for (int i = 0; i < this.height; i++) {\n builder.append(VERTICAL_CHAR);\n for (int j = 0; j < this.width; j++) {\n builder.append(pixels[i][j]);\n }\n builder.append(VERTICAL_CHAR);\n builder.append(\"\\n\");\n }\n builder.append(horizontalEdge);\n System.out.printf(builder.toString());\n }", "@Override\n\tpublic void breath() {\n\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "public\nstatic\nvoid\nmain(String args[]) \n\n{ \n\nBinaryTree tree = \nnew\nBinaryTree(); \n\ntree.root = \nnew\nNode(\n20\n); \n\ntree.root.left = \nnew\nNode(\n8\n); \n\ntree.root.left.left = \nnew\nNode(\n4\n); \n\ntree.root.left.right = \nnew\nNode(\n12\n); \n\ntree.root.left.right.left = \nnew\nNode(\n10\n); \n\ntree.root.left.right.right = \nnew\nNode(\n14\n); \n\ntree.root.right = \nnew\nNode(\n22\n); \n\ntree.root.right.right = \nnew\nNode(\n25\n); \n\ntree.printBoundary(tree.root); \n\n}", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tint n = 7;\r\n\t\tfor (int i = n; i >= 0; i--) {\r\n\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t for(int j=0; j<n-i; j++) {\r\n\t\t\t \r\n\t\t\t System.out.print(\" \");\r\n\t\t\t \r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t \r\n\r\n\t\t\tfor (int j = n; j >= n-i; j--) {\r\n\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t}\r\n\r\n\t\t\r\n\t}", "@Override\n\tpublic void draw() {\n\t}", "private void division()\n\t{\n\t\tFun = Function.DIVIDE; //Function set to determine what action should be taken later.\n\t\t\n\t\t\tsetLeftValue();\n\t\t\tentry.grabFocus();\n\t\t\n\t}" ]
[ "0.5654086", "0.5282051", "0.5270874", "0.5268489", "0.5230159", "0.5229372", "0.5205559", "0.51923394", "0.51524484", "0.50993294", "0.50948834", "0.5071109", "0.5043058", "0.5009983", "0.5006536", "0.49739555", "0.49691963", "0.4959123", "0.49568397", "0.49425906", "0.49421698", "0.49421698", "0.4903223", "0.4897176", "0.48879617", "0.48803073", "0.48741165", "0.48718095", "0.48679698", "0.48646608", "0.48598114", "0.48402584", "0.48362267", "0.48321876", "0.48310882", "0.4825809", "0.48227587", "0.48175377", "0.48045233", "0.48045233", "0.48002362", "0.47911668", "0.47906598", "0.4776121", "0.47734705", "0.47673976", "0.475685", "0.47517157", "0.47446346", "0.47364715", "0.47353277", "0.47321412", "0.47242466", "0.4721296", "0.47190621", "0.47164857", "0.47148356", "0.47142458", "0.47103566", "0.47027764", "0.47023293", "0.4701804", "0.46992764", "0.46985114", "0.46954885", "0.4695406", "0.46914175", "0.4690724", "0.46901584", "0.4686765", "0.4682771", "0.46786475", "0.46786475", "0.4676364", "0.46714565", "0.46710065", "0.46701837", "0.46698236", "0.46671712", "0.466633", "0.4663725", "0.46617198", "0.46599096", "0.46593648", "0.4654308", "0.46481097", "0.46472353", "0.46443266", "0.46441418", "0.46438584", "0.4642061", "0.46387514", "0.46382058", "0.46375832", "0.4636777", "0.46365395", "0.46365395", "0.46359038", "0.4635539", "0.46332848", "0.46326485" ]
0.0
-1
/ / / / / / / / / / / / / / / / / / / / / / / / /
private boolean isHasCorrespondingReadProperty(Method paramMethod, Class paramClass) { /* 321 */ String str = paramMethod.getName(); /* 322 */ boolean bool = false; /* */ /* */ /* */ /* */ try { /* 327 */ String str1 = str.replaceFirst("is", "get"); /* */ /* 329 */ Method method = paramClass.getMethod(str1, new Class[0]); /* */ /* 331 */ bool = isPropertyAccessorMethod(method, paramClass); /* */ } /* 333 */ catch (Exception exception) {} /* */ /* */ /* */ /* 337 */ return bool; /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static int getNumPatterns() { return 64; }", "double passer();", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "private int parent(int i){return (i-1)/2;}", "void mo33732Px();", "public Integer getWidth(){return this.width;}", "private int leftChild(int i){return 2*i+1;}", "public void gored() {\n\t\t\n\t}", "int getWidth() {return width;}", "public int getBlockLength()\r\n/* 45: */ {\r\n/* 46:107 */ return -32;\r\n/* 47: */ }", "int width();", "public void method_4270() {}", "int getTribeSize();", "int getSize ();", "@Override\n\tpublic int sount() {\n\t\treturn 0;\n\t}", "double seBlesser();", "public int getInternalBlockLength()\r\n/* 40: */ {\r\n/* 41: 95 */ return 32;\r\n/* 42: */ }", "public void getTile_B8();", "public abstract void bepaalGrootte();", "private void poetries() {\n\n\t}", "static int size_of_inx(String passed){\n\t\treturn 1;\n\t}", "@Override\n\tprotected void interr() {\n\t}", "public int length() { return 1+maxidx; }", "@Override\n protected int mapSize() {\n return left.size()+right.size()-hidden.size();\n }", "public int getEdgeCount() \n {\n return 3;\n }", "public int generateRoshambo(){\n ;]\n\n }", "static int size_of_xra(String passed){\n\t\treturn 1;\n\t}", "public int getTakeSpace() {\n return 0;\n }", "public double getWidth() {\n return this.size * 2.0; \n }", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "public abstract int getSpotsNeeded();", "@Override\n public void perish() {\n \n }", "@Override\n public int getSize() {\n return 1;\n }", "public int getWidth() {\r\n\treturn this.width;\r\n}", "int fixedSize();", "public void skystonePos4() {\n }", "@Override\n\tpublic float getWidth() {\n\t\treturn 26;\n\t}", "@Override\n public void func_104112_b() {\n \n }", "int memSize() {\n return super.memSize() + 4 * 4; }", "laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }", "long getWidth();", "static int size_of_xthl(String passed){\n\t\treturn 1;\n\t}", "public static int size_parentId() {\n return (16 / 8);\n }", "public int getSize(){return _size;}", "static int size_of_rpo(String passed){\n\t\treturn 1;\n\t}", "@Override\r\n\tpublic int size() {\n\t\treturn 27;\r\n\t}", "protected int getWidth()\n\t{\n\t\treturn 0;\n\t}", "public byte[] initialValue() {\n return new byte[]{(byte) -1, (byte) -40, (byte) -1, (byte) -37, (byte) 0, (byte) 67, (byte) 0, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -64, (byte) 0, (byte) 17, (byte) 8, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 3, (byte) 1, (byte) 34, (byte) 0, (byte) 2, (byte) 17, (byte) 0, (byte) 3, (byte) 17, (byte) 0, (byte) -1, (byte) -60, (byte) 0, (byte) 31, (byte) 0, (byte) 0, (byte) 1, (byte) 5, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 2, (byte) 3, (byte) 4, (byte) 5, (byte) 6, (byte) 7, (byte) 8, (byte) 9, (byte) 10, (byte) 11, (byte) -1, (byte) -60, (byte) 0, (byte) -75, (byte) 16, (byte) 0, (byte) 2, (byte) 1, (byte) 3, (byte) 3, (byte) 2, (byte) 4, (byte) 3, (byte) 5, (byte) 5, (byte) 4, (byte) 4, (byte) 0, (byte) 0, (byte) 1, (byte) 125, (byte) 1, (byte) 2, (byte) 3, (byte) 0, (byte) 4, (byte) 17, (byte) 5, (byte) 18, (byte) 33, (byte) 49, (byte) 65, (byte) 6, (byte) 19, (byte) 81, (byte) 97, (byte) 7, (byte) 34, (byte) 113, (byte) 20, (byte) 50, (byte) -127, (byte) -111, (byte) -95, (byte) 8, (byte) 35, (byte) 66, (byte) -79, (byte) -63, (byte) 21, (byte) 82, (byte) -47, (byte) -16, (byte) 36, (byte) 51, (byte) 98, (byte) 114, (byte) -126, (byte) 9, (byte) 10, (byte) 22, (byte) 23, (byte) 24, (byte) 25, (byte) 26, (byte) 37, (byte) 38, (byte) 39, (byte) 40, (byte) 41, (byte) 42, (byte) 52, (byte) 53, (byte) 54, (byte) 55, (byte) 56, (byte) 57, (byte) 58, (byte) 67, (byte) 68, (byte) 69, (byte) 70, (byte) 71, (byte) 72, (byte) 73, (byte) 74, (byte) 83, (byte) 84, (byte) 85, (byte) 86, (byte) 87, (byte) 88, (byte) 89, (byte) 90, (byte) 99, (byte) 100, (byte) 101, (byte) 102, (byte) 103, (byte) 104, (byte) 105, (byte) 106, (byte) 115, (byte) 116, (byte) 117, (byte) 118, (byte) 119, (byte) 120, (byte) 121, (byte) 122, (byte) -125, (byte) -124, (byte) -123, (byte) -122, (byte) -121, (byte) -120, (byte) -119, (byte) -118, (byte) -110, (byte) -109, (byte) -108, (byte) -107, (byte) -106, (byte) -105, (byte) -104, (byte) -103, (byte) -102, (byte) -94, (byte) -93, (byte) -92, (byte) -91, (byte) -90, (byte) -89, (byte) -88, (byte) -87, (byte) -86, (byte) -78, (byte) -77, (byte) -76, (byte) -75, (byte) -74, (byte) -73, (byte) -72, (byte) -71, (byte) -70, (byte) -62, (byte) -61, (byte) -60, (byte) -59, (byte) -58, (byte) -57, (byte) -56, (byte) -55, (byte) -54, (byte) -46, (byte) -45, (byte) -44, (byte) -43, (byte) -42, (byte) -41, (byte) -40, (byte) -39, (byte) -38, (byte) -31, (byte) -30, (byte) -29, (byte) -28, (byte) -27, (byte) -26, (byte) -25, (byte) -24, (byte) -23, (byte) -22, (byte) -15, (byte) -14, (byte) -13, (byte) -12, (byte) -11, (byte) -10, (byte) -9, (byte) -8, (byte) -7, (byte) -6, (byte) -1, (byte) -60, (byte) 0, (byte) 31, (byte) 1, (byte) 0, (byte) 3, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 2, (byte) 3, (byte) 4, (byte) 5, (byte) 6, (byte) 7, (byte) 8, (byte) 9, (byte) 10, (byte) 11, (byte) -1, (byte) -60, (byte) 0, (byte) -75, (byte) 17, (byte) 0, (byte) 2, (byte) 1, (byte) 2, (byte) 4, (byte) 4, (byte) 3, (byte) 4, (byte) 7, (byte) 5, (byte) 4, (byte) 4, (byte) 0, (byte) 1, (byte) 2, (byte) 119, (byte) 0, (byte) 1, (byte) 2, (byte) 3, (byte) 17, (byte) 4, (byte) 5, (byte) 33, (byte) 49, (byte) 6, (byte) 18, (byte) 65, (byte) 81, (byte) 7, (byte) 97, (byte) 113, (byte) 19, (byte) 34, (byte) 50, (byte) -127, (byte) 8, (byte) 20, (byte) 66, (byte) -111, (byte) -95, (byte) -79, (byte) -63, (byte) 9, (byte) 35, (byte) 51, (byte) 82, (byte) -16, (byte) 21, (byte) 98, (byte) 114, (byte) -47, (byte) 10, (byte) 22, (byte) 36, (byte) 52, (byte) -31, (byte) 37, (byte) -15, (byte) 23, (byte) 24, (byte) 25, (byte) 26, (byte) 38, (byte) 39, (byte) 40, (byte) 41, (byte) 42, (byte) 53, (byte) 54, (byte) 55, (byte) 56, (byte) 57, (byte) 58, (byte) 67, (byte) 68, (byte) 69, (byte) 70, (byte) 71, (byte) 72, (byte) 73, (byte) 74, (byte) 83, (byte) 84, (byte) 85, (byte) 86, (byte) 87, (byte) 88, (byte) 89, (byte) 90, (byte) 99, (byte) 100, (byte) 101, (byte) 102, (byte) 103, (byte) 104, (byte) 105, (byte) 106, (byte) 115, (byte) 116, (byte) 117, (byte) 118, (byte) 119, (byte) 120, (byte) 121, (byte) 122, (byte) -126, (byte) -125, (byte) -124, (byte) -123, (byte) -122, (byte) -121, (byte) -120, (byte) -119, (byte) -118, (byte) -110, (byte) -109, (byte) -108, (byte) -107, (byte) -106, (byte) -105, (byte) -104, (byte) -103, (byte) -102, (byte) -94, (byte) -93, (byte) -92, (byte) -91, (byte) -90, (byte) -89, (byte) -88, (byte) -87, (byte) -86, (byte) -78, (byte) -77, (byte) -76, (byte) -75, (byte) -74, (byte) -73, (byte) -72, (byte) -71, (byte) -70, (byte) -62, (byte) -61, (byte) -60, (byte) -59, (byte) -58, (byte) -57, (byte) -56, (byte) -55, (byte) -54, (byte) -46, (byte) -45, (byte) -44, (byte) -43, (byte) -42, (byte) -41, (byte) -40, (byte) -39, (byte) -38, (byte) -30, (byte) -29, (byte) -28, (byte) -27, (byte) -26, (byte) -25, (byte) -24, (byte) -23, (byte) -22, (byte) -14, (byte) -13, (byte) -12, (byte) -11, (byte) -10, (byte) -9, (byte) -8, (byte) -7, (byte) -6, (byte) -1, (byte) -38, (byte) 0, (byte) 12, (byte) 3, (byte) 1, (byte) 0, (byte) 2, (byte) 17, (byte) 3, (byte) 17, (byte) 0, (byte) 63, (byte) 0, (byte) -114, (byte) -118, (byte) 40, (byte) -96, (byte) 15, (byte) -1, (byte) -39};\n }", "public static int size_parent() {\n return (8 / 8);\n }", "int getSpriteArraySize();", "static int size_of_shld(String passed){\n\t\treturn 3;\n\t}", "public abstract void mo56925d();", "double getNewWidth();", "public void divide() {\n\t\t\n\t}", "public void verliesLeven() {\r\n\t\t\r\n\t}", "int align();", "@Override\n public int getSize() {\n return 64;\n }", "public abstract int mo9754s();", "private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }", "public interface Probing {\r\n\t/**\r\n\t * Get an alternate hash position\r\n\t * @param key The original key\r\n\t * @param i How many spaces are occupied already\r\n\t * @param max How many spaces are available\r\n\t * @return A new position for the key\r\n\t */\r\n\tpublic int getHash(int key, int i, int max);\r\n}", "private void m50366E() {\n }", "@Override\n public int getSize() {\n\treturn 0;\n }", "long getMid();", "long getMid();", "public int getSize(){return this.size;}", "int size() {\n int basic = ((offset() + 4) & ~3) - offset() + 8;\n /* Add 8*number of offsets */\n return basic + targetsOp.length*8;\n }", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "public int get_resource_distance() {\n return 1;\r\n }", "@Override\n public int width()\n {\n return widthCent; //Charlie Gao helped me debug the issue here\n }", "static int size_of_rp(String passed){\n\t\treturn 1;\n\t}", "public double getWidth() { return _width<0? -_width : _width; }", "@Override\n public String toString()\n {\n\treturn getClass().getSimpleName() + \" (\" + getLength() + \"x\" + getWidth() + \")\";\n }", "@Override\n\tpublic int computeSize() {\n\t\treturn 36;\n\t}", "@Override\n public void bfs() {\n\n }", "public String ring();", "default int getCompositeBitLength() {\n return getHighBitLength() + getLowBitLength();\n }", "@Override\n protected long advanceH(final long k) {\n return 5 * k - 2;\n }", "static int size_of_xri(String passed){\n\t\treturn 2;\n\t}", "public int my_leaf_count();", "private void level7() {\n }", "@Override\r\n\tpublic int getWidth() {\n\t\treturn 0;\r\n\t}", "public void leerPlanesDietas();", "public interface ITechLinker extends ITechByteObject {\r\n \r\n /**\r\n * \r\n */\r\n public static final int LINKER_BASIC_SIZE = A_OBJECT_BASIC_SIZE + 5;\r\n\r\n /**\r\n * \r\n */\r\n public static final int LINKER_OFFSET_01_TYPE1 = A_OBJECT_BASIC_SIZE;\r\n\r\n /**\r\n * \r\n */\r\n public static final int LINKER_OFFSET_02_DATA4 = A_OBJECT_BASIC_SIZE + 1;\r\n\r\n}", "long getSize();", "@Override\r\n\tpublic int operar() {\n\t\treturn 0;\r\n\t}", "int expand();", "public void mo21877s() {\n }", "private static Object[] newPath(int length, Object[] leaf) {\n Object[] node = leaf;\n for (int i = 0; i < length; i += 5) {\n node = new Object[] { node };\n }\n return node;\n }", "@Override\n\tpublic int taille() {\n\t\treturn 1;\n\t}" ]
[ "0.51399547", "0.5131128", "0.5119027", "0.5097745", "0.50405824", "0.50197875", "0.5016779", "0.49754438", "0.49635002", "0.49618208", "0.49443138", "0.49290267", "0.49223396", "0.49198383", "0.49195004", "0.49156117", "0.4912135", "0.4886776", "0.48860443", "0.48609847", "0.4860524", "0.48583794", "0.48559892", "0.4849906", "0.4849344", "0.4841757", "0.48411283", "0.48401913", "0.4836817", "0.48343477", "0.4827947", "0.4824216", "0.48222223", "0.48135203", "0.48073256", "0.4805911", "0.4802631", "0.4799138", "0.47895014", "0.47893843", "0.47870162", "0.47831497", "0.47790566", "0.47784105", "0.47762328", "0.4775706", "0.47748405", "0.47703993", "0.47692192", "0.47683373", "0.47678977", "0.47651494", "0.47644082", "0.4763657", "0.47592735", "0.47558174", "0.47513452", "0.4750664", "0.47475937", "0.47460392", "0.47439772", "0.47435668", "0.47433618", "0.47433618", "0.47416535", "0.4735418", "0.47340873", "0.47340873", "0.47340873", "0.47340873", "0.47340873", "0.47340873", "0.47340873", "0.47340873", "0.47340873", "0.47340873", "0.47340873", "0.47340873", "0.47340873", "0.47333214", "0.4732068", "0.4727434", "0.47270632", "0.47240195", "0.47220507", "0.47192207", "0.47134084", "0.47119918", "0.47112933", "0.47075984", "0.4698447", "0.4698391", "0.4697278", "0.46968535", "0.46964347", "0.46943602", "0.46919492", "0.46909314", "0.46900812", "0.46871892", "0.46846145" ]
0.0
-1
/ / / / / / /
public IDLType getPrimitiveIDLTypeMapping(Class<void> paramClass) { /* 375 */ if (paramClass == null) { /* 376 */ throw new IllegalArgumentException(); /* */ } /* */ /* 379 */ if (paramClass.isPrimitive()) { /* 380 */ if (paramClass == void.class) /* 381 */ return new IDLType(paramClass, "void"); /* 382 */ if (paramClass == boolean.class) /* 383 */ return new IDLType(paramClass, "boolean"); /* 384 */ if (paramClass == char.class) /* 385 */ return new IDLType(paramClass, "wchar"); /* 386 */ if (paramClass == byte.class) /* 387 */ return new IDLType(paramClass, "octet"); /* 388 */ if (paramClass == short.class) /* 389 */ return new IDLType(paramClass, "short"); /* 390 */ if (paramClass == int.class) /* 391 */ return new IDLType(paramClass, "long"); /* 392 */ if (paramClass == long.class) /* 393 */ return new IDLType(paramClass, "long_long"); /* 394 */ if (paramClass == float.class) /* 395 */ return new IDLType(paramClass, "float"); /* 396 */ if (paramClass == double.class) { /* 397 */ return new IDLType(paramClass, "double"); /* */ } /* */ } /* */ /* 401 */ return null; /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "public void divide() {\n\t\t\n\t}", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "private int rightChild(int i){return 2*i+2;}", "public abstract void bepaalGrootte();", "public static void bottomHalf() {\n\n for(int i = 1; i <= SIZE; i++) {\n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\" \");\n }\n \n\t System.out.print(\"\\\\_\");\n\t for(int j = 3*SIZE-i; j >= i; j--) {\n\t System.out.print(\"/\\\\\");\n\t }\n\t System.out.println(\"_/\");\n }\n }", "double passer();", "public void gored() {\n\t\t\n\t}", "public String ring();", "laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }", "public abstract String division();", "public String toString(){ return \"DIV\";}", "public double getWidth() {\n return this.left.getLeft(0) - this.right.getRight(0); \n }", "private static Object[] newPath(int length, Object[] leaf) {\n Object[] node = leaf;\n for (int i = 0; i < length; i += 5) {\n node = new Object[] { node };\n }\n return node;\n }", "int getWidth() {return width;}", "private void pointer(Graphics image,int x,int y,int height,int b,int dir) {\n\n\t\tint[] xt=new int[3];\n\t\tint[] yt=new int[3];\n\n\t\tif(dir==0) {\n\t\t\txt[0]=x;\n\t\t\txt[1]=xt[2]=x+height;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=y+b/2;\n\t\t\tyt[2]=y-b/2;\n\t\t} else {\n\t\t\txt[0]=x;\n\t\t\txt[1]=x+b/2;\n\t\t\txt[2]=x-b/2;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=yt[2]=y-height;\n\t\t}\n\t\timage.fillPolygon(xt,yt,3);\n\t}", "public void getTile_B8();", "public double getWidth() {\n return this.size * 2.0; \n }", "double volume(){\n return width*height*depth;\n }", "@Override\n public void bfs() {\n\n }", "public static void main(String[] args) {\n\n\n for(int a=0; a<7;a++){\n for(int b=0;b<7-a;b++){\n System.out.print(\" \");\n }\n for(int c=0; c<=a;c++){\n System.out.print(\"* \");\n }\n System.out.println(\" \");\n }\n\n }", "int width();", "Operations operations();", "void sharpen();", "void sharpen();", "private static void breadcrumbArrow(int width, int height, int indent, int c1, int c2) {\n\n\t\tdouble x0 = 0, y0 = height / 2d;\n\t\tdouble x1 = indent, y1 = 0;\n\t\tdouble x2 = indent, y2 = height / 2d;\n\t\tdouble x3 = indent, y3 = height;\n\t\tdouble x4 = width, y4 = 0;\n\t\tdouble x5 = width, y5 = height / 2d;\n\t\tdouble x6 = width, y6 = height;\n\t\tdouble x7 = indent + width, y7 = 0;\n\t\tdouble x8 = indent + width, y8 = height;\n\n\t\tint fc1 = ColorHelper.mixAlphaColors(c1, c2, 0);\n\t\tint fc2 = ColorHelper.mixAlphaColors(c1, c2, (indent)/(width + 2f * indent));\n\t\tint fc3 = ColorHelper.mixAlphaColors(c1, c2, (indent + width)/(width + 2f * indent));\n\t\tint fc4 = ColorHelper.mixAlphaColors(c1, c2, 1);\n\n\t\tRenderSystem.disableTexture();\n\t\tRenderSystem.enableBlend();\n\t\tRenderSystem.disableAlphaTest();\n\t\tRenderSystem.defaultBlendFunc();\n\t\tRenderSystem.shadeModel(GL11.GL_SMOOTH);\n\n\t\tTessellator tessellator = Tessellator.getInstance();\n\t\tBufferBuilder bufferbuilder = tessellator.getBuffer();\n\t\tbufferbuilder.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR);\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x7, y7, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x8, y8, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\ttessellator.draw();\n\t\tRenderSystem.shadeModel(GL11.GL_FLAT);\n\t\tRenderSystem.disableBlend();\n\t\tRenderSystem.enableAlphaTest();\n\t\tRenderSystem.enableTexture();\n\t}", "static void pyramid(){\n\t}", "public Integer getWidth(){return this.width;}", "private void traverseBayeredPatternHalfSizeRGB(){\n int originalPositionX = 0;\n int originalPositionY = 1;\n\n for (int newX = 0; originalPositionX < originalImageHeight -1; newX++){\n for (int newY = 0; originalPositionY < originalImageWidth -1; newY++){\n Point newPosition = new Point(newX,newY);\n int newAbsoultPosition = getAbsolutPixelPosition(newPosition, originalImageHeight / 2, originalImageWidth / 2);\n halfSizePixRGB[newAbsoultPosition] = getAverageRGB(new Point(originalPositionX,originalPositionY));\n originalPositionY += 2;\n }\n originalPositionY = 0;\n originalPositionX += 2;\n }\n }", "@Override\npublic void processDirection() {\n\t\n}", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "public int generateRoshambo(){\n ;]\n\n }", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "public void skystonePos4() {\n }", "void mo33732Px();", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}", "public void SubRect(){\n\t\n}", "public static void unionPathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze two = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\tSystem.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = two.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber+n) != S.findAndCompress(randomNumber)){\n\t\t\t\t\t\tS.union(randomNumber+n, randomNumber);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'u');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.union(randomNumber, randomNumber+1);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(two, n);\n\t\tuserSelection_SolveMaze(n);\n\n\n\t\tStdDraw.show(0);\n\t\ttwo.draw();\n\t\ttwo.printCellNumbers();\n\t}", "private int leftChild(int index){\n\t\treturn (2*index) +1;\n\t}", "void walk() {\n\t\t\n\t}", "public static void sizePathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze five = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\t//System.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = five.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber + n)){\n\t\t\t\t\t\tS.unionBySize(randomNumber+n, randomNumber);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'u');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+1);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(five, n);\n\t\tuserSelection_SolveMaze(n);\n\n\t\tStdDraw.show(0);\n\t\tfive.draw();\n\t\tfive.printCellNumbers();\t\n\t}", "public double getWidth() { return _width<0? -_width : _width; }", "public void draw(){\n for(int i = 1; i <= height; i++){\n for(int s = 1; s <= i; s++)\n System.out.print(\"*\");\n System.out.println();\n }\n }", "public void stg() {\n\n\t}", "Parallelogram(){\n length = width = height = 0;\n }", "private int get_right_child(int index){\r\n return 2 * index + 2;\r\n }", "public void foundLeaf(int width, int height, int level, int currX, int currY, int location) {\n level = level +2;\n if (location == 1) {\n\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - ( (new Double(spatialHeight / Math.pow(2, level ))).intValue()),\n currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY * 2,\n Color.BLACK);\n\n\n canvas.addLine(((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue())) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n currX,\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n\n }\n\n if (location == 2) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n ( currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n (currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n\n\n }\n\n if (location == 3) {\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY,\n Color.BLACK);\n\n\n\n canvas.addLine((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n\tcurrY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n (currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n }\n\n if (location == 4) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY,\n Color.BLACK);\n\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue() + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), Color.BLACK);\n\n\n }\n\n\n\n\n }", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tScanner obj=new Scanner(System.in);\r\n\t\tint a=0;\r\n\t\tint count=0;\r\n System.out.println(\"enter size\");\r\n\t\ta=obj.nextInt();\r\n\t\tint m=2*a+1;\r\n\t\tint n=2*a+2;\r\n\t\tint mid=(m+1)/2;\r\n\t\tfor(int i=1;i<=m;i++)\r\n\t\t{\r\n\t\t\tcount=0;\r\n\t\t\tfor(int j=1;j<=n;j++)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tif((i==1)||(i==m)||(j==1)||(j==n))//frame begin\r\n\t\t\t\t{\r\n\t\t\t\t\tif((i==1)||(i==m))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"+\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t {\r\n\t\t\t\t\t\t\tSystem.out.print(\"|\");//frame left and right\r\n\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//frame end\r\n\t\t\t\telse if (i<mid)//upper-half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t for(int l=1;l<=2*i-4;l++)\r\n\t\t\t\t {\r\n\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\tSystem.out.print(\"\\\\\");\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end of upper half\r\n\t\t\t\telse if(i>mid)//lower half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tfor(int k=mid;k<i;k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t System.out.print(\"\\\\\");\r\n\t\t\t\t\t for(int l=2*m-6;l>2*i-4;l--)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t else\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t }\r\n\t\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t\t for(int k=mid;k<i;k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t\t\t}//end of lower half\r\n\t\t\t\telse if(i==mid)//middle part\r\n\t\t\t\t{\r\n\t\t\t\t\tif(j==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\"<\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(j==n-1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\">\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(i%2==0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"=\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end\r\n\t\t\t}//end-of-j\r\n\t\t\tSystem.out.println();\r\n\t\t}//end\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tfor(int j=0;j<8;j++){\n\t\t\tfor(int i=0;i<8;i++){\n\t\t\t\t//上下两侧\n\t\t\t\tif(j==0||j==7){\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}else{\n\t\t\t\t\t//中间\n\t\t\t\t\tif(i>0&&i<7){\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }", "public double getWidth() {\n return this.getRight(this.tree.getRight(0)) - this.getLeft(this.tree.getLeft(0)); \n }", "double getPerimeter(){\n return 2*height+width;\n }", "public static void part2(){\n\t\n System.out.println(\"\\\\\"); //Outer wall\n System.out.println(\"\\\\\");\n System.out.println(\"\\\\\");\n for(int i = 0; i <= 16; i++){ //loop created to display top of the door\n\n \tSystem.out.print(\"-\");\n\n\t}\n System.out.println(\"\");\n System.out.println(\"\\\\\\t\\t| \\t(\\\")\"); //The door and the stick figure\n System.out.println(\"\\\\\\t\\t|\\t-|-\");\n System.out.println(\"\\\\\\t o | \\t |\");\n System.out.println(\"\\\\\\t\\t|\\t /\\\\\");\n System.out.println(\"\\\\\\t\\t|\\t/ \\\\\");\n\t\t\n }", "public double getPerimiter(){return (2*height +2*width);}", "@Override\r\n\tpublic void walk() {\n\r\n\t}", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}", "void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2)\r\n/* 100: */ {\r\n/* 101: 99 */ int s2 = sides << 1 & 0x2A | sides >> 1 & 0x15;\r\n/* 102: */ \r\n/* 103:101 */ this.context.renderBox(sides, x1, y1, z1, x2, y2, z2);\r\n/* 104:102 */ this.context.renderBox(s2, x2, y2, z2, x1, y1, z1);\r\n/* 105: */ }", "@Override\n protected void paint2d(Graphics2D g) {\n \n }", "public static String makeShapeA() {\n\tString result = \"\";\n\t\tfor (int i = 0; i < 8 ; i++) {\n\t\t\tresult+=printHash(i);\n\t\t\t\n\t\t}return result;\n\t\t\t//System.out.println(printHash(i));\n\t\t}", "double getNewWidth();", "public void draw4x4 (char design){\n System.out.println(\"\"+design+design+design+design);\n System.out.println(design+\" \"+design);\n System.out.println(design+\" \"+design);\n System.out.println(\"\"+design+design+design+design);\n}", "public void lowerFlatbed(){\n flatbed.lowerFlatbed();\n }", "int fi(int x, int y) {\n\t\treturn (x + 1) + (width + 2) * (y + 1);\n\t}", "private void createPath(Direction d, int width, Point p1, Point p2) {\n\t\t// Determine how far away from the center the corners are\n\t\tint sideOneOffset = 0;\t// Top or Left depending on path direction\n\t\tint sideTwoOffset = 0;\t// Bot or Right depending on path direction\n\t\t// If the width is odd, balance the offsets\n\t\tif (width % 2 != 0) {\t\n\t\t\tsideOneOffset = sideTwoOffset = ((width / 2) + 1);\n\t\t} else {\n\t\t\t// If the width is even, the offsets will be off by 1\n\t\t\tsideOneOffset = width;\n\t\t\tsideTwoOffset = width - 1;\n\t\t}\n\t\tif (d == Direction.LEFT || d == Direction.RIGHT) {\n\t\t\t// If the direction is left then we want to swap the points\n\t\t\t// to pretend like the direction was right (so the following code works)\n\t\t\tif (d == Direction.LEFT) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p1.x, p1.y + sideTwoOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p2.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x, p1.y + sideTwoOffset)));\n\t\t\t// Set the left and right walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.y is the center of the path (top to bottom)\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x, p1.y + (i - width/2))));\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p2.x, p2.y + (i - width/2))));\n\t\t\t}\n\t\t\t// Set middle path and top/bottom padding (horizontal Oreo!)\n\t\t\tfor (int col = p1.x + 1, endCol = p2.x; col < endCol; col++) {\n\t\t\t\t// Add the top wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(col, p1.y - sideOneOffset)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(col, p1.y + (i - width /2))));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the bottom wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(col, p1.y + sideTwoOffset)));\n\t\t\t}\n\t\t} else {\n\t\t\t// If the direction is up then we want to swap the points\n\t\t\t// to pretend like the direction was down (so the following code works)\n\t\t\tif (d == Direction.UP) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x - sideOneOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p2.x - sideOneOffset, p2.y)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p1.x + sideTwoOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x + sideTwoOffset, p2.y)));\n\t\t\t// Set the top and bottom walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.x is the center of the path (left to right)\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(p1.x + (i - width /2), p1.y)));\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(p2.x + (i - width /2), p2.y)));\n\t\t\t}\n\t\t\t// Set middle path and left/right padding (vertical Oreo!)\n\t\t\tfor (int row = p1.y + 1, endRow = p2.y; row < endRow; row++) {\n\t\t\t\t// Add the left wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x - sideOneOffset, row)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(p1.x + (i - width /2), row)));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the right wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p1.x + sideTwoOffset, row)));\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void walk() {\n\t\t\n\t}", "public void renderCenterBlock(int cons, int side, int end)\r\n/* 143: */ {\r\n/* 144:135 */ if (cons == 0)\r\n/* 145: */ {\r\n/* 146:136 */ this.context.setTex(end);\r\n/* 147:137 */ doubleBox(63, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 148:138 */ return;\r\n/* 149: */ }\r\n/* 150:139 */ if (cons == 3)\r\n/* 151: */ {\r\n/* 152:140 */ this.context.setTexFlags(1773);\r\n/* 153:141 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 154:142 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 155:143 */ return;\r\n/* 156: */ }\r\n/* 157:144 */ if (cons == 12)\r\n/* 158: */ {\r\n/* 159:145 */ this.context.setTexFlags(184365);\r\n/* 160:146 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 161:147 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 1.0F);\r\n/* 162:148 */ return;\r\n/* 163: */ }\r\n/* 164:149 */ if (cons == 48)\r\n/* 165: */ {\r\n/* 166:150 */ this.context.setTexFlags(187200);\r\n/* 167:151 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 168:152 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 169:153 */ return;\r\n/* 170: */ }\r\n/* 171:155 */ this.context.setTex(end);\r\n/* 172:156 */ doubleBox(0x3F ^ cons, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 173:157 */ if ((cons & 0x1) > 0)\r\n/* 174: */ {\r\n/* 175:158 */ this.context.setTexFlags(1773);\r\n/* 176:159 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 177:160 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 0.375F, 0.625F);\r\n/* 178: */ }\r\n/* 179:162 */ if ((cons & 0x2) > 0)\r\n/* 180: */ {\r\n/* 181:163 */ this.context.setTexFlags(1773);\r\n/* 182:164 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 183:165 */ doubleBox(60, 0.375F, 0.625F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 184: */ }\r\n/* 185:167 */ if ((cons & 0x4) > 0)\r\n/* 186: */ {\r\n/* 187:168 */ this.context.setTexFlags(184365);\r\n/* 188:169 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 189:170 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 0.375F);\r\n/* 190: */ }\r\n/* 191:172 */ if ((cons & 0x8) > 0)\r\n/* 192: */ {\r\n/* 193:173 */ this.context.setTexFlags(184365);\r\n/* 194:174 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 195:175 */ doubleBox(51, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F, 1.0F);\r\n/* 196: */ }\r\n/* 197:177 */ if ((cons & 0x10) > 0)\r\n/* 198: */ {\r\n/* 199:178 */ this.context.setTexFlags(187200);\r\n/* 200:179 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 201:180 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F);\r\n/* 202: */ }\r\n/* 203:182 */ if ((cons & 0x20) > 0)\r\n/* 204: */ {\r\n/* 205:183 */ this.context.setTexFlags(187200);\r\n/* 206:184 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 207:185 */ doubleBox(15, 0.625F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 208: */ }\r\n/* 209: */ }", "double seBlesser();", "long getWidth();", "public int getWidth() {\r\n\treturn this.width;\r\n}", "private void render() {\n StringBuilder builder = new StringBuilder();\n builder.append(horizontalEdge).append(\"\\n\");\n for (int i = 0; i < this.height; i++) {\n builder.append(VERTICAL_CHAR);\n for (int j = 0; j < this.width; j++) {\n builder.append(pixels[i][j]);\n }\n builder.append(VERTICAL_CHAR);\n builder.append(\"\\n\");\n }\n builder.append(horizontalEdge);\n System.out.printf(builder.toString());\n }", "public void leerPlanesDietas();", "@Override\r\n public void draw()\r\n {\n\r\n }", "private void buildPath() {\r\n int xNext = 1;\r\n int yNext = map.getStartPos() + 1;\r\n CellLayered before = cells[yNext][xNext];\r\n while(true)\r\n {\r\n Byte[] xy = map.getDirection(xNext-1, yNext-1);\r\n xNext = xNext + xy[0];\r\n yNext = yNext + xy[1];\r\n\r\n CellLayered next = cells[yNext][xNext];\r\n\r\n if(xy[0]==-1)\r\n before.setRight(false);\r\n else\r\n before.setRight(true);\r\n before.setPath(true);\r\n if(next==null)\r\n break;\r\n\r\n before.setNextInPath(next);\r\n before = next;\r\n }\r\n }", "void block(Directions dir);", "public static void slashes() {\n\t\tSystem.out.println(\"//////////////////////\");\r\n\r\n\t}", "public String getRing();", "@Override\r\n\tpublic double perimeter() {\n\t\treturn 2*length*breadth;\r\n\t}", "public\nstatic\nvoid\nmain(String args[]) \n\n{ \n\nBinaryTree tree = \nnew\nBinaryTree(); \n\ntree.root = \nnew\nNode(\n20\n); \n\ntree.root.left = \nnew\nNode(\n8\n); \n\ntree.root.left.left = \nnew\nNode(\n4\n); \n\ntree.root.left.right = \nnew\nNode(\n12\n); \n\ntree.root.left.right.left = \nnew\nNode(\n10\n); \n\ntree.root.left.right.right = \nnew\nNode(\n14\n); \n\ntree.root.right = \nnew\nNode(\n22\n); \n\ntree.root.right.right = \nnew\nNode(\n25\n); \n\ntree.printBoundary(tree.root); \n\n}", "public int getEdgeCount() \n {\n return 3;\n }", "public int getWidth(){\n return width;\n }", "public int upright();", "protected int parent(int i) { return (i - 1) / 2; }", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "protected int getWidth()\n\t{\n\t\treturn 0;\n\t}", "public int getDireccion(Pixel p) {\r\n\t\tif (x == p.x && y < p.y)\r\n\t\t\treturn DIR_N;\r\n\t\tif (x > p.x && y < p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_NE;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_NE;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_E;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_N;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x < p.x && y < p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_NO;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_NO;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_O;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_N;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x == p.x && y > p.y)\r\n\t\t\treturn DIR_S;\r\n\t\tif (x > p.x && y > p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_SE;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_SE;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_E;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_S;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x < p.x && y > p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_SO;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_SO;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_O;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_S;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x > p.x && y == p.y)\r\n\t\t\treturn DIR_E;\r\n\t\tif (x < p.x && y == p.y)\r\n\t\t\treturn DIR_O;\r\n\t\treturn -1;\r\n\t}", "private void renderPath(Node n)\n {\n\tGraphics g = getGraphics();\n\tboolean painting;\n\tColor nc,lc;\n\n\tpainting = (n.paths_passing==0);\n\twhile (n != null) {\n\t if (painting)\n\t\tn.paths_passing++;\n\t else {\n\t\tn.paths_passing--;\n\t }\n\t \n// \t nc = (n.paths_passing > 0)?hilitcolor:normalcolor;\n// \t lc = (n.paths_passing > 0)?hilitcolor:linecolor;\n\t nc = (n.paths_passing > 0)?n.path_color:normalcolor;\n\t lc = (n.paths_passing > 0)?n.path_color:linecolor;\n\t \n\t if (n.parent == null) {\n\t\tsetRenderColor(g,nc);\n\t\trenderNode(g,n);\n\t\tbreak;\n\t }\n\n\t // Double line width\n\t //setRenderColor(g,(n.paths_passing>0)?hilitcolor:Color.white);\n\t setRenderColor(g,(n.paths_passing>0)?n.path_color:Color.white);\n\t renderLine(g,n.x-1,n.y,n.parent.x-1,n.parent.y);\t\n\n\t setRenderColor(g,lc);\n\t renderLine(g,n.x,n.y,n.parent.x,n.parent.y);\n\n\t setRenderColor(g,nc);\n\t renderNode(g,n);\n\t n = n.parent;\n\t}\n }", "double volume() {\n\treturn width*height*depth;\n}", "void table(){\n fill(0);\n rect(width/2, height/2, 600, 350); // boarder\n fill(100, 0 ,0);\n rect(width/2, height/2, 550, 300); //Felt\n \n \n}", "public void snare();", "void ringBell() {\n\n }", "public static void main(String[] args) {\n\t\tint n=5;\n\t\tfor(int i=n-1;i>=0;i--)\n\t\t{\n\t\t\tfor(int space=0;space<n-1-i;space++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int j=0;j<=i*2;j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\n\t\tSystem.out.println();\n\t}\n\n}", "private byte r() {\r\n\t\treturn (left_map == 0 ) ? (byte) 1 : 0;\r\n\t}", "public void skystonePos2() {\n }", "public int my_leaf_count();", "@Override\n\tpublic void draw3() {\n\n\t}" ]
[ "0.54567957", "0.53680295", "0.53644985", "0.52577376", "0.52142847", "0.51725817", "0.514088", "0.50868535", "0.5072305", "0.504888", "0.502662", "0.50005764", "0.49740013", "0.4944243", "0.4941118", "0.4937142", "0.49095523", "0.48940238", "0.48719338", "0.48613623", "0.48604724", "0.48558092", "0.48546165", "0.48490012", "0.4843668", "0.4843668", "0.48420057", "0.4839597", "0.4832105", "0.4817357", "0.481569", "0.48122767", "0.48085573", "0.48065376", "0.48032433", "0.48032212", "0.4799707", "0.4798766", "0.47978994", "0.47978172", "0.47921672", "0.47903922", "0.4790111", "0.47886384", "0.47843018", "0.47837785", "0.47828907", "0.47826976", "0.4776919", "0.47767594", "0.47767594", "0.47766045", "0.4764252", "0.47560593", "0.4753577", "0.4752732", "0.47510985", "0.47496924", "0.47485355", "0.4748455", "0.4746839", "0.4744132", "0.47203988", "0.4713808", "0.4711382", "0.47113234", "0.47096533", "0.47075558", "0.47029856", "0.4701444", "0.47014076", "0.46973658", "0.46969122", "0.4692372", "0.46897912", "0.4683049", "0.4681391", "0.46810925", "0.46750805", "0.46722633", "0.46681988", "0.466349", "0.46618745", "0.46606532", "0.46533036", "0.46485004", "0.46464643", "0.46447286", "0.46447286", "0.46438906", "0.46405315", "0.46397775", "0.4634643", "0.46339533", "0.4633923", "0.4632826", "0.4631328", "0.46299514", "0.46285036", "0.46276402", "0.4625902" ]
0.0
-1
/ / / / / / / /
public IDLType getSpecialCaseIDLTypeMapping(Class<Object> paramClass) { /* 411 */ if (paramClass == null) { /* 412 */ throw new IllegalArgumentException(); /* */ } /* */ /* 415 */ if (paramClass == Object.class) { /* 416 */ return new IDLType(paramClass, new String[] { "java", "lang" }, "Object"); /* */ } /* 418 */ if (paramClass == String.class) { /* 419 */ return new IDLType(paramClass, new String[] { "CORBA" }, "WStringValue"); /* */ } /* 421 */ if (paramClass == Class.class) { /* 422 */ return new IDLType(paramClass, new String[] { "javax", "rmi", "CORBA" }, "ClassDesc"); /* */ } /* 424 */ if (paramClass == Serializable.class) { /* 425 */ return new IDLType(paramClass, new String[] { "java", "io" }, "Serializable"); /* */ } /* 427 */ if (paramClass == Externalizable.class) { /* 428 */ return new IDLType(paramClass, new String[] { "java", "io" }, "Externalizable"); /* */ } /* 430 */ if (paramClass == Remote.class) { /* 431 */ return new IDLType(paramClass, new String[] { "java", "rmi" }, "Remote"); /* */ } /* 433 */ if (paramClass == Object.class) { /* 434 */ return new IDLType(paramClass, "Object"); /* */ } /* 436 */ return null; /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "public void divide() {\n\t\t\n\t}", "private int rightChild(int i){return 2*i+2;}", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "public abstract void bepaalGrootte();", "public static void bottomHalf() {\n\n for(int i = 1; i <= SIZE; i++) {\n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\" \");\n }\n \n\t System.out.print(\"\\\\_\");\n\t for(int j = 3*SIZE-i; j >= i; j--) {\n\t System.out.print(\"/\\\\\");\n\t }\n\t System.out.println(\"_/\");\n }\n }", "double passer();", "public String ring();", "public void gored() {\n\t\t\n\t}", "laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }", "public double getWidth() {\n return this.left.getLeft(0) - this.right.getRight(0); \n }", "private static Object[] newPath(int length, Object[] leaf) {\n Object[] node = leaf;\n for (int i = 0; i < length; i += 5) {\n node = new Object[] { node };\n }\n return node;\n }", "int getWidth() {return width;}", "public String toString(){ return \"DIV\";}", "public abstract String division();", "public void getTile_B8();", "public double getWidth() {\n return this.size * 2.0; \n }", "public Integer getWidth(){return this.width;}", "int width();", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "private void pointer(Graphics image,int x,int y,int height,int b,int dir) {\n\n\t\tint[] xt=new int[3];\n\t\tint[] yt=new int[3];\n\n\t\tif(dir==0) {\n\t\t\txt[0]=x;\n\t\t\txt[1]=xt[2]=x+height;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=y+b/2;\n\t\t\tyt[2]=y-b/2;\n\t\t} else {\n\t\t\txt[0]=x;\n\t\t\txt[1]=x+b/2;\n\t\t\txt[2]=x-b/2;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=yt[2]=y-height;\n\t\t}\n\t\timage.fillPolygon(xt,yt,3);\n\t}", "@Override\n public void bfs() {\n\n }", "private int leftChild(int index){\n\t\treturn (2*index) +1;\n\t}", "double volume(){\n return width*height*depth;\n }", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "private int get_right_child(int index){\r\n return 2 * index + 2;\r\n }", "private void traverseBayeredPatternHalfSizeRGB(){\n int originalPositionX = 0;\n int originalPositionY = 1;\n\n for (int newX = 0; originalPositionX < originalImageHeight -1; newX++){\n for (int newY = 0; originalPositionY < originalImageWidth -1; newY++){\n Point newPosition = new Point(newX,newY);\n int newAbsoultPosition = getAbsolutPixelPosition(newPosition, originalImageHeight / 2, originalImageWidth / 2);\n halfSizePixRGB[newAbsoultPosition] = getAverageRGB(new Point(originalPositionX,originalPositionY));\n originalPositionY += 2;\n }\n originalPositionY = 0;\n originalPositionX += 2;\n }\n }", "@Override\npublic void processDirection() {\n\t\n}", "Operations operations();", "public double getWidth() { return _width<0? -_width : _width; }", "public int generateRoshambo(){\n ;]\n\n }", "public static void main(String[] args) {\n\n\n for(int a=0; a<7;a++){\n for(int b=0;b<7-a;b++){\n System.out.print(\" \");\n }\n for(int c=0; c<=a;c++){\n System.out.print(\"* \");\n }\n System.out.println(\" \");\n }\n\n }", "static void pyramid(){\n\t}", "public static void sizePathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze five = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\t//System.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = five.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber + n)){\n\t\t\t\t\t\tS.unionBySize(randomNumber+n, randomNumber);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'u');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+1);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(five, n);\n\t\tuserSelection_SolveMaze(n);\n\n\t\tStdDraw.show(0);\n\t\tfive.draw();\n\t\tfive.printCellNumbers();\t\n\t}", "public void SubRect(){\n\t\n}", "protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}", "public double getWidth() {\n return this.getRight(this.tree.getRight(0)) - this.getLeft(this.tree.getLeft(0)); \n }", "private static void breadcrumbArrow(int width, int height, int indent, int c1, int c2) {\n\n\t\tdouble x0 = 0, y0 = height / 2d;\n\t\tdouble x1 = indent, y1 = 0;\n\t\tdouble x2 = indent, y2 = height / 2d;\n\t\tdouble x3 = indent, y3 = height;\n\t\tdouble x4 = width, y4 = 0;\n\t\tdouble x5 = width, y5 = height / 2d;\n\t\tdouble x6 = width, y6 = height;\n\t\tdouble x7 = indent + width, y7 = 0;\n\t\tdouble x8 = indent + width, y8 = height;\n\n\t\tint fc1 = ColorHelper.mixAlphaColors(c1, c2, 0);\n\t\tint fc2 = ColorHelper.mixAlphaColors(c1, c2, (indent)/(width + 2f * indent));\n\t\tint fc3 = ColorHelper.mixAlphaColors(c1, c2, (indent + width)/(width + 2f * indent));\n\t\tint fc4 = ColorHelper.mixAlphaColors(c1, c2, 1);\n\n\t\tRenderSystem.disableTexture();\n\t\tRenderSystem.enableBlend();\n\t\tRenderSystem.disableAlphaTest();\n\t\tRenderSystem.defaultBlendFunc();\n\t\tRenderSystem.shadeModel(GL11.GL_SMOOTH);\n\n\t\tTessellator tessellator = Tessellator.getInstance();\n\t\tBufferBuilder bufferbuilder = tessellator.getBuffer();\n\t\tbufferbuilder.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR);\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x7, y7, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x8, y8, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\ttessellator.draw();\n\t\tRenderSystem.shadeModel(GL11.GL_FLAT);\n\t\tRenderSystem.disableBlend();\n\t\tRenderSystem.enableAlphaTest();\n\t\tRenderSystem.enableTexture();\n\t}", "void sharpen();", "void sharpen();", "void mo33732Px();", "void walk() {\n\t\t\n\t}", "public void skystonePos4() {\n }", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "@Override\r\n\tpublic void walk() {\n\r\n\t}", "public static void unionPathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze two = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\tSystem.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = two.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber+n) != S.findAndCompress(randomNumber)){\n\t\t\t\t\t\tS.union(randomNumber+n, randomNumber);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'u');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.union(randomNumber, randomNumber+1);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(two, n);\n\t\tuserSelection_SolveMaze(n);\n\n\n\t\tStdDraw.show(0);\n\t\ttwo.draw();\n\t\ttwo.printCellNumbers();\n\t}", "public double getPerimiter(){return (2*height +2*width);}", "public void foundLeaf(int width, int height, int level, int currX, int currY, int location) {\n level = level +2;\n if (location == 1) {\n\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - ( (new Double(spatialHeight / Math.pow(2, level ))).intValue()),\n currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY * 2,\n Color.BLACK);\n\n\n canvas.addLine(((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue())) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n currX,\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n\n }\n\n if (location == 2) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n ( currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n (currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n\n\n }\n\n if (location == 3) {\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY,\n Color.BLACK);\n\n\n\n canvas.addLine((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n\tcurrY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n (currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n }\n\n if (location == 4) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY,\n Color.BLACK);\n\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue() + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), Color.BLACK);\n\n\n }\n\n\n\n\n }", "public static void main(String[] args) {\n\t\tScanner obj=new Scanner(System.in);\r\n\t\tint a=0;\r\n\t\tint count=0;\r\n System.out.println(\"enter size\");\r\n\t\ta=obj.nextInt();\r\n\t\tint m=2*a+1;\r\n\t\tint n=2*a+2;\r\n\t\tint mid=(m+1)/2;\r\n\t\tfor(int i=1;i<=m;i++)\r\n\t\t{\r\n\t\t\tcount=0;\r\n\t\t\tfor(int j=1;j<=n;j++)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tif((i==1)||(i==m)||(j==1)||(j==n))//frame begin\r\n\t\t\t\t{\r\n\t\t\t\t\tif((i==1)||(i==m))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"+\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t {\r\n\t\t\t\t\t\t\tSystem.out.print(\"|\");//frame left and right\r\n\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//frame end\r\n\t\t\t\telse if (i<mid)//upper-half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t for(int l=1;l<=2*i-4;l++)\r\n\t\t\t\t {\r\n\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\tSystem.out.print(\"\\\\\");\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end of upper half\r\n\t\t\t\telse if(i>mid)//lower half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tfor(int k=mid;k<i;k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t System.out.print(\"\\\\\");\r\n\t\t\t\t\t for(int l=2*m-6;l>2*i-4;l--)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t else\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t }\r\n\t\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t\t for(int k=mid;k<i;k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t\t\t}//end of lower half\r\n\t\t\t\telse if(i==mid)//middle part\r\n\t\t\t\t{\r\n\t\t\t\t\tif(j==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\"<\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(j==n-1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\">\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(i%2==0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"=\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end\r\n\t\t\t}//end-of-j\r\n\t\t\tSystem.out.println();\r\n\t\t}//end\r\n\r\n\t}", "double getNewWidth();", "Parallelogram(){\n length = width = height = 0;\n }", "int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}", "long getWidth();", "public int getWidth() {\r\n\treturn this.width;\r\n}", "double getPerimeter(){\n return 2*height+width;\n }", "public int getEdgeCount() \n {\n return 3;\n }", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "public void draw(){\n for(int i = 1; i <= height; i++){\n for(int s = 1; s <= i; s++)\n System.out.print(\"*\");\n System.out.println();\n }\n }", "public void stg() {\n\n\t}", "@Override\n\tpublic void walk() {\n\t\t\n\t}", "private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }", "public void lowerFlatbed(){\n flatbed.lowerFlatbed();\n }", "double seBlesser();", "public void leerPlanesDietas();", "public static void main(String[] args) {\n\t\tfor(int j=0;j<8;j++){\n\t\t\tfor(int i=0;i<8;i++){\n\t\t\t\t//上下两侧\n\t\t\t\tif(j==0||j==7){\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}else{\n\t\t\t\t\t//中间\n\t\t\t\t\tif(i>0&&i<7){\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public int my_leaf_count();", "public static String makeShapeA() {\n\tString result = \"\";\n\t\tfor (int i = 0; i < 8 ; i++) {\n\t\t\tresult+=printHash(i);\n\t\t\t\n\t\t}return result;\n\t\t\t//System.out.println(printHash(i));\n\t\t}", "public String getRing();", "void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2)\r\n/* 100: */ {\r\n/* 101: 99 */ int s2 = sides << 1 & 0x2A | sides >> 1 & 0x15;\r\n/* 102: */ \r\n/* 103:101 */ this.context.renderBox(sides, x1, y1, z1, x2, y2, z2);\r\n/* 104:102 */ this.context.renderBox(s2, x2, y2, z2, x1, y1, z1);\r\n/* 105: */ }", "public int getWidth(){\n return width;\n }", "@Override\n protected void paint2d(Graphics2D g) {\n \n }", "private int get_left_child(int index){\r\n return 2 * index + 1;\r\n }", "public static void part2(){\n\t\n System.out.println(\"\\\\\"); //Outer wall\n System.out.println(\"\\\\\");\n System.out.println(\"\\\\\");\n for(int i = 0; i <= 16; i++){ //loop created to display top of the door\n\n \tSystem.out.print(\"-\");\n\n\t}\n System.out.println(\"\");\n System.out.println(\"\\\\\\t\\t| \\t(\\\")\"); //The door and the stick figure\n System.out.println(\"\\\\\\t\\t|\\t-|-\");\n System.out.println(\"\\\\\\t o | \\t |\");\n System.out.println(\"\\\\\\t\\t|\\t /\\\\\");\n System.out.println(\"\\\\\\t\\t|\\t/ \\\\\");\n\t\t\n }", "int fi(int x, int y) {\n\t\treturn (x + 1) + (width + 2) * (y + 1);\n\t}", "protected int parent(int i) { return (i - 1) / 2; }", "public void draw4x4 (char design){\n System.out.println(\"\"+design+design+design+design);\n System.out.println(design+\" \"+design);\n System.out.println(design+\" \"+design);\n System.out.println(\"\"+design+design+design+design);\n}", "private int get_parent(int index){\r\n return (index-1)/2;\r\n }", "@Override\r\n\tpublic double perimeter() {\n\t\treturn 2*length*breadth;\r\n\t}", "protected int getWidth()\n\t{\n\t\treturn 0;\n\t}", "static int getNumPatterns() { return 64; }", "public void renderCenterBlock(int cons, int side, int end)\r\n/* 143: */ {\r\n/* 144:135 */ if (cons == 0)\r\n/* 145: */ {\r\n/* 146:136 */ this.context.setTex(end);\r\n/* 147:137 */ doubleBox(63, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 148:138 */ return;\r\n/* 149: */ }\r\n/* 150:139 */ if (cons == 3)\r\n/* 151: */ {\r\n/* 152:140 */ this.context.setTexFlags(1773);\r\n/* 153:141 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 154:142 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 155:143 */ return;\r\n/* 156: */ }\r\n/* 157:144 */ if (cons == 12)\r\n/* 158: */ {\r\n/* 159:145 */ this.context.setTexFlags(184365);\r\n/* 160:146 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 161:147 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 1.0F);\r\n/* 162:148 */ return;\r\n/* 163: */ }\r\n/* 164:149 */ if (cons == 48)\r\n/* 165: */ {\r\n/* 166:150 */ this.context.setTexFlags(187200);\r\n/* 167:151 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 168:152 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 169:153 */ return;\r\n/* 170: */ }\r\n/* 171:155 */ this.context.setTex(end);\r\n/* 172:156 */ doubleBox(0x3F ^ cons, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 173:157 */ if ((cons & 0x1) > 0)\r\n/* 174: */ {\r\n/* 175:158 */ this.context.setTexFlags(1773);\r\n/* 176:159 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 177:160 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 0.375F, 0.625F);\r\n/* 178: */ }\r\n/* 179:162 */ if ((cons & 0x2) > 0)\r\n/* 180: */ {\r\n/* 181:163 */ this.context.setTexFlags(1773);\r\n/* 182:164 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 183:165 */ doubleBox(60, 0.375F, 0.625F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 184: */ }\r\n/* 185:167 */ if ((cons & 0x4) > 0)\r\n/* 186: */ {\r\n/* 187:168 */ this.context.setTexFlags(184365);\r\n/* 188:169 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 189:170 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 0.375F);\r\n/* 190: */ }\r\n/* 191:172 */ if ((cons & 0x8) > 0)\r\n/* 192: */ {\r\n/* 193:173 */ this.context.setTexFlags(184365);\r\n/* 194:174 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 195:175 */ doubleBox(51, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F, 1.0F);\r\n/* 196: */ }\r\n/* 197:177 */ if ((cons & 0x10) > 0)\r\n/* 198: */ {\r\n/* 199:178 */ this.context.setTexFlags(187200);\r\n/* 200:179 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 201:180 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F);\r\n/* 202: */ }\r\n/* 203:182 */ if ((cons & 0x20) > 0)\r\n/* 204: */ {\r\n/* 205:183 */ this.context.setTexFlags(187200);\r\n/* 206:184 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 207:185 */ doubleBox(15, 0.625F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 208: */ }\r\n/* 209: */ }", "private void buildPath() {\r\n int xNext = 1;\r\n int yNext = map.getStartPos() + 1;\r\n CellLayered before = cells[yNext][xNext];\r\n while(true)\r\n {\r\n Byte[] xy = map.getDirection(xNext-1, yNext-1);\r\n xNext = xNext + xy[0];\r\n yNext = yNext + xy[1];\r\n\r\n CellLayered next = cells[yNext][xNext];\r\n\r\n if(xy[0]==-1)\r\n before.setRight(false);\r\n else\r\n before.setRight(true);\r\n before.setPath(true);\r\n if(next==null)\r\n break;\r\n\r\n before.setNextInPath(next);\r\n before = next;\r\n }\r\n }", "public abstract double getBaseWidth();", "private void render() {\n StringBuilder builder = new StringBuilder();\n builder.append(horizontalEdge).append(\"\\n\");\n for (int i = 0; i < this.height; i++) {\n builder.append(VERTICAL_CHAR);\n for (int j = 0; j < this.width; j++) {\n builder.append(pixels[i][j]);\n }\n builder.append(VERTICAL_CHAR);\n builder.append(\"\\n\");\n }\n builder.append(horizontalEdge);\n System.out.printf(builder.toString());\n }", "public\nstatic\nvoid\nmain(String args[]) \n\n{ \n\nBinaryTree tree = \nnew\nBinaryTree(); \n\ntree.root = \nnew\nNode(\n20\n); \n\ntree.root.left = \nnew\nNode(\n8\n); \n\ntree.root.left.left = \nnew\nNode(\n4\n); \n\ntree.root.left.right = \nnew\nNode(\n12\n); \n\ntree.root.left.right.left = \nnew\nNode(\n10\n); \n\ntree.root.left.right.right = \nnew\nNode(\n14\n); \n\ntree.root.right = \nnew\nNode(\n22\n); \n\ntree.root.right.right = \nnew\nNode(\n25\n); \n\ntree.printBoundary(tree.root); \n\n}", "public int upright();", "private void createPath(Direction d, int width, Point p1, Point p2) {\n\t\t// Determine how far away from the center the corners are\n\t\tint sideOneOffset = 0;\t// Top or Left depending on path direction\n\t\tint sideTwoOffset = 0;\t// Bot or Right depending on path direction\n\t\t// If the width is odd, balance the offsets\n\t\tif (width % 2 != 0) {\t\n\t\t\tsideOneOffset = sideTwoOffset = ((width / 2) + 1);\n\t\t} else {\n\t\t\t// If the width is even, the offsets will be off by 1\n\t\t\tsideOneOffset = width;\n\t\t\tsideTwoOffset = width - 1;\n\t\t}\n\t\tif (d == Direction.LEFT || d == Direction.RIGHT) {\n\t\t\t// If the direction is left then we want to swap the points\n\t\t\t// to pretend like the direction was right (so the following code works)\n\t\t\tif (d == Direction.LEFT) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p1.x, p1.y + sideTwoOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p2.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x, p1.y + sideTwoOffset)));\n\t\t\t// Set the left and right walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.y is the center of the path (top to bottom)\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x, p1.y + (i - width/2))));\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p2.x, p2.y + (i - width/2))));\n\t\t\t}\n\t\t\t// Set middle path and top/bottom padding (horizontal Oreo!)\n\t\t\tfor (int col = p1.x + 1, endCol = p2.x; col < endCol; col++) {\n\t\t\t\t// Add the top wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(col, p1.y - sideOneOffset)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(col, p1.y + (i - width /2))));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the bottom wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(col, p1.y + sideTwoOffset)));\n\t\t\t}\n\t\t} else {\n\t\t\t// If the direction is up then we want to swap the points\n\t\t\t// to pretend like the direction was down (so the following code works)\n\t\t\tif (d == Direction.UP) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x - sideOneOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p2.x - sideOneOffset, p2.y)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p1.x + sideTwoOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x + sideTwoOffset, p2.y)));\n\t\t\t// Set the top and bottom walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.x is the center of the path (left to right)\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(p1.x + (i - width /2), p1.y)));\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(p2.x + (i - width /2), p2.y)));\n\t\t\t}\n\t\t\t// Set middle path and left/right padding (vertical Oreo!)\n\t\t\tfor (int row = p1.y + 1, endRow = p2.y; row < endRow; row++) {\n\t\t\t\t// Add the left wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x - sideOneOffset, row)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(p1.x + (i - width /2), row)));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the right wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p1.x + sideTwoOffset, row)));\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "@Override\n public String toString()\n {\n\treturn getClass().getSimpleName() + \" (\" + getLength() + \"x\" + getWidth() + \")\";\n }", "private byte r() {\r\n\t\treturn (left_map == 0 ) ? (byte) 1 : 0;\r\n\t}", "public int getDireccion(Pixel p) {\r\n\t\tif (x == p.x && y < p.y)\r\n\t\t\treturn DIR_N;\r\n\t\tif (x > p.x && y < p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_NE;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_NE;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_E;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_N;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x < p.x && y < p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_NO;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_NO;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_O;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_N;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x == p.x && y > p.y)\r\n\t\t\treturn DIR_S;\r\n\t\tif (x > p.x && y > p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_SE;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_SE;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_E;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_S;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x < p.x && y > p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_SO;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_SO;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_O;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_S;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x > p.x && y == p.y)\r\n\t\t\treturn DIR_E;\r\n\t\tif (x < p.x && y == p.y)\r\n\t\t\treturn DIR_O;\r\n\t\treturn -1;\r\n\t}", "void block(Directions dir);", "@Override\r\n public void draw()\r\n {\n\r\n }", "int getWidth1();", "@Override\n\tpublic float getWidth() {\n\t\treturn 26;\n\t}", "int expand();", "int getR();", "private int right(int parent) {\n\t\treturn parent*2+2;\n\t}", "public void snare();" ]
[ "0.55049527", "0.54132545", "0.5298104", "0.52380925", "0.52058434", "0.5148157", "0.5101382", "0.507637", "0.50369906", "0.5031998", "0.5009869", "0.49817902", "0.4981198", "0.4978498", "0.49735028", "0.49626762", "0.4937221", "0.492919", "0.49037388", "0.48935315", "0.4878925", "0.48603266", "0.48546374", "0.48474872", "0.48440295", "0.48437494", "0.48404217", "0.48289716", "0.48272792", "0.4821976", "0.48184958", "0.4803486", "0.48024514", "0.48019546", "0.48010612", "0.47979236", "0.4796159", "0.47899675", "0.47899008", "0.47898105", "0.47898105", "0.4779357", "0.47784406", "0.47748962", "0.47726098", "0.47666183", "0.47663304", "0.47662857", "0.47644624", "0.4759417", "0.4758728", "0.47568414", "0.47494224", "0.47483176", "0.47481185", "0.4741822", "0.4741359", "0.4739998", "0.4733422", "0.4733422", "0.47304484", "0.47281104", "0.4724607", "0.4721184", "0.4720441", "0.471938", "0.4711545", "0.4710926", "0.47099394", "0.4709627", "0.47074342", "0.47063792", "0.46962094", "0.4692173", "0.46898013", "0.46896878", "0.46893874", "0.4689199", "0.46865323", "0.46843717", "0.46749675", "0.4673216", "0.46721715", "0.46685347", "0.46652782", "0.4664887", "0.4662483", "0.4657706", "0.46539602", "0.46514836", "0.46471143", "0.4646346", "0.46434107", "0.46423686", "0.46415353", "0.46410298", "0.46406373", "0.46389073", "0.4637081", "0.4631085", "0.4629557" ]
0.0
-1
/ / / / / / /
private void validateExceptions(Method paramMethod) throws IDLTypeException { /* 445 */ Class[] arrayOfClass = paramMethod.getExceptionTypes(); /* */ /* 447 */ boolean bool = false; /* */ /* */ byte b; /* 450 */ for (b = 0; b < arrayOfClass.length; b++) { /* 451 */ Class clazz = arrayOfClass[b]; /* 452 */ if (isRemoteExceptionOrSuperClass(clazz)) { /* 453 */ bool = true; /* */ /* */ break; /* */ } /* */ } /* 458 */ if (!bool) { /* 459 */ String str = "Method '" + paramMethod + "' must throw at least one exception of type java.rmi.RemoteException or one of its super-classes"; /* */ /* */ /* 462 */ throw new IDLTypeException(str); /* */ } /* */ /* */ /* */ /* */ /* */ /* 469 */ for (b = 0; b < arrayOfClass.length; b++) { /* 470 */ Class clazz = arrayOfClass[b]; /* */ /* 472 */ if (isCheckedException(clazz) && !isValue(clazz) && /* 473 */ !isRemoteException(clazz)) { /* */ /* 475 */ String str = "Exception '" + clazz + "' on method '" + paramMethod + "' is not a allowed RMI/IIOP exception type"; /* */ /* 477 */ throw new IDLTypeException(str); /* */ } /* */ } /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "public void divide() {\n\t\t\n\t}", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "private int rightChild(int i){return 2*i+2;}", "public abstract void bepaalGrootte();", "public static void bottomHalf() {\n\n for(int i = 1; i <= SIZE; i++) {\n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\" \");\n }\n \n\t System.out.print(\"\\\\_\");\n\t for(int j = 3*SIZE-i; j >= i; j--) {\n\t System.out.print(\"/\\\\\");\n\t }\n\t System.out.println(\"_/\");\n }\n }", "double passer();", "public void gored() {\n\t\t\n\t}", "public String ring();", "laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }", "public abstract String division();", "public String toString(){ return \"DIV\";}", "public double getWidth() {\n return this.left.getLeft(0) - this.right.getRight(0); \n }", "private static Object[] newPath(int length, Object[] leaf) {\n Object[] node = leaf;\n for (int i = 0; i < length; i += 5) {\n node = new Object[] { node };\n }\n return node;\n }", "int getWidth() {return width;}", "private void pointer(Graphics image,int x,int y,int height,int b,int dir) {\n\n\t\tint[] xt=new int[3];\n\t\tint[] yt=new int[3];\n\n\t\tif(dir==0) {\n\t\t\txt[0]=x;\n\t\t\txt[1]=xt[2]=x+height;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=y+b/2;\n\t\t\tyt[2]=y-b/2;\n\t\t} else {\n\t\t\txt[0]=x;\n\t\t\txt[1]=x+b/2;\n\t\t\txt[2]=x-b/2;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=yt[2]=y-height;\n\t\t}\n\t\timage.fillPolygon(xt,yt,3);\n\t}", "public void getTile_B8();", "public double getWidth() {\n return this.size * 2.0; \n }", "double volume(){\n return width*height*depth;\n }", "@Override\n public void bfs() {\n\n }", "public static void main(String[] args) {\n\n\n for(int a=0; a<7;a++){\n for(int b=0;b<7-a;b++){\n System.out.print(\" \");\n }\n for(int c=0; c<=a;c++){\n System.out.print(\"* \");\n }\n System.out.println(\" \");\n }\n\n }", "int width();", "Operations operations();", "void sharpen();", "void sharpen();", "private static void breadcrumbArrow(int width, int height, int indent, int c1, int c2) {\n\n\t\tdouble x0 = 0, y0 = height / 2d;\n\t\tdouble x1 = indent, y1 = 0;\n\t\tdouble x2 = indent, y2 = height / 2d;\n\t\tdouble x3 = indent, y3 = height;\n\t\tdouble x4 = width, y4 = 0;\n\t\tdouble x5 = width, y5 = height / 2d;\n\t\tdouble x6 = width, y6 = height;\n\t\tdouble x7 = indent + width, y7 = 0;\n\t\tdouble x8 = indent + width, y8 = height;\n\n\t\tint fc1 = ColorHelper.mixAlphaColors(c1, c2, 0);\n\t\tint fc2 = ColorHelper.mixAlphaColors(c1, c2, (indent)/(width + 2f * indent));\n\t\tint fc3 = ColorHelper.mixAlphaColors(c1, c2, (indent + width)/(width + 2f * indent));\n\t\tint fc4 = ColorHelper.mixAlphaColors(c1, c2, 1);\n\n\t\tRenderSystem.disableTexture();\n\t\tRenderSystem.enableBlend();\n\t\tRenderSystem.disableAlphaTest();\n\t\tRenderSystem.defaultBlendFunc();\n\t\tRenderSystem.shadeModel(GL11.GL_SMOOTH);\n\n\t\tTessellator tessellator = Tessellator.getInstance();\n\t\tBufferBuilder bufferbuilder = tessellator.getBuffer();\n\t\tbufferbuilder.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR);\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x7, y7, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x8, y8, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\ttessellator.draw();\n\t\tRenderSystem.shadeModel(GL11.GL_FLAT);\n\t\tRenderSystem.disableBlend();\n\t\tRenderSystem.enableAlphaTest();\n\t\tRenderSystem.enableTexture();\n\t}", "static void pyramid(){\n\t}", "public Integer getWidth(){return this.width;}", "private void traverseBayeredPatternHalfSizeRGB(){\n int originalPositionX = 0;\n int originalPositionY = 1;\n\n for (int newX = 0; originalPositionX < originalImageHeight -1; newX++){\n for (int newY = 0; originalPositionY < originalImageWidth -1; newY++){\n Point newPosition = new Point(newX,newY);\n int newAbsoultPosition = getAbsolutPixelPosition(newPosition, originalImageHeight / 2, originalImageWidth / 2);\n halfSizePixRGB[newAbsoultPosition] = getAverageRGB(new Point(originalPositionX,originalPositionY));\n originalPositionY += 2;\n }\n originalPositionY = 0;\n originalPositionX += 2;\n }\n }", "@Override\npublic void processDirection() {\n\t\n}", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "public int generateRoshambo(){\n ;]\n\n }", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "public void skystonePos4() {\n }", "void mo33732Px();", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}", "public void SubRect(){\n\t\n}", "public static void unionPathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze two = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\tSystem.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = two.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber+n) != S.findAndCompress(randomNumber)){\n\t\t\t\t\t\tS.union(randomNumber+n, randomNumber);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'u');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.union(randomNumber, randomNumber+1);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(two, n);\n\t\tuserSelection_SolveMaze(n);\n\n\n\t\tStdDraw.show(0);\n\t\ttwo.draw();\n\t\ttwo.printCellNumbers();\n\t}", "private int leftChild(int index){\n\t\treturn (2*index) +1;\n\t}", "void walk() {\n\t\t\n\t}", "public static void sizePathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze five = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\t//System.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = five.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber + n)){\n\t\t\t\t\t\tS.unionBySize(randomNumber+n, randomNumber);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'u');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+1);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(five, n);\n\t\tuserSelection_SolveMaze(n);\n\n\t\tStdDraw.show(0);\n\t\tfive.draw();\n\t\tfive.printCellNumbers();\t\n\t}", "public double getWidth() { return _width<0? -_width : _width; }", "public void draw(){\n for(int i = 1; i <= height; i++){\n for(int s = 1; s <= i; s++)\n System.out.print(\"*\");\n System.out.println();\n }\n }", "public void stg() {\n\n\t}", "Parallelogram(){\n length = width = height = 0;\n }", "private int get_right_child(int index){\r\n return 2 * index + 2;\r\n }", "public void foundLeaf(int width, int height, int level, int currX, int currY, int location) {\n level = level +2;\n if (location == 1) {\n\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - ( (new Double(spatialHeight / Math.pow(2, level ))).intValue()),\n currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY * 2,\n Color.BLACK);\n\n\n canvas.addLine(((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue())) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n currX,\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n\n }\n\n if (location == 2) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n ( currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n (currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n\n\n }\n\n if (location == 3) {\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY,\n Color.BLACK);\n\n\n\n canvas.addLine((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n\tcurrY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n (currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n }\n\n if (location == 4) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY,\n Color.BLACK);\n\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue() + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), Color.BLACK);\n\n\n }\n\n\n\n\n }", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tScanner obj=new Scanner(System.in);\r\n\t\tint a=0;\r\n\t\tint count=0;\r\n System.out.println(\"enter size\");\r\n\t\ta=obj.nextInt();\r\n\t\tint m=2*a+1;\r\n\t\tint n=2*a+2;\r\n\t\tint mid=(m+1)/2;\r\n\t\tfor(int i=1;i<=m;i++)\r\n\t\t{\r\n\t\t\tcount=0;\r\n\t\t\tfor(int j=1;j<=n;j++)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tif((i==1)||(i==m)||(j==1)||(j==n))//frame begin\r\n\t\t\t\t{\r\n\t\t\t\t\tif((i==1)||(i==m))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"+\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t {\r\n\t\t\t\t\t\t\tSystem.out.print(\"|\");//frame left and right\r\n\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//frame end\r\n\t\t\t\telse if (i<mid)//upper-half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t for(int l=1;l<=2*i-4;l++)\r\n\t\t\t\t {\r\n\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\tSystem.out.print(\"\\\\\");\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end of upper half\r\n\t\t\t\telse if(i>mid)//lower half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tfor(int k=mid;k<i;k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t System.out.print(\"\\\\\");\r\n\t\t\t\t\t for(int l=2*m-6;l>2*i-4;l--)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t else\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t }\r\n\t\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t\t for(int k=mid;k<i;k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t\t\t}//end of lower half\r\n\t\t\t\telse if(i==mid)//middle part\r\n\t\t\t\t{\r\n\t\t\t\t\tif(j==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\"<\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(j==n-1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\">\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(i%2==0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"=\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end\r\n\t\t\t}//end-of-j\r\n\t\t\tSystem.out.println();\r\n\t\t}//end\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tfor(int j=0;j<8;j++){\n\t\t\tfor(int i=0;i<8;i++){\n\t\t\t\t//上下两侧\n\t\t\t\tif(j==0||j==7){\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}else{\n\t\t\t\t\t//中间\n\t\t\t\t\tif(i>0&&i<7){\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }", "public double getWidth() {\n return this.getRight(this.tree.getRight(0)) - this.getLeft(this.tree.getLeft(0)); \n }", "double getPerimeter(){\n return 2*height+width;\n }", "public static void part2(){\n\t\n System.out.println(\"\\\\\"); //Outer wall\n System.out.println(\"\\\\\");\n System.out.println(\"\\\\\");\n for(int i = 0; i <= 16; i++){ //loop created to display top of the door\n\n \tSystem.out.print(\"-\");\n\n\t}\n System.out.println(\"\");\n System.out.println(\"\\\\\\t\\t| \\t(\\\")\"); //The door and the stick figure\n System.out.println(\"\\\\\\t\\t|\\t-|-\");\n System.out.println(\"\\\\\\t o | \\t |\");\n System.out.println(\"\\\\\\t\\t|\\t /\\\\\");\n System.out.println(\"\\\\\\t\\t|\\t/ \\\\\");\n\t\t\n }", "public double getPerimiter(){return (2*height +2*width);}", "@Override\r\n\tpublic void walk() {\n\r\n\t}", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}", "void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2)\r\n/* 100: */ {\r\n/* 101: 99 */ int s2 = sides << 1 & 0x2A | sides >> 1 & 0x15;\r\n/* 102: */ \r\n/* 103:101 */ this.context.renderBox(sides, x1, y1, z1, x2, y2, z2);\r\n/* 104:102 */ this.context.renderBox(s2, x2, y2, z2, x1, y1, z1);\r\n/* 105: */ }", "@Override\n protected void paint2d(Graphics2D g) {\n \n }", "public static String makeShapeA() {\n\tString result = \"\";\n\t\tfor (int i = 0; i < 8 ; i++) {\n\t\t\tresult+=printHash(i);\n\t\t\t\n\t\t}return result;\n\t\t\t//System.out.println(printHash(i));\n\t\t}", "double getNewWidth();", "public void draw4x4 (char design){\n System.out.println(\"\"+design+design+design+design);\n System.out.println(design+\" \"+design);\n System.out.println(design+\" \"+design);\n System.out.println(\"\"+design+design+design+design);\n}", "public void lowerFlatbed(){\n flatbed.lowerFlatbed();\n }", "int fi(int x, int y) {\n\t\treturn (x + 1) + (width + 2) * (y + 1);\n\t}", "private void createPath(Direction d, int width, Point p1, Point p2) {\n\t\t// Determine how far away from the center the corners are\n\t\tint sideOneOffset = 0;\t// Top or Left depending on path direction\n\t\tint sideTwoOffset = 0;\t// Bot or Right depending on path direction\n\t\t// If the width is odd, balance the offsets\n\t\tif (width % 2 != 0) {\t\n\t\t\tsideOneOffset = sideTwoOffset = ((width / 2) + 1);\n\t\t} else {\n\t\t\t// If the width is even, the offsets will be off by 1\n\t\t\tsideOneOffset = width;\n\t\t\tsideTwoOffset = width - 1;\n\t\t}\n\t\tif (d == Direction.LEFT || d == Direction.RIGHT) {\n\t\t\t// If the direction is left then we want to swap the points\n\t\t\t// to pretend like the direction was right (so the following code works)\n\t\t\tif (d == Direction.LEFT) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p1.x, p1.y + sideTwoOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p2.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x, p1.y + sideTwoOffset)));\n\t\t\t// Set the left and right walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.y is the center of the path (top to bottom)\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x, p1.y + (i - width/2))));\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p2.x, p2.y + (i - width/2))));\n\t\t\t}\n\t\t\t// Set middle path and top/bottom padding (horizontal Oreo!)\n\t\t\tfor (int col = p1.x + 1, endCol = p2.x; col < endCol; col++) {\n\t\t\t\t// Add the top wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(col, p1.y - sideOneOffset)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(col, p1.y + (i - width /2))));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the bottom wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(col, p1.y + sideTwoOffset)));\n\t\t\t}\n\t\t} else {\n\t\t\t// If the direction is up then we want to swap the points\n\t\t\t// to pretend like the direction was down (so the following code works)\n\t\t\tif (d == Direction.UP) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x - sideOneOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p2.x - sideOneOffset, p2.y)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p1.x + sideTwoOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x + sideTwoOffset, p2.y)));\n\t\t\t// Set the top and bottom walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.x is the center of the path (left to right)\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(p1.x + (i - width /2), p1.y)));\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(p2.x + (i - width /2), p2.y)));\n\t\t\t}\n\t\t\t// Set middle path and left/right padding (vertical Oreo!)\n\t\t\tfor (int row = p1.y + 1, endRow = p2.y; row < endRow; row++) {\n\t\t\t\t// Add the left wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x - sideOneOffset, row)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(p1.x + (i - width /2), row)));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the right wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p1.x + sideTwoOffset, row)));\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void walk() {\n\t\t\n\t}", "public void renderCenterBlock(int cons, int side, int end)\r\n/* 143: */ {\r\n/* 144:135 */ if (cons == 0)\r\n/* 145: */ {\r\n/* 146:136 */ this.context.setTex(end);\r\n/* 147:137 */ doubleBox(63, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 148:138 */ return;\r\n/* 149: */ }\r\n/* 150:139 */ if (cons == 3)\r\n/* 151: */ {\r\n/* 152:140 */ this.context.setTexFlags(1773);\r\n/* 153:141 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 154:142 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 155:143 */ return;\r\n/* 156: */ }\r\n/* 157:144 */ if (cons == 12)\r\n/* 158: */ {\r\n/* 159:145 */ this.context.setTexFlags(184365);\r\n/* 160:146 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 161:147 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 1.0F);\r\n/* 162:148 */ return;\r\n/* 163: */ }\r\n/* 164:149 */ if (cons == 48)\r\n/* 165: */ {\r\n/* 166:150 */ this.context.setTexFlags(187200);\r\n/* 167:151 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 168:152 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 169:153 */ return;\r\n/* 170: */ }\r\n/* 171:155 */ this.context.setTex(end);\r\n/* 172:156 */ doubleBox(0x3F ^ cons, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 173:157 */ if ((cons & 0x1) > 0)\r\n/* 174: */ {\r\n/* 175:158 */ this.context.setTexFlags(1773);\r\n/* 176:159 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 177:160 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 0.375F, 0.625F);\r\n/* 178: */ }\r\n/* 179:162 */ if ((cons & 0x2) > 0)\r\n/* 180: */ {\r\n/* 181:163 */ this.context.setTexFlags(1773);\r\n/* 182:164 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 183:165 */ doubleBox(60, 0.375F, 0.625F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 184: */ }\r\n/* 185:167 */ if ((cons & 0x4) > 0)\r\n/* 186: */ {\r\n/* 187:168 */ this.context.setTexFlags(184365);\r\n/* 188:169 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 189:170 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 0.375F);\r\n/* 190: */ }\r\n/* 191:172 */ if ((cons & 0x8) > 0)\r\n/* 192: */ {\r\n/* 193:173 */ this.context.setTexFlags(184365);\r\n/* 194:174 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 195:175 */ doubleBox(51, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F, 1.0F);\r\n/* 196: */ }\r\n/* 197:177 */ if ((cons & 0x10) > 0)\r\n/* 198: */ {\r\n/* 199:178 */ this.context.setTexFlags(187200);\r\n/* 200:179 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 201:180 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F);\r\n/* 202: */ }\r\n/* 203:182 */ if ((cons & 0x20) > 0)\r\n/* 204: */ {\r\n/* 205:183 */ this.context.setTexFlags(187200);\r\n/* 206:184 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 207:185 */ doubleBox(15, 0.625F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 208: */ }\r\n/* 209: */ }", "double seBlesser();", "long getWidth();", "public int getWidth() {\r\n\treturn this.width;\r\n}", "private void render() {\n StringBuilder builder = new StringBuilder();\n builder.append(horizontalEdge).append(\"\\n\");\n for (int i = 0; i < this.height; i++) {\n builder.append(VERTICAL_CHAR);\n for (int j = 0; j < this.width; j++) {\n builder.append(pixels[i][j]);\n }\n builder.append(VERTICAL_CHAR);\n builder.append(\"\\n\");\n }\n builder.append(horizontalEdge);\n System.out.printf(builder.toString());\n }", "public void leerPlanesDietas();", "@Override\r\n public void draw()\r\n {\n\r\n }", "private void buildPath() {\r\n int xNext = 1;\r\n int yNext = map.getStartPos() + 1;\r\n CellLayered before = cells[yNext][xNext];\r\n while(true)\r\n {\r\n Byte[] xy = map.getDirection(xNext-1, yNext-1);\r\n xNext = xNext + xy[0];\r\n yNext = yNext + xy[1];\r\n\r\n CellLayered next = cells[yNext][xNext];\r\n\r\n if(xy[0]==-1)\r\n before.setRight(false);\r\n else\r\n before.setRight(true);\r\n before.setPath(true);\r\n if(next==null)\r\n break;\r\n\r\n before.setNextInPath(next);\r\n before = next;\r\n }\r\n }", "void block(Directions dir);", "public static void slashes() {\n\t\tSystem.out.println(\"//////////////////////\");\r\n\r\n\t}", "public String getRing();", "@Override\r\n\tpublic double perimeter() {\n\t\treturn 2*length*breadth;\r\n\t}", "public\nstatic\nvoid\nmain(String args[]) \n\n{ \n\nBinaryTree tree = \nnew\nBinaryTree(); \n\ntree.root = \nnew\nNode(\n20\n); \n\ntree.root.left = \nnew\nNode(\n8\n); \n\ntree.root.left.left = \nnew\nNode(\n4\n); \n\ntree.root.left.right = \nnew\nNode(\n12\n); \n\ntree.root.left.right.left = \nnew\nNode(\n10\n); \n\ntree.root.left.right.right = \nnew\nNode(\n14\n); \n\ntree.root.right = \nnew\nNode(\n22\n); \n\ntree.root.right.right = \nnew\nNode(\n25\n); \n\ntree.printBoundary(tree.root); \n\n}", "public int getEdgeCount() \n {\n return 3;\n }", "public int getWidth(){\n return width;\n }", "public int upright();", "protected int parent(int i) { return (i - 1) / 2; }", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "protected int getWidth()\n\t{\n\t\treturn 0;\n\t}", "public int getDireccion(Pixel p) {\r\n\t\tif (x == p.x && y < p.y)\r\n\t\t\treturn DIR_N;\r\n\t\tif (x > p.x && y < p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_NE;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_NE;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_E;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_N;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x < p.x && y < p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_NO;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_NO;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_O;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_N;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x == p.x && y > p.y)\r\n\t\t\treturn DIR_S;\r\n\t\tif (x > p.x && y > p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_SE;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_SE;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_E;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_S;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x < p.x && y > p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_SO;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_SO;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_O;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_S;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x > p.x && y == p.y)\r\n\t\t\treturn DIR_E;\r\n\t\tif (x < p.x && y == p.y)\r\n\t\t\treturn DIR_O;\r\n\t\treturn -1;\r\n\t}", "private void renderPath(Node n)\n {\n\tGraphics g = getGraphics();\n\tboolean painting;\n\tColor nc,lc;\n\n\tpainting = (n.paths_passing==0);\n\twhile (n != null) {\n\t if (painting)\n\t\tn.paths_passing++;\n\t else {\n\t\tn.paths_passing--;\n\t }\n\t \n// \t nc = (n.paths_passing > 0)?hilitcolor:normalcolor;\n// \t lc = (n.paths_passing > 0)?hilitcolor:linecolor;\n\t nc = (n.paths_passing > 0)?n.path_color:normalcolor;\n\t lc = (n.paths_passing > 0)?n.path_color:linecolor;\n\t \n\t if (n.parent == null) {\n\t\tsetRenderColor(g,nc);\n\t\trenderNode(g,n);\n\t\tbreak;\n\t }\n\n\t // Double line width\n\t //setRenderColor(g,(n.paths_passing>0)?hilitcolor:Color.white);\n\t setRenderColor(g,(n.paths_passing>0)?n.path_color:Color.white);\n\t renderLine(g,n.x-1,n.y,n.parent.x-1,n.parent.y);\t\n\n\t setRenderColor(g,lc);\n\t renderLine(g,n.x,n.y,n.parent.x,n.parent.y);\n\n\t setRenderColor(g,nc);\n\t renderNode(g,n);\n\t n = n.parent;\n\t}\n }", "double volume() {\n\treturn width*height*depth;\n}", "void table(){\n fill(0);\n rect(width/2, height/2, 600, 350); // boarder\n fill(100, 0 ,0);\n rect(width/2, height/2, 550, 300); //Felt\n \n \n}", "public void snare();", "void ringBell() {\n\n }", "public static void main(String[] args) {\n\t\tint n=5;\n\t\tfor(int i=n-1;i>=0;i--)\n\t\t{\n\t\t\tfor(int space=0;space<n-1-i;space++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int j=0;j<=i*2;j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\n\t\tSystem.out.println();\n\t}\n\n}", "private byte r() {\r\n\t\treturn (left_map == 0 ) ? (byte) 1 : 0;\r\n\t}", "public void skystonePos2() {\n }", "public int my_leaf_count();", "@Override\n\tpublic void draw3() {\n\n\t}" ]
[ "0.54567957", "0.53680295", "0.53644985", "0.52577376", "0.52142847", "0.51725817", "0.514088", "0.50868535", "0.5072305", "0.504888", "0.502662", "0.50005764", "0.49740013", "0.4944243", "0.4941118", "0.4937142", "0.49095523", "0.48940238", "0.48719338", "0.48613623", "0.48604724", "0.48558092", "0.48546165", "0.48490012", "0.4843668", "0.4843668", "0.48420057", "0.4839597", "0.4832105", "0.4817357", "0.481569", "0.48122767", "0.48085573", "0.48065376", "0.48032433", "0.48032212", "0.4799707", "0.4798766", "0.47978994", "0.47978172", "0.47921672", "0.47903922", "0.4790111", "0.47886384", "0.47843018", "0.47837785", "0.47828907", "0.47826976", "0.4776919", "0.47767594", "0.47767594", "0.47766045", "0.4764252", "0.47560593", "0.4753577", "0.4752732", "0.47510985", "0.47496924", "0.47485355", "0.4748455", "0.4746839", "0.4744132", "0.47203988", "0.4713808", "0.4711382", "0.47113234", "0.47096533", "0.47075558", "0.47029856", "0.4701444", "0.47014076", "0.46973658", "0.46969122", "0.4692372", "0.46897912", "0.4683049", "0.4681391", "0.46810925", "0.46750805", "0.46722633", "0.46681988", "0.466349", "0.46618745", "0.46606532", "0.46533036", "0.46485004", "0.46464643", "0.46447286", "0.46447286", "0.46438906", "0.46405315", "0.46397775", "0.4634643", "0.46339533", "0.4633923", "0.4632826", "0.4631328", "0.46299514", "0.46285036", "0.46276402", "0.4625902" ]
0.0
-1
/ / / / / / / / / / /
private boolean validPropertyExceptions(Method paramMethod) { /* 492 */ Class[] arrayOfClass = paramMethod.getExceptionTypes(); /* */ /* 494 */ for (byte b = 0; b < arrayOfClass.length; b++) { /* 495 */ Class clazz = arrayOfClass[b]; /* */ /* 497 */ if (isCheckedException(clazz) && !isRemoteException(clazz)) { /* 498 */ return false; /* */ } /* */ } /* 501 */ return true; /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "private int rightChild(int i){return 2*i+2;}", "public void divide() {\n\t\t\n\t}", "public abstract void bepaalGrootte();", "double passer();", "int getWidth() {return width;}", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "public Integer getWidth(){return this.width;}", "public double getWidth() {\n return this.size * 2.0; \n }", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "public double getWidth() {\n return this.left.getLeft(0) - this.right.getRight(0); \n }", "public static void bottomHalf() {\n\n for(int i = 1; i <= SIZE; i++) {\n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\" \");\n }\n \n\t System.out.print(\"\\\\_\");\n\t for(int j = 3*SIZE-i; j >= i; j--) {\n\t System.out.print(\"/\\\\\");\n\t }\n\t System.out.println(\"_/\");\n }\n }", "public void getTile_B8();", "private static Object[] newPath(int length, Object[] leaf) {\n Object[] node = leaf;\n for (int i = 0; i < length; i += 5) {\n node = new Object[] { node };\n }\n return node;\n }", "public String ring();", "public void gored() {\n\t\t\n\t}", "int width();", "laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }", "public String toString(){ return \"DIV\";}", "private int leftChild(int index){\n\t\treturn (2*index) +1;\n\t}", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "public abstract String division();", "private int get_right_child(int index){\r\n return 2 * index + 2;\r\n }", "public double getWidth() { return _width<0? -_width : _width; }", "public int getEdgeCount() \n {\n return 3;\n }", "public int getWidth() {\r\n\treturn this.width;\r\n}", "@Override\n public void bfs() {\n\n }", "long getWidth();", "double getNewWidth();", "static int getNumPatterns() { return 64; }", "public int my_leaf_count();", "private void traverseBayeredPatternHalfSizeRGB(){\n int originalPositionX = 0;\n int originalPositionY = 1;\n\n for (int newX = 0; originalPositionX < originalImageHeight -1; newX++){\n for (int newY = 0; originalPositionY < originalImageWidth -1; newY++){\n Point newPosition = new Point(newX,newY);\n int newAbsoultPosition = getAbsolutPixelPosition(newPosition, originalImageHeight / 2, originalImageWidth / 2);\n halfSizePixRGB[newAbsoultPosition] = getAverageRGB(new Point(originalPositionX,originalPositionY));\n originalPositionY += 2;\n }\n originalPositionY = 0;\n originalPositionX += 2;\n }\n }", "public int generateRoshambo(){\n ;]\n\n }", "@Override\npublic void processDirection() {\n\t\n}", "public double getWidth() {\n return this.getRight(this.tree.getRight(0)) - this.getLeft(this.tree.getLeft(0)); \n }", "@Override\n protected int mapSize() {\n return left.size()+right.size()-hidden.size();\n }", "public static void sizePathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze five = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\t//System.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = five.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber + n)){\n\t\t\t\t\t\tS.unionBySize(randomNumber+n, randomNumber);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'u');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+1);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(five, n);\n\t\tuserSelection_SolveMaze(n);\n\n\t\tStdDraw.show(0);\n\t\tfive.draw();\n\t\tfive.printCellNumbers();\t\n\t}", "void mo33732Px();", "protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}", "double volume(){\n return width*height*depth;\n }", "double seBlesser();", "int getTribeSize();", "Operations operations();", "private int get_left_child(int index){\r\n return 2 * index + 1;\r\n }", "public double getPerimiter(){return (2*height +2*width);}", "public int getWidth(){\n return width;\n }", "public void leerPlanesDietas();", "public void skystonePos4() {\n }", "protected int getWidth()\n\t{\n\t\treturn 0;\n\t}", "public String getRing();", "@Override\n public String toString()\n {\n\treturn getClass().getSimpleName() + \" (\" + getLength() + \"x\" + getWidth() + \")\";\n }", "@Override\n\tpublic float getWidth() {\n\t\treturn 26;\n\t}", "private int get_parent(int index){\r\n return (index-1)/2;\r\n }", "int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}", "@Override\r\n\tpublic void walk() {\n\r\n\t}", "public void SubRect(){\n\t\n}", "public abstract double getBaseWidth();", "public static void main(String[] args) {\n\t\tScanner obj=new Scanner(System.in);\r\n\t\tint a=0;\r\n\t\tint count=0;\r\n System.out.println(\"enter size\");\r\n\t\ta=obj.nextInt();\r\n\t\tint m=2*a+1;\r\n\t\tint n=2*a+2;\r\n\t\tint mid=(m+1)/2;\r\n\t\tfor(int i=1;i<=m;i++)\r\n\t\t{\r\n\t\t\tcount=0;\r\n\t\t\tfor(int j=1;j<=n;j++)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tif((i==1)||(i==m)||(j==1)||(j==n))//frame begin\r\n\t\t\t\t{\r\n\t\t\t\t\tif((i==1)||(i==m))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"+\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t {\r\n\t\t\t\t\t\t\tSystem.out.print(\"|\");//frame left and right\r\n\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//frame end\r\n\t\t\t\telse if (i<mid)//upper-half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t for(int l=1;l<=2*i-4;l++)\r\n\t\t\t\t {\r\n\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\tSystem.out.print(\"\\\\\");\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end of upper half\r\n\t\t\t\telse if(i>mid)//lower half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tfor(int k=mid;k<i;k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t System.out.print(\"\\\\\");\r\n\t\t\t\t\t for(int l=2*m-6;l>2*i-4;l--)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t else\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t }\r\n\t\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t\t for(int k=mid;k<i;k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t\t\t}//end of lower half\r\n\t\t\t\telse if(i==mid)//middle part\r\n\t\t\t\t{\r\n\t\t\t\t\tif(j==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\"<\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(j==n-1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\">\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(i%2==0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"=\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end\r\n\t\t\t}//end-of-j\r\n\t\t\tSystem.out.println();\r\n\t\t}//end\r\n\r\n\t}", "protected int parent(int i) { return (i - 1) / 2; }", "static void pyramid(){\n\t}", "public static int size_parent() {\n return (8 / 8);\n }", "public void lowerFlatbed(){\n flatbed.lowerFlatbed();\n }", "int expand();", "public abstract int getSpotsNeeded();", "Parallelogram(){\n length = width = height = 0;\n }", "@Override\n\tpublic void walk() {\n\t\t\n\t}", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "void walk() {\n\t\t\n\t}", "private void pointer(Graphics image,int x,int y,int height,int b,int dir) {\n\n\t\tint[] xt=new int[3];\n\t\tint[] yt=new int[3];\n\n\t\tif(dir==0) {\n\t\t\txt[0]=x;\n\t\t\txt[1]=xt[2]=x+height;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=y+b/2;\n\t\t\tyt[2]=y-b/2;\n\t\t} else {\n\t\t\txt[0]=x;\n\t\t\txt[1]=x+b/2;\n\t\t\txt[2]=x-b/2;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=yt[2]=y-height;\n\t\t}\n\t\timage.fillPolygon(xt,yt,3);\n\t}", "@Override\r\n\tpublic int getWidth() {\n\t\treturn 0;\r\n\t}", "public int getWidth()\n {return width;}", "private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }", "int depth();", "int depth();", "long getMid();", "long getMid();", "private byte r() {\r\n\t\treturn (left_map == 0 ) ? (byte) 1 : 0;\r\n\t}", "public static String makeShapeA() {\n\tString result = \"\";\n\t\tfor (int i = 0; i < 8 ; i++) {\n\t\t\tresult+=printHash(i);\n\t\t\t\n\t\t}return result;\n\t\t\t//System.out.println(printHash(i));\n\t\t}", "String directsTo();", "int getSpriteArraySize();", "public void foundLeaf(int width, int height, int level, int currX, int currY, int location) {\n level = level +2;\n if (location == 1) {\n\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - ( (new Double(spatialHeight / Math.pow(2, level ))).intValue()),\n currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY * 2,\n Color.BLACK);\n\n\n canvas.addLine(((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue())) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n currX,\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n\n }\n\n if (location == 2) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n ( currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n (currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n\n\n }\n\n if (location == 3) {\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY,\n Color.BLACK);\n\n\n\n canvas.addLine((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n\tcurrY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n (currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n }\n\n if (location == 4) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY,\n Color.BLACK);\n\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue() + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), Color.BLACK);\n\n\n }\n\n\n\n\n }", "public static void unionPathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze two = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\tSystem.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = two.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber+n) != S.findAndCompress(randomNumber)){\n\t\t\t\t\t\tS.union(randomNumber+n, randomNumber);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'u');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.union(randomNumber, randomNumber+1);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(two, n);\n\t\tuserSelection_SolveMaze(n);\n\n\n\t\tStdDraw.show(0);\n\t\ttwo.draw();\n\t\ttwo.printCellNumbers();\n\t}", "double getPerimeter(){\n return 2*height+width;\n }", "public static void main(String[] args) {\n\n\n for(int a=0; a<7;a++){\n for(int b=0;b<7-a;b++){\n System.out.print(\" \");\n }\n for(int c=0; c<=a;c++){\n System.out.print(\"* \");\n }\n System.out.println(\" \");\n }\n\n }", "int getWidth1();", "public String getRingback();", "void sharpen();", "void sharpen();", "@Override\r\n\tpublic double perimeter() {\n\t\treturn 2*length*breadth;\r\n\t}", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();" ]
[ "0.5540745", "0.5444497", "0.5205538", "0.5182055", "0.5094161", "0.50587463", "0.5053648", "0.50452423", "0.50258267", "0.50122976", "0.5012191", "0.50119436", "0.50044477", "0.49989554", "0.49980396", "0.49847832", "0.49795863", "0.49785143", "0.4966902", "0.49588826", "0.491195", "0.49114203", "0.48977208", "0.48783925", "0.4871045", "0.4866241", "0.48425886", "0.48414746", "0.48404667", "0.48359194", "0.48321852", "0.48264593", "0.48214784", "0.48163307", "0.48100394", "0.48063412", "0.48053867", "0.4804083", "0.4794161", "0.47927848", "0.4788403", "0.47818738", "0.47784477", "0.47709942", "0.4770795", "0.4766995", "0.47618645", "0.47570822", "0.4752602", "0.4751775", "0.4751225", "0.47489616", "0.47487566", "0.474798", "0.47473353", "0.47425666", "0.47340578", "0.47319007", "0.47315216", "0.4729219", "0.4727721", "0.47272617", "0.47233397", "0.47144157", "0.47093782", "0.47075313", "0.47051412", "0.47038573", "0.46964964", "0.4695774", "0.46953171", "0.46950933", "0.46876776", "0.46871465", "0.46871465", "0.46869987", "0.46869987", "0.4686779", "0.46865502", "0.46834555", "0.46825886", "0.46823603", "0.46798244", "0.4674724", "0.46727514", "0.46678638", "0.4667731", "0.4665962", "0.4665962", "0.46643248", "0.46639606", "0.46639606", "0.46639606", "0.46639606", "0.46639606", "0.46639606", "0.46639606", "0.46639606", "0.46639606", "0.46639606", "0.46639606" ]
0.0
-1
/ / / / /
private boolean isRemoteExceptionOrSuperClass(Class<RemoteException> paramClass) { /* 508 */ return (paramClass == RemoteException.class || paramClass == IOException.class || paramClass == Exception.class || paramClass == Throwable.class); /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void divide() {\n\t\t\n\t}", "private int parent(int i){return (i-1)/2;}", "public abstract void bepaalGrootte();", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "public void gored() {\n\t\t\n\t}", "public static void bottomHalf() {\n\n for(int i = 1; i <= SIZE; i++) {\n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\" \");\n }\n \n\t System.out.print(\"\\\\_\");\n\t for(int j = 3*SIZE-i; j >= i; j--) {\n\t System.out.print(\"/\\\\\");\n\t }\n\t System.out.println(\"_/\");\n }\n }", "public abstract String division();", "private int leftChild(int i){return 2*i+1;}", "public static void slashes() {\n\t\tSystem.out.println(\"//////////////////////\");\r\n\r\n\t}", "double passer();", "public String ring();", "private int rightChild(int i){return 2*i+2;}", "public String toString(){ return \"DIV\";}", "laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }", "public void division() {\n\t\tx=1;\n\t\ty=0;\n\t\tz=x/y;\n\t\t\t\t\n\t}", "static void pyramid(){\n\t}", "public static void main(String[] args) {\n\n\n for(int a=0; a<7;a++){\n for(int b=0;b<7-a;b++){\n System.out.print(\" \");\n }\n for(int c=0; c<=a;c++){\n System.out.print(\"* \");\n }\n System.out.println(\" \");\n }\n\n }", "public void stg() {\n\n\t}", "void mo33732Px();", "Operations operations();", "void sharpen();", "void sharpen();", "public void skystonePos4() {\n }", "private static void breadcrumbArrow(int width, int height, int indent, int c1, int c2) {\n\n\t\tdouble x0 = 0, y0 = height / 2d;\n\t\tdouble x1 = indent, y1 = 0;\n\t\tdouble x2 = indent, y2 = height / 2d;\n\t\tdouble x3 = indent, y3 = height;\n\t\tdouble x4 = width, y4 = 0;\n\t\tdouble x5 = width, y5 = height / 2d;\n\t\tdouble x6 = width, y6 = height;\n\t\tdouble x7 = indent + width, y7 = 0;\n\t\tdouble x8 = indent + width, y8 = height;\n\n\t\tint fc1 = ColorHelper.mixAlphaColors(c1, c2, 0);\n\t\tint fc2 = ColorHelper.mixAlphaColors(c1, c2, (indent)/(width + 2f * indent));\n\t\tint fc3 = ColorHelper.mixAlphaColors(c1, c2, (indent + width)/(width + 2f * indent));\n\t\tint fc4 = ColorHelper.mixAlphaColors(c1, c2, 1);\n\n\t\tRenderSystem.disableTexture();\n\t\tRenderSystem.enableBlend();\n\t\tRenderSystem.disableAlphaTest();\n\t\tRenderSystem.defaultBlendFunc();\n\t\tRenderSystem.shadeModel(GL11.GL_SMOOTH);\n\n\t\tTessellator tessellator = Tessellator.getInstance();\n\t\tBufferBuilder bufferbuilder = tessellator.getBuffer();\n\t\tbufferbuilder.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR);\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x7, y7, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x8, y8, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\ttessellator.draw();\n\t\tRenderSystem.shadeModel(GL11.GL_FLAT);\n\t\tRenderSystem.disableBlend();\n\t\tRenderSystem.enableAlphaTest();\n\t\tRenderSystem.enableTexture();\n\t}", "double volume(){\n return width*height*depth;\n }", "private void pointer(Graphics image,int x,int y,int height,int b,int dir) {\n\n\t\tint[] xt=new int[3];\n\t\tint[] yt=new int[3];\n\n\t\tif(dir==0) {\n\t\t\txt[0]=x;\n\t\t\txt[1]=xt[2]=x+height;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=y+b/2;\n\t\t\tyt[2]=y-b/2;\n\t\t} else {\n\t\t\txt[0]=x;\n\t\t\txt[1]=x+b/2;\n\t\t\txt[2]=x-b/2;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=yt[2]=y-height;\n\t\t}\n\t\timage.fillPolygon(xt,yt,3);\n\t}", "private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }", "public int generateRoshambo(){\n ;]\n\n }", "@Override\n public void bfs() {\n\n }", "public static void part2(){\n\t\n System.out.println(\"\\\\\"); //Outer wall\n System.out.println(\"\\\\\");\n System.out.println(\"\\\\\");\n for(int i = 0; i <= 16; i++){ //loop created to display top of the door\n\n \tSystem.out.print(\"-\");\n\n\t}\n System.out.println(\"\");\n System.out.println(\"\\\\\\t\\t| \\t(\\\")\"); //The door and the stick figure\n System.out.println(\"\\\\\\t\\t|\\t-|-\");\n System.out.println(\"\\\\\\t o | \\t |\");\n System.out.println(\"\\\\\\t\\t|\\t /\\\\\");\n System.out.println(\"\\\\\\t\\t|\\t/ \\\\\");\n\t\t\n }", "public static void main(String[] args) {\n\t\tfor(int j=0;j<8;j++){\n\t\t\tfor(int i=0;i<8;i++){\n\t\t\t\t//上下两侧\n\t\t\t\tif(j==0||j==7){\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}else{\n\t\t\t\t\t//中间\n\t\t\t\t\tif(i>0&&i<7){\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}", "int getWidth() {return width;}", "public void draw(){\n for(int i = 1; i <= height; i++){\n for(int s = 1; s <= i; s++)\n System.out.print(\"*\");\n System.out.println();\n }\n }", "public double getWidth() {\n return this.left.getLeft(0) - this.right.getRight(0); \n }", "Parallelogram(){\n length = width = height = 0;\n }", "public static void main(String[] args) {\n\t\tScanner obj=new Scanner(System.in);\r\n\t\tint a=0;\r\n\t\tint count=0;\r\n System.out.println(\"enter size\");\r\n\t\ta=obj.nextInt();\r\n\t\tint m=2*a+1;\r\n\t\tint n=2*a+2;\r\n\t\tint mid=(m+1)/2;\r\n\t\tfor(int i=1;i<=m;i++)\r\n\t\t{\r\n\t\t\tcount=0;\r\n\t\t\tfor(int j=1;j<=n;j++)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tif((i==1)||(i==m)||(j==1)||(j==n))//frame begin\r\n\t\t\t\t{\r\n\t\t\t\t\tif((i==1)||(i==m))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"+\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t {\r\n\t\t\t\t\t\t\tSystem.out.print(\"|\");//frame left and right\r\n\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//frame end\r\n\t\t\t\telse if (i<mid)//upper-half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t for(int l=1;l<=2*i-4;l++)\r\n\t\t\t\t {\r\n\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\tSystem.out.print(\"\\\\\");\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end of upper half\r\n\t\t\t\telse if(i>mid)//lower half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tfor(int k=mid;k<i;k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t System.out.print(\"\\\\\");\r\n\t\t\t\t\t for(int l=2*m-6;l>2*i-4;l--)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t else\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t }\r\n\t\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t\t for(int k=mid;k<i;k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t\t\t}//end of lower half\r\n\t\t\t\telse if(i==mid)//middle part\r\n\t\t\t\t{\r\n\t\t\t\t\tif(j==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\"<\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(j==n-1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\">\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(i%2==0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"=\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end\r\n\t\t\t}//end-of-j\r\n\t\t\tSystem.out.println();\r\n\t\t}//end\r\n\r\n\t}", "void ringBell() {\n\n }", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "public static void unionPathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze two = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\tSystem.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = two.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber+n) != S.findAndCompress(randomNumber)){\n\t\t\t\t\t\tS.union(randomNumber+n, randomNumber);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'u');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.union(randomNumber, randomNumber+1);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(two, n);\n\t\tuserSelection_SolveMaze(n);\n\n\n\t\tStdDraw.show(0);\n\t\ttwo.draw();\n\t\ttwo.printCellNumbers();\n\t}", "void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2)\r\n/* 100: */ {\r\n/* 101: 99 */ int s2 = sides << 1 & 0x2A | sides >> 1 & 0x15;\r\n/* 102: */ \r\n/* 103:101 */ this.context.renderBox(sides, x1, y1, z1, x2, y2, z2);\r\n/* 104:102 */ this.context.renderBox(s2, x2, y2, z2, x1, y1, z1);\r\n/* 105: */ }", "int width();", "private boolean slash() {\r\n return MARK(OPERATOR) && CHAR('/') && gap();\r\n }", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "void walk() {\n\t\t\n\t}", "double getPerimeter(){\n return 2*height+width;\n }", "private static Object[] newPath(int length, Object[] leaf) {\n Object[] node = leaf;\n for (int i = 0; i < length; i += 5) {\n node = new Object[] { node };\n }\n return node;\n }", "public double getWidth() { return _width<0? -_width : _width; }", "public static void main(String[] args) {\n\t\tint n=5;\n\t\tfor(int i=n-1;i>=0;i--)\n\t\t{\n\t\t\tfor(int space=0;space<n-1-i;space++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int j=0;j<=i*2;j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\n\t\tSystem.out.println();\n\t}\n\n}", "public void draw4x4 (char design){\n System.out.println(\"\"+design+design+design+design);\n System.out.println(design+\" \"+design);\n System.out.println(design+\" \"+design);\n System.out.println(\"\"+design+design+design+design);\n}", "private void createPath(Direction d, int width, Point p1, Point p2) {\n\t\t// Determine how far away from the center the corners are\n\t\tint sideOneOffset = 0;\t// Top or Left depending on path direction\n\t\tint sideTwoOffset = 0;\t// Bot or Right depending on path direction\n\t\t// If the width is odd, balance the offsets\n\t\tif (width % 2 != 0) {\t\n\t\t\tsideOneOffset = sideTwoOffset = ((width / 2) + 1);\n\t\t} else {\n\t\t\t// If the width is even, the offsets will be off by 1\n\t\t\tsideOneOffset = width;\n\t\t\tsideTwoOffset = width - 1;\n\t\t}\n\t\tif (d == Direction.LEFT || d == Direction.RIGHT) {\n\t\t\t// If the direction is left then we want to swap the points\n\t\t\t// to pretend like the direction was right (so the following code works)\n\t\t\tif (d == Direction.LEFT) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p1.x, p1.y + sideTwoOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p2.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x, p1.y + sideTwoOffset)));\n\t\t\t// Set the left and right walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.y is the center of the path (top to bottom)\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x, p1.y + (i - width/2))));\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p2.x, p2.y + (i - width/2))));\n\t\t\t}\n\t\t\t// Set middle path and top/bottom padding (horizontal Oreo!)\n\t\t\tfor (int col = p1.x + 1, endCol = p2.x; col < endCol; col++) {\n\t\t\t\t// Add the top wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(col, p1.y - sideOneOffset)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(col, p1.y + (i - width /2))));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the bottom wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(col, p1.y + sideTwoOffset)));\n\t\t\t}\n\t\t} else {\n\t\t\t// If the direction is up then we want to swap the points\n\t\t\t// to pretend like the direction was down (so the following code works)\n\t\t\tif (d == Direction.UP) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x - sideOneOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p2.x - sideOneOffset, p2.y)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p1.x + sideTwoOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x + sideTwoOffset, p2.y)));\n\t\t\t// Set the top and bottom walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.x is the center of the path (left to right)\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(p1.x + (i - width /2), p1.y)));\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(p2.x + (i - width /2), p2.y)));\n\t\t\t}\n\t\t\t// Set middle path and left/right padding (vertical Oreo!)\n\t\t\tfor (int row = p1.y + 1, endRow = p2.y; row < endRow; row++) {\n\t\t\t\t// Add the left wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x - sideOneOffset, row)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(p1.x + (i - width /2), row)));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the right wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p1.x + sideTwoOffset, row)));\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "@Override\npublic void processDirection() {\n\t\n}", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "public void renderCenterBlock(int cons, int side, int end)\r\n/* 143: */ {\r\n/* 144:135 */ if (cons == 0)\r\n/* 145: */ {\r\n/* 146:136 */ this.context.setTex(end);\r\n/* 147:137 */ doubleBox(63, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 148:138 */ return;\r\n/* 149: */ }\r\n/* 150:139 */ if (cons == 3)\r\n/* 151: */ {\r\n/* 152:140 */ this.context.setTexFlags(1773);\r\n/* 153:141 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 154:142 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 155:143 */ return;\r\n/* 156: */ }\r\n/* 157:144 */ if (cons == 12)\r\n/* 158: */ {\r\n/* 159:145 */ this.context.setTexFlags(184365);\r\n/* 160:146 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 161:147 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 1.0F);\r\n/* 162:148 */ return;\r\n/* 163: */ }\r\n/* 164:149 */ if (cons == 48)\r\n/* 165: */ {\r\n/* 166:150 */ this.context.setTexFlags(187200);\r\n/* 167:151 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 168:152 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 169:153 */ return;\r\n/* 170: */ }\r\n/* 171:155 */ this.context.setTex(end);\r\n/* 172:156 */ doubleBox(0x3F ^ cons, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 173:157 */ if ((cons & 0x1) > 0)\r\n/* 174: */ {\r\n/* 175:158 */ this.context.setTexFlags(1773);\r\n/* 176:159 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 177:160 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 0.375F, 0.625F);\r\n/* 178: */ }\r\n/* 179:162 */ if ((cons & 0x2) > 0)\r\n/* 180: */ {\r\n/* 181:163 */ this.context.setTexFlags(1773);\r\n/* 182:164 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 183:165 */ doubleBox(60, 0.375F, 0.625F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 184: */ }\r\n/* 185:167 */ if ((cons & 0x4) > 0)\r\n/* 186: */ {\r\n/* 187:168 */ this.context.setTexFlags(184365);\r\n/* 188:169 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 189:170 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 0.375F);\r\n/* 190: */ }\r\n/* 191:172 */ if ((cons & 0x8) > 0)\r\n/* 192: */ {\r\n/* 193:173 */ this.context.setTexFlags(184365);\r\n/* 194:174 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 195:175 */ doubleBox(51, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F, 1.0F);\r\n/* 196: */ }\r\n/* 197:177 */ if ((cons & 0x10) > 0)\r\n/* 198: */ {\r\n/* 199:178 */ this.context.setTexFlags(187200);\r\n/* 200:179 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 201:180 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F);\r\n/* 202: */ }\r\n/* 203:182 */ if ((cons & 0x20) > 0)\r\n/* 204: */ {\r\n/* 205:183 */ this.context.setTexFlags(187200);\r\n/* 206:184 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 207:185 */ doubleBox(15, 0.625F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 208: */ }\r\n/* 209: */ }", "public static String makeShapeA() {\n\tString result = \"\";\n\t\tfor (int i = 0; i < 8 ; i++) {\n\t\t\tresult+=printHash(i);\n\t\t\t\n\t\t}return result;\n\t\t\t//System.out.println(printHash(i));\n\t\t}", "private void traverseBayeredPatternHalfSizeRGB(){\n int originalPositionX = 0;\n int originalPositionY = 1;\n\n for (int newX = 0; originalPositionX < originalImageHeight -1; newX++){\n for (int newY = 0; originalPositionY < originalImageWidth -1; newY++){\n Point newPosition = new Point(newX,newY);\n int newAbsoultPosition = getAbsolutPixelPosition(newPosition, originalImageHeight / 2, originalImageWidth / 2);\n halfSizePixRGB[newAbsoultPosition] = getAverageRGB(new Point(originalPositionX,originalPositionY));\n originalPositionY += 2;\n }\n originalPositionY = 0;\n originalPositionX += 2;\n }\n }", "public void foundLeaf(int width, int height, int level, int currX, int currY, int location) {\n level = level +2;\n if (location == 1) {\n\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - ( (new Double(spatialHeight / Math.pow(2, level ))).intValue()),\n currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY * 2,\n Color.BLACK);\n\n\n canvas.addLine(((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue())) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n currX,\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n\n }\n\n if (location == 2) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n ( currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n (currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n\n\n }\n\n if (location == 3) {\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY,\n Color.BLACK);\n\n\n\n canvas.addLine((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n\tcurrY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n (currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n }\n\n if (location == 4) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY,\n Color.BLACK);\n\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue() + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), Color.BLACK);\n\n\n }\n\n\n\n\n }", "double volume() {\n\treturn width*height*depth;\n}", "@Override\r\n public void draw()\r\n {\n\r\n }", "@Override\n protected void paint2d(Graphics2D g) {\n \n }", "public static void method1(){\n System.out.println(\"*****\");\n System.out.println(\"*****\");\n System.out.println(\" * *\");\n System.out.println(\" *\");\n System.out.println(\" * *\");\n }", "@Override\n\tpublic void draw3() {\n\n\t}", "private void renderPath(Node n)\n {\n\tGraphics g = getGraphics();\n\tboolean painting;\n\tColor nc,lc;\n\n\tpainting = (n.paths_passing==0);\n\twhile (n != null) {\n\t if (painting)\n\t\tn.paths_passing++;\n\t else {\n\t\tn.paths_passing--;\n\t }\n\t \n// \t nc = (n.paths_passing > 0)?hilitcolor:normalcolor;\n// \t lc = (n.paths_passing > 0)?hilitcolor:linecolor;\n\t nc = (n.paths_passing > 0)?n.path_color:normalcolor;\n\t lc = (n.paths_passing > 0)?n.path_color:linecolor;\n\t \n\t if (n.parent == null) {\n\t\tsetRenderColor(g,nc);\n\t\trenderNode(g,n);\n\t\tbreak;\n\t }\n\n\t // Double line width\n\t //setRenderColor(g,(n.paths_passing>0)?hilitcolor:Color.white);\n\t setRenderColor(g,(n.paths_passing>0)?n.path_color:Color.white);\n\t renderLine(g,n.x-1,n.y,n.parent.x-1,n.parent.y);\t\n\n\t setRenderColor(g,lc);\n\t renderLine(g,n.x,n.y,n.parent.x,n.parent.y);\n\n\t setRenderColor(g,nc);\n\t renderNode(g,n);\n\t n = n.parent;\n\t}\n }", "int fi(int x, int y) {\n\t\treturn (x + 1) + (width + 2) * (y + 1);\n\t}", "double defendre();", "public void getTile_B8();", "public void SubRect(){\n\t\n}", "public static void sizePathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze five = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\t//System.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = five.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber + n)){\n\t\t\t\t\t\tS.unionBySize(randomNumber+n, randomNumber);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'u');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+1);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(five, n);\n\t\tuserSelection_SolveMaze(n);\n\n\t\tStdDraw.show(0);\n\t\tfive.draw();\n\t\tfive.printCellNumbers();\t\n\t}", "void mo21076g();", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "public double getWidth() {\n return this.size * 2.0; \n }", "public void skystonePos2() {\n }", "public void skystonePos5() {\n }", "public double getPerimiter(){return (2*height +2*width);}", "int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}", "public static void topHalf() {\n \t\n for( int i = 1; i <= SIZE; i++){\n for(int spaces = 1; spaces <= 3*SIZE - 3*i; spaces++) {\n System.out.print(\" \"); \n }\n \n for(int j = 1; j <= 1; j++) {\n System.out.print(\"__/\");\n }\n \n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\":::\");\n }\n \n System.out.print(\"||\");\n \n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\":::\");\n }\n \n for(int j = 1; j <= 1; j++) {\n System.out.print(\"\\\\__\");\n }\n \n System.out.println();\n }\n \n System.out.print(\"|\");\n \n for(int i = 1; i <= 6 * SIZE; i++) {\n System.out.print(\"\\\"\");\n }\n \n System.out.println(\"|\");\n }", "public static void body() {\n \tfor(int i = 1; i <= SIZE*SIZE; i++) {\n for(int j = 1; j <= 3*SIZE-(SIZE-1); j++) {\n System.out.print(\" \");\n }\n \n System.out.print(\"|\");\n for(int j = 1; j <= SIZE-2; j++) {\n \tSystem.out.print(\"%\");\n }\n System.out.print(\"||\");\n for(int j = 1; j <= SIZE-2; j++) {\n \tSystem.out.print(\"%\");\n }\n System.out.print(\"|\");\n \n System.out.println();\n }\n }", "public void skystonePos3() {\n }", "double seBlesser();", "public wall() { //default constructor makes a 10x10 square extending right and down from the pixel located at 5,5\r\n x = 5;\r\n y = 5;\r\n height = 10;\r\n width = 10;\r\n }", "void block(Directions dir);", "public void lowerFlatbed(){\n flatbed.lowerFlatbed();\n }", "public static void main(String[] args) {\nint i,j,k;\r\nint num=5;\r\nfor(i=0;i<num;i++){\r\n\tfor(j=0;j<i;j++){\r\n\t\tSystem.out.print(\" \");\r\n\t}\r\n\tfor(k=num; k>=2*i-1; k--){\r\n\t\tSystem.out.print(\"*\");\r\n\t}\r\n\t\r\n\tSystem.out.println();\r\n}\r\n\t}", "public RMPath getPath() { return RMPath.unitRectPath; }", "public int upright();", "private int uniquePaths(int x, int y, int[][] dp) {\n \t\tif (x == 0 || y == 0) return 1;\n \t\tif (dp[x][y] == 0)\n \t\t\tdp[x][y] = uniquePaths(x - 1, y, dp) + uniquePaths(x, y - 1, dp);\n \t\treturn dp[x][y];\n \t}", "public Integer getWidth(){return this.width;}", "public void skystonePos6() {\n }", "void GenerateBoardPath() {\n\t\t\t\n\t\t\tint rows = board.getRowsNum();\n\t\t\tint columns = board.getColsNum();\n\t\t\tint space_number = 1; \n\t\t\t\n\t\t\t\n\t\t\tfor (int i = rows - 1; i >= 0; i--) \n\t\t\t\t//If the row is an odd-number, move L-R\n\t\t\t\tif (i % 2 != 0) {\n\t\t\t\t\tfor (int j = 0; j < columns; j++) \n\t\t\t\t\t\tBoardPathRepository.put(space_number++, board.getTile(i, j));}\n\t\t\t\telse {\n\t\t\t\t\tfor (int j = columns-1; j >=0; j--) \n\t\t\t\t\t\tBoardPathRepository.put(space_number++, board.getTile(i, j));\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t}", "private byte r() {\r\n\t\treturn (left_map == 0 ) ? (byte) 1 : 0;\r\n\t}", "private void render() {\n StringBuilder builder = new StringBuilder();\n builder.append(horizontalEdge).append(\"\\n\");\n for (int i = 0; i < this.height; i++) {\n builder.append(VERTICAL_CHAR);\n for (int j = 0; j < this.width; j++) {\n builder.append(pixels[i][j]);\n }\n builder.append(VERTICAL_CHAR);\n builder.append(\"\\n\");\n }\n builder.append(horizontalEdge);\n System.out.printf(builder.toString());\n }", "@Override\n\tpublic void breath() {\n\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "public\nstatic\nvoid\nmain(String args[]) \n\n{ \n\nBinaryTree tree = \nnew\nBinaryTree(); \n\ntree.root = \nnew\nNode(\n20\n); \n\ntree.root.left = \nnew\nNode(\n8\n); \n\ntree.root.left.left = \nnew\nNode(\n4\n); \n\ntree.root.left.right = \nnew\nNode(\n12\n); \n\ntree.root.left.right.left = \nnew\nNode(\n10\n); \n\ntree.root.left.right.right = \nnew\nNode(\n14\n); \n\ntree.root.right = \nnew\nNode(\n22\n); \n\ntree.root.right.right = \nnew\nNode(\n25\n); \n\ntree.printBoundary(tree.root); \n\n}", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tint n = 7;\r\n\t\tfor (int i = n; i >= 0; i--) {\r\n\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t for(int j=0; j<n-i; j++) {\r\n\t\t\t \r\n\t\t\t System.out.print(\" \");\r\n\t\t\t \r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t \r\n\r\n\t\t\tfor (int j = n; j >= n-i; j--) {\r\n\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t}\r\n\r\n\t\t\r\n\t}", "@Override\n\tpublic void draw() {\n\t}", "private void division()\n\t{\n\t\tFun = Function.DIVIDE; //Function set to determine what action should be taken later.\n\t\t\n\t\t\tsetLeftValue();\n\t\t\tentry.grabFocus();\n\t\t\n\t}" ]
[ "0.5654086", "0.5282051", "0.5270874", "0.5268489", "0.5230159", "0.5229372", "0.5205559", "0.51923394", "0.51524484", "0.50993294", "0.50948834", "0.5071109", "0.5043058", "0.5009983", "0.5006536", "0.49739555", "0.49691963", "0.4959123", "0.49568397", "0.49425906", "0.49421698", "0.49421698", "0.4903223", "0.4897176", "0.48879617", "0.48803073", "0.48741165", "0.48718095", "0.48679698", "0.48646608", "0.48598114", "0.48402584", "0.48362267", "0.48321876", "0.48310882", "0.4825809", "0.48227587", "0.48175377", "0.48045233", "0.48045233", "0.48002362", "0.47911668", "0.47906598", "0.4776121", "0.47734705", "0.47673976", "0.475685", "0.47517157", "0.47446346", "0.47364715", "0.47353277", "0.47321412", "0.47242466", "0.4721296", "0.47190621", "0.47164857", "0.47148356", "0.47142458", "0.47103566", "0.47027764", "0.47023293", "0.4701804", "0.46992764", "0.46985114", "0.46954885", "0.4695406", "0.46914175", "0.4690724", "0.46901584", "0.4686765", "0.4682771", "0.46786475", "0.46786475", "0.4676364", "0.46714565", "0.46710065", "0.46701837", "0.46698236", "0.46671712", "0.466633", "0.4663725", "0.46617198", "0.46599096", "0.46593648", "0.4654308", "0.46481097", "0.46472353", "0.46443266", "0.46441418", "0.46438584", "0.4642061", "0.46387514", "0.46382058", "0.46375832", "0.4636777", "0.46365395", "0.46365395", "0.46359038", "0.4635539", "0.46332848", "0.46326485" ]
0.0
-1
/ / / / / / / / / /
private void validateDirectInterfaces(Class paramClass) throws IDLTypeException { /* 520 */ Class[] arrayOfClass = paramClass.getInterfaces(); /* */ /* 522 */ if (arrayOfClass.length < 2) { /* */ return; /* */ } /* */ /* 526 */ HashSet<String> hashSet1 = new HashSet(); /* 527 */ HashSet<String> hashSet2 = new HashSet(); /* */ /* 529 */ for (byte b = 0; b < arrayOfClass.length; b++) { /* 530 */ Class clazz = arrayOfClass[b]; /* 531 */ Method[] arrayOfMethod = clazz.getMethods(); /* */ /* */ /* */ /* */ /* 536 */ hashSet2.clear(); /* 537 */ for (byte b1 = 0; b1 < arrayOfMethod.length; b1++) { /* 538 */ hashSet2.add(arrayOfMethod[b1].getName()); /* */ } /* */ /* */ /* */ /* 543 */ for (String str : hashSet2) { /* */ /* 545 */ if (hashSet1.contains(str)) { /* 546 */ String str1 = "Class " + paramClass + " inherits method " + str + " from multiple direct interfaces."; /* */ /* 548 */ throw new IDLTypeException(str1); /* */ } /* 550 */ hashSet1.add(str); /* */ } /* */ } /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "private int rightChild(int i){return 2*i+2;}", "public void divide() {\n\t\t\n\t}", "public abstract void bepaalGrootte();", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "double passer();", "int getWidth() {return width;}", "public static void bottomHalf() {\n\n for(int i = 1; i <= SIZE; i++) {\n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\" \");\n }\n \n\t System.out.print(\"\\\\_\");\n\t for(int j = 3*SIZE-i; j >= i; j--) {\n\t System.out.print(\"/\\\\\");\n\t }\n\t System.out.println(\"_/\");\n }\n }", "public double getWidth() {\n return this.left.getLeft(0) - this.right.getRight(0); \n }", "public String ring();", "private static Object[] newPath(int length, Object[] leaf) {\n Object[] node = leaf;\n for (int i = 0; i < length; i += 5) {\n node = new Object[] { node };\n }\n return node;\n }", "public Integer getWidth(){return this.width;}", "public double getWidth() {\n return this.size * 2.0; \n }", "public void gored() {\n\t\t\n\t}", "public void getTile_B8();", "laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "public String toString(){ return \"DIV\";}", "int width();", "public abstract String division();", "private int leftChild(int index){\n\t\treturn (2*index) +1;\n\t}", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "private int get_right_child(int index){\r\n return 2 * index + 2;\r\n }", "public double getWidth() { return _width<0? -_width : _width; }", "@Override\n public void bfs() {\n\n }", "public int getEdgeCount() \n {\n return 3;\n }", "private void traverseBayeredPatternHalfSizeRGB(){\n int originalPositionX = 0;\n int originalPositionY = 1;\n\n for (int newX = 0; originalPositionX < originalImageHeight -1; newX++){\n for (int newY = 0; originalPositionY < originalImageWidth -1; newY++){\n Point newPosition = new Point(newX,newY);\n int newAbsoultPosition = getAbsolutPixelPosition(newPosition, originalImageHeight / 2, originalImageWidth / 2);\n halfSizePixRGB[newAbsoultPosition] = getAverageRGB(new Point(originalPositionX,originalPositionY));\n originalPositionY += 2;\n }\n originalPositionY = 0;\n originalPositionX += 2;\n }\n }", "public int getWidth() {\r\n\treturn this.width;\r\n}", "@Override\npublic void processDirection() {\n\t\n}", "double getNewWidth();", "long getWidth();", "public int generateRoshambo(){\n ;]\n\n }", "public double getWidth() {\n return this.getRight(this.tree.getRight(0)) - this.getLeft(this.tree.getLeft(0)); \n }", "double volume(){\n return width*height*depth;\n }", "public static void sizePathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze five = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\t//System.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = five.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber + n)){\n\t\t\t\t\t\tS.unionBySize(randomNumber+n, randomNumber);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'u');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+1);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(five, n);\n\t\tuserSelection_SolveMaze(n);\n\n\t\tStdDraw.show(0);\n\t\tfive.draw();\n\t\tfive.printCellNumbers();\t\n\t}", "public int my_leaf_count();", "protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}", "Operations operations();", "static int getNumPatterns() { return 64; }", "void mo33732Px();", "public double getPerimiter(){return (2*height +2*width);}", "double seBlesser();", "public void SubRect(){\n\t\n}", "@Override\n protected int mapSize() {\n return left.size()+right.size()-hidden.size();\n }", "private int get_left_child(int index){\r\n return 2 * index + 1;\r\n }", "@Override\r\n\tpublic void walk() {\n\r\n\t}", "public void skystonePos4() {\n }", "int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}", "public int getWidth(){\n return width;\n }", "static void pyramid(){\n\t}", "public void leerPlanesDietas();", "private void pointer(Graphics image,int x,int y,int height,int b,int dir) {\n\n\t\tint[] xt=new int[3];\n\t\tint[] yt=new int[3];\n\n\t\tif(dir==0) {\n\t\t\txt[0]=x;\n\t\t\txt[1]=xt[2]=x+height;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=y+b/2;\n\t\t\tyt[2]=y-b/2;\n\t\t} else {\n\t\t\txt[0]=x;\n\t\t\txt[1]=x+b/2;\n\t\t\txt[2]=x-b/2;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=yt[2]=y-height;\n\t\t}\n\t\timage.fillPolygon(xt,yt,3);\n\t}", "public String getRing();", "private int get_parent(int index){\r\n return (index-1)/2;\r\n }", "public static void main(String[] args) {\n\t\tScanner obj=new Scanner(System.in);\r\n\t\tint a=0;\r\n\t\tint count=0;\r\n System.out.println(\"enter size\");\r\n\t\ta=obj.nextInt();\r\n\t\tint m=2*a+1;\r\n\t\tint n=2*a+2;\r\n\t\tint mid=(m+1)/2;\r\n\t\tfor(int i=1;i<=m;i++)\r\n\t\t{\r\n\t\t\tcount=0;\r\n\t\t\tfor(int j=1;j<=n;j++)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tif((i==1)||(i==m)||(j==1)||(j==n))//frame begin\r\n\t\t\t\t{\r\n\t\t\t\t\tif((i==1)||(i==m))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"+\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t {\r\n\t\t\t\t\t\t\tSystem.out.print(\"|\");//frame left and right\r\n\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//frame end\r\n\t\t\t\telse if (i<mid)//upper-half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t for(int l=1;l<=2*i-4;l++)\r\n\t\t\t\t {\r\n\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\tSystem.out.print(\"\\\\\");\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end of upper half\r\n\t\t\t\telse if(i>mid)//lower half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tfor(int k=mid;k<i;k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t System.out.print(\"\\\\\");\r\n\t\t\t\t\t for(int l=2*m-6;l>2*i-4;l--)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t else\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t }\r\n\t\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t\t for(int k=mid;k<i;k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t\t\t}//end of lower half\r\n\t\t\t\telse if(i==mid)//middle part\r\n\t\t\t\t{\r\n\t\t\t\t\tif(j==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\"<\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(j==n-1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\">\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(i%2==0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"=\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end\r\n\t\t\t}//end-of-j\r\n\t\t\tSystem.out.println();\r\n\t\t}//end\r\n\r\n\t}", "protected int getWidth()\n\t{\n\t\treturn 0;\n\t}", "@Override\n public String toString()\n {\n\treturn getClass().getSimpleName() + \" (\" + getLength() + \"x\" + getWidth() + \")\";\n }", "public void lowerFlatbed(){\n flatbed.lowerFlatbed();\n }", "void walk() {\n\t\t\n\t}", "protected int parent(int i) { return (i - 1) / 2; }", "int getTribeSize();", "@Override\n\tpublic float getWidth() {\n\t\treturn 26;\n\t}", "@Override\n\tpublic void walk() {\n\t\t\n\t}", "Parallelogram(){\n length = width = height = 0;\n }", "public abstract double getBaseWidth();", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "public void foundLeaf(int width, int height, int level, int currX, int currY, int location) {\n level = level +2;\n if (location == 1) {\n\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - ( (new Double(spatialHeight / Math.pow(2, level ))).intValue()),\n currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY * 2,\n Color.BLACK);\n\n\n canvas.addLine(((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue())) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n currX,\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n\n }\n\n if (location == 2) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n ( currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n (currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n\n\n }\n\n if (location == 3) {\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY,\n Color.BLACK);\n\n\n\n canvas.addLine((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n\tcurrY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n (currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n }\n\n if (location == 4) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY,\n Color.BLACK);\n\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue() + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), Color.BLACK);\n\n\n }\n\n\n\n\n }", "public static void main(String[] args) {\n\n\n for(int a=0; a<7;a++){\n for(int b=0;b<7-a;b++){\n System.out.print(\" \");\n }\n for(int c=0; c<=a;c++){\n System.out.print(\"* \");\n }\n System.out.println(\" \");\n }\n\n }", "public static void unionPathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze two = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\tSystem.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = two.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber+n) != S.findAndCompress(randomNumber)){\n\t\t\t\t\t\tS.union(randomNumber+n, randomNumber);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'u');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.union(randomNumber, randomNumber+1);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(two, n);\n\t\tuserSelection_SolveMaze(n);\n\n\n\t\tStdDraw.show(0);\n\t\ttwo.draw();\n\t\ttwo.printCellNumbers();\n\t}", "void sharpen();", "void sharpen();", "double getPerimeter(){\n return 2*height+width;\n }", "private static void breadcrumbArrow(int width, int height, int indent, int c1, int c2) {\n\n\t\tdouble x0 = 0, y0 = height / 2d;\n\t\tdouble x1 = indent, y1 = 0;\n\t\tdouble x2 = indent, y2 = height / 2d;\n\t\tdouble x3 = indent, y3 = height;\n\t\tdouble x4 = width, y4 = 0;\n\t\tdouble x5 = width, y5 = height / 2d;\n\t\tdouble x6 = width, y6 = height;\n\t\tdouble x7 = indent + width, y7 = 0;\n\t\tdouble x8 = indent + width, y8 = height;\n\n\t\tint fc1 = ColorHelper.mixAlphaColors(c1, c2, 0);\n\t\tint fc2 = ColorHelper.mixAlphaColors(c1, c2, (indent)/(width + 2f * indent));\n\t\tint fc3 = ColorHelper.mixAlphaColors(c1, c2, (indent + width)/(width + 2f * indent));\n\t\tint fc4 = ColorHelper.mixAlphaColors(c1, c2, 1);\n\n\t\tRenderSystem.disableTexture();\n\t\tRenderSystem.enableBlend();\n\t\tRenderSystem.disableAlphaTest();\n\t\tRenderSystem.defaultBlendFunc();\n\t\tRenderSystem.shadeModel(GL11.GL_SMOOTH);\n\n\t\tTessellator tessellator = Tessellator.getInstance();\n\t\tBufferBuilder bufferbuilder = tessellator.getBuffer();\n\t\tbufferbuilder.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR);\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x7, y7, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x8, y8, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\ttessellator.draw();\n\t\tRenderSystem.shadeModel(GL11.GL_FLAT);\n\t\tRenderSystem.disableBlend();\n\t\tRenderSystem.enableAlphaTest();\n\t\tRenderSystem.enableTexture();\n\t}", "public static String makeShapeA() {\n\tString result = \"\";\n\t\tfor (int i = 0; i < 8 ; i++) {\n\t\t\tresult+=printHash(i);\n\t\t\t\n\t\t}return result;\n\t\t\t//System.out.println(printHash(i));\n\t\t}", "int expand();", "private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "private byte r() {\r\n\t\treturn (left_map == 0 ) ? (byte) 1 : 0;\r\n\t}", "public static int size_parent() {\n return (8 / 8);\n }", "public int getWidth()\n {return width;}", "@Override\r\n\tpublic int getWidth() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic double perimeter() {\n\t\treturn 2*length*breadth;\r\n\t}", "String directsTo();", "int depth();", "int depth();", "int getWidth1();", "public abstract int getSpotsNeeded();", "public int upright();", "public void stg() {\n\n\t}", "int getR();", "int fi(int x, int y) {\n\t\treturn (x + 1) + (width + 2) * (y + 1);\n\t}", "public String getRingback();", "double getWidth();", "double getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();" ]
[ "0.5540896", "0.5446543", "0.5227331", "0.52141076", "0.5111389", "0.50963986", "0.50654864", "0.5038032", "0.50336593", "0.501189", "0.50033337", "0.5002645", "0.4999724", "0.4997505", "0.49938273", "0.4988672", "0.4982446", "0.49785286", "0.4967535", "0.49578318", "0.4915642", "0.49043542", "0.4896837", "0.48817068", "0.48615584", "0.48489416", "0.4838888", "0.48292333", "0.48239383", "0.48229367", "0.48212478", "0.48193154", "0.48124096", "0.48111546", "0.4806745", "0.4804178", "0.48025957", "0.47942734", "0.4787015", "0.47851548", "0.47835702", "0.47725245", "0.47664967", "0.476185", "0.4760751", "0.47598377", "0.4759025", "0.4757917", "0.47506076", "0.47504088", "0.47497043", "0.47486544", "0.4747894", "0.4746228", "0.4741946", "0.47376034", "0.47327974", "0.47300422", "0.4727591", "0.47272107", "0.47263286", "0.47261053", "0.47214398", "0.47212386", "0.47205597", "0.47184741", "0.47169027", "0.47127956", "0.47109538", "0.47052673", "0.47015747", "0.47015747", "0.47005445", "0.46963036", "0.46961927", "0.46945545", "0.46940103", "0.46804753", "0.4678816", "0.46784258", "0.4676913", "0.46759227", "0.46728146", "0.46719387", "0.46686554", "0.46686554", "0.4666156", "0.46614605", "0.46611053", "0.466004", "0.46565068", "0.46531367", "0.4652937", "0.4652573", "0.4652573", "0.46524948", "0.46524948", "0.46524948", "0.46524948", "0.46524948", "0.46524948" ]
0.0
-1
/ / / / / / / / / /
private void validateConstants(final Class c) throws IDLTypeException { /* 564 */ Field[] arrayOfField = null; /* */ /* */ /* */ /* */ try { /* 569 */ arrayOfField = AccessController.<Field[]>doPrivileged(new PrivilegedExceptionAction<Field>() { /* */ public Object run() throws Exception { /* 571 */ return c.getFields(); /* */ } /* */ }); /* 574 */ } catch (PrivilegedActionException privilegedActionException) { /* 575 */ IDLTypeException iDLTypeException = new IDLTypeException(); /* 576 */ iDLTypeException.initCause(privilegedActionException); /* 577 */ throw iDLTypeException; /* */ } /* */ /* 580 */ for (byte b = 0; b < arrayOfField.length; b++) { /* 581 */ Field field = arrayOfField[b]; /* 582 */ Class<?> clazz = field.getType(); /* 583 */ if (clazz != String.class && /* 584 */ !isPrimitive(clazz)) { /* */ /* */ /* 587 */ String str = "Constant field '" + field.getName() + "' in class '" + field.getDeclaringClass().getName() + "' has invalid type' " + field.getType() + "'. Constants in RMI/IIOP interfaces can only have primitive types and java.lang.String types."; /* */ /* */ /* 590 */ throw new IDLTypeException(str); /* */ } /* */ } /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "private int rightChild(int i){return 2*i+2;}", "public void divide() {\n\t\t\n\t}", "public abstract void bepaalGrootte();", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "double passer();", "int getWidth() {return width;}", "public static void bottomHalf() {\n\n for(int i = 1; i <= SIZE; i++) {\n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\" \");\n }\n \n\t System.out.print(\"\\\\_\");\n\t for(int j = 3*SIZE-i; j >= i; j--) {\n\t System.out.print(\"/\\\\\");\n\t }\n\t System.out.println(\"_/\");\n }\n }", "public double getWidth() {\n return this.left.getLeft(0) - this.right.getRight(0); \n }", "public String ring();", "private static Object[] newPath(int length, Object[] leaf) {\n Object[] node = leaf;\n for (int i = 0; i < length; i += 5) {\n node = new Object[] { node };\n }\n return node;\n }", "public Integer getWidth(){return this.width;}", "public double getWidth() {\n return this.size * 2.0; \n }", "public void gored() {\n\t\t\n\t}", "public void getTile_B8();", "laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "public String toString(){ return \"DIV\";}", "int width();", "public abstract String division();", "private int leftChild(int index){\n\t\treturn (2*index) +1;\n\t}", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "private int get_right_child(int index){\r\n return 2 * index + 2;\r\n }", "public double getWidth() { return _width<0? -_width : _width; }", "@Override\n public void bfs() {\n\n }", "public int getEdgeCount() \n {\n return 3;\n }", "private void traverseBayeredPatternHalfSizeRGB(){\n int originalPositionX = 0;\n int originalPositionY = 1;\n\n for (int newX = 0; originalPositionX < originalImageHeight -1; newX++){\n for (int newY = 0; originalPositionY < originalImageWidth -1; newY++){\n Point newPosition = new Point(newX,newY);\n int newAbsoultPosition = getAbsolutPixelPosition(newPosition, originalImageHeight / 2, originalImageWidth / 2);\n halfSizePixRGB[newAbsoultPosition] = getAverageRGB(new Point(originalPositionX,originalPositionY));\n originalPositionY += 2;\n }\n originalPositionY = 0;\n originalPositionX += 2;\n }\n }", "public int getWidth() {\r\n\treturn this.width;\r\n}", "@Override\npublic void processDirection() {\n\t\n}", "double getNewWidth();", "long getWidth();", "public int generateRoshambo(){\n ;]\n\n }", "public double getWidth() {\n return this.getRight(this.tree.getRight(0)) - this.getLeft(this.tree.getLeft(0)); \n }", "double volume(){\n return width*height*depth;\n }", "public static void sizePathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze five = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\t//System.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = five.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber + n)){\n\t\t\t\t\t\tS.unionBySize(randomNumber+n, randomNumber);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'u');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+1);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(five, n);\n\t\tuserSelection_SolveMaze(n);\n\n\t\tStdDraw.show(0);\n\t\tfive.draw();\n\t\tfive.printCellNumbers();\t\n\t}", "public int my_leaf_count();", "protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}", "Operations operations();", "static int getNumPatterns() { return 64; }", "void mo33732Px();", "public double getPerimiter(){return (2*height +2*width);}", "double seBlesser();", "public void SubRect(){\n\t\n}", "@Override\n protected int mapSize() {\n return left.size()+right.size()-hidden.size();\n }", "private int get_left_child(int index){\r\n return 2 * index + 1;\r\n }", "@Override\r\n\tpublic void walk() {\n\r\n\t}", "public void skystonePos4() {\n }", "int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}", "public int getWidth(){\n return width;\n }", "static void pyramid(){\n\t}", "public void leerPlanesDietas();", "private void pointer(Graphics image,int x,int y,int height,int b,int dir) {\n\n\t\tint[] xt=new int[3];\n\t\tint[] yt=new int[3];\n\n\t\tif(dir==0) {\n\t\t\txt[0]=x;\n\t\t\txt[1]=xt[2]=x+height;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=y+b/2;\n\t\t\tyt[2]=y-b/2;\n\t\t} else {\n\t\t\txt[0]=x;\n\t\t\txt[1]=x+b/2;\n\t\t\txt[2]=x-b/2;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=yt[2]=y-height;\n\t\t}\n\t\timage.fillPolygon(xt,yt,3);\n\t}", "public String getRing();", "private int get_parent(int index){\r\n return (index-1)/2;\r\n }", "public static void main(String[] args) {\n\t\tScanner obj=new Scanner(System.in);\r\n\t\tint a=0;\r\n\t\tint count=0;\r\n System.out.println(\"enter size\");\r\n\t\ta=obj.nextInt();\r\n\t\tint m=2*a+1;\r\n\t\tint n=2*a+2;\r\n\t\tint mid=(m+1)/2;\r\n\t\tfor(int i=1;i<=m;i++)\r\n\t\t{\r\n\t\t\tcount=0;\r\n\t\t\tfor(int j=1;j<=n;j++)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tif((i==1)||(i==m)||(j==1)||(j==n))//frame begin\r\n\t\t\t\t{\r\n\t\t\t\t\tif((i==1)||(i==m))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"+\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t {\r\n\t\t\t\t\t\t\tSystem.out.print(\"|\");//frame left and right\r\n\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//frame end\r\n\t\t\t\telse if (i<mid)//upper-half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t for(int l=1;l<=2*i-4;l++)\r\n\t\t\t\t {\r\n\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\tSystem.out.print(\"\\\\\");\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end of upper half\r\n\t\t\t\telse if(i>mid)//lower half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tfor(int k=mid;k<i;k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t System.out.print(\"\\\\\");\r\n\t\t\t\t\t for(int l=2*m-6;l>2*i-4;l--)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t else\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t }\r\n\t\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t\t for(int k=mid;k<i;k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t\t\t}//end of lower half\r\n\t\t\t\telse if(i==mid)//middle part\r\n\t\t\t\t{\r\n\t\t\t\t\tif(j==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\"<\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(j==n-1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\">\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(i%2==0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"=\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end\r\n\t\t\t}//end-of-j\r\n\t\t\tSystem.out.println();\r\n\t\t}//end\r\n\r\n\t}", "protected int getWidth()\n\t{\n\t\treturn 0;\n\t}", "@Override\n public String toString()\n {\n\treturn getClass().getSimpleName() + \" (\" + getLength() + \"x\" + getWidth() + \")\";\n }", "public void lowerFlatbed(){\n flatbed.lowerFlatbed();\n }", "void walk() {\n\t\t\n\t}", "protected int parent(int i) { return (i - 1) / 2; }", "int getTribeSize();", "@Override\n\tpublic float getWidth() {\n\t\treturn 26;\n\t}", "@Override\n\tpublic void walk() {\n\t\t\n\t}", "Parallelogram(){\n length = width = height = 0;\n }", "public abstract double getBaseWidth();", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "public void foundLeaf(int width, int height, int level, int currX, int currY, int location) {\n level = level +2;\n if (location == 1) {\n\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - ( (new Double(spatialHeight / Math.pow(2, level ))).intValue()),\n currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY * 2,\n Color.BLACK);\n\n\n canvas.addLine(((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue())) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n currX,\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n\n }\n\n if (location == 2) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n ( currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n (currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n\n\n }\n\n if (location == 3) {\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY,\n Color.BLACK);\n\n\n\n canvas.addLine((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n\tcurrY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n (currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n }\n\n if (location == 4) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY,\n Color.BLACK);\n\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue() + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), Color.BLACK);\n\n\n }\n\n\n\n\n }", "public static void main(String[] args) {\n\n\n for(int a=0; a<7;a++){\n for(int b=0;b<7-a;b++){\n System.out.print(\" \");\n }\n for(int c=0; c<=a;c++){\n System.out.print(\"* \");\n }\n System.out.println(\" \");\n }\n\n }", "public static void unionPathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze two = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\tSystem.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = two.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber+n) != S.findAndCompress(randomNumber)){\n\t\t\t\t\t\tS.union(randomNumber+n, randomNumber);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'u');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.union(randomNumber, randomNumber+1);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(two, n);\n\t\tuserSelection_SolveMaze(n);\n\n\n\t\tStdDraw.show(0);\n\t\ttwo.draw();\n\t\ttwo.printCellNumbers();\n\t}", "void sharpen();", "void sharpen();", "double getPerimeter(){\n return 2*height+width;\n }", "private static void breadcrumbArrow(int width, int height, int indent, int c1, int c2) {\n\n\t\tdouble x0 = 0, y0 = height / 2d;\n\t\tdouble x1 = indent, y1 = 0;\n\t\tdouble x2 = indent, y2 = height / 2d;\n\t\tdouble x3 = indent, y3 = height;\n\t\tdouble x4 = width, y4 = 0;\n\t\tdouble x5 = width, y5 = height / 2d;\n\t\tdouble x6 = width, y6 = height;\n\t\tdouble x7 = indent + width, y7 = 0;\n\t\tdouble x8 = indent + width, y8 = height;\n\n\t\tint fc1 = ColorHelper.mixAlphaColors(c1, c2, 0);\n\t\tint fc2 = ColorHelper.mixAlphaColors(c1, c2, (indent)/(width + 2f * indent));\n\t\tint fc3 = ColorHelper.mixAlphaColors(c1, c2, (indent + width)/(width + 2f * indent));\n\t\tint fc4 = ColorHelper.mixAlphaColors(c1, c2, 1);\n\n\t\tRenderSystem.disableTexture();\n\t\tRenderSystem.enableBlend();\n\t\tRenderSystem.disableAlphaTest();\n\t\tRenderSystem.defaultBlendFunc();\n\t\tRenderSystem.shadeModel(GL11.GL_SMOOTH);\n\n\t\tTessellator tessellator = Tessellator.getInstance();\n\t\tBufferBuilder bufferbuilder = tessellator.getBuffer();\n\t\tbufferbuilder.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR);\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x7, y7, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x8, y8, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\ttessellator.draw();\n\t\tRenderSystem.shadeModel(GL11.GL_FLAT);\n\t\tRenderSystem.disableBlend();\n\t\tRenderSystem.enableAlphaTest();\n\t\tRenderSystem.enableTexture();\n\t}", "public static String makeShapeA() {\n\tString result = \"\";\n\t\tfor (int i = 0; i < 8 ; i++) {\n\t\t\tresult+=printHash(i);\n\t\t\t\n\t\t}return result;\n\t\t\t//System.out.println(printHash(i));\n\t\t}", "int expand();", "private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "private byte r() {\r\n\t\treturn (left_map == 0 ) ? (byte) 1 : 0;\r\n\t}", "public static int size_parent() {\n return (8 / 8);\n }", "public int getWidth()\n {return width;}", "@Override\r\n\tpublic int getWidth() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic double perimeter() {\n\t\treturn 2*length*breadth;\r\n\t}", "String directsTo();", "int depth();", "int depth();", "int getWidth1();", "public abstract int getSpotsNeeded();", "public int upright();", "public void stg() {\n\n\t}", "int getR();", "int fi(int x, int y) {\n\t\treturn (x + 1) + (width + 2) * (y + 1);\n\t}", "public String getRingback();", "double getWidth();", "double getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();" ]
[ "0.5540896", "0.5446543", "0.5227331", "0.52141076", "0.5111389", "0.50963986", "0.50654864", "0.5038032", "0.50336593", "0.501189", "0.50033337", "0.5002645", "0.4999724", "0.4997505", "0.49938273", "0.4988672", "0.4982446", "0.49785286", "0.4967535", "0.49578318", "0.4915642", "0.49043542", "0.4896837", "0.48817068", "0.48615584", "0.48489416", "0.4838888", "0.48292333", "0.48239383", "0.48229367", "0.48212478", "0.48193154", "0.48124096", "0.48111546", "0.4806745", "0.4804178", "0.48025957", "0.47942734", "0.4787015", "0.47851548", "0.47835702", "0.47725245", "0.47664967", "0.476185", "0.4760751", "0.47598377", "0.4759025", "0.4757917", "0.47506076", "0.47504088", "0.47497043", "0.47486544", "0.4747894", "0.4746228", "0.4741946", "0.47376034", "0.47327974", "0.47300422", "0.4727591", "0.47272107", "0.47263286", "0.47261053", "0.47214398", "0.47212386", "0.47205597", "0.47184741", "0.47169027", "0.47127956", "0.47109538", "0.47052673", "0.47015747", "0.47015747", "0.47005445", "0.46963036", "0.46961927", "0.46945545", "0.46940103", "0.46804753", "0.4678816", "0.46784258", "0.4676913", "0.46759227", "0.46728146", "0.46719387", "0.46686554", "0.46686554", "0.4666156", "0.46614605", "0.46611053", "0.466004", "0.46565068", "0.46531367", "0.4652937", "0.4652573", "0.4652573", "0.46524948", "0.46524948", "0.46524948", "0.46524948", "0.46524948", "0.46524948" ]
0.0
-1
print all three digit armstrong no int n=153; System.out.println(isArmstrong(n));
public static void main(String[] args){ for(int i=100;i<1000;i++){ if(isArmstrong(i)){ System.out.print(i+" "); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean isArm(int n){\r\n int m=n;// new variable for n as we divide by 10 it reduce given number by 1 digit( last digit)\r\n double c=0;\r\n int temp=m ;\r\n \r\n int mDigitCounter=digitCounter(n); \r\n \r\n while(m>0){\r\n int a=m%10;\r\n m=m/10;\r\n double mCube=cube(a,mDigitCounter);\r\n\r\n \r\n c=c+(mCube);\r\n \r\n }\r\n \r\n if (temp==c){\r\n return true;\r\n\r\n }\r\n\r\n else\r\n return false;\r\n\r\n }", "public static void main (String[] args){\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int count=0;\n int sum=0;\n int t;\n t=n;\n while(n>0)\n {\n int i=n%10;\n sum=sum+i*i*i;\n n=n/10; \n }\n if(sum==t)\n {\n System.out.println(\"Armstrong Number\");\n }\n else\n {\n System.out.println(\"Not a Armstrong Number\");\n }\n\t}", "public static void main(String[] args) {\n\r\n\t\tScanner s= new Scanner (System.in);\r\n\t\t\r\n\t\tSystem.out.println(\"Please enter the number: \");\r\n\t\tint n= s.nextInt();\r\n\t\t\r\n\t\tint temp=n;\r\n\t\tint r, sum=0;\r\n\t\t\r\n\t\twhile(n>0)\r\n\t\t{\r\n\t\t\tr=n%10;\r\n\t\t\tn=n/10;\r\n\t\t\tsum= sum + r*r*r;\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(temp==sum)\r\n\t\t\tSystem.out.println(\"Number is Armstrong\");\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Not an Armstrong\");\t\t\r\n\t\t\r\n\t}", "public static void main (String[] args){\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int temp = n;\n int temp1=n;\n int pd,cd=0;\n int sum = 0;\n while(n > 0)\n {\n cd=cd+1;\n n=n/10;\n }\n while(temp>0)\n {\n pd=temp%10;\n int prod = 1;\n for(int i =1;i<=cd;i++)\n {\n prod = pd * prod; \n }\n sum = sum + prod;\n temp=temp/10;\n }\n \n if(temp1==sum)\n \n System.out.println(\"Armstrong Number\");\n else\n System.out.println(\"Not a Armstrong Number\");\n }", "public static void main (String[] args){\n Scanner in = new Scanner(System.in);\n int rem,t,sum=0;\n int n=in.nextInt();\n t=n;\n while(n!=0)\n {\n rem=n%10;\n sum=sum+(rem*rem*rem);\n n=n/10;\n }\n if(sum==t)\n System.out.println(\"Armstrong Number\");\n else\n System.out.println(\"Not a Armstrong Number\");\n }", "public static boolean checkIfArmstrongsNumber(int number){\n\t\tboolean isAremstrongNumber = false;\n\t\tint sum =0;\n\t\tchar [] numberArray =Integer.toString(number).toCharArray();\n\t for(char numbers:numberArray){\n\t \t Integer num=Integer.parseInt(Character.toString(numbers));\n\t \t sum=sum+(num*num*num);\n\t \t \n\t }\n\t\tif(sum == number){\n\t\t\tisAremstrongNumber = true;\n\t\t\tSystem.out.println(sum);\n\t\t}\n\t\t\n\t\treturn isAremstrongNumber;\n\t\t\n\t}", "public static boolean isArmStrongNumber(int num){\n\n String number = String.valueOf(num); // converting int to String (String.valueOf)\n int multiplier = number.length(); // find the length; if length is 3 digits\n int sum =0;\n\n for(int i=0; i<multiplier; i++){ // loop the original number\n int digit = Integer.parseInt(\"\" +number.charAt(i));\n sum += Math.pow(digit,multiplier);\n }\n return sum == num;\n\n\n\n }", "public static void main (String[] args){\n Scanner in = new Scanner ( System.in ); \n int n = in.nextInt ( ); \n int n1=n;\n int n2 =n;\n int count=0;\n int digit;\n int sum=0;\n while (n1>0)\n {\n n1=n1/10;\n count++;\n }\n while (n>0)\n {\n digit=n%10;\n n=n/10;\n sum=sum+ (digit*digit*digit);\n }\n if (sum==n2)\n System.out.println ( \"Armstrong Number\");\n else\n System.out.println ( \"Not a Armstrong Number\");\n\t}", "public boolean isArmstrongNumber(int input) {\n\t\tint size = Integer.toString(input).length();\n\t\tint sum = 0;\n\t\tList<Integer> numList = new ArrayList<Integer>();\n\t\tString num_string = Integer.toString(input);\n\t\tfor(int i =0; i < num_string.length(); i++) {\n\t\t\tchar num_char = num_string.charAt(i);\n\t\t\tint chartonum = num_char - '0';\n\t\t\tnumList.add(chartonum);\n\t\t}\n\t\tfor(Integer i : numList) {\n\t\t\t//System.out.println(i);\n\t\t\tsum += (int)(Math.pow(i, size));\n\t\t}\n\t\t//System.out.println(sum);\n\t\tif(sum == input) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isArmstrongNumber(int input) {\n\t\tint sumOfDigits = 0, power = Integer.toString(input).length();\n\t\tfor (int i = 0; i < power; i++)\n\t\t\tsumOfDigits += Math.pow(Integer.parseInt(Integer.toString(input).substring(i, i + 1)), power);\n\t\treturn sumOfDigits == input;\n\t}", "public static void main (String[] args){\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n \n int temp = n;\n int copy = n;\n int sum = 0;\n int count = 0;\n int rem = 0;\n while(n!=0)\n {\n rem = n%10;\n count++;\n n = n/10;\n }\n while(temp!=0)\n {\n rem = temp%10;\n int count2 = 0;\n int expo = 1;\n int base = rem;\n \n while(count>count2)\n {\n expo = base * expo;\n count2++;\n }\n sum = sum+ expo;\n temp = temp/10;\n }\n if(sum == copy)\n {\n System.out.println(\"Armstrong Number\");\n }\n else\n {\n System.out.println(\"Not a Armstrong Number\");\n }\n\t}", "public static void main (String[] args){\n Scanner sc = new Scanner(System.in);\n int num = sc.nextInt();\n int temp = num;\n int c = 0;\n \n while (num != 0)\n {\n int a = num%10;\n num = num/10;\n c = c + (a*a*a);\n \n }\n \n \n \n if(c == temp)\n System.out.println(\"Armstrong Number\");\n else\n System.out.println(\"Not a Armstrong Number\");\n \n\t}", "public static void main(String[] args) {\n\t\tisArmstrongNumber(153);\n\t}", "public boolean isArmstrongNumber(int input) {\n\t\t\n\t\t//Convert input to a string format\n\t\tString inputValue = String.valueOf(input);\n\t\t\n\t\t//Iterate across the string\n\t\t//Raise the value of the int within the string to the power of the length of the string\n\t\t//Add this value to a temp value \n\t\t\n\t\tint temp = 0;\n\t\tfor(int i=0; i<inputValue.length(); i++) {\t\t\n\t\t\ttemp += Math.round(Math.pow(Character.getNumericValue(inputValue.charAt(i)),inputValue.length()));\n\t\t}\n\t\t\n\t\t//Check whether or not the obtained value matches the initial input\n\t\t\n\t\tif(input == temp) {\n\t\t\treturn true;\n\t\t}\t\t\n\t\treturn false;\n\t}", "public static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tint n = scn.nextInt();\n\t\tint temp=n;\n\t\tint ans=0;\n\t\twhile(n!=0)\n\t\t{\n\t\t\t int c=n%10;\n\t\t\t ans=ans+c*c*c;\n\t\t\t n=n/10;\n\t\t}\n\t\tif(ans==temp)\n\t\t{ System.out.println(\"armstrong\");}\n\t\telse\n\t\t{ System.out.println(\" not armstrong\");}\n\t}", "public static void main(String[] args) {\n\t\tint num=666;\r\n\t\t//declr 3 more\r\n\t\tint calculated=0;\r\n\t\tint remainder;\r\n\t\tint original;\r\n\t\t//Assign i/p into variable orignal\r\n\t\tSystem.out.println(\"ip - \"+num);\r\n\t\toriginal=num;\r\n\t\t//use loop to calculate:use while loop to set condn until the num is > 0\r\n\t\twhile (num>0) {\r\n\t\t\t//get the remainder done when divided by 10\r\n\t\t\tremainder=num%10;\r\n\t\t\tnum=num/10;\r\n\t\t\t//use formula\r\n\t\t\tcalculated=calculated+((remainder)*(remainder)*(remainder));\r\n\t\t\tSystem.out.println(calculated);\r\n\t\t}\r\n\t\t\t//check wheather cal & orgil r same\r\n\t\tif(calculated==original)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Armstrong\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Not an Armstrong\");\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tint orgnum1=1634,orgnum;\r\n\t\tfloat res=0,rem=0;\r\n\t\torgnum=orgnum1;\r\n\t\r\n\t\twhile(orgnum!=0)\r\n\t\t{\r\n\t\trem=(orgnum%10);\t\r\n\t\tres+=(rem*rem*rem);\r\n\t\torgnum/=10;\r\n\t\t}\r\n\t\tSystem.out.println(\"res\"+ res + \" \"+ orgnum+\" n value\"+orgnum1);\r\n if(orgnum1==res)\r\n \tSystem.out.println(\"arms strong\");\r\n else\r\n \t System.out.println(\"not arms strong\");\r\n \t \r\n\t}", "public static void main(String[] args) {\n\t\r\n\t\tint a=153;\r\n\t\tint temp=a;\r\n\t\t\r\n\t\tint c=0;\r\n\t\tint b=0;\r\n\t\twhile(a>0)\r\n\t\t{\r\n\t\t\tc=a%10;\r\n\t\tb=b+c*c*c;\r\n\t\ta=a/10;}\r\n\tif(temp==b)\r\n\t{\r\n\t\tSystem.out.println(\"given no is amstrong\");\r\n\t\t\t\r\n\t}\t\r\n\telse\r\n\t{\r\n\t\tSystem.out.println(\"given no is not an amstrong number\");\r\n\t}\r\n\r\n\t\r\n\r\n\r\n}", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter number till which ypou want armstrong numbers to be printed\");\r\n\t\tint n=sc.nextInt();\r\n\t\tfor(int i=2;i<=n;i++) {\r\n\t\t\tif(check(i)==true) System.out.println(i);\r\n\t\t}\r\n\t}", "public static int[] checkArmstrongNumber()\n\t{\n int armNumberArray[]=new int[5]; \n int i=0;\n for(int num=100;num<=999;num++) //for loop to iterate the number from 100 to 999 range\n {\n \tint temp=num;\n \tint rem,sum=0;\n \t\n \twhile(temp!=0) //while loop to iterate the loop until condition is true\n \t{\n \t\trem=temp%10;\n \t\tsum=sum+(rem*rem*rem);\n \t\ttemp=temp/10;\n \t}\n \tif(num==sum) //if num is equal to the sum\n \t{\n \t\tarmNumberArray[i]=num; //assign number to the array index\n \t\ti=i+1; //increment index\n \t}\n }\n\t\treturn armNumberArray;\n\t\t\n\t}", "public static void main (String[] args){\n Scanner sc=new Scanner(System.in);\n int num=sc.nextInt();int sum=1;\n int lol=String.valueOf(num).length();\n while(num>0)\n {\n int h=num%10;\n sum=sum+fact(h);\n num=num/10;\n }\n int len=String.valueOf(sum).length();\n if(len==lol)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n\t}", "public boolean or35(int n) {\n return (n % 3 == 0 || n % 5 == 0);\n}", "boolean mo54449n(int i);", "public static void main(String[] args) {\nint r,sum=0,t;\r\nint n=12121; \r\nt=n;\r\nwhile(n>0) {\r\n\tr=n%10;\r\n\tsum=(sum*10)+r;\r\n\tn=n/10; \t\r\n}\r\nif(t==sum) \r\n\t System.out.println(\"palindrome number \"); \r\n\t else \r\n\t System.out.println(\"not palindrome\"); \r\n\t}", "public boolean or35 (int n) {\n if ( (n % 3 == 0) || (n % 5 == 0)){\n return true;\n }\n return false;\n}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Enter Number to check is number Armstrong\");\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tint input = scan.nextInt();\r\n\t\tint temp = input;\r\n\r\n\t\tString_Assignment_Ex5 ex5 = new String_Assignment_Ex5();\r\n\t\tex5.checkArmStrongNumber(temp, input);\r\n\r\n\t\tSystem.out.println(\"Enter number to find all Armstrong number in that range\");\r\n\t\tint range = scan.nextInt();\r\n\t\tfor (int i = 0; i <= range; i++) {\r\n\t\t\ttemp = i;\r\n\t\t\tex5.findArmStrongNumber(temp, i);\r\n\t\t}\r\n\t\tscan.close();\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter a number that include 6 numbers\");\r\n\t\tint a = sc.nextInt();\r\n\t\tint a1=a/100000;\r\n\t\tint a2=a%100000/10000;\r\n\t\tint a3=a%10000/1000;\r\n\t\tint a4=a%1000/100;\r\n\t\tint a5=a%100/10;\r\n\t\tint a6=a%10;\r\n\t\tif (a1==a6 && a2==a5 && a3==a4){\r\n\t\t\tSystem.out.println(\"Yours number is polyndromic\");\r\n\t\t}else {\r\n\t\t\tSystem.out.println(\"Yours number is unpolyndromic\");\r\n\t\t}\r\n\t\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tint i= 212;\r\n\t\tint r=0;\r\n\t\tint n=i;\r\n\t\tint p =0;\r\n\t\t\r\n\t\twhile (n!=0) {\r\n\t\t\tr=n%10;\r\n\t\t\tp=p*10+r;\r\n\t\t\t\r\n\t\t\tn=n/10;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif (i==p) { System.out.println(\"Yes it is\");\r\n\t\t\t}\r\n\t\t\r\n\t\telse {System.out.println(\"No it is Not\");\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "public static boolean isPalindromic( int n )\n {\n String str = \"\" + n;\n int count[] = new int[NO_OF_CHARS];\n Arrays.fill(count, 0);\n for (int i = 0; i < str.length(); i++)\n count[(int)(str.charAt(i))]++;\n int odd = 0;\n for (int i = 0; i < NO_OF_CHARS; i++)\n {\n if ((count[i] & 1) == 1)\n odd++;\n\n if (odd > 1)\n return false;\n }\n return true;\n }", "public abstract boolean mo36211n();", "public static void main(String[] args) {\nint num=4550,temp,r,sum=0;\ntemp=num;\nwhile(num>0) {\n\tr=num%10;\n\tsum=(sum*10)+r;\n\tnum=num/10;\n\t\n}\n\tif(temp==sum) {\n\t\tSystem.out.println(\"number is palindrome\");\n\t}\n\telse {\n\t\tSystem.out.println(\"number is not palindrome\");\n\t}\n\t}", "public static void main(String[] args) {\n int m, n;\n Scanner scan = new Scanner(System.in);\n m = scan.nextInt();\n n = scan.nextInt();\n int count = 0;\n if ((m>=0 && n>=0) || n>=0) {\n for (int i = m; i <= n; i++) {\n if(i>=0){\n int tmp=(int)Math.sqrt(i);\n if(tmp*tmp==i){\n System.out.printf(\"%5d\",i);\n count++;\n if(count%10==0){\n System.out.println();\n }\n }\n }\n }\n System.out.println();\n System.out.printf(\"Tong so chinh phuong doan MN: \" + count);\n } else {\n System.out.println(\"fails\");\n }\n\n }", "public static boolean isPalindrom(int a) {\n String bitStr = toBinary(a);\n //System.out.println(bitStr);\n System.out.println(Integer.toBinaryString(a));\n if(bitStr.length() < 2) {\n return true;\n }\n int i = 0;\n int j = bitStr.length() - 1;\n while(i < j) {\n if(bitStr.charAt(i) != bitStr.charAt(j)) {\n return false;\n }\n i++;\n j--;\n }\n return true;\n }", "public boolean isPowerOfThree(int n) {\n return ( n>0 && 1162261467%n==0);\n\n }", "public static void main (String[] args){\n Scanner in = new Scanner (System.in);\n int num = in.nextInt();\n int sum=1,sum1=0,n,check=num;\n for(;num!=0;)\n {\n n=num%10;\n sum=1;\n for( int i=n;i>0;i--){\n sum=sum*i;\n }\n sum1 = sum1+sum;\n num=num/10;\n \n }\n if(check==sum1)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n\n\n\t}", "public boolean checkForNumber(int m, int n){\r\n\t\tif ( count[m][n] > 0 & count[m][n] < 9 & !bombs[m][n])\r\n\t\t\treturn true ;\r\n\t\treturn false;\r\n\t}", "public void printTruthAssesment(){\n for(CustomHashmap.HashMapEntry<Integer, Boolean> e: tarjan.getTruthAssignment().entrySet()){\n if(e.getKey()>tarjan.getNumVariables()){\n continue;\n }else{\n String number=\"x\";\n for(char c: e.getKey().toString().toCharArray()){\n number+=UnicodeUtil.numbers[c-'0'];\n }\n io.println(number+\" = \"+ e.getValue());\n }\n }\n }", "public void findHarmonicNo(int n)\r\n\t {\r\n\t int harmonicNo=0;\r\n\t for(int i=1;i<=n;i++)\r\n\t {\r\n\t System.out.print(\"1\"+\"/\"+i+\"+\");\r\n\t }\r\n\t }", "void pass() {\r\n if (m1 >=35 && m2>=35 && m3>=35) {\r\n System.out.println(\"pass\");\r\n } else {\r\n System.out.println(\"fail\");\r\n }\r\n }", "public static void main(String[] args) {\n\t\tint a=33, sum=0;\r\n\t\tint temp=a;\r\n\t\tint r;\r\n\t while(a>0)\t{\r\n\t \tr=a%10;\r\n\t sum= (sum*10)+ r;\r\n\t\ta=a/10;\r\n\t }\r\n\t\tif(temp==sum) {\r\n\t\tSystem.out.println(sum+ \"the given number is palindrome \");\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\tSystem.out.println(sum + \"not a palindrome\");\r\n\t\t}}", "public static void main (String[] args){\n Scanner joe= new Scanner(System.in);\n int n= joe.nextInt();\n int cd=0;\n int temp=n;\n int digit;\n int sum=0;\n while(n>0)\n {\n int prod=1;\n digit = n % 10;\n for(int i =1;i<=digit;i++)\n {\n prod = prod * i;\n }\n //System.out.println(prod);\n sum = sum+prod;\n n = n/10;\n\t }\n if(temp==sum)\n {\n System.out.println(\"Yes\");\n //System.out.println(sum);\n }\n else\n {\n System.out.println(\"No\");\n // System.out.println(sum);\n }\n }", "public static void main(String[] args) {\n\t\tint num=131,rem,rev=0;\n\t\tint temp=num;\n\t\t\n\t\twhile(num>0)\n\t\t{\n\t\t\trem=num%10;\n\t\t\tnum=num/10;\n\t\t\trev=rev*10+rem;\n\t\t}\n\t\tif(rev==temp)\n\t\t{\n\t\t\tSystem.out.println(\"Number is Palindrome\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Number is Not Palindrome\");\n\t\t}\n\t}", "public static void main(String[] args) {\n int a,b=0,c=0;\r\n Scanner scan = new Scanner (System.in);\r\n a = scan.nextInt();\r\n int d=a;\r\n\t while(a!=0){\r\n\t\t b = a%10;\r\n\t\t c=c*10+b;\r\n\t\t a=a/10;\r\n }\r\n\t if(c==d){\r\n\t\t System.out.println(\"palidrome\");\r\n\t }\r\n\t else{\r\n\t\tSystem.out.println(\"no palidrome\"); \r\n\t }\r\n\t}", "public boolean isPowerOfThree(int n){\n\t\treturn (n > 0) && (1162261467 % n == 0);\n\t}", "static void staircase(int n) {\n int hashes = 1;\n \n while(hashes<=n) {\n \tint i=0;\n \twhile(i<n-hashes) {\n \t\tSystem.out.print(\" \");\n \t\ti++;\n \t}\n \tint k = 0;\n \twhile(k<hashes) {\n \t\tSystem.out.print(\"#\");\n \t\tk++;\n \t}\n \thashes++;\n System.out.println();\n }\n System.out.println();\n }", "boolean mo54453r(int i);", "public static void main(String[] args) {\n\n int randomNumber = (int) (Math.random() * 11); // 0-10\n System.out.println(\"Random number is = \" + randomNumber);\n\n if(randomNumber % 3 != 0){\n System.out.println(false);\n }\n else{\n System.out.println(true);\n }\n\n System.out.println(\"End of the program!\");\n }", "short digits();", "public boolean isPowerOfThree(int n) {\n return (n > 0 && 1162261467 % n == 0);\n }", "private boolean checkDigit(String code, int length) {\n int len = length - 1;\n int[] digits = new int[len];\n int digitSum = 0;\n int lastDigit;\n\n if (length == 13) {\n lastDigit = Integer.parseInt(String.valueOf(code.charAt(len)));\n for (int i = 0; i < len; i++) {\n int digit = Integer.parseInt(String.valueOf(code.charAt(i)));\n\n if (i % 2 == 0) {\n digits[i] = digit;\n } else {\n digits[i] = digit * 3;\n }\n }\n\n for (int i = 0; i < digits.length; i++) {\n digitSum = digitSum + digits[i];\n }\n\n if (10 - (digitSum % 10) == lastDigit) {\n return true;\n } else if ((digitSum % 10) == 0 && lastDigit == 0) {\n return true;\n } else {\n return false;\n }\n\n } else if (length == 10) {\n if (String.valueOf(code.charAt(len)).equals(\"X\") ||\n String.valueOf(code.charAt(len)).equals(\"x\")) {\n lastDigit = 10;\n } else {\n lastDigit = Integer.parseInt(String.valueOf(code.charAt(len)));\n }\n\n int weight = 11;\n for (int i = 0; i < len; i++) {\n int digit = Integer.parseInt(String.valueOf(code.charAt(i)));\n weight--;\n digits[i] = digit * weight;\n }\n\n for (int i = 0; i < digits.length; i++) {\n digitSum = digitSum + digits[i];\n }\n\n if (11 - (digitSum % 11) == lastDigit) {\n return true;\n } else {\n return false;\n }\n\n } else {\n return false;\n }\n }", "boolean mo4830a();", "public boolean mo35074a(int i) {\n return i == 4;\n }", "public static void main(String[] args) {\n\t\t int num=101;\n\t\t int r=0;\n\t\t int rev=0;\n\t\t int temp=num;\n\t\t while(num>0){\n\t\t r=num%10;\n\t\t rev=(rev*10)+r;\n\t\t num=num/10;\n\t\t System.out.println(rev);\n\t\t //System.out.println(num);\n\t\t }\n\t\t if(temp==rev) System.out.println(\"Palindrome\");\n\t\t else System.out.println(\"Not a Palindrome\");\n\t\t }", "private static boolean checkBy3 (int a) {\n return a % 3 == 0;\n }", "public static void main(String[] args) {\n\t\tScanner keyboard= new Scanner(System.in);\r\nSystem.out.print(\"Enter a number:\");\r\nString word1,word2 = null,word3 = null,word4; //Create four string for four outputs\r\nint number = keyboard.nextInt();\r\nif(number%15==0){ word1=\"special\";}//check weather it is special\r\nelse { word1=\"not special\";}\r\nif( number>999){word3=\"big\";}//check weather it is big\r\nelse{word3=\"not big\";}\r\nif(number%5==0&&number%6==0&&number%18!=0){word2=\"weird\";} //check weather it is weird\r\nelse{word2=\"not weird\";}\r\nif(word3==\"big\"||word2==\"weird\"){word4=\"scary\";}//check weather it is scary\r\nelse{word4=\"not scary\";}\r\n \r\n// strings ae compared in oder to check the all possible outcome combinations\r\n//Then outcomes are printed as given in the sample test cases\r\n\r\nif(word1==\"special\" && word4!=\"scary\"){\r\n\tSystem.out.println(number+\" is \"+\" \"+word1+\", but \"+word4+\".\");\r\n}\r\nif(word1==\"special\" && word3!=\"big\"&& word2==\"weird\"){\r\n\tSystem.out.println(number+\" is \"+word1+\", \"+word2+\", \"+word4+\", but \"+word3+\".\");\r\n}\r\nif(word1==\"special\" && word3==\"big\" && word2!=\"weird\"){\r\n\tSystem.out.println(number+\" is \"+word1+\" , \"+word3+\", \"+word4+\", but \"+word2+\".\");\r\n}\r\nif(word1!=\"special\" && word3==\"big\" && word2!=\"weird\"){\r\n\tSystem.out.println(number+\" is \"+word3+\", \"+word4+\", but \"+word2+\".\");\r\n}\r\nif(word1!=\"special\" && word3!=\"big\" && word2==\"weird\"){\r\n\tSystem.out.println(number+\" is \"+word2+\", \"+word4+\", but \"+word3+\".\");\r\n}\r\nif(word1!=\"special\" && word3!=\"big\" && word2!=\"weird\"){\r\n\tSystem.out.println(number+\" is \"+word4+\".\");\r\n}\r\nif(word1==\"special\" && word3==\"big\" && word2==\"weird\"){\r\n\tSystem.out.println(number+\" is \"+word1+\", \"+word3+\", \"+word2+\", \"+word4+\".\");\r\n}\r\n\r\n\r\nkeyboard.close();\r\n\t}", "public static boolean luckyNumber3(int number) {\n\t\tint sum = 0;\n\t\twhile (number != 0) {\n\t\t\tsum = number % 10 - sum;\n\t\t\tnumber /= 10;\n\t\t}\n\t\treturn sum == 0;\n\t}", "private boolean isIsbn10(String code) {\n return checkDigit(code, 10);\n }", "public abstract boolean mo9234ar();", "boolean mo25262a(int i);", "public abstract boolean mo9739d(int i);", "public static void main(String[] args) {\n\n short angle1 = 0;\n short angle2 = 180;\n short angle3 = 0;\n\n int sumOfAngles = angle1 + angle2 + angle3;\n\n boolean validTriangle = sumOfAngles == 180;\n\n if (validTriangle){\n System.out.println(\"the shape is a triangle\");\n }\n if(!validTriangle){\n System.out.println(\"the shape is not valid\");\n }\n\n\n\n\n\n }", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n if (n == 1) \n System.out.println(\"Kaprekar number\");\n // Count number of digits in square \n int sq_n = n * n; \n int count_digits = 0; \n int sum=0;\n while (sq_n != 0) \n { \n count_digits++; \n sq_n /= 10; \n } \n sq_n = n*n; // Recompute square as it was changed \n // Split the square at different poitns and see if sum \n // of any pair of splitted numbers is equal to n. \n for (int r_digits=1; r_digits<count_digits; r_digits++) \n { \n int eq_parts = (int) Math.pow(10, r_digits); \n \n // To avoid numbers like 10, 100, 1000 (These are not \n // Karprekar numbers \n if (eq_parts == n) \n continue; \n \n // Find sum of current parts and compare with n \n sum = sq_n/eq_parts + sq_n % eq_parts; \n }\n if (sum == n){\n System.out.println(\"Kaprekar number\");\n }else{\n System.out.println(\"Not a Kaprekar number\");\n }\n }", "static void kaprekarNumbers(int p, int q) {\n for (int i = p; i <=q ; i++) {\n if(isKN(i)){\n System.out.print(i+\" \");\n }\n }\n }", "public boolean canWinNim(int n) {\n\t\tif (n <= 0)\n\t\t\treturn false;\n\t\treturn n % 4 != 0;\n\t}", "public void bruteForcePrint() {\n long start = System.currentTimeMillis();\n io.print(\"The given statement is \");\n if (brute.checkEveryCombination(numVariables, statement)) {\n io.println(\"satisfiable.\");\n } else {\n io.println(\"not satisfiable.\");\n }\n io.println(\"The calculation took \" + (System.currentTimeMillis() - start) + \" milliseconds.\\n\");\n }", "public static void main(String[] args) {\n\t\tPandromeNumber pandromeNumber = new PandromeNumber();\n\t\tint n=121;\n\t\tint number=pandromeNumber.findpandrome(n);\n\t\tif(n==number) {\n\t\t\tSystem.out.println(\"pandrome\");\n\t\t}\n\n\t}", "boolean hasAlreadFoldCard();", "@Override\n public boolean validate(long number) {\n List<Integer> digits = split(number);\n int multiplier = 1;\n int sum = 0;\n for (int digit : Lists.reverse(digits)) {\n int product = multiplier * digit;\n sum += product / BASE + product % BASE;\n multiplier = 3 - multiplier;\n }\n return sum % BASE == 0;\n }", "boolean mo54443h(int i);", "public boolean isArm() {\r\n return getFamily() == Family.ARM32BIT;\r\n }", "public static void main(String args[]) {\n\n int start = Integer.parseInt(args[0]);\n int end = Integer.parseInt(args[1]);\n\n System.out.println(\"\\nArmstrong numbers within the range \" + start + \" - \" + end + \" are as follows: \");\n\n for(int number = start; number <= end; number++) {\n\n int sum = 0;\n int original = 0;\n int digits = 0;\n\n original = number;\n\n while(original > 0) {\n digits++;\n original = original / 10;\n }\n\n original = number;\n\n while(original > 0) {\n int remainder = original % 10;\n sum = sum + (int) Math.pow((double)remainder, (double)digits);\n original = original / 10;\n }\n\n if(number == sum) {\n System.out.print(number + \" \");\n }\n }\n\n System.out.println(\"\\n\");\n\n }", "public static void main(String[] args) {\n\t\tString string=\" 14539148803436467\";\n\t\tif(isLuhn(string))\n\t\t\tSystem.out.println(\"valid\");\n\t\telse\n\t\t\tSystem.out.println(\"not valid\");\n\t\t\n\t}", "boolean hasNum();", "boolean hasNum();", "boolean hasNum();", "public static void main(String [] args){\n\t\tArrayList<Integer> allNums = new ArrayList<>();\n\t\tfor(int i = 0; i < 10; i++){\n\t\t\tallNums.add(i);\n\t\t}\n\t\t//Make into one big number\n\t\t//Proceed to divide it to knock bits off the right hand side\n\t\tboolean miracleFound = false;\n\t\tString tempNum;\n\t\tlong miracleNum = 0;\n\t\twhile(!miracleFound){\n\t\t\t//Make A String from the List And analyse it\n\t\t\ttempNum = \"\";\n\t\t\tfor(int i = 0; i < allNums.size(); i++){\n\t\t\t\ttempNum = tempNum + allNums.get(i);\n\t\t\t\t//System.out.println(\"Tempnum is \" + tempNum + \" and i is \" + i);\n\t\t\t\tif(i > 0){\n\t\t\t\t\tmiracleNum = Long.valueOf(tempNum).longValue();\n\t\t\t\t\tif(miracleNum % (i+1) == 0){ //If it is divisible without remainders\n\t\t\t\t\t\tif((i+1) == 10){\n\t\t\t\t\t\t\tmiracleFound = true;\n\t\t\t\t\t\t\tSystem.out.println(\"Number \" + miracleNum + \" was a miracle number.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tSystem.out.println(miracleNum + \" % \" + (i+1) + \" is 0.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tCollections.shuffle(allNums);\n\t\t\t\t\t\ti = allNums.size();\n\t\t\t\t\t\tSystem.out.println(\"Number \" + miracleNum + \" was not a miracle number.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static boolean isValid(long num) {\r\n\t\tint sum = sumOfDoubleEvenPlace(num) + sumOfOddPlace(num);\r\n\t\tif (getSize(num) < 13 || getSize(num) > 16) {\t\t\t// duzina broja ne smije biti manja od 13 i veca od 16\r\n\t\t\talert(\"Your credit card number is not long enough!\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (prefixMatched(num) == false) {\t\t\t\t\t// ako uslov ne zadovoljava, odnosno ako je false, ispisi poruku\r\n\t\t\talert(\"Your credit card does not start with suitable prefix!\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (sum % 10 != 0) {\t\t\t\t\t\t// uslov sume parnih i neparnih brojeva koji mora biti djeljiv sa 10\r\n\t\t\talert(\"Your credit card is invalid!\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "boolean hasNumb();", "public static boolean isPowerOfThree3(int n)\n\t{\n\t\tif(n <= 0)\n\t\t\treturn false;\n\t\tdouble r = Math.log10(n) / Math.log10(3);\n\t\tif (r % 1 == 0)\n\t\t\treturn true;\n\t\treturn false;\n\t\t\n\t}", "public static boolean capicuaOrNot(String theNumber){\r\n\r\n //more local variables\r\n int counter=0, size=0;\r\n String newNumber=\"\";\r\n boolean yesOrNo=false;\r\n\r\n //process to determine wether it's capicúa or not\r\n size=theNumber.length()-1;\r\n //System.out.println(theNumber + size);\r\n for(counter=size; counter>=0; counter--){\r\n newNumber+=theNumber.charAt(counter);\r\n }//end of for loop\r\n System.out.println(newNumber);\r\n if(newNumber.equals(theNumber)){\r\n yesOrNo=true;\r\n }\r\n return yesOrNo;\r\n\r\n }", "public static List<String> findStrobogrammatic(int n) {\n List<String> cur, ans;\n ans = new ArrayList<String>((n & 1) == 0 ? Arrays.asList(\"\") : Arrays.asList(\"0\", \"1\", \"8\"));\n if (n < 2) return ans;\n\n for (;n > 1; n -= 2) {\n cur = ans;\n ans = new ArrayList<String>();\n for (String i : cur) {\n if (n > 3) {\n ans.add('0' + i + '0');\n }\n ans.add('1' + i + '1');\n ans.add('8' + i + '8');\n ans.add('6' + i + '9');\n ans.add('9' + i + '6');\n }\n }\n System.out.println(ans.size());\n return ans;\n }", "static void staircase(int n) {\n\n \t/* Imlementacion para java11 (aqui se creo el repeat)\n \tfor( int i = 1; i <= n; i++ ) {\n \t\tSystem.out.println(\" \".repeat(n - i) + \"#\".repeat(i));\n \t}\n \t */\n\n \tString salida = \"\";\n \tfor( int i = 1; i <= n; i++ ) {\n \t\tfor( int j = 0; j < n - i; j++ ) {\n \t\t\tsalida += \" \"; \n \t\t}\n \t\tfor( int j = 0; j < i; j++ ) {\n \t\t\tsalida += \"#\";\n \t\t}\n \t\tSystem.out.println(salida);\n \t\tsalida = \"\";\n \t}\n }", "public boolean DoBlackMagic()\n{\n\tRandom generator=new Random();\n\tint result=generator.nextInt(4);\n\tif(result==0)\n\t{\n\t\treturn false;\n\t}\n\telse\n\t{\n\t\treturn true;\n\t}\n\n}", "public static boolean isUgly(int num) {\n int n = num;\r\n if(n<=0){\r\n return false;\r\n }\r\n if(n==1){\r\n return true;\r\n }\r\n while(n>0 && n%2==0){\r\n n=n/2;\r\n }\r\n System.out.println(n);\r\n while(n>0 && n%3==0){\r\n n=n/3;\r\n }\r\n System.out.println(n);\r\n while(n>0 && n%5==0){\r\n n=n/5;\r\n }\r\n System.out.println(n);\r\n if(n==1){\r\n return true;\r\n }\r\n return false;\r\n }", "public static void main(String[] args) {\n System.out.print(isPowerOfFour(64));\n }", "public boolean checkNaturals() {\n return getSize() == 2 && handValue() == 21;\n }", "boolean hasI10();", "public static void main(String[] args) {\n double angel1 = 30;\n double angel2 = 50;\n double angel3= 60;\n\n short sumOfAngels = (short)(angel1 + angel2 + angel3);\n\n boolean validTriangle = sumOfAngels == 180;\n if (sumOfAngels==180){\n System.out.println(\"The shape is a triangle.\");\n }\n if (sumOfAngels!=180){\n System.out.println(\"The shape is not a valid triangle.\");\n }\n\n\n\n\n\n\n\n\n\n\n }", "public abstract boolean isHappy(int n);", "boolean mo1489a();", "public boolean isStrobogrammatic(String num) {\n char input[] = num.toCharArray();\n int p1 = 0, p2 = num.length() - 1;//pointers\n while(p1 <= p2) {\n if(input[p1] == '6') {\n if(input[p2] != '9') return false;\n } else if (input[p1] == '9') {\n if(input[p2] != '6') return false;\n } else if (input[p1] == '1' || input[p1] == '8'||input[p1] == '0') {\n if (input[p2] != input[p1]) return false;\n } else {\n return false;\n }\n p1++;\n p2--;\n }\n return true;\n }", "public static int Main()\n\t{\n\t\t//cout << \"?????????n\" << endl;\n\t\tint n; //n????????a,b,c???,y??????x??????\n\t\tint a;\n\t\tint b;\n\t\tint c;\n\t\tint y;\n\t\tint x;\n\t\tint z;\n\t\tn = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\tfor (int i = 1; i <= n; i++) //n???\n\t\t{\n\t\t\tx = 0;\n\t\t\ty = 0;\n\t\t\ta = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\t\tb = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\t\tc = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\t\tif (b > c) //?b??c\n\t\t\t{\n\t\t\t\tz = c;\n\t\t\t\tc = b;\n\t\t\t\tb = z;\n\t\t\t}\n\t\t\tif ((a % 4 == 0 && a % 100 != 0) || (a % 400 == 0)) //????\n\t\t\t{\n\t\t\t\ty = 1;\n\t\t\t}\n\t\t\tfor (; b <= c - 1; b++) //??????\n\t\t\t{\n\t\t\t\tswitch (b)\n\t\t\t\t{\n\t\t\t\tcase 1 :\n\t\t\t\tcase 3 :\n\t\t\t\tcase 5 :\n\t\t\t\tcase 7 :\n\t\t\t\tcase 8 :\n\t\t\t\tcase 10 :\n\t\t\t\tcase 12 :\n\t\t\t\t\tx = x + 31;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4 :\n\t\t\t\tcase 6 :\n\t\t\t\tcase 9 :\n\t\t\t\tcase 11 :\n\t\t\t\t\tx = x + 30;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\tx = x + 28 + y;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (x % 7 == 0) //??????????\n\t\t\t{\n\t\t\t\tSystem.out.print(\"YES\");\n\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.print(\"NO\");\n\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}", "static boolean isRomanNumeral(String s) {\n return s.matches(\"^(?=.)M*(C[MD]|D?C{0,3})\"\n + \"(X[CL]|L?X{0,3})(I[XV]|V?I{0,3})$\");\n }", "public static boolean binaryNum(int n)\n {\n if(n<10) //stop condition - the end case, if only a single number is left\n return n==1||n==0;\n return (n%10==0||n%10==1)&&binaryNum(n/10); // check if the last digit is 0 or 1 and re-call the method without it(and return the result at the end)\n }", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\t//Methods to validate credit card numbers\n\t\tString ccCheck = \"\";\n\t\tSystem.out.print(\"Enter a credit card number as a long integer: \");\n\t\tString ccNumber = input.next();\n\t\tif(isValid(ccNumber)) {\n\t\t\tccCheck = \"valid\";\n\t\t}\n\t\telse {\n\t\t\tccCheck = \"invalid\";\n\t\t}\n\t\tSystem.out.println(ccNumber + \" is \" + ccCheck);\n\t\n\t\tSystem.out.println(\"Testing other methods: \" + getPrefix(ccNumber, 1));\t\n\t\t\n\t\t//Simulation of a bean machine a.k.a. Galton box\n\t\tSystem.out.print(\"Enter the number of balls to drop: \");\n\t\tint balls = input.nextInt();\n\t\tSystem.out.print(\"Enter the number of slots in the bean machine: \");\n\t\tint[] slots = new int[input.nextInt()];\n\t\tint slotCount = 0;\n\t\t\n\t\tfor(int i = 0; i < balls; i++) {\n\t\t\tfor(int j = 0; j < slots.length; j++) {\n\t\t\t\tint randomPick = (int)(Math.random() * 10);\n\t\t\t\tchar direction = 'A';\n\t\t\t\tif(randomPick <= 5) {\n\t\t\t\t\tdirection = 'L';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdirection = 'R';\n\t\t\t\t\tslotCount++;\n\t\t\t\t}\n\t\t\t\tSystem.out.print(direction);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tslots[slotCount - 1] += 1;\n\t\t\tslotCount = 0;\n\t\t}\n\t\tSystem.out.print(\"\\n\");\n\t\t\n\t\tSystem.out.println(java.util.Arrays.toString(slots));\n\t\t\n\t\tfor(int i = 5; i >= 1; i--) {\n\t\t\tfor(int j = 0; j < slots.length; j++) {\n\t\t\t\tif(slots[j] == i) {\n\t\t\t\t\tSystem.out.print(\"O\");\n\t\t\t\t\tslots[j] = slots[j] - 1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\t\n\t\t\n\t\t//Eight Queens puzzle: placing 8 queens on a chessboard such that no two queens can attack eachother\n\t\tString gridOutput = \"\";\n\t\tchar[][] gameGrid = new char[8][8];\n\t\t//initialize the array\n\t\t\t\tfor(int i = 0; i < gameGrid.length; i++) {\n\t\t\t\t\tfor(int j = 0; j < gameGrid[i].length; j++) {\n\t\t\t\t\t\tgameGrid[i][j] = ' ';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\tgameGrid[0][0] = 'Q';\n\t\tgameGrid[1][4] = 'Q';\n\t\tgameGrid[2][7] = 'Q';\n\t\tgameGrid[3][5] = 'Q';\n\t\tgameGrid[4][2] = 'Q';\n\t\tgameGrid[5][6] = 'Q';\n\t\tgameGrid[6][1] = 'Q';\n\t\tgameGrid[7][3] = 'Q';\n\t\t\n\t\tgridOutput = Arrays.deepToString(gameGrid).replace(\"], \", \"]\\n\");\n\t\tgridOutput = gridOutput.substring(1,gridOutput.length() - 1).replace(\"[\", \"|\").replace(\"]\", \"|\").replace(\", \",\"|\");\n\t\tSystem.out.println(gridOutput);\n\t\t\n\t\t//Simple hangman game which reads words from a .txt file on the computer\n\t\tFile words = new java.io.File(\"C:\\\\Users\\\\Darth Phoenix\\\\Documents\\\\eclipsemars\\\\Exampractice\\\\src\\\\hangman.txt\");\n\t\tSystem.out.println(\"Does this file exist? \" + words.exists());\n\t\tint misses = 0;\n\t\ttry {\n\t\t\tScanner wordReader = new Scanner(words);\n\t\t\tif(wordReader.hasNext()) {\n\t\t\t\tString solution = wordReader.next();\n\t\t\t\tString answer = \"\";\n\t\t\t\tchar[] convertingAnswer = new char[solution.length()];\n\t\t\t\tfor(int i = 0; i < solution.length(); i++ ) {\n\t\t\t\t\tanswer += \"*\";\n\t\t\t\t}\n\n\t\t\t\tSystem.out.print(\"(Guess) Enter a letter in word \" + answer + \" >\");\n\t\t\t\tchar guess = input.next().charAt(0);\n\t\t\t\tfor(int i = 0; i < solution.length(); i++ ) {\n\t\t\t\t\tif(guess == solution.charAt(i)) {\n\t\t\t\t\t\t//Working on this bit here\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"The word is: \" + solution + \". You missed \" + misses + \"time.\");\n\t\t\t}\n\t\t}\n\t\tcatch (FileNotFoundException ex) {\n\t\t\tSystem.out.println(\"Whoops. That file isn't there where you thought it was.\");\n\t\t}\n\t}", "public boolean seriesPatt(int n){\n\n for(int i=1;i<=n;i++){\n for(int j=1;j<=i;j++){\n System.out.print(i+\" \");\n }\n //System.out.println();\n }\n return true;\n }", "public void print()\r\n {\r\n int i = numar.length()/3;\r\n while( i != 0 ){\r\n String n = numar.substring(0,3);\r\n numar = numar.substring(3);\r\n printNo(n);\r\n if( i == 3){\r\n System.out.print(\"million \");\r\n }\r\n else if( i == 2 ){\r\n System.out.print(\"thousand \");\r\n }\r\n i--;\r\n }\r\n }", "boolean hasI15();", "static boolean arePandigital(int a, int b, int c) {\n // Array to check that all digits are accounted for\n boolean[] nums = new boolean[10];\n\n // Fill in digits in a, b, c\n if(!fillInDigits(a, nums)) return false;\n if(!fillInDigits(b, nums)) return false;\n if(!fillInDigits(c, nums)) return false;\n\n if(nums[0]) return false;\n for(int i = 1; i < nums.length; i++) if(!nums[i]) return false;\n\n return true;\n }", "boolean hasI13();" ]
[ "0.7687186", "0.7485958", "0.7413966", "0.73980814", "0.73910743", "0.7387464", "0.7196502", "0.7089312", "0.70010537", "0.6948334", "0.6908267", "0.688435", "0.6747811", "0.66766745", "0.6676167", "0.641434", "0.63325703", "0.63129187", "0.60601395", "0.59455895", "0.58746564", "0.5651972", "0.563108", "0.5628882", "0.55995446", "0.557421", "0.5552076", "0.55456156", "0.5542636", "0.5540695", "0.5540414", "0.5530827", "0.5497591", "0.54580015", "0.54497296", "0.5447959", "0.5389863", "0.5380782", "0.53480536", "0.5347948", "0.534581", "0.5338151", "0.5328903", "0.5326667", "0.53022957", "0.52981806", "0.5296963", "0.5295753", "0.5281724", "0.52816033", "0.5265137", "0.52507186", "0.5240525", "0.5225176", "0.5222447", "0.5217001", "0.5209312", "0.52076143", "0.52011144", "0.5182234", "0.51808965", "0.5169031", "0.51672137", "0.5157847", "0.51490027", "0.5142103", "0.5134259", "0.51261216", "0.51234907", "0.51233137", "0.511944", "0.5116985", "0.5115069", "0.5115069", "0.5115069", "0.5114139", "0.5111244", "0.511057", "0.5107377", "0.5107173", "0.5102087", "0.51019925", "0.50898296", "0.5088361", "0.5087095", "0.5084142", "0.5068857", "0.50661325", "0.50648654", "0.5063611", "0.50581264", "0.50482583", "0.50400484", "0.50324005", "0.5030627", "0.5030611", "0.50249827", "0.5024178", "0.5021041", "0.50177497" ]
0.7293739
6
this method iterates over all the bodies in the tree (with an iterator over the octree) and calculates the forces for the bodies.
public void calculateForces() { Stack<CelestialBody> stack = new Stack<>(); stack = this.root.iterate(stack); OctreeIterator iterator = new OctreeIterator(stack); root.calculateForces(root, iterator); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void CalculateForces(){\n\n Vec3f gravon= mult(this.gravity,this.mass);\n this.force.add(gravon);\n// Totalforce.add(force);\n }", "public void update() {\n\t\t\n\t\t// Calculating all forces to apply to the physics shapes\n\t\tArrayList<Object[]> forces = new ArrayList<Object[]>();\n\t\tfor(PhysicsShape shape : shapes) {\n\t\t\tfor(PhysicsShape shape2 : shapes) {\n\t\t\t\tif(!(shape == shape2))\n\t\t\t\t\tforces.addAll(shape.allForcesFromShape(shape2));\n\t\t\t}\n\t\t}\n\n\t\t// Adding force of gravity to each shape, directly downward.\n\t\tfor(PhysicsShape shape : shapes) {\n\t\t\tif(!shape.equals(ground))\n\t\t\t\tforces.add(new Object[] {shape, shape.getX(), shape.getY(), shape.getMass() * 9.81f, 0 - (float) (Math.PI / 2.0) } );\n\t\t}\n\t\t\n\t\t// tester, applies sideways force to the left\n\t\tif(shapes.get(1).getY() == 200.0f) {\n\t\t\tforces.add(new Object[] {shapes.get(1), 300f, 125f, 1000f, (float) Math.PI});\n\t\t}\n\t\t\n\t\t// Applying each force to the shapes to set new vX, vY and omega values for this tick.\n\t\t// Force array is in format [PhysicsShape, x, y, magnitude, direction]\n\t\tfor(Object[] force : forces) {\n\t\t\t\n\t\t\tPhysicsShape shape = (PhysicsShape) force[0];\n\t\t\tfloat x = (float) force[1];\n\t\t\tfloat y = (float) force[2];\n\t\t\tfloat magnitude = (float) force[3];\n\t\t\tfloat direction = (float) force[4];\n\t\t\t\n\t\t\tshape.applyForce(x, y, magnitude, direction);\n\t\t}\n\t\t\n\t\t// Tells each PhysicsShape to move one tick forwards with the new vX, vY and omega values\n\t\tfor(PhysicsShape shape : shapes) {\n\t\t\tshape.act();\n\t\t}\n\t\t\n\t}", "public void updateAcceleration (Body[] bodies) {\n\n boolean collision;\n\n for (int i = 0; i < bodies.length; i ++) {\n\n Body otherBody = bodies[i];\n if (this.merged == false && otherBody.merged == false) {\n collision = this.collisionDetection(otherBody);\n\n // if there's a collision between this and another body, stop the loop\n if (collision == true) {\n this.collisionPhsysics(otherBody);\n System.out.println(\"Collision occured!\");\n break;\n }\n else {\n if (otherBody.name != this.name){ // makes sure a body doesn't calculate acc on itself\n double r = Math.sqrt(Math.pow((this.x - otherBody.x),2) + Math.pow((this.y - otherBody.y),2));\n double temp_acc;\n try {\n temp_acc = (G * otherBody.mass)/Math.pow(r,3); // temp_acc * deltax = ax\n }\n catch (ArithmeticException e){\n // catch division / 0\n temp_acc = 0;\n }\n this.ax += temp_acc * (otherBody.x - this.x);\n this.ay += temp_acc * (otherBody.y - this.y);\n }\n\n if (otherBody.name != this.name){\n // computes and updates axplusone and ayplusone\n\n double r = Math.sqrt(Math.pow((this.euler_x - otherBody.euler_x),2) + Math.pow((this.euler_y - otherBody.euler_y),2));\n double temp_acc;\n try {\n temp_acc = (G * otherBody.mass)/Math.pow(r,3); // temp_acc * deltax = ax\n }\n catch (ArithmeticException e){\n temp_acc = 0;\n }\n this.axplusone += temp_acc * (otherBody.euler_x - this.euler_x);\n this.ayplusone += temp_acc * (otherBody.euler_y - this.euler_y);\n }\n }\n }\n }\n\n }", "@Override\r\n\tpublic void updateForces() {\n\t\tapplyForce(new Vector(0, 0.05));\r\n\t}", "public void computeForce(State state, VectorOfSpatialVec bodyForces, Vector generalizedForces) {\n opensimSimulationJNI.ExpressionBasedPointToPointForce_computeForce(swigCPtr, this, State.getCPtr(state), state, VectorOfSpatialVec.getCPtr(bodyForces), bodyForces, Vector.getCPtr(generalizedForces), generalizedForces);\n }", "private void updatePhysics() {\n long now = System.currentTimeMillis();\n // Do nothing if mLastTime is in the future.\n // This allows the game-start to delay the start of the physics\n // by 100ms or whatever.\n if (mLastTime > now) return;\n int n = particles.length;\n tree.clear();\n for (int i = 0; i < n; i++) {\n tree.insert(particles[i]);\n }\n // Determine if there are any collisions\n // http://www.kirupa.com/developer/actionscript/multiple_collision2.htm\n for (int i = 0; i < n; i++) {\n \tparticles[i].update(now);\n \tparticles[i].disappearsFromEdge(canvasWidth, canvasHeight);\n\t\t\tSet<Particle> nearBy = tree.retrieve(particles[i]);\n\t\t\tfor (Particle particle : nearBy) {\n\t\t\t\tif (particle != particles[i])\n\t\t\t\t\tparticles[i].collidesWith(particle);\n\t\t\t}\n }\n }", "public void force_directed() {\n\n\t\tint ssize = g_heir[g_current_level];\n\t\tint fixedsize = 0;\n\t\tif (g_interpolating)\n\t\t\tfixedsize = g_heir[g_current_level + 1];\n\n\t\t// initialize index sets\n\t\tif (g_cur_iteration == g_stop_iteration) {\n\n\t\t\tfor (int i = 0; i < ssize; i++) {\n\n\t\t\t\tfor (int j = 0; j < V_SET_SIZE; j++) {\n\n\t\t\t\t\tSimpleEdge se = null;\n\t\t\t\t\tif( j > m_gm.nodeEdgeLookup.get(i).size() - 2 ) {\n\t\t\t\t\t\tse = m_gm.nodeEdgeLookup.get(i).get(1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tse = m_gm.nodeEdgeLookup.get(i).get(j+1);\n\t\t\t\t\t}\n\t\t\t\t\tg_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].se = se; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// perform the force simulation iteration\n\t\tfloat[] dir_vec = new float[g_embedding_dims];\n\t\tfloat[] relvel_vec = new float[g_embedding_dims];\n\t\tfloat diff = 0.f;\n\t\tfloat norm = 0.f;\n\t\tfloat lo = 0.f;\n\t\tfloat hi = 0.f;\n\n\t\t// compute new forces for each point\n\t\tfor (int i = fixedsize; i < ssize; i++) {\n\n\t\t\tfor (int j = 0; j < V_SET_SIZE + S_SET_SIZE; j++) {\n\n\t\t\t\t// update the S set with random entries\n\t\t\t\tif (j >= V_SET_SIZE) {\n\t\t\t\t\t\n\t\t\t\t\tSimpleEdge se = null;\n\t\t\t\t\tif( V_SET_SIZE > m_gm.nodeEdgeLookup.get(i).size() - 2 ) {\n\t\t\t\t\t\tse = m_gm.nodeEdgeLookup.get(i).get(1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tse = m_gm.nodeEdgeLookup.get(i).get(V_SET_SIZE + myRandom.nextInt(m_gm.nodeEdgeLookup.get(i).size()-V_SET_SIZE));\n\t\t\t\t\t} \n\t\t\t\t\tg_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].se = se;\n\t\t\t\t\t// g_idx[i*(V_SET_SIZE+S_SET_SIZE)+j].index =\n\t\t\t\t\t// myRandom.nextInt(g_interpolating?fixedsize:ssize);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// sort index set by index\n\t\t\tArrays.sort(g_idx, i * (V_SET_SIZE + S_SET_SIZE), (i + 1)\n\t\t\t\t\t* (V_SET_SIZE + S_SET_SIZE), new IdxComp());\n\n\t\t\t// mark duplicates (with 1000)\n\t\t\tfor (int j = 0; j < V_SET_SIZE + S_SET_SIZE; j++) {\n\n\t\t\t\tif( j > 0) {\n\t\t\t\t\tif (g_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].se.dst == g_idx[i\n\t\t\t\t\t\t\t* (V_SET_SIZE + S_SET_SIZE) + j - 1].se.dst)\n\t\t\t\t\t\tg_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].isDuplicate = true;\n\t\t\t\t\telse {\n\t\t\t\t\t\tg_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].isDuplicate = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( g_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].se.src == g_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].se.dst ) {\n\t\t\t\t\t\n\t\t\t\t\tg_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].isDuplicate = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// sort index set by distance\n\t\t\tArrays.sort(g_idx, i * (V_SET_SIZE + S_SET_SIZE), (i + 1)\n\t\t\t\t\t* (V_SET_SIZE + S_SET_SIZE), new DistComp());\n\n\t\t\t// move the point\n\t\t\tfor (int j = 0; j < (V_SET_SIZE + S_SET_SIZE); j++) {\n\n\t\t\t\t// get a reference to the other point in the index set\n\t\t\t\tint idx = g_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].se.dst;\n\t\t\t\tnorm = 0.f;\n\t\t\t\tfor (int k = 0; k < g_embedding_dims; k++) {\n\n\t\t\t\t\t// calculate the direction vector\n\t\t\t\t\tdir_vec[k] = m_embed[idx * g_embedding_dims + k]\n\t\t\t\t\t\t\t- m_embed[i * g_embedding_dims + k];\n\t\t\t\t\tnorm += dir_vec[k] * dir_vec[k];\n\t\t\t\t}\n\t\t\t\tnorm = (float) Math.sqrt(norm);\n\t\t\t\tg_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].lowd = norm;\n\t\t\t\tif (norm > 1.e-6\n\t\t\t\t\t\t&& !g_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].isDuplicate ) {\n\t\t\t\t\t\n\t\t\t\t\t// normalize direction vector\n\t\t\t\t\tfor (int k = 0; k < g_embedding_dims; k++) {\n\n\t\t\t\t\t\tdir_vec[k] /= norm;\n\t\t\t\t\t}\n\n\t\t\t\t\t// calculate relative velocity\n\t\t\t\t\tfor (int k = 0; k < g_embedding_dims; k++) {\n\t\t\t\t\t\trelvel_vec[k] = g_vel[idx *g_embedding_dims + k]\n\t\t\t\t\t\t\t\t- g_vel[i * g_embedding_dims + k];\n\t\t\t\t\t}\n\n\t\t\t\t\t// calculate difference between lo and hi distances\n\t\t\t\t\tlo = g_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].lowd;\n\t\t\t\t\thi = (float) Math.pow(g_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].se.w,POWER_FACTOR);\n\t\t\t\t\tdiff = (lo - hi) * SPRINGFORCE;\n\t\t\t\t\t// compute damping value\n\t\t\t\t\tnorm = 0.f;\n\t\t\t\t\tfor (int k = 0; k < g_embedding_dims; k++) {\n\n\t\t\t\t\t\tnorm += dir_vec[k] * relvel_vec[k];\n\t\t\t\t\t}\n\t\t\t\t\tdiff += norm * DAMPING;\n\n\t\t\t\t\t// accumulate the force\n\t\t\t\t\tfor (int k = 0; k < g_embedding_dims; k++) {\n\n\t\t\t\t\t\tg_force[i * g_embedding_dims + k] += dir_vec[k] * diff;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// scale the force by the size factor\n\t\t\tfor (int k = 0; k < g_embedding_dims; k++) {\n\n\t\t\t\tg_force[i * g_embedding_dims + k] *= SIZE_FACTOR;\n\t\t\t}\n\t\t}\n\n\t\t// compute new velocities for each point with Euler integration\n\t\tfor (int i = fixedsize; i < ssize; i++) {\n\n\t\t\tfor (int k = 0; k < g_embedding_dims; k++) {\n\n\t\t\t\tfloat foo = g_vel[i * g_embedding_dims + k];\n\t\t\t\tfloat bar = foo + g_force[i * g_embedding_dims + k] * DELTATIME;\n\t\t\t\tfloat baz = bar * FREENESS;\n\t\t\t\tg_vel[i * g_embedding_dims + k] = (float) Math.max(\n\t\t\t\t\t\tMath.min(baz, 2.0), -2.0);\n\t\t\t}\n\t\t}\n\n\t\t// compute new positions for each point with Euler integration\n\t\tfor (int i = fixedsize; i < ssize; i++) {\n\t\t\tfor (int k = 0; k < g_embedding_dims; k++) {\n\n\t\t\t\tm_embed[i * g_embedding_dims + k] += g_vel[i * g_embedding_dims\n\t\t\t\t\t\t+ k]\n\t\t\t\t\t\t* DELTATIME;\n\t\t\t}\n\t\t}\n\t}", "public void applyForce(PVector force) {\n PVector f = force.get();\n f.div(mass); // ignoring mass right now\n acceleration.add(f);\n }", "public void applyForce()\r\n {\n\tVector2d v = new Vector2d();\r\n\tv.sub(x, R.getPosition());\r\n\tdouble L = v.length();\r\n\tv.normalize();\r\n\tVector2d vel = R.getVelocityLinear();//fragile ref\r\n\t//double vn = vel.dot(v);\r\n\tdouble k = Constants.STIFFNESS_STRETCH_DENSITY * R.getMass();\r\n\tv.scale( k*L ); //- 0.2*k*vn );//force\r\n\tR.applyWrenchW(v, 0);//at center of mass, so no torque\r\n\r\n\t/// DAMP RIGIDBODY MOTION\r\n\tv.set(vel);\r\n\tv.scale( -0.2 * k );\r\n\tR.applyWrenchW(v, 0);\r\n }", "@Override\n public OctreeIterator iterator()\n {\n Stack<CelestialBody> stack = new Stack<>();\n stack = this.root.iterate(stack);\n\n OctreeIterator iterator = new OctreeIterator(stack);\n return iterator;\n }", "public Vector<YANG_Body> getBodies() {\n\t\treturn bodies;\n\t}", "public void tick() {\n \t\t// Iterate over objects in the world.\n \t\tIterator<PhysicalObject> itr = myObjects.iterator();\n \t\n \t\tList<PhysicalObject> children = new LinkedList<PhysicalObject>();\n \t\t\n \t\twhile (itr.hasNext()) {\n \t\t\tCollidableObject obj = itr.next();\n \n \t\t\t// Apply forces\n \t\t\tfor (Force force : myForces) {\n \t\t\t\tforce.applyForceTo((PhysicalObject) obj);\n \t\t\t}\n \t\t\t\n \t\t\t// Update the object's state.\n \t\t\tobj.updateState(1f / UPDATE_RATE);\n \t\t\t\n \t\t\t// Spawn new objects?\n \t\t\tList<PhysicalObject> newChildren =\n \t\t\t\t((PhysicalObject) obj).spawnChildren(1f / UPDATE_RATE);\n \t\t\t\n \t\t\tif (newChildren != null) {\n \t\t\t\tchildren.addAll(newChildren);\n \t\t\t}\n \t\t}\n \t\t\n \t\t/*\n \t\t In the \"tick\" method of your application, rather than call the old form of \n \t\t resolveCollisions to completely handle a collision, you can now:\n \t\t \n \t\t \t1.Directly call CollisionDetector.calculateCollisions to receive an\n \t\t\t ArrayList<CollisionInfo> object.\n \t\t\t2.If the list is empty, then there is no collision between the pair\n \t\t\t of objects and nothing further need be done.\n \t\t\t3.If the list is not empty, then a collision has occurred and you can\n \t\t\t check whether the objects involved necessitate a transmission or a standard\n \t\t\t collision resolution (a.k.a. bounce).\n \t\t\t4.If a standard collision resolution is called for, use the new form of\n \t\t\t resolveCollisions to pass in the ArrayList<CollisionInfo> object.\n \t\t\t \n \t\t The goal of this change is to prevent the computationally expensive \n \t\t collision detection algorithm from being executed twice when objects collide.\n \t\t */\n \n \t\tfor (int i = 0; i < myObjects.size() - 1; i++) {\n \t\t\tfor (int j = i + 1; j < myObjects.size(); j++) {\n \t\t\t\tArrayList<CollisionInfo> collisions = \n \t\t\t\t\tCollisionDetector.calculateCollisions(myObjects.get(i), myObjects.get(j));\n \t\t\t\t\n \t\t\t\tif (collisions.size() > 0) {\n \t\t\t\t\tHalfSpace hs = null;\n \t\t\t\t\tPhysicalObject o = null;\n \t\t\t\t\t\n \t\t\t\t\tif (myObjects.get(i) instanceof HalfSpace) {\n \t\t\t\t\t\t// If i is a halfspace, j must be an object\n \t\t\t\t\t\ths = (HalfSpace) myObjects.get(i);\n \t\t\t\t\t\to = myObjects.get(j);\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t} else if (myObjects.get(j) instanceof HalfSpace) {\n \t\t\t\t\t\t// If j is a halfspace, i must be an object\n \t\t\t\t\t\ths = (HalfSpace) myObjects.get(j);\n \t\t\t\t\t\to = myObjects.get(i);\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Was there a halfspace involved? If so, was it a side?\n\t\t\t\t\tif (hs != null && hs.normal.y != 1 && hs.normal.y != -1 && myPeer.getPeerSize() > 0) {\n \t\t\t\t\t\t// Side collision, is there a peer?\n \t\t\t\t\t\tPeerInformation peer = myPeer.getPeerInDirection(o.getVelocity().x, -o.getVelocity().z);\n \t\t\t\t\t\t\n \t\t\t\t\t\tif (peer != null) {\n \t\t\t\t\t\t\to.switchX();\n \t\t\t\t\t\t\to.switchZ();\n \t\t\t\t\t\t\tmyPeer.sendPayloadToPeer(peer, o);\n \t\t\t\t\t\t\to.detach();\n \t\t\t\t\t\t\tmyObjects.remove(o);\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// Moving on\n \t\t\t\t\t\t\tcontinue;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Collision as usual...\n \t\t\t\t\tmyObjects.get(i).resolveCollisions(myObjects.get(j), collisions);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\t// Add new children to the world.\n \t\tfor (PhysicalObject obj : children) {\n \t\t\tmyScene.addChild(obj.getGroup());\n \t\t}\n \t\t\n \t\tmyObjects.addAll(children);\n \t}", "public void addBodies(ArrayList<CollisionBody> bodies){\n for(CollisionBody body: bodies){\n addBody(body);\n }\n }", "public double computeForces(Density density, Parameters1 p1, boolean verbose, PrintWriter forceWriter) {\n\t\tVectorDouble tangent, u_plus = null, u_minus = null;\n\t\tVectorDouble gradF;\n\t\tVectorDouble springF;\n\t\tVectorDouble angleF;\n\t\tdouble gradFNorms = 0.0;\n\t\tdouble springFNorms = 0.0;\n\t\tdouble angleFNorms = 0.0;\n\t\tdouble totalFNorms = 0.0;\n\t\t\n\t\tfor (int i = 1; i < points.length - 1; i++) {\n\t\t\ttangent = tangentInstance.getTangent(points[i - 1], points[i], points[i + 1]);\n\t\t\tu_plus = VectorDouble.subtract(points[i + 1], points[i]);\n\t\t\tu_minus = VectorDouble.subtract(points[i], points[i - 1]);\n\n\t\t\tgradF = VectorDouble.perpendicularProjection(tangent, density.getGradient(points[i]));\n\t\t\tgradF.scalarMult(p1.gradConst);\n\t\t\tgradFNorms += gradF.norm();\n\n\t\t\tspringF = VectorDouble.scalarMult((u_plus.norm() - u_minus.norm()) / tangent.norm(), tangent);\n\t\t\tspringFNorms += springF.norm();\n\n\t\t\tangleF = p1.anglePenalty.getAnglePenalty(u_plus, u_minus);\n\t\t\tangleFNorms += angleF.norm();\n\t\t\tforces[i] = VectorDouble.linearCombination(1.0, gradF, 1.0, springF, 1.0, angleF);\n\t\t\ttotalFNorms += forces[i].norm();\n\t\t}\n\n\t\tdouble averageGradFNorm = gradFNorms / (double) (points.length - 2);\n\t\tdouble averageSpringFNorm = springFNorms / (double) (points.length - 2);\n\t\tdouble averageAngleFNorm = angleFNorms / (double) (points.length - 2);\n\t\tdouble averageTotalFNorm = totalFNorms / (double) (points.length - 2);\n\t\t\n\t\tif (verbose) {\n\t\t\tSystem.out.println(\"Average gradient force = \" + averageGradFNorm);\n\t\t\tSystem.out.println(\"Average spring force = \" + averageSpringFNorm);\n\t\t\tSystem.out.println(\"Average angle force = \" + averageAngleFNorm);\n\t\t\tSystem.out.println(\"Average total force = \" + averageTotalFNorm);\n\t\t}\n\t\tforceWriter.print(averageGradFNorm + \", \");\n\t\tforceWriter.print(averageSpringFNorm + \", \");\n\t\tforceWriter.print(averageAngleFNorm + \", \");\n\t\tforceWriter.println(averageTotalFNorm);\n\n\t\treturn averageTotalFNorm;\n\t}", "public void clearForces() {\n rBody.clearForces();\n }", "void applyForce(Vector2D force) {\n\t\tforce.div(mass);\n\t\tacceleration.add(force);\n\t}", "public static void updatePosition() {\n\t\tfor (int i = 0; i < TitanV4.planets.length; i++) { //compute forces between all celestial corpses\n\t\t\tfor(int j=i; j<TitanV4.planets.length; j++){\n\t\t\t\tif (i != j) {\n\t\t\t\t\tdouble upper = TitanV4.G*TitanV4.planets[i].getMass() * TitanV4.planets[j].getMass();\n\t\t\t\t\tdouble lower = TitanV4.planets[i].getPosition().distanceFrom(TitanV4.planets[j].getPosition());\n\t\t\t\t\tdouble gravitation = upper/lower;\n\t\t\t\t\tVector a = new Vector();\n\t\t\t\t\ta = TitanV4.planets[i].getPosition().substract(TitanV4.planets[j].getPosition()).normalize().multiply(-1);\n\n\t\t\t\t\tTitanV4.planets[i].force.add(a.multiply(gravitation));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//compute acceleration vector for each celestial corpse but the sun\n\t\tfor(int i=1; i<TitanV4.planets.length; i++){\n\t\t\tTitanV4.planets[i].acceleration = (TitanV4.planets[i].force.divide(TitanV4.planets[i].getMass()));\n\t\t}\n\n\t\t//calculate change in speed over deltaT\n\t\tfor(int i=1; i<TitanV4.planets.length; i++){\n\t\t\tVector oldVelocity = new Vector(TitanV4.planets[i].velocity);\n\t\t\tTitanV4.planets[i].velocity.add((TitanV4.planets[i].acceleration.multiply(TitanV4.deltaT)));\n\n\t\t\tVector posChange = new Vector();\n\t\t\tposChange = (oldVelocity.add(velocity).divide(2)).multiply(TitanV4.deltaT);\n\t\t\tTitanV4.planets[i].pos.add(posChange);\n\t\t}\n\t}", "void update() {\n for( int i= 0; i < masses.length; i++) {\n masses[i].posX += masses[i].vx*dt;\n masses[i].posY += masses[i].vy*dt;\n }\n\n for( int i = 0; i < springs.length; i++) {\n if( !springs[i].mass1.fixed ) {\n springs[i].mass1.vx += ( springs[i].forceX() + nx(springs[i].mass1)*Math.pow(dist(springs[i].mass1)/(width*Math.sqrt(2)),2) - 0.005*springs[i].mass1.vx ) * dt;\n springs[i].mass1.vy += ( springs[i].forceY() + ny(springs[i].mass1)*Math.pow(dist(springs[i].mass1)/(width*Math.sqrt(2)),2) - 0.005*springs[i].mass1.vy ) * dt;\n }\n\n if( !springs[i].mass2.fixed ) {\n springs[i].mass2.vx += ( (-1)*springs[i].forceX() + nx(springs[i].mass2)*Math.pow(dist(springs[i].mass1)/(width*Math.sqrt(2)),2) - 0.005*springs[i].mass2.vx ) * dt;\n springs[i].mass2.vy += ( (-1)*springs[i].forceY() + ny(springs[i].mass2)*Math.pow(dist(springs[i].mass1)/(width*Math.sqrt(2)),2) - 0.005*springs[i].mass2.vy ) * dt;\n }\n }\n }", "public void EulerNextPos(Body[] bodies, int dt) {\n double ax = 0;\n double ay = 0;\n double temp_vx = this.vx;\n double temp_vy = this.vy;\n for (int i = 0; i < bodies.length; i++) {\n Body otherBody = bodies[i];\n if (otherBody.name != this.name){ // makes sure a body doesn't calculate acc on itself\n double r = Math.sqrt(Math.pow((this.x - otherBody.x),2) + Math.pow((this.y - otherBody.y),2));\n double temp_acc;\n try {\n temp_acc = (G * otherBody.mass)/Math.pow(r,3); // temp_acc * deltax = ax\n }\n catch (ArithmeticException e){ \n temp_acc = 0;\n }\n ax += temp_acc * (otherBody.x - this.x);\n ay += temp_acc * (otherBody.y - this.y);\n }\n }\n // change temp_vx and temp_vy based on acceleration\n temp_vx += ax * dt;\n temp_vy += ay * dt;\n \n this.euler_x = this.x + temp_vx * dt;\n this.euler_y = this.y + temp_vy * dt;\n }", "public synchronized void apply(Lambda<TurtleBody> function) {\n\t\tfor (TurtleBody body : this.bodies.values()) {\n\t\t\tfunction.apply(body);\n\t\t}\n\t}", "private double computeWallForces() {\r\n double potentialEnergy = 0;\r\n for (Molecule m: molecules) {\r\n potentialEnergy += computeLJWallForce(m);\r\n }\r\n return potentialEnergy;\r\n }", "public void preStep(float invDT) {\r\n\r\n\t\t// calculate the spring's vector (pointing from body1 to body2) and length\r\n\t\tspring = new Vector2f(body2.getPosition());\r\n\t\tspring.add(r2);\r\n\t\tspring.sub(body1.getPosition());\r\n\t\tspring.sub(r1);\r\n\t\tspringLength = spring.length();\r\n\t\t\r\n\t\t// the spring vector needs to be normalized for applyImpulse as well!\r\n\t\tspring.normalise();\r\n\t\t\r\n\t\t// calculate the spring's forces\r\n\t\t// note that although theoretically invDT could never be 0\r\n\t\t// but here it can\r\n\t\tfloat springConst;\r\n\t\t\r\n\t\tif ( springLength < minSpringSize || springLength > maxSpringSize ) { \r\n\t\t\t// Pre-compute anchors, mass matrix, and bias.\r\n\t\t\tMatrix2f rot1 = new Matrix2f(body1.getRotation());\r\n\t\t\tMatrix2f rot2 = new Matrix2f(body2.getRotation());\r\n\t\r\n\t\t\tr1 = MathUtil.mul(rot1,localAnchor1);\r\n\t\t\tr2 = MathUtil.mul(rot2,localAnchor2);\r\n\t\t\t\r\n\t\t\t// the mass normal or 'k'\r\n\t\t\tfloat rn1 = r1.dot(spring);\r\n\t\t\tfloat rn2 = r2.dot(spring);\r\n\t\t\tfloat kNormal = body1.getInvMass() + body2.getInvMass();\r\n\t\t\tkNormal += body1.getInvI() * (r1.dot(r1) - rn1 * rn1) + body2.getInvI() * (r2.dot(r2) - rn2 * rn2);\r\n\t\t\tmassNormal = 1 / kNormal;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// The spring is broken so apply force to correct it\r\n\t\t\t// note that we use biased velocities for this\r\n\t\t\tfloat springImpulse =\r\n\t\t\t\tinvDT != 0 ? brokenSpringConst * (springLength - springSize) / invDT : 0;\r\n\t\t\t\r\n\t\t\tVector2f impulse = MathUtil.scale(spring, springImpulse);\r\n\t\t\tbody1.adjustBiasedVelocity(MathUtil.scale(impulse, body1.getInvMass()));\r\n\t\t\tbody1.adjustBiasedAngularVelocity((body1.getInvI() * MathUtil.cross(r1, impulse)));\r\n\r\n\t\t\tbody2.adjustBiasedVelocity(MathUtil.scale(impulse, -body2.getInvMass()));\r\n\t\t\tbody2.adjustBiasedAngularVelocity(-(body2.getInvI() * MathUtil.cross(r2, impulse)));\r\n\t\t\t\r\n\t\t\tisBroken = true;\r\n\t\t\treturn;\r\n\t\t\t\r\n\t\t} else if ( springLength < springSize ) {\r\n\t\t\tspringConst = compressedSpringConst;\r\n\t\t\tisBroken = false;\r\n\t\t} else { // if ( springLength >= springSize )\r\n\t\t\tspringConst = stretchedSpringConst;\r\n\t\t\tisBroken = false;\r\n\t\t}\r\n\t\t\r\n\t\tfloat springImpulse =\r\n\t\t\tinvDT != 0 ? springConst * (springLength - springSize) / invDT : 0;\r\n\r\n\t\t// apply the spring's forces\r\n\t\tVector2f impulse = MathUtil.scale(spring, springImpulse);\r\n\t\tbody1.adjustVelocity(MathUtil.scale(impulse, body1.getInvMass()));\r\n\t\tbody1.adjustAngularVelocity((body1.getInvI() * MathUtil.cross(r1, impulse)));\r\n\r\n\t\tbody2.adjustVelocity(MathUtil.scale(impulse, -body2.getInvMass()));\r\n\t\tbody2.adjustAngularVelocity(-(body2.getInvI() * MathUtil.cross(r2, impulse)));\r\n\t}", "public void applyForce(E entity,Force force);", "public void contractDorsalMuscle(int i, double force);", "@Override\n public void update ( long t )\n {\n try\n { \n // Iterate through all entities, filtering by those that contain the specific set of components, that this system is intended to work with.\n \n for ( ECSEntity entity : engine.getEntities ().values () )\n { \n if ( entity.hasComponents ( transform, physics ) )\n { \n // Update physics simulation.\n \n updatePhysics ( entity, t );\n \n // Console logger.\n \n logger.log ();\n }\n } \n \n // Swap the double buffers.\n \n engine.swapBuffer ();\n }\n catch ( Exception e )\n { \n TextFormat.printFormattedException ( e, true );\n }\n }", "protected void rebuildRigidBody() {\n boolean removed = false;\n if(collisionShape instanceof MeshCollisionShape && mass != 0){\n throw new IllegalStateException(\"Dynamic rigid body cannot have mesh collision shape!\");\n }\n if (rBody != null) {\n if (rBody.isInWorld()) {\n PhysicsSpace.getPhysicsSpace().remove(this);\n removed = true;\n }\n rBody.destroy();\n }\n preRebuild();\n rBody = new RigidBody(constructionInfo);\n postRebuild();\n if (removed) {\n PhysicsSpace.getPhysicsSpace().add(this);\n }\n }", "public ArrayList<CollisionBody> getBodies() {\n return collisionBodies;\n }", "public void applyCentralForce(final Vector3f force) {\n rBody.applyCentralForce(Converter.convert(force, tempVec));\n rBody.activate();\n }", "void flushAll() {\n dirtyS = true;\n dirtyD = true;\n modelRoot.incrementNumberOfDirtySNodes();\n modelRoot.incrementNumberOfDirtyDNodes();\n }", "public void rk4sim(ArrayList<? extends ODEsolvable> bodies, Vector3D[][] kav, double dt) {\n //the increment is precalculated before updating the whole celestial bodies\n for(int i = 0; i < bodies.size(); i++) {\n if(bodies.get(i)!=null) {\n ODEsolvable planet = bodies.get(i);\n // System.out.println(planet.toString());\n kav[i] = rk4(planet.getCentralPos(), planet.getCentralVel(), dt, planet);\n }\n }\n\n //updating the celestial body position and velocity at the next time step\n for(int i = 0; i < bodies.size(); i++) {\n if(bodies.get(i) != null) {\n ODEsolvable planet = bodies.get(i);\n planet.setCentralPos(planet.getCentralPos().add(kav[i][0]));\n planet.setCentralVel(planet.getCentralVel().add(kav[i][1]));\n }\n }\n }", "private double computeForcesWithinCells() {\r\n double potentialEnergy = 0;\r\n \r\n for (int i = 0; i < nXCells; i++) {\r\n for (int j = 0; j < nYCells; j++) {\r\n for (Molecule m1 = cells[i][j].firstMolecule; m1 != null; m1 = m1.nextMoleculeInCell) {\r\n for (Molecule m2 = m1.nextMoleculeInCell; m2 != null; m2 = m2.nextMoleculeInCell) {\r\n double pe = computeForceBetweenMolecules(m1, m2);\r\n if (pe != 0) {\r\n potentialEnergy += pe;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return potentialEnergy;\r\n }", "public static void moveEuler( Dynamics a, Body[] b, int nbodies, double dt ) {\r\n int n, m;\r\n ap = a;\r\n\r\n for ( n=0; n<nbodies; n++ ) {\r\n zero_acceleration( b[n] );\r\n }\r\n\r\n for ( n=0; n<nbodies; n++ ) {\r\n add_gravitational_acceleration( b[n] );\r\n add_damping_acceleration( b[n] );\r\n }\r\n\r\n// for ( n=0; n<nties; n++ ) {\r\n// t[n].add_elastic_accelerations(b);\r\n// }\r\n\r\n for ( n=0; n<nbodies; n++ ) {\r\n if ( b[n].inFreeMotion ) {\r\n new_speed( b[n], dt );\r\n } else {\r\n b[n].currentState.vx = 0;\r\n b[n].currentState.vy = 0;\r\n b[n].currentState.vz = 0;\r\n }\r\n }\r\n\r\n for ( n=0; n<nbodies; n++ ) {\r\n new_position( b[n], dt );\r\n }\r\n\r\n }", "public void applyForce(final Vector2f force);", "void setForce() {\n\tdouble oldfreq = forceBarValue * omega[1] / 20.0;\n\tforceBarValue = forceBar.getValue();\n\tdouble newfreq = forceBarValue * omega[1] / 20.0;\n\tdouble adj = newfreq-oldfreq;\n\tforceTimeZero = t-oldfreq*(t-forceTimeZero)/newfreq;\n }", "public float getForce() { \n \treturn force; \n }", "public void actionPerformed(ActionEvent e) {\n\t\tNode hold = head;\r\n\t\t\r\n\t\tfor(int i = 0; i< this.track; i++) { //for everything in our linkedlist\r\n\t\t\tcelestialBody phold = this.get(i); // getting celestial body for comparing\r\n\t\t\tfor(int j =0; j < this.track; j++) { // loop to compare everything else to phold\r\n\t\t\t\tif(hold != null && hold.data != phold) { // as long as we aren't out of bounds and not comaring the same thing...\r\n\t\t\t\t\tfloat x1 = (float)phold.XV; // initial X-velocity of first celestial body being compared\r\n\t\t\t\t\tfloat y1 = (float) phold.YV; // initial Y-velocity of first celestial body being compared \r\n\t\t\t\t\tfloat x2 = (float)hold.data.getXV(); // initial X-velocity of \"everything else\"\r\n\t\t\t\t\tfloat y2 = (float)hold.data.getYV();// initial y-velocity of \"everything else\"\r\n\t\t\t\t\tdouble masses = phold.getMass() * hold.data.getMass(); // gotta have a mass\r\n\t\t\t\t\tSystem.out.println(\"masses:\"+ masses);\r\n\t\t\t\t\tdouble distx =phold.XC-hold.data.XC ; // our distance in terms of X\r\n\t\t\t\t\tdistx *=pixeldist; //scaling\r\n\t\t\t\t\tSystem.out.println(\"distx: \"+distx+ \"pixeldist:\"+ pixeldist);\r\n\t\t\t\t\tdouble disty = (phold.getYC() -hold.data.getYC()); //distance in terms of Y\r\n\t\t\t\t\tdisty *=pixeldist; // scaling\r\n\t\t\t\t\tSystem.out.println(\"disty: \"+disty);\r\n\t\t\t\t\tdouble r = Math.sqrt(Math.pow(distx, 2) + Math.pow(disty, 2)); // getting our actual distance using X and Y components\r\n\t\t\t\t\tSystem.out.println(\"r: \"+r);\r\n\t\t\t\t\tdouble force = G*((masses)/(r*r));//calculating force\r\n\t\t\t\t\tSystem.out.println(\"force: \"+force + \"(\"+ masses+\")\"+\" \"+ r*r);\r\n\t\t\t\t\tif(distx > 0) { // if our distance is positive...\r\n\t\t\t\t\t\tx1 += force* (distx/r); // calculating force for x\r\n\t\t\t\t\t\tx2 += force* (distx/r); \r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(distx < 0){// if our distance is negative...\r\n\t\t\t\t\t\tx1 += -1*force*(distx/r); // calculate for for x\r\n\t\t\t\t\t\tx2+= -1*force*(distx/r);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tx1 = x1*200;//scaling\r\n\t\t\t\t\tx2 = x2*200; //scaling\r\n\t\t\t\t\tif(disty > 0) { // repeat for Y...\r\n\t\t\t\t\t\ty1 += force*(disty/r);\r\n\t\t\t\t\t\ty2 += force*(disty/r);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (disty <0){ // repeat for Y...\r\n\t\t\t\t\t\ty1+=-1*force*(disty/r);\r\n\t\t\t\t\t\ty2+=-1*force*(disty/r);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ty1 = y1*300; //scaling\r\n\t\t\t\t\ty2 = y2*300; //scaling\r\n\t\t\t\t\tSystem.out.println(\"new x n y: \"+x1 + \",\"+y1);\r\n\t\t\t\t\tphold.YC +=(int) y2; // setting our next Y coordinate\r\n\t\t\t\t\tphold.XC += (int)x2; //setting our next X coordinate\r\n\t\t\t\t\thold.data.XV += force/masses; // applying force to velocity in terms of x\r\n\t\t\t\t\thold.data.YV+= force/masses;// applying force to velocity in terms of y\r\n\t\t\t\t\thold = hold.next;\r\n\t\t\t\t\tSystem.out.println(pixeldist+ \" \"+ force+ \" \"+phold.XC +\" \" +phold.YC);\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t}\r\n\t\trepaint();\r\n\t}", "private void renderBody(GL2 gl, SimulationBody body) {\n\t\t// apply the transform\n\t\tRenderUtilities.pushTransform(gl);\n\t\tRenderUtilities.applyTransform(gl, body.getTransform());\n\t\t\n\t\t// render the body\n\t\t// check for multiple fixtures\n\t\tbody.render(gl);\n\t\t\n\t\t// render the center of mass\n\t\tbody.renderCenter(gl);\n\n\t\tRenderUtilities.popTransform(gl);\n\t\t\n\t\t// render the velocities\n\t\tbody.renderVelocity(gl);\n\t}", "public void updateAccelerations(double xLimit, double yLimit) {\n // Loop all entities and update their accelerations in parallel\n entities.parallelStream().forEach(cur -> {\n int alignmentNeighbors = 0;\n int cohesionNeighbors = 0;\n int separationNeighbors = 0;\n Vector2D alignment = new Vector2D();\n Vector2D cohesion = new Vector2D();\n Vector2D separation = new Vector2D();\n\n // Use nearby entities to determinate forces\n for (Entity ee : entities) {\n if (ee == cur) continue;\n //if (cur.angleToEntity(ee) > detectionAngleBox.val/2) continue;\n double dist = Math.max(cur.distanceFrom(ee), 0.001);\n\n if (dist < alignmentDistanceBox.val) {\n alignmentNeighbors++;\n alignment.add(ee.getVelocity());\n }\n if (dist < cohesionDistanceBox.val) {\n cohesionNeighbors++;\n cohesion.add(ee.getPosition());\n }\n if (dist < separationDistanceBox.val) {\n separationNeighbors++;\n separation.add(new Vector2D(cur.getPosition()).subtract(ee.getPosition())\n .ensureDirection()\n .divide(dist*dist));\n }\n }\n\n if (alignmentNeighbors != 0)\n alignment\n .divide(alignmentNeighbors)\n .setMagnitude(maxSpeedBox.val)\n .subtract(cur.getVelocity())\n .limit(maxForceBox.val);\n if (cohesionNeighbors != 0)\n cohesion\n .divide(cohesionNeighbors)\n .subtract(cur.getPosition())\n .setMagnitude(maxSpeedBox.val)\n .subtract(cur.getVelocity())\n .limit(maxForceBox.val);\n if (separationNeighbors != 0)\n separation\n .divide(separationNeighbors)\n .setMagnitude(maxSpeedBox.val)\n .subtract(cur.getVelocity())\n .limit(maxForceBox.val);\n\n cur.getAcceleration()\n .add(alignment.multiply(alignmentMultiplierBox.val))\n .add(cohesion.multiply(cohesionMultiplierBox.val))\n .add(separation.multiply(separationMultiplierBox.val))\n .limit(maxSpeedBox.val);\n\n // Border force\n double bfX = cur.getX() < xLimit/2 ? 100/Math.pow(cur.getX(),2) : -100/Math.pow(xLimit - cur.getX(),2);\n double bfY = cur.getY() < yLimit/2 ? 100/Math.pow(cur.getY(),2) : -100/Math.pow(yLimit - cur.getY(),2);\n cur.getAcceleration().add(new Vector2D(bfX, bfY)).limit(maxSpeedBox.val);\n });\n }", "public void defineBody()\n {\n if(B2body != null){\n PlayScreen.world.destroyBody(B2body);}\n\n BodyDef bdef = new BodyDef();\n bdef.type = BodyDef.BodyType.KinematicBody;\n B2body = PlayScreen.world.createBody(bdef);\n\n\n calculateTriangle(mirror.getX(), mirror.getY(), mirror.getRotation());\n }", "private double computeForcesWithNeighbourCells() {\r\n double potentialEnergy = 0;\r\n for (Cell[] cellPair: neighbourCells) { \r\n if (cellPair[1].firstMolecule == null) continue; // If cell2 is empty, skip\r\n \r\n for (Molecule m1 = cellPair[0].firstMolecule; m1 != null; m1 = m1.nextMoleculeInCell) {\r\n for (Molecule m2 = cellPair[1].firstMolecule; m2 != null; m2 = m2.nextMoleculeInCell) {\r\n double pe = computeForceBetweenMolecules(m1, m2);\r\n if (pe != 0) {\r\n potentialEnergy += pe;\r\n }\r\n }\r\n }\r\n }\r\n return potentialEnergy;\r\n }", "public void applyForce(PVector force) {\n acceleration.add(force);\n }", "public void applyForce(PVector force) {\n acceleration.add(force);\n }", "public void applyForce(PVector force) {\n acceleration.add(force);\n }", "public void updateChildNodes() {\n\t\tList<FTNonLeafNode> nodesToRemove = new ArrayList<FTNonLeafNode>();\n\t\tfor (FTNonLeafNode intermediateNode : intermediateNodes.values()) {\n\t\t\tList<FTNode> childNodesToRemove = new ArrayList<FTNode>();\n\t\t\tfor (String childName : intermediateNode.childNodes.keySet()) {\n\t\t\t\tif (intermediateNodes.containsKey(childName)) {\n\t\t\t\t\t// update child node if it has child node\n\t\t\t\t\tFTNonLeafNode childNode = intermediateNodes.get(childName);\n\t\t\t\t\tif ((childNode instanceof FTOrNode) || (childNode instanceof FTAndNode)) {\n\t\t\t\t\t\tintermediateNode.addChildNode(childName, intermediateNodes.get(childName));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// if parent node is an OR node\n\t\t\t\t\t\t// remove this child\n\t\t\t\t\t\tif (intermediateNode instanceof FTOrNode) {\n\t\t\t\t\t\t\tchildNodesToRemove.add(childNode);\n\t\t\t\t\t\t\tnodesToRemove.add(childNode);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// if parent node is an AND node\n\t\t\t\t\t\t// remove the parent node and child node\n\t\t\t\t\t\t// and set their values to false in case they are referenced by other nodes\n\t\t\t\t\t\telse if (intermediateNode instanceof FTAndNode) {\n\t\t\t\t\t\t\tnodesToRemove.add(intermediateNode);\n\t\t\t\t\t\t\tnodesToRemove.add(childNode);\n\t\t\t\t\t\t\t// mark the nodes as they are not getting removed till after the loop\n\t\t\t\t\t\t\tintermediateNode.resolved = true;\n\t\t\t\t\t\t\tintermediateNode.nodeValue = false;\n\t\t\t\t\t\t\tchildNode.resolved = true;\n\t\t\t\t\t\t\tchildNode.nodeValue = false;\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\tintermediateNode.removeChildNodes(childNodesToRemove);\n\t\t\t// if no child node left for this intermediate node,\n\t\t\t// then its parent node should remove this intermediate node as well\n\t\t}\n\t\t// remove the no child nodes\n\t\tfor (FTNonLeafNode node : nodesToRemove) {\n\t\t\tintermediateNodes.remove(node.nodeName);\n\t\t}\n\t}", "public void checkBodyCollisions(ArrayList<CollisionBody> bodies) {\n for (CollisionBody body : bodies) {\n if (this.collidesWith(body)) {\n Line line = (Line) body.getShape();\n\n double lineMidX = (line.getStartX() + line.getEndX()) / 2;\n double lineMidY = (line.getStartY() + line.getEndY()) / 2;\n double ballMidX = ball.getLayoutX();\n double ballMidY = ball.getLayoutY();\n double ratioX = (ballMidX - lineMidX) / Math.min(Math.abs(ballMidX - lineMidX), Math.abs(ballMidY - lineMidY));\n double ratioY = (ballMidY - lineMidY) / Math.min(Math.abs(ballMidX - lineMidX), Math.abs(ballMidY - lineMidY));\n\n double increment = 0.05;\n while (collidesWith(body)) {\n System.out.print(\"|\");\n ball.setLayoutX(ball.getLayoutX() + (ratioX * increment));\n ball.setLayoutY(ball.getLayoutY() + (ratioY * increment));\n }\n System.out.println(\"\");\n\n double lineAngle = getAngleFromXY(line.getEndX() - line.getStartX(), line.getStartY() - line.getEndY());\n double velAngle = getAngleFromXY(velX, velY);\n double totalVel = Math.hypot(velX, velY);\n\n velAngle -= lineAngle;\n velAngle = normalizeAngle(velAngle);\n velAngle = 360 - velAngle;\n velAngle += lineAngle;\n\n velX = totalVel * Math.cos(Math.toRadians(velAngle)) * frictionX;\n velY = totalVel * Math.sin(Math.toRadians(velAngle)) * frictionY;\n }\n }\n }", "public void update() {\n\n //Updates all the modules\n for(Module module : modules.values())\n module.update();\n\n //Applies all the forces that can act on this mobile (gravity, air resistance etc)\n for(Force force : forces)\n force.apply();\n\n position = position.add(velocity.multiply(deltaTime()));\n rotation = rotation.multiply(angularVelocity.copy().quaternion().scale(deltaTime()));\n }", "public RigidBodyForceGenerator() {\n\t\tsuper();\n\t}", "@Override\n public void solve(MovementManager mm) {\n // Get current body position, velocity and acceleration\n position = mm.getBody().getPosition().cpy();\n acceleration = calculateAcceleration(mm.getBody(), DT, position.cpy());\n velocity = mm.getBody().getVelocity().cpy();\n\n // Calculate new velocity based on the acceleration\n velocity.add(acceleration.cpy().scl(mm.getDt()));\n\n // Set new values\n mm.getBody().setVelocity(velocity.cpy());\n mm.getBody().setPosition(position.cpy().add(velocity.cpy().scl(mm.getDt())));\n }", "public void contractTransverseMuscle(int i, double force);", "public void Run()\n {\n for(int i = 0; i < birds.size(); i++)\n {\n Animal thisBird = (Animal)birds.get(i);\n \n // if the bird is all alone, it should just wander around\n if(thisBird.Alone(birds) && wandering)\n {\n PVector wander = thisBird.Wander();\n wander.mult(wanderMult);\n thisBird.ApplyForce(wander);\n }\n // if not alone, apply appropiate behaviours\n else\n {\n if (separating)\n {\n PVector separate = thisBird.Separate(birds);\n separate.mult(separationMult);\n thisBird.ApplyForce(separate);\n }\n if (cohesing)\n {\n PVector cohese = thisBird.Cohesion(birds);\n cohese.mult(cohesionMult);\n thisBird.ApplyForce(cohese);\n }\n if (aligning)\n {\n PVector align = thisBird.Align(birds);\n align.mult(alignMult);\n thisBird.ApplyForce(align);\n }\n if (noiseEnabled)\n {\n PVector noise = thisBird.NoiseMove();\n noise.mult(noiseMult);\n thisBird.ApplyForce(noise);\n }\n } \n thisBird.Tick();\n thisBird.Display();\n birds.set(i, thisBird); \n }\n }", "public void collisionPhsysics (Body otherBody) {\n if (this.mass <= otherBody.mass) {\n this.merged = true;\n otherBody.mass += this.mass;\n this.x = 0;\n this.y = 0;\n this.temp_x = 0;\n this.temp_y = 0;\n }\n else {\n otherBody.merged = true;\n this.mass += otherBody.mass;\n otherBody.x = 0;\n otherBody.y = 0;\n otherBody.temp_x = 0;\n otherBody.temp_y = 0;\n }\n\n // momentum transfer\n if (this.mass <= otherBody.mass) {\n otherBody.vx = (this.mass*this.vx + otherBody.mass*otherBody.vx)/(this.mass + otherBody.mass);\n otherBody.vy = (this.mass*this.vy + otherBody.mass*otherBody.vy)/(this.mass + otherBody.mass);\n }\n else {\n this.vx = (this.mass*this.vx + otherBody.mass*otherBody.vx)/(this.mass + otherBody.mass);\n this.vy = (this.mass*this.vy + otherBody.mass*otherBody.vy)/(this.mass + otherBody.mass);\n }\n\n\n }", "public void updateVelocity (Body[] bodies, int dt) {\n this.updateAcceleration(bodies);\n this.vx += 0.5 * (this.ax + this.axplusone) * dt;\n this.vy += 0.5 * (this.ay + this.ayplusone) * dt;\n }", "public void updateVelocity() {\n \t// Step 1: input power and convert the power to a force based on the starting velocity\n \tsetWeight();\n \tdouble trainMass = trainWeight*KG_PER_POUND;\n \t\n \t// this is ensuring that we never get a negative speed\n \tif (this.currentSpeed == 0) {\n \t\tthis.force = (this.powerIn)/1;\n \t} else {\n \t\tthis.force = (this.powerIn)/this.currentSpeed;\n \t}\n \tsetGrade();\n \t\n \t// Step 2: Calculate the slope of the train's current angle (Degrees = Tan-1 (Slope Percent/100))\n \tthis.slope = Math.atan2(this.grade,100);\n \tdouble angle = Math.toDegrees(this.slope);\n \t\n \t// Step 3: Calculate the forces acting on the train using the coefficient of friction\n \t// and the train's weight in lbs converted to kg divided over the wheels (where the force is technically\n \t// being applied times gravity (G)\n \tthis.normalForce = (trainMass/this.trainWheels) * G * Math.sin((angle*Math.PI)/180);\t// divide by 12 for the number of wheels\n \tthis.downwardForce = (trainMass/this.trainWheels) * G * Math.cos((angle*Math.PI)/180);\t// divide by 12 for the number of wheels\n\n \t// compute friction force\n \tthis.friction = (FRICTION_COEFFICIENT * this.downwardForce) + this.normalForce;\n \t\n \t// sum of the forces\n \tthis.totalForce = this.force - this.friction;\n \t \t\n \tthis.force = this.totalForce;\n \t\n \t// Step 4: Calculate acceleration using the F = ma equation, where m = the mass of the body moving\n \tthis.trainAcceleration = this.force/trainMass;\n \t\n \t// and have to check to make sure this acceleration does not exceed our max.\n \tif (this.trainAcceleration >= TRAIN_MAX_ACCELERATION * 1) {\t// time elapsed (one second)\n \t\t// set the acceleration as the max acceleration because we cannot exceed that\n \t\tthis.trainAcceleration = TRAIN_MAX_ACCELERATION * 1;\t// time elapsed (one second)\n \t}\n \t\n\t\temerBrake = this.getEBrake();\n \t// decelerates the train based on the values given in the spec sheet for the emergency brake\n \tif (emerBrake) {\n \t\tthis.trainAcceleration += (TRAIN_MAX_ACCELERATION_E_BRAKE*1);\n \t}\n \t\n \t// decelerates the train based onthe values given in the spec sheet for the service brake\n \tif(serviceBrake) {\n \t\tthis.trainAcceleration += (TRAIN_MAX_ACCELERATION_SERVICE_BRAKE*1);\n \t}\n \t\n \t// Step 5: Calculate the final speed by adding the old speed with the acceleration x the time elapsed (one second)\n \tthis.finalSpeed = this.currentSpeed + (this.trainAcceleration * 1);\n \t\n \t// NO NEGATIVE SPEEDS YINZ\n \tif(this.finalSpeed < 0) {\n this.finalSpeed = 0;\n }\n \t\n \t// resetting the current speed based on our calculations\n \tthis.currentSpeed = this.finalSpeed;\n \tthis.distTravelled = this.currentSpeed * 1; // speed times the time between clock ticks = distance travelled\n \t//System.out.println(finalSpeed);\n \t\n \tif(!(currentBlock == this.position.getCurrentBlock())) {\n \t\tmetersIn = 0;\n \t} else {\n \t\tmetersIn += this.distTravelled;\n \t}\n \tthis.position.moveTrain(this.distTravelled); // method call to tell the position class how far to move the train\n \t\n }", "public void step(double deltaTime) {\n Iterator<Body> iterator = bodies.iterator();\n\n while (iterator.hasNext()) {\n Body body = iterator.next();\n if (body.isDead() && body.isDestroyOnDeath()) {\n body.removeFromWorld();\n\n removedBodies.add(body);\n iterator.remove();\n continue;\n }\n\n body.updateTransform();\n motionRule.integrate(deltaTime, body);\n body.updateTransform();\n }\n\n for (Body body : bodies) {\n for (Body secondBody : bodies) {\n // the same body cannot collide with itself\n if (secondBody.equals(body)) {\n continue;\n }\n\n // two bodies should only collide once per frame\n if (!body.shouldCollide(secondBody)) {\n continue;\n }\n if (!secondBody.shouldCollide(body)) {\n continue;\n }\n\n // ensure these two bodies will not collide again\n secondBody.addFrameCollision(body);\n body.addFrameCollision(secondBody);\n\n // test for a collision\n CollisionResult result = collisionRule.isCollision(body, secondBody);\n if (result.isCollision()) {\n collisionRule.resolveCollision(body, secondBody, result.getMTV());\n }\n }\n }\n\n // prepare the bodies for next frame\n for (Body body : bodies) {\n body.clearForces();\n body.clearFrameCollisions();\n }\n }", "public void contractVentralMuscle(int i, double force);", "private void buildBody() {\n\t\tBodyDef def = new BodyDef();\n\t\tdef.type = BodyType.KinematicBody;\n\t\tdef.position.set(new Vector2(0, 0));\n\t\tmouseBody = GamePlayManager.world.createBody(def);\n\n\t\t//this body is jointed to the above body and is physically pulled towards the mouse\n\t\tBodyDef def2 = new BodyDef();\n\t\tdef2.type = BodyType.DynamicBody;\n\t\tdef2.position.set(new Vector2(0, 0));\n\t\tBody collisionBody = GamePlayManager.world.createBody(def2);\n\t\tCircleShape shape = new CircleShape();\n\t\tshape.setRadius(8 * Util.PIXEL_TO_BOX);\n\t\tFixtureDef fixDef2 = new FixtureDef();\n\t\tfixDef2.shape = shape;\n\t\tfixDef2.isSensor = true;\n\t\tfixDef2.density = 1f;\n\t\tfixDef2.filter.categoryBits = Util.CATEGORY_EVERYTHING;\n\t\tfixDef2.filter.maskBits = Util.CATEGORY_EVERYTHING;\n\t\tcollisionBody.createFixture(fixDef2);\n\t\tcollisionBody.setUserData(this);\n\t\tshape.dispose();\n\t\t\n\t\tWeldJointDef jDef = new WeldJointDef();\n\t\tjDef.bodyA = mouseBody;\n\t\tjDef.bodyB = collisionBody;\n\t\tjDef.collideConnected = false;\n\t\tjDef.type = JointType.WeldJoint;\n\t\tjDef.referenceAngle = 0;\n\t\tjDef.dampingRatio = 0;\n\t\tGamePlayManager.world.createJoint(jDef);\n\t}", "public void preTraverse() {\n // ensure not an empty tree\n while (root != null) {\n \n }\n }", "public List<BodyDecl> getBodyDecls() {\n return getBodyDeclList();\n }", "private void calculateDistances() {\n for (int point = 0; point < ntree.size(); point++) {\n calculateDistances(point);\n }\n }", "public List<BodyDecl> getBodyDeclsNoTransform() {\n return getBodyDeclListNoTransform();\n }", "private void recalculateAllRoutes() {\n robotModels.parallelStream().forEach(m -> m.recalculateRoute(target, obstacles));\n }", "public void setForce(float force) { \n \tthis.force = force; \n }", "public final void initBody() {\n m_body = new ArrayList<Condition>();\n m_stats = new TwoClassConfusionMatrix();\n m_val = Double.NEGATIVE_INFINITY;\n resetTieBreaker();\n }", "private void doBasicUpdate(){\n for (int i = 0; i < subTrees.length - 1; i++) { //top tree never receives an update (reason for -1)\r\n if(!subTrees[i].hasStopped()) {\r\n doOneUpdateStep() ;\r\n }\r\n }\r\n }", "@Override\r\n double computeAccelerations() {\r\n double potentialEnergy;\r\n \r\n potentialEnergy = computeWallForces();\r\n assignMoleculesToCells(); \r\n potentialEnergy += computeForcesWithinCells();\r\n potentialEnergy += computeForcesWithNeighbourCells();\r\n \r\n return potentialEnergy;\r\n }", "@DISPID(1610940418) //= 0x60050002. The runtime will prefer the VTID if present\n @VTID(24)\n Bodies bodies();", "@Override\r\n public void updateForce(Rigidbody body, float duration) {\n Vector3f lws = body.getPointInWorldSpace(connectionPoint);\r\n Vector3f ows = new Vector3f(anchorPoint);\r\n\r\n if (this.restLength == -1f) {\r\n this.restLength = new Vector3f(ows).sub(lws).length();\r\n }\r\n\r\n // Calculate the vector of the spring (in local space)\r\n Vector3f force = new Vector3f(lws).sub(ows);\r\n\r\n // Calculate the magnitude of the force\r\n float magnitude = force.length();\r\n magnitude = Math.max(magnitude - restLength, 1.6f);\r\n magnitude *= springConstant;\r\n\r\n // Calculate the final force and apply it\r\n force.normalize();\r\n force.mul(-magnitude);\r\n body.addForceAtPoint(force, lws);\r\n }", "public void calculatePosition(Body[] bodies, int dt) {\n this.updateVelocity(bodies, dt);\n this.temp_x += this.vx * dt + 0.5 * this.ax * dt * dt;\n this.temp_y += this.vy * dt + 0.5 * this.ay * dt * dt;\n }", "@DISPID(1611006016) //= 0x60060040. The runtime will prefer the VTID if present\n @VTID(91)\n boolean bodiesUnderOperationsInTree();", "@DISPID(1610940420) //= 0x60050004. The runtime will prefer the VTID if present\n @VTID(26)\n Bodies bodies();", "private void calculateRecForces(){\n\t\t\n\t\t\n\t\tfor(Particle p : this){\n\t\t\t//Pg 183 Lee[05]\n\t\t\t//For each grid point that this particle has been interpolated to\n\t\t\tfor(int dx = -ASSIGNMENT_SCHEME_ORDER; dx < ASSIGNMENT_SCHEME_ORDER; dx++)\n\t\t\t{\n\t\t\t\tfor(int dy = -ASSIGNMENT_SCHEME_ORDER; dy < ASSIGNMENT_SCHEME_ORDER; dy++)\n\t\t\t\t{\n\t\t\t\t\tdouble uX = p.getPosition().re()/1.0 * CELL_SIDE_COUNT;//Scaled fractional coordinate\n\t\t\t\t\tdouble uY = p.getPosition().im()/1.0 * CELL_SIDE_COUNT;//Scaled fractional coordinate\n\t\t\t\t\tint particleCellX = (int)Math.round(p.getPosition().re()/1.0 * CELL_SIDE_COUNT);\n\t\t\t\t\tint particleCellY = (int)Math.round(p.getPosition().im()/1.0 * CELL_SIDE_COUNT);\n\t\t\t\t\tint thisX = particleCellX + dx;\n\t\t\t\t\tint thisY = particleCellY + dy;\n\t\t\t\t\tif(thisX >= 0 && thisY >= 0 && thisX < CELL_SIDE_COUNT && thisY < CELL_SIDE_COUNT)\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble dQdx = p.getCharge() * M.evaluateDerivative(uX - thisX) * M.evaluate(uY - thisY);\n\t\t\t\t\t\tdouble dQdy = p.getCharge() * M.evaluate(uX - thisX) * M.evaluateDerivative(uY - thisY);\n\t\t\t\t\t\tp.addToForce(-dQdx * convolutedMatrix[thisX][thisY].re(), -dQdy * convolutedMatrix[thisX][thisY].re()); //FIXME .re()?\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void UpdateAcceleration()\n\t{\n\t\tVector2 newAcceleration = new Vector2(0,0);\n\t\t\n\t\tfor(int i=0;i<forcesList.size();i++)\n\t\t{\n\t\t\tnewAcceleration.x += forcesList.get(i).force.x / mass;\n\t\t\tnewAcceleration.y += forcesList.get(i).force.y / mass;\n\t\t\t\n\t\t\tif(forcesList.get(i).mode == ForceMode.Impulse)\n\t\t\t{\n\t\t\t\tRemoveForce(forcesList.get(i));\n\t\t\t}\n\t\t}\n\t\tacceleration = newAcceleration;\n\t\t\n\t\tfloat newAngularAcc = 0;\n\t\t\n\t\tfor(int i=0;i<torqueList.size();i++)\n\t\t{\n\t\t\tnewAngularAcc += torqueList.get(i).torqueVal / mass;\n\t\t\tif(torqueList.get(i).mode == ForceMode.Impulse)\n\t\t\t{\n\t\t\t\tRemoveTorque(torqueList.get(i));\n\t\t\t}\n\t\t}\n\t\tangularAcceleration = newAngularAcc;\n\t\t\n\t}", "public static void applyGravity() {\n\n\t\tfor (Ball b : Panel.balls) {\n\t\t\tb.setyVelocity(b.getyVelocity() + 2);\n\t\t}\n\t}", "private void rootTreeIterate(Element rootNode) throws DocumentException {\n\n Iterator rootIterator = rootNode.elementIterator();\n\n while (rootIterator.hasNext()) {\n\n Element node = (Element) rootIterator.next();\n\n if (node.getName().equals(TABLE_NODE)) {\n processTableNode(node);\n } else if (node.getName().equals(CLASS_NODE)) {\n processClassNode(node);\n } else if (node.getName().equals(CLASS_PARENT_NODE)) {\n processClassParentNode(node);\n } else if (node.getName().equals(PROPERTY_NODE)) {\n processPropertyNode(node);\n } else if (node.getName().equals(PROPERTY_PARENT_NODE)) {\n processPropertyParentNode(node);\n } else {\n throw new DocumentException(\"Node with illegal name \\\"\" + node.getName() + \"\\\" found\");\n }\n }\n }", "public void calculateTermWeights() {\n\t\tfor (String termString : terms.keySet()) {\n\t\t\tTerm t = terms.get(termString);\n\t\t\tMap<Integer, TermDoc> posting = t.getPostings();\n\n\t\t\t// Iterate through the docs in which the selected term is found.\n\t\t\tfor (Integer docId : posting.keySet()) {\n\n\t\t\t\tTermDoc td = posting.get(docId);\n\t\t\t\tDocument doc = this.getDocument(docId);\n\n\t\t\t\tfinal double a = 0.4;\n\t\t\t\tdouble ntf = a + (1 - a) * (double) td.getFreq() / (double) doc.getMaxTermFreq();\n\t\t\t\tdouble idf = Math.log((double) documents.size() / (1 + (double) t.getDocFreq()));\n\t\t\t\tdoc.addWeight(termString, ntf * idf);\n\t\t\t}\n\t\t}\n\n\t\tfor (Document doc : documents.values())\n\t\t\tdoc.setEuclideanDistance();\n\t}", "public void recalculateNodesVectors(int width) {\n List<double[]> inputVectors = new ArrayList<double[]>();\n // use squar of distance\n for (ReferenceNode node : nodeList) {\n Point location = node.getLocation();\n List<ReferenceNode> neighborNodes = getNodesWithin(location, width);\n inputVectors.clear();\n for (ReferenceNode neighborNode : neighborNodes) {\n List<double[]> data = neighborNode.getInputVectors();\n if (data != null)\n inputVectors.addAll(data);\n }\n // If nothing in the inputVectors, keep the original value\n if (inputVectors.size() > 0) {\n double[] newVector = average(inputVectors);\n node.setReferenceVector(newVector);\n }\n }\n // Have to empty input nodes\n for (ReferenceNode node : nodeList) {\n node.resetInputVectors();\n node.resetLabels();\n }\n }", "private void applyForce(PVector force)\n\t{\n\t\tacceleration.add(force);\n\t}", "private void iterateUpdate()\n\t{\n\t\tSystem.out.println(\"ITERATE\");\n\t\t\t\n\t\tfor (Organism org : simState.getOrganisms()) \n\t\t{\n\t\t\torganismViewData.resetOrganismView(org);\n\t\t}\n\t\t\n\t\tIterationResult result = simEngine.iterate();\n\t\t\n\t\t// Process born and dead organisms\n\t\taddBornModels(result.getBorn());\n\t\tremoveDeadModels(result.getLastDead());\n\t\t\n\t\trotateAnimals();\t\t\n\t}", "public void step() {\n hasMoved = new boolean[simulationSize][simulationSize]; // Initializing the array and populating it with false values\n\n for(int i = 0; i < hasMoved.length; i++)\n Arrays.fill(hasMoved[i], false);\n\n moveFluid();\n\n yVelocityModifier.add(gravity);\n for(int i = 0; i < simulationSize; i++) { // Iterating through every grid space\n for(int j = 0; j < simulationSize; j++) {\n if(fluidGrid[i][j][0] == EMPTY_VALUE) // If the current space is empty don't use it\n continue;\n\n for(float xModifier : xVelocityModifier) {\n fluidGrid[i][j][0] += xModifier;\n }\n\n for(float yModifier : yVelocityModifier) {\n fluidGrid[i][j][1] += yModifier;\n }\n }\n }\n\n xVelocityModifier.clear();\n yVelocityModifier.clear();\n }", "public void doPhysics(World var1, int var2, int var3, int var4, int var5)\r\n {\r\n boolean var6 = false;\r\n\r\n if (!var1.isBlockSolidOnSide(var2, var3 - 1, var4, 1) && var1.getTypeId(var2, var3 - 1, var4) != Block.FENCE.id)\r\n {\r\n var6 = true;\r\n }\r\n\r\n if (var6)\r\n {\r\n this.b(var1, var2, var3, var4, var1.getData(var2, var3, var4), 0);\r\n var1.setTypeId(var2, var3, var4, 0);\r\n }\r\n }", "void normalize(ILineStartFinder finder) {\n // perform final changes to the open and close body ranges\n int openBodyEnd, openBodyStart, closeBodyStart, closeBodyEnd;\n DOMNode first = (DOMNode) getFirstChild();\n DOMNode lastNode = null;\n // look for the open body\n Scanner scanner = new Scanner();\n scanner.setSource(this.fDocument);\n scanner.resetTo(this.fNameRange[1] + 1, this.fDocument.length);\n try {\n int currentToken = scanner.getNextToken();\n while (currentToken != TerminalTokens.TokenNameLBRACE && currentToken != TerminalTokens.TokenNameEOF) {\n currentToken = scanner.getNextToken();\n }\n if (currentToken == TerminalTokens.TokenNameLBRACE) {\n openBodyEnd = scanner.currentPosition - 1;\n openBodyStart = scanner.startPosition;\n } else {\n openBodyEnd = this.fDocument.length;\n openBodyStart = this.fDocument.length;\n }\n } catch (InvalidInputException e) {\n openBodyEnd = this.fDocument.length;\n openBodyStart = this.fDocument.length;\n }\n if (first != null) {\n int lineStart = finder.getLineStart(first.getStartPosition());\n if (lineStart > openBodyEnd) {\n openBodyEnd = lineStart - 1;\n } else {\n openBodyEnd = first.getStartPosition() - 1;\n }\n lastNode = (DOMNode) first.getNextNode();\n if (lastNode == null) {\n lastNode = first;\n } else {\n while (lastNode.getNextNode() != null) {\n lastNode = (DOMNode) lastNode.getNextNode();\n }\n }\n scanner.setSource(this.fDocument);\n scanner.resetTo(lastNode.getEndPosition() + 1, this.fDocument.length);\n try {\n int currentToken = scanner.getNextToken();\n while (currentToken != TerminalTokens.TokenNameRBRACE && currentToken != TerminalTokens.TokenNameEOF) {\n currentToken = scanner.getNextToken();\n }\n if (currentToken == TerminalTokens.TokenNameRBRACE) {\n closeBodyStart = scanner.startPosition;\n closeBodyEnd = scanner.currentPosition - 1;\n } else {\n closeBodyStart = this.fDocument.length;\n closeBodyEnd = this.fDocument.length;\n }\n } catch (InvalidInputException e) {\n closeBodyStart = this.fDocument.length;\n closeBodyEnd = this.fDocument.length;\n }\n } else {\n scanner.resetTo(openBodyEnd, this.fDocument.length);\n try {\n int currentToken = scanner.getNextToken();\n while (currentToken != TerminalTokens.TokenNameRBRACE && currentToken != TerminalTokens.TokenNameEOF) {\n currentToken = scanner.getNextToken();\n }\n if (currentToken == TerminalTokens.TokenNameRBRACE) {\n closeBodyStart = scanner.startPosition;\n closeBodyEnd = scanner.currentPosition - 1;\n } else {\n closeBodyStart = this.fDocument.length;\n closeBodyEnd = this.fDocument.length;\n }\n } catch (InvalidInputException e) {\n closeBodyStart = this.fDocument.length;\n closeBodyEnd = this.fDocument.length;\n }\n openBodyEnd = closeBodyEnd - 1;\n }\n setOpenBodyRangeEnd(openBodyEnd);\n setOpenBodyRangeStart(openBodyStart);\n setCloseBodyRangeStart(closeBodyStart);\n setCloseBodyRangeEnd(closeBodyEnd);\n this.fInsertionPosition = finder.getLineStart(closeBodyStart);\n if (lastNode != null && this.fInsertionPosition < lastNode.getEndPosition()) {\n this.fInsertionPosition = getCloseBodyPosition();\n }\n if (this.fInsertionPosition <= openBodyEnd) {\n this.fInsertionPosition = getCloseBodyPosition();\n }\n super.normalize(finder);\n }", "private static double calculateAcceleration(double force, double mass) {\n return force / mass;\n }", "public void recalculateNodes(int width) {\n int x, y, minX, minY, maxX, maxY;\n List<Set<String>> inputData = new ArrayList<Set<String>>();\n // use squar of distance\n for (ReferenceNode node : nodeList) {\n Point location = node.getLocation();\n x = location.x;\n y = location.y;\n minX = Math.max(0, x - width);\n minY = Math.max(0, y - width);\n maxX = Math.min(SOM.X_LENGTH - 1, x + width);\n maxY = Math.min(SOM.Y_LENGTH - 1, y + width);\n inputData.clear();\n for (x = minX; x < maxX + 1; x++) {\n for (y = minY; y < maxY + 1; y++) {\n ReferenceNode neighborNode = getNodeAt(x, y);\n List<Set<String>> data = neighborNode.getInputData();\n if (data != null)\n inputData.addAll(data);\n }\n }\n // Set<String> newData = average(inputData);\n // node.setReferenceData(newData);\n node.setInputReferenceData(inputData);\n }\n // Have to empty input nodes\n for (ReferenceNode node : nodeList)\n node.resetInputData();\n }", "public void updateUniverse(int dimension)\n\t{\n\t\tfor(int i = 0; i < this.particles.size(); i++)\n\t\t{\n\t\t\tVector force = new Vector(this.dimension);\n\t\t\t\n\t\t\tfor(int x = 0; x < this.particles.size(); x++)\n\t\t\t{\n\t\t\t\tif(x == i) continue;\n\t\t\t\t\n\t\t\t\tif(checkCollision(i, x) == true)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tparticles.get(i).setVelocity(\n\t\t\t\t\t\t\tparticles.get(i).getVelocity().multiply(particles.get(i).getMass()).add(particles.get(x).getVelocity().multiply(particles.get(x).getMass())).divide(\n\t\t\t\t\t\t\t\t\tparticles.get(i).getMass()+particles.get(x).getMass())\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\tthis.particles.get(i).increaseMass(this.particles.get(x).getMass());\n\t\t\t\t\tparticles.remove(x);\n\t\t\t\t\t\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble gForce = GRAV_CONST * (particles.get(i).getMass() * particles.get(x).getMass()) / Math.pow((this.particles.get(i).getPosition().distance(this.particles.get(x).getPosition())), 2);\n\t\t\t\tVector directon = particles.get(i).getPosition().direction(particles.get(x).getPosition());\n\t\t\t\t\n\t\t\t\tforce = force.add(directon.multiply(gForce));\n\t\t\t}\n\t\t\t\n\t\t\tparticles.get(i).setAcceleration(force.divide(particles.get(i).getMass()));\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < this.particles.size(); i++)\n\t\t{\n\t\t\tparticles.get(i).update(timebase);\n\t\t}\n\t\t\n\t\telapsedTime += timebase;\n\t}", "protected void setForceNormalVector() {\n\t\tvn = forceNormalVector(v1, v2);\n\t}", "public static void main(String[] args) {\n Double T = Double.valueOf(args[0]);\n Double dt = Double.valueOf(args[1]);\n String fileName = args[2];\n double radius = NBody.readRadius(fileName);\n Body[] Bodies = NBody.readBodies(fileName);\n\n StdDraw.setScale(-radius, radius);\n StdDraw.clear();\n String background = \"images/starfield.jpg\";\n StdDraw.picture(0, 0, background);\n\n for (Body b : Bodies) {\n b.draw();\n }\n\n double time = 0;\n while (time < T) {\n double[] xForces = new double[Bodies.length];\n double[] yForces = new double[Bodies.length];\n for (int i = 0; i < xForces.length; ++i) {\n xForces[i] = Bodies[i].calcNetForceExertedByX(Bodies);\n yForces[i] = Bodies[i].calcNetForceExertedByY(Bodies);\n }\n for (int i = 0; i < xForces.length; ++i) {\n Bodies[i].update(dt, xForces[i], yForces[i]);\n }\n StdDraw.picture(0, 0, background);\n\n for (Body b : Bodies) {\n b.draw();\n }\n\n StdDraw.show();\n StdDraw.pause(10);\n time += dt;\n }\n StdDraw.show();\n }", "public void optimize(MathForLoopExpressionSymbol mathExpressionSymbol, List<MathExpressionSymbol> precedingExpressions) {\n for (MathExpressionSymbol subExp : mathExpressionSymbol.getForLoopBody()) {\n optimize(subExp, precedingExpressions);\n }\n }", "public synchronized void runPostTurtles() {\n\t\trunEndogenousEngine();\n\t\tsolveConflicts();\n\t\tfirePostAgentScheduling();\n\t}", "void do_physics(CAR car, double delta_t) {\n// sn = Math.sin(car.angle);\n// cs = Math.cos(car.angle);\n//\n// velocity.x = cs * car.velocity_wc.y + sn * car.velocity_wc.x;\n// velocity.y = cs * car.velocity_wc.x - sn * car.velocity_wc.y;\n//\n// double yawSpeed = 0.5 * car.cartype.wheelbase * car.angularvelocity;\n//\n// double rotationAngle = 0;\n// double sideSlip = 0;\n// if (velocity.x != 0) {\n// //car is moving forwards\n// rotationAngle = Math.atan(yawSpeed / velocity.x);\n// }\n//\n// if (velocity.x != 0) {\n// sideSlip = Math.atan(velocity.y / velocity.x);\n// }\n//\n// if (velocity.x == 0) {\n// car.angularvelocity = 0;\n// }\n//\n//\n// double slipAngleFront = sideSlip + rotationAngle - car.steerangle;\n// double slipAngleRear = sideSlip - rotationAngle;\n//\n// // weight per axle = half car mass times 1G (=9.8m/s^2)\n// double weight = car.cartype.mass * 9.8 * 0.5;\n//\n// Vector2D frontWheelLateralForce = new Vector2D();\n// frontWheelLateralForce.setX(0);\n// frontWheelLateralForce.setY(normalise(-MAX_GRIP, MAX_GRIP, CA_F * slipAngleFront));\n// frontWheelLateralForce.setY(frontWheelLateralForce.getY() * weight);\n//\n// if (front_slip == 1) {\n// frontWheelLateralForce.setY(frontWheelLateralForce.getY() * 0.5d);\n// }\n//\n// Vector2D rearWheelLateralForce = new Vector2D();\n// rearWheelLateralForce.setX(0);\n// rearWheelLateralForce.setY(normalise(-MAX_GRIP, MAX_GRIP, CA_R * slipAngleRear));\n// rearWheelLateralForce.setY(rearWheelLateralForce.getY() * weight);\n//\n// if (rear_slip == 1) {\n// rearWheelLateralForce.setY(rearWheelLateralForce.getY() * 0.5d);\n// }\n//\n//\n// Vector2D tractionForce = new Vector2D();\n// tractionForce.setX(100 * (car.throttle - car.brake * SGN(velocity.x)));\n// tractionForce.setY(0);\n//\n// if (rear_slip == 1) {\n// tractionForce.setX(tractionForce.getX() * 0.5d);\n// }\n//\n// Vector2D resistance = new Vector2D();\n// double rollingResistanceX = -RESISTANCE * velocity.x;\n// double rollingResistanceY = -RESISTANCE * velocity.y;\n// double dragResistanceX = -DRAG * velocity.x * ABS(velocity.x);\n// double dragResistanceY = -DRAG * velocity.y * ABS(velocity.y);\n// resistance.setX(rollingResistanceX + dragResistanceX);\n// resistance.setY(rollingResistanceY + dragResistanceY);\n//\n// // sum forces\n// Vector2D totalForce = new Vector2D();\n// double frontWheelLateralX = Math.sin(car.steerangle) * frontWheelLateralForce.getX();\n// double rearWheelLateralX = rearWheelLateralForce.getX();\n// double frontWheelLateralY = Math.cos(car.steerangle) * frontWheelLateralForce.getY();\n// double rearWheelLateralY = rearWheelLateralForce.getY();\n//\n// totalForce.setX(tractionForce.getX() + frontWheelLateralX + rearWheelLateralX + resistance.getX());\n// totalForce.setY(tractionForce.getY() + frontWheelLateralY + rearWheelLateralY + resistance.getY());\n//\n//\n// double frontTorque = frontWheelLateralForce.getY() * car.cartype.b;\n// double rearTorque = rearWheelLateralForce.getY() * car.cartype.c;\n// double torque = frontTorque - rearTorque;\n//\n// Vector2D acceleration = new Vector2D();\n// acceleration.setX(totalForce.getX() / car.cartype.mass);\n// acceleration.setY(totalForce.getY() / car.cartype.mass);\n// // Newton F = m.a, therefore a = F/m\n// //TODO: add inertia to the vehicle\n// double angularAcceleration = torque / car.cartype.inertia;\n//\n// acceleration.setX(normalise(acceleration.getX(), 0.1d));\n// acceleration.setY(normalise(acceleration.getY(), 0.1d));\n//\n//\n// Vector2D worldReferenceAcceleration = new Vector2D();\n// worldReferenceAcceleration.setX(cs * acceleration.getY() + sn * acceleration.getX());\n// worldReferenceAcceleration.setY(-sn * acceleration.getY() + cs * acceleration.getX());\n//\n// // velocity is integrated acceleration\n// Vector2D worldReferenceVelocity = new Vector2D();\n// worldReferenceVelocity.setX(car.velocity_wc.x + (delta_t * worldReferenceAcceleration.getX()));\n// worldReferenceVelocity.setY(car.velocity_wc.y + (delta_t * worldReferenceAcceleration.getY()));\n//\n// // position is integrated velocity\n// Vector2D newPosition = new Vector2D();\n// newPosition.setX(delta_t * worldReferenceVelocity.getX() + car.position_wc.x);\n// newPosition.setY(delta_t * worldReferenceVelocity.getY() + car.position_wc.y);\n//\n//\n// car.velocity_wc.x = normalise(worldReferenceVelocity.getX(), 0.1d);\n// car.velocity_wc.y = normalise(worldReferenceVelocity.getY(), 0.1d);\n//\n// if (car.velocity_wc.x == 0 && car.velocity_wc.y == 0) {\n// car.angularvelocity = 0;\n// } else {\n// car.angularvelocity += delta_t * angularAcceleration;\n// }\n//\n// car.angle += delta_t * car.angularvelocity;\n// car.position_wc.x = newPosition.getX();\n// car.position_wc.y = newPosition.getY();\n//\n// /**\n\n sn = Math.sin(car.angle);\n cs = Math.cos(car.angle);\n\n // SAE convention: x is to the front of the car, y is to the right, z is down\n // transform velocity in world reference frame to velocity in car reference frame\n velocity.x = cs * car.velocity_wc.y + sn * car.velocity_wc.x;\n velocity.y = -sn * car.velocity_wc.y + cs * car.velocity_wc.x;\n\n // Lateral force on wheels\n //\n // Resulting velocity of the wheels as result of the yaw rate of the car body\n // v = yawrate * r where r is distance of wheel to CG (approx. half wheel base)\n // yawrate (ang.velocity) must be in rad/s\n //\n yawspeed = car.cartype.wheelbase * 0.5 * car.angularvelocity;\n\n if (velocity.x == 0) // TODO: fix Math.singularity\n rot_angle = 0;\n else\n rot_angle = Math.atan(yawspeed / velocity.x);\n // Calculate the side slip angle of the car (a.k.a. beta)\n if (velocity.x == 0) // TODO: fix Math.singularity\n sideslip = 0;\n else\n sideslip = Math.atan(velocity.y / velocity.x);\n\n // Calculate slip angles for front and rear wheels (a.k.a. alpha)\n slipanglefront = sideslip + rot_angle - car.steerangle;\n slipanglerear = sideslip - rot_angle;\n\n // weight per axle = half car mass times 1G (=9.8m/s^2)\n weight = car.cartype.mass * 9.8 * 0.5;\n\n // lateral force on front wheels = (Ca * slip angle) capped to friction circle * load\n flatf.x = 0;\n flatf.y = CA_F * slipanglefront;\n flatf.y = Math.min(MAX_GRIP, flatf.y);\n flatf.y = Math.max(-MAX_GRIP, flatf.y);\n flatf.y *= weight;\n if (front_slip == 1)\n flatf.y *= 0.5;\n\n // lateral force on rear wheels\n flatr.x = 0;\n flatr.y = CA_R * slipanglerear;\n flatr.y = Math.min(MAX_GRIP, flatr.y);\n flatr.y = Math.max(-MAX_GRIP, flatr.y);\n flatr.y *= weight;\n if (rear_slip == 1)\n flatr.y *= 0.5;\n\n // longtitudinal force on rear wheels - very simple traction model\n ftraction.x = 100 * (car.throttle - car.brake * SGN(velocity.x));\n ftraction.y = 0;\n if (rear_slip == 1)\n ftraction.x *= 0.5;\n\n // Forces and torque on body\n\n // drag and rolling resistance\n resistance.x = -(RESISTANCE * velocity.x + DRAG * velocity.x * ABS(velocity.x));\n resistance.y = -(RESISTANCE * velocity.y + DRAG * velocity.y * ABS(velocity.y));\n\n // sum forces\n force.x = ftraction.x + Math.sin(car.steerangle) * flatf.x + flatr.x + resistance.x;\n force.y = ftraction.y + Math.cos(car.steerangle) * flatf.y + flatr.y + resistance.y;\n\n // torque on body from lateral forces\n torque = car.cartype.b * flatf.y - car.cartype.c * flatr.y;\n\n // Acceleration\n\n // Newton F = m.a, therefore a = F/m\n acceleration.x = force.x / car.cartype.mass;\n acceleration.y = force.y / car.cartype.mass;\n angular_acceleration = torque / car.cartype.inertia;\n\n // Velocity and position\n\n // transform acceleration from car reference frame to world reference frame\n acceleration_wc.x = cs * acceleration.y + sn * acceleration.x;\n acceleration_wc.y = -sn * acceleration.y + cs * acceleration.x;\n\n // velocity is integrated acceleration\n //\n car.velocity_wc.x += delta_t * acceleration_wc.x;\n car.velocity_wc.y += delta_t * acceleration_wc.y;\n\n // position is integrated velocity\n //\n car.position_wc.x += delta_t * car.velocity_wc.x;\n car.position_wc.y += delta_t * car.velocity_wc.y;\n\n\n // Angular velocity and heading\n\n // integrate angular acceleration to get angular velocity\n //\n car.angularvelocity += delta_t * angular_acceleration;\n\n // integrate angular velocity to get angular orientation\n //\n car.angle += delta_t * car.angularvelocity;\n\n }", "public void transform() {\n\t\tthis.targetRootBlock = copy(this.sourceRootBlock);\n\n\t\tList<BlockImpl> blocks = allSubobjectsOfKind(targetRootBlock,\n\t\t\t\tBlockImpl.class);\n\t\tList<Block> emptyBlocks = new LinkedList<Block>();\n\t\tfor (Block block : blocks) {\n\t\t\tif (block.getModelElement().size() == 0) {\n\t\t\t\temptyBlocks.add(block);\n\t\t\t}\n\t\t}\n\n\t\tfor (Block block : emptyBlocks) {\n\t\t\tcreateSquare(block);\n\t\t\tEcoreUtil.delete(block);\n\t\t}\n\n\t\tif (LOGGER.isInfoEnabled()) {\n\t\t\tLOGGER.info(\"Completed Transformation\");\n\t\t}\n\t}", "public void updatePhysics() {\n ball.setLayoutX(ball.getLayoutX() + velX);\n ball.setLayoutY(ball.getLayoutY() - velY);\n\n velY += accelY;\n velX += accelX;\n }", "private static double calculateForce(double mass1, double mass2, double g, double distance) {\n if (distance > 0)\n return ((mass1 * mass2) * g) / (distance * distance);\n else\n return 0.0;\n }", "public void createBody(){\n this.fuelMass = this.initFuelMass;\n BodyDef def = new BodyDef();\n def.position.set(initPosition);\n def.type = BodyDef.BodyType.DynamicBody;\n body = world.createBody(def);\n\n PolygonShape box = new PolygonShape();\n box.setAsBox(lunarModuleWidth / 2, lunarModuleHeight / 2);\n fixture = body.createFixture(box, (lunarModuleMass + fuelMass) / (lunarModuleHeight * lunarModuleWidth));\n box.dispose();\n\n fixture.setUserData(\"lunar module\");\n fixture.setFriction(0.4f);\n massData = body.getMassData();\n setSize(lunarModuleWidth, lunarModuleHeight);\n\n this.alive = true;\n this.activateEngine = false;\n this.activateAuxiliaryEnginesLeft = false;\n this.activateAuxiliaryEnginesRight = false;\n }", "public static void advanceBody( double t ) {\r\n\r\n for ( int i=0; i<=2; i++ ) {\r\n body.advanced[i].x = body.currentState.x + body.currentState.vx * (double)i * t / 2.0;\r\n body.advanced[i].y = body.currentState.y + body.currentState.vy * (double)i * t / 2.0;\r\n body.advanced[i].z = body.currentState.z + body.currentState.vz * (double)i * t / 2.0;\r\n }\r\n\r\n }", "public void removeLostBodies(){\n for(int i = physics.rigidBodies.size() - 1; i >= 0; i--){\n BObject body = physics.rigidBodies.get(i);\n Vector3f pos = body.getPosition();\n \n if(pos.z < -1000){\n int idx = group_bulletbodies.getChildIndex(body.displayShape);\n if(idx >= 0){\n group_bulletbodies.removeChild(idx);\n }\n physics.removeBody(body);\n }\n }\n }", "public static void moveRK4( Dynamics a, Body[] b, int nbodies, StateVector[] state, double dt ) {\r\n int m, n;\r\n\r\n ap = a;\r\n\r\n // don't perform calculations using dt = 0. 19 aug 2016\r\n if ( dt != 0 ) {\r\n\r\n // find straight-line-advanced body locations\r\n for (n = 1; n < nbodies; n++) {\r\n if ( b[n].status == 3 ) {\r\n// System.out.println( nbodies + \"b num \" + b[n].num );\r\n body = b[n];\r\n// System.out.println( \"body num \" + body.num );\r\n// System.out.println( body.currentState.x );\r\n advanceBody( dt );\r\n }\r\n }\r\n\r\n // perform RK4 calculations on current state\r\n for (n = 1; n < nbodies; n++) {\r\n body = b[n];\r\n // here for RK4 acceleration\r\n if ( b[n].status == 3 && b[n].activated ) {\r\n state[n].copyStateVectors( b[n].currentState );\r\n state[n] = integrate( state[n], dt );\r\n }\r\n }\r\n\r\n // update positions and speeds\r\n for (n = 0; n < nbodies; n++) {\r\n body = b[n];\r\n if ( b[n].status >= 2 && b[n].activated && b[n].inFreeMotion ) {\r\n setVectors( b[n], state[n] ); // RK4\r\n }\r\n }\r\n\r\n }\r\n }", "private double getAngleDisplacement(SkeletonNode root, int f) {\r\n\r\n\t\t/**------------------------------------------------------**/\r\n\t\tdouble ang = 0;\r\n\t\tint ang_counter = 0;\r\n\t\t/**------------------------------------------------------**/\r\n\t\t/**||||||||||||||||||||||||||||||||||||||||||||||||||||||**/\r\n\t\t/**------------------------------------------------------**/\r\n\t\tSkeletonNode parent =\troot.getParent();\r\n\t\tif(parent==null) return ang;\r\n\t\tString root_name = \t\troot.getName();\r\n\t\t/**------------------------------------------------------**/\r\n\t\t/**||||||||||||||||||||||||||||||||||||||||||||||||||||||**/\r\n\t\t/**------------------------------------------------------**/\r\n\t\tint group_size = ControlVariables.third_level_ang_filter_size;\r\n\t\tint group_size_half = (group_size/2)+(group_size % 2);\r\n\t\tint total_filter_size_i = (group_size_half*2) +\r\n\t\t\t\t(Math.min(f-group_size_half, 0)) +\r\n\t\t\t\t(Math.min(skeletonNodes.length - (f+group_size_half+1), 0));\r\n\t\t/**------------------------------------------------------**/\r\n\t\t/**||||||||||||||||||||||||||||||||||||||||||||||||||||||**/\r\n\t\t/**------------------------------------------------------**/\r\n\t\tfor(int j = f-group_size_half; j < f; j++) {\r\n\t\t\tif(j < 0) continue;\r\n\t\t\telse {\r\n\r\n\t\t\t\tSkeletonNode root_j_1 = skeletonWrappers[j+1].getFromHash(root_name);\r\n\t\t\t\tSkeletonNode parent_j_1 = root_j_1.getParent();\r\n\r\n\t\t\t\tSkeletonNode root_j = skeletonWrappers[j].getFromHash(root_name);\r\n\t\t\t\tSkeletonNode parent_j = root_j.getParent();\r\n\r\n\r\n\t\t\t\tdouble [] r_j = root_j.getPoint();\r\n\t\t\t\tdouble [] p_j = parent_j.getPoint();\r\n\r\n\t\t\t\tdouble [] r_j_1 = root_j_1.getPoint();\r\n\t\t\t\tdouble [] p_j_1 = parent_j_1.getPoint();\r\n\r\n\t\t\t\tdouble [] par_diff = VectorTools.sub(p_j, p_j_1);\r\n\t\t\t\tr_j_1 = VectorTools.add(par_diff, r_j_1);\r\n\r\n\t\t\t\tang += VectorTools.ang(r_j_1, p_j, r_j);\r\n\t\t\t\tang_counter++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t/**------------------------------------------------------**/\r\n\t\t/**||||||||||||||||||||||||||||||||||||||||||||||||||||||**/\r\n\t\t/**------------------------------------------------------**/\r\n\t\tfor(int j = f; j < f+group_size_half; j++) {\r\n\t\t\tif((j+1) >= skeletonWrappers.length) continue;\r\n\t\t\telse {\r\n\r\n\t\t\t\tSkeletonNode root_j_1 = skeletonWrappers[j+1].getFromHash(root_name);\r\n\t\t\t\tSkeletonNode parent_j_1 = root_j_1.getParent();\r\n\r\n\t\t\t\tSkeletonNode root_j = skeletonWrappers[j].getFromHash(root_name);\r\n\t\t\t\tSkeletonNode parent_j = root_j.getParent();\r\n\r\n\r\n\t\t\t\tdouble [] r_j = root_j.getPoint();\r\n\t\t\t\tdouble [] p_j = parent_j.getPoint();\r\n\r\n\t\t\t\tdouble [] r_j_1 = root_j_1.getPoint();\r\n\t\t\t\tdouble [] p_j_1 = parent_j_1.getPoint();\r\n\r\n\t\t\t\tdouble [] par_diff = VectorTools.sub(p_j, p_j_1);\r\n\t\t\t\tr_j_1 = VectorTools.add(par_diff, r_j_1);\r\n\r\n\t\t\t\tang += VectorTools.ang(r_j_1, p_j, r_j);\r\n\t\t\t\tang_counter++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t/**------------------------------------------------------**/\r\n\t\t/**||||||||||||||||||||||||||||||||||||||||||||||||||||||**/\r\n\t\t/**------------------------------------------------------**/\r\n\t\tif(total_filter_size_i != ang_counter) {\r\n\t\t\tSystem.out.println(total_filter_size_i);\r\n\t\t\tSystem.out.println(ang_counter);\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\treturn((1.0)/(ang_counter+0.0))*ang;\r\n\t\t/**------------------------------------------------------**/\r\n\t}", "public void rebuild() {\n\t\tif (!divided) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint totalChildren = 0;\n\t\tfor (QuadTreeNode<E> q : nodes) {\n\t\t\t// If there is a divided child then we cant do anything\n\t\t\tif (q.isDivided()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\ttotalChildren += q.numPoints();\n\t\t}\n\t\t\n\t\t// If the sum of all the children contained in the sub nodes\n\t\t// is greater than allowed then we cant do anything\n\t\tif (totalChildren > QUADTREE_NODE_CAPACITY) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Add all the nodes from the children to this node then remvoe the nodes\n\t\tpoints = new HashMap<Point, E>();\n\t\tfor (QuadTreeNode<E> q : nodes) {\n\t\t\tpoints.putAll(q.points);\n\t\t}\n\t\t\n\t\tnodes.clear();\n\t\tdivided = false;\n\t}", "public void tick() {\n\t\tfor (Entity e : entities) {\n\t\t\te.tick();\n\t\t}\n\t}", "@Override\n public void simStepUpdate(long stepMillis) {\n if(!isStationary) {\n // Calculate gravity force\n this.forces = this.forces.add(new Vector(0, -9.81).times(mass_newtons));\n // Add forces to velocities\n this.velocities = this.velocities.add(this.forces.times(mass_newtons * (stepMillis/1000F)));\n // Times 0.9 to add for some overall drag\n this.velocities = this.velocities.times(0.9);\n // Now add velocities to position vector to get new position of body\n this.sim_pos = this.sim_pos.add(velocities.times((stepMillis/1000F)));\n // Check if the node is touching the floor\n if (isOnGround()) {\n this.sim_pos.setY(2);\n // Drag the feet on the ground by * 0.2\n this.velocities.setX(this.velocities.getX() * 0.2);\n if (this.velocities.getY() < 0) {\n // Bouncing detected, retain some negative Y velocity\n this.velocities.setY(this.velocities.getY() * -0.2);\n }\n }\n // Reset force vector for next step cycle\n this.forces = new Vector(0, 0);\n }\n this.updateSimCoords(this.sim_pos);\n }" ]
[ "0.6143235", "0.61040634", "0.5714923", "0.5679014", "0.56080806", "0.5191432", "0.51710516", "0.513424", "0.5082504", "0.50149393", "0.50146985", "0.50047433", "0.4982171", "0.49597594", "0.49227324", "0.48888564", "0.48779795", "0.48753884", "0.48638526", "0.48276627", "0.48177242", "0.48043856", "0.47858745", "0.4769073", "0.47480416", "0.4701597", "0.46688414", "0.4654404", "0.46440303", "0.46376726", "0.46356755", "0.4617371", "0.4610389", "0.45862526", "0.45808107", "0.45759398", "0.45659497", "0.45650002", "0.4544802", "0.45414707", "0.45352218", "0.45352218", "0.45352218", "0.45286977", "0.45284188", "0.45219925", "0.44789356", "0.4469035", "0.44602314", "0.44526106", "0.4450078", "0.44422913", "0.44419128", "0.44395265", "0.4438061", "0.4429159", "0.44159058", "0.44147182", "0.44072735", "0.44006532", "0.43800887", "0.43752977", "0.4365222", "0.43573746", "0.43563208", "0.4342526", "0.43378764", "0.43244722", "0.43217134", "0.43199137", "0.4304348", "0.43040973", "0.42739326", "0.42719722", "0.4266296", "0.4263056", "0.42532462", "0.425148", "0.42499977", "0.42483035", "0.42435786", "0.4242145", "0.424037", "0.42356634", "0.42280608", "0.42247018", "0.42225152", "0.42208463", "0.42164713", "0.42148954", "0.4211985", "0.42035168", "0.419985", "0.41973206", "0.41922078", "0.4190571", "0.41790035", "0.41734594", "0.4168149", "0.41626948" ]
0.759303
0
generates an iterator for the tree to iterate over the tree, a stack is used which stores all of the bodies of the tree
@Override public OctreeIterator iterator() { Stack<CelestialBody> stack = new Stack<>(); stack = this.root.iterate(stack); OctreeIterator iterator = new OctreeIterator(stack); return iterator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract TreeIter<T> iterator();", "@Override\n\tpublic Iterator<StackType> iterator();", "@Override\n public Iterator<T> iterator() {\n return new IteratorTree(this.root, this.modCount);\n }", "public interface TreeIterable<T> extends Iterable<T>{\n TreeIterator<T> iterator();\n}", "@Override\n\tpublic Iterator<Item> iterator() {\n\t\treturn new StackIter();\n\t}", "@Override\r\n public Iterator<NamedTreeNode<T>> iterator()\r\n {\r\n return new Iterator<NamedTreeNode<T>>()\r\n {\r\n NamedTreeNode<T> n = (NamedTreeNode<T>)getLeftNode();\r\n @Override\r\n public boolean hasNext()\r\n {\r\n return n != null;\r\n }\r\n @Override\r\n public NamedTreeNode<T> next()\r\n {\r\n if( n == null ) {\r\n throw new NoSuchElementException();\r\n }\r\n NamedTreeNode<T> r = n;\r\n n = (NamedTreeNode<T>)n.getRightNode();\r\n return r;\r\n }\r\n @Override\r\n public void remove()\r\n {\r\n throw new UnsupportedOperationException();\r\n }\r\n };\r\n }", "@Override\n\tpublic Iterator<Item> iterator() {\n\t\treturn new StackIterator();\n\t}", "@Override\r\n\tpublic Iterator<T> iteratorLevelOrder() {\r\n\t\tLinkedList<T> list = new LinkedList<T>();\r\n\t\tQueue<BSTNode<T>> work = new ArrayDeque<BSTNode<T>>();\r\n\t\twork.add(this.root);//start at the root\r\n\r\n\t\twhile(!work.isEmpty()) {\r\n\t\t\tBSTNode<T> node = work.remove();//pop the first\r\n\t\t\tlist.add(node.data);\r\n\t\t\t\r\n\t\t\tif(node.left!= null) {\r\n\t\t\t\twork.add(node.left);\r\n\t\t\t}\r\n\t\t\tif(node.right!= null) {\r\n\t\t\t\twork.add(node.right);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn list.iterator();\r\n\t}", "public Iterator <T> iterator (){\n\t\t// create and return an instance of the inner class IteratorImpl\n\t\t\t\treturn new HashAVLTreeIterator();\n\t}", "public Iterator<E> iterator()\n {\n return stack.iterator();\n }", "public Iterator<Object> iterator()\r\n {\r\n return new MyTreeSetIterator(root);\r\n }", "public Iterator<TreeNode> iterator() {\n\t\ttraverse();\n\t\treturn traverseVector.iterator();\n\t}", "public Iterator<T> byGenerations() {\r\n ArrayIterator<T> iter = new ArrayIterator<T>();\r\n\r\n for (int i = 0; i < SIZE; i++) {\r\n iter.add(tree[i]);\r\n }\r\n\r\n return iter;\r\n }", "public ASTNodeIterator iterator()\n {\n ASTNodeIterator I = new ASTNodeIterator(1);\n I.children[0] = expression;\n return I;\n }", "@Override\n public Iterator<Position> iterator() {\n \t\n \t//create the child-position on calling the iterator\n \tcreateChildren();\n \t\n return new Iterator<Position> () {\n private final Iterator<Position> iter = children.iterator();\n\n @Override\n public boolean hasNext() {\n return iter.hasNext();\n }\n\n @Override\n public Position next() {\n return iter.next();\n }\n\n @Override\n public void remove() {\n throw new UnsupportedOperationException(\"no changes allowed\");\n }\n };\n }", "public ASTNodeIterator iterator() {\n ASTNodeIterator I = new ASTNodeIterator(1);\n I.children[0] = name;\n return I;\n }", "public InOrderIterator(NestedQuest tree) {\n queue.add(tree);\n }", "@Override\n\tpublic Iterator<E> iterator() {\n\n\t\tNode tempRoot = root;\n\t\tinOrder(tempRoot);\n\t\treturn null;\n\t}", "@Override\n public Iterator<E> iterator() {\n return new AVLTreeIterator();\n }", "public Iterator<PartialTree> iterator() {\r\n \treturn new PartialTreeListIterator(this);\r\n }", "@Override\r\n\tpublic Iterator<T> iteratorPostOrder() {\r\n\t\tLinkedList<T> list = new LinkedList<T>();\r\n\t\tthis.traversePostOrder(this.root, list);\r\n\t\treturn list.iterator();\r\n\t}", "@Override\n public Iterator<Node> iterator() {\n return this;\n }", "public static void main(String[] args) {\n\t\t\n\t\tNode root = new Node(4);\n\t\troot.left = new Node(2);\n\t\troot.right = new Node(6);\n\t\troot.left.left = new Node(1);\n\t\troot.left.right = new Node(3);\n\t\troot.right.left = new Node(5);\n\t\troot.right.right = new Node(7);\n\t\t\n\t\tTreeIterator iterator = new TreeIterator(root);\t\t\n\t\t\t\n\t\tSystem.out.println(iterator.next());\n\t\tSystem.out.println(iterator.next());\n\t\tSystem.out.println(iterator.hasNext());\n\t}", "public synchronized Iterator<E> iteratorLevel()\n {\n if (isEmpty())\n return new CNullIterator<E>();\n\n return new NodeIteratorLevel<E>(this, this.m_RootNode);\n }", "@Override\n protected void iterChildren(TreeFunction f) {\n }", "@Override\n protected void iterChildren(TreeFunction f) {\n }", "@Override\n protected void iterChildren(TreeFunction f) {\n }", "public Iterator<ElementType> iterator(){\n return new InnerIterator();\n }", "public TreeIterator<?> treeIterator(Object object)\n {\n return new DomainTreeIterator<Object>(this, object);\n }", "protected TreeIterator(Tree<T> tree) {\n\t\t\tsuper();\n\t\t\tthis.tree = tree;\n\t\t\tcursor = null;\n\t\t}", "public InorderIterator() {\r\n\t\t\tinorder(); // Traverse binary tree and store elements in list\r\n\t\t}", "public void iterate() {\n\t\t// iterator\n\t\tQueue<NDLMapEntryNode<T>> nodes = new LinkedList<NDLMapEntryNode<T>>();\n\t\tnodes.add(rootNode);\n\t\twhile(!nodes.isEmpty()) {\n\t\t\t// iterate BFSwise\n\t\t\tNDLMapEntryNode<T> node = nodes.poll();\n\t\t\tif(node.end) {\n\t\t\t\t// end of entry, call processor\n\t\t\t\tif(keyProcessor != null) {\n\t\t\t\t\tkeyProcessor.process(node.data);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(node.keys != null) {\n\t\t\t\t// if available\n\t\t\t\tnodes.addAll(node.keys.values()); // next nodes to traverse\n\t\t\t}\n\t\t}\n\t}", "public interface Tree<E> extends Iterable<E>\r\n{\r\n //accessor methods\r\n /**\r\n * Returns the Position of the root of the tree.\r\n * @return the Position of the root of the tree\r\n */\r\n Position<E> root();\r\n \r\n /**\r\n * Returns the Position of the parent of given Position.\r\n * @param p Position to check\r\n * @return the Position of the parent of given Position (or null if p is the root). \r\n * @throws IllegalArgumentException if Position isn't valid\r\n */\r\n Position<E> parent(Position<E> p) throws IllegalArgumentException;\r\n \r\n /**\r\n * Returns the number of children of given Position.\r\n * @param p Position to check\r\n * @return the number of children of given Position\r\n * @throws IllegalArgumentException if Position isn't valid\r\n */\r\n int numChildren(Position<E> p) throws IllegalArgumentException;\r\n\r\n /**\r\n * Returns the number of positions (and therefore elements) that are contained in tree.\r\n * @return the number of positions (and therefore elements) that are contained in tree\r\n */\r\n int size();\r\n \r\n \r\n //query methods\r\n /**\r\n * Tests whether given Position has at least one child.\r\n * @param p Position to check\r\n * @return true if given Position has at least one child, false otherwise\r\n * @throws IllegalArgumentException if Position isn't valid \r\n */\r\n boolean isInternal(Position<E> p) throws IllegalArgumentException;\r\n \r\n /**\r\n * Tests whether given Position has any children.\r\n * @param p Position to check\r\n * @return true if given Position does not have children, false otherwise\r\n * @throws IllegalArgumentException if Position isn't valid \r\n */\r\n boolean isExternal(Position<E> p) throws IllegalArgumentException;\r\n \r\n /**\r\n * Tests whether given Position is the root of the tree.\r\n * @param p Position to check\r\n * @return true if given Position is the root, false otherwise\r\n * @throws IllegalArgumentException if Position isn't valid \r\n */\r\n boolean isRoot(Position<E> p) throws IllegalArgumentException;\r\n \r\n /**\r\n * Tests whether tree contains any Positions (and therefore elements).\r\n * @return true if tree doesn't contain any Positions, false otherwise\r\n */\r\n boolean isEmpty();\r\n \r\n \r\n \r\n //additional methods\r\n /**\r\n * Returns an iterable Collection containing the children of given Position.\r\n * @param p Position to check\r\n * @return an iterable Collection containing the children of given Position\r\n * @throws IllegalArgumentException if Position isn't valid\r\n */\r\n Iterable<Position<E>> children(Position<E> p) throws IllegalArgumentException;\r\n \r\n /**\r\n * Returns an iterable Collection of all Positions of the tree.\r\n * @return an iterable Collection of all Positions of the tree.\r\n */\r\n Iterable<Position<E>> positions(); \r\n \r\n /**\r\n * Returns an iterator for all elements in the tree.\r\n * Ensures tree itself is iterable.\r\n * @return an iterator for all elements in the tree\r\n */\r\n @Override\r\n Iterator<E> iterator(); \r\n}", "public void inOrderTraverseIterative();", "public Iterable<Key> iterator() {\n Queue<Key> queue = new LinkedList<>();\n inorder(root, queue);\n return queue;\n }", "public InorderIterator() {\n inorder(); // Traverse binary tree and store elements in list\n }", "public final FxNodeCursor iterateChildren() {\n FxNode n = currentNode();\n if (n == null) throw new IllegalStateException(\"No current node\");\n if (n.isArray()) { // false since we have already returned START_ARRAY\n return new FxArrayCursor((FxArrayNode) n, this);\n }\n if (n.isObject()) {\n return new FxObjectCursor((FxObjNode) n, this);\n }\n throw new IllegalStateException(\"Current node of type \"+n.getClass().getName());\n }", "protected abstract void traverse();", "void getInorderIteratively(Node node) {\n Stack<Node> stack = new Stack<Tree.Node>();\n if (node == null)\n return;\n Node current = node;\n while (!stack.isEmpty() || current != null) {\n // While the sub tree is not empty keep on adding them\n while (current != null) {\n stack.push(current);\n current = current.left;\n }\n // No more left sub tree\n Node temp = stack.pop();\n System.out.println(temp.data);\n // We now have to move to the right sub tree of the just popped out node\n current = temp.right;\n }\n\n }", "public Iterator<T> iterator()\n\t{\n\t\treturn new Iterator<T>()\n\t\t{\n\t\t\tNode<T> actual = head;\n\n\t\t\t@Override\n\t\t\tpublic boolean hasNext()\n\t\t\t{\n\t\t\t\treturn actual != null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic T next() \n\t\t\t{\n\t\t\t\tif(hasNext())\n\t\t\t\t{\n\t\t\t\t\tT data = actual.getElement();\n\t\t\t\t\tactual = actual.getNext();\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\t\t};\n\t}", "@Test\n public void whenAddTwoNodesOnDifferentLevelsThenNextFromBottomLevel() {\n tree.addChild(nodeOne, \"1\");\n nodeOne.addChild(nodeTwo, \"2\");\n Iterator iter = tree.iterator();\n assertThat(iter.next(), is(\"2\"));\n }", "public static void main(String[] args)\n throws Exception\n {\n PrintWriter pen = new PrintWriter(System.out, true);\n BST<String, String> dict =\n new BST<String, String>((left, right) -> left.compareTo(right));\n\n String[] values =\n new String[] { \"gorilla\", \"dingo\", \"chimp\", \"emu\", \"elephant\", \"beta\",\n \"aardvark\", \"chinchilla\", \"yeti\", \"gibbon\", \"horse\",\n \"elephant\", \"duck\", \"emu\" };\n String[] moreValues =\n new String[] { \"gnu\", \"dingo\", \"flying squirrel\", \"iguana\", \"squirrel\",\n \"red squirrel\", \"moose\" };\n\n // Add each element and make sure that it's there.\n for (String value : values)\n {\n addString(pen, dict, value);\n } // for\n\n // A quick printout for fun\n pen.println(\"After setting the first set of values\");\n iterate(pen, dict.iterator());\n\n // Another quick printout for fun\n for (String value : values)\n {\n addString(pen, dict, value);\n } // for\n pen.println(\"After setting the second set of values\");\n iterate(pen, dict.iterator());\n\n // Build iterators that traverse in different ways\n Iterable<String> df_pre_lr =\n dict.values(Traversal.DEPTH_FIRST_PREORDER_LEFT_TO_RIGHT);\n Iterable<String> df_in_lr =\n dict.values(Traversal.DEPTH_FIRST_INORDER_LEFT_TO_RIGHT);\n Iterable<String> df_in_rl =\n dict.values(Traversal.DEPTH_FIRST_INORDER_RIGHT_TO_LEFT);\n Iterable<String> bf_pre_rl =\n dict.values(Traversal.BREADTH_FIRST_PREORDER_RIGHT_TO_LEFT);\n\n // Iterate!\n pen.println(\"Iterating depth-first, preorder, left-to-right\");\n pen.print(\" \");\n iterate(pen, df_pre_lr);\n \n pen.println(\"Iterating depth-first, inorder, left-to-right\");\n pen.print(\" \");\n iterate(pen, df_in_lr);\n \n pen.println(\"Iterating depth-first, inorder, right-to-left\");\n pen.print(\" \");\n iterate(pen, df_in_rl);\n \n pen.println(\"Iterating breadth-first, preorder, right-to-left\");\n pen.print(\" \");\n iterate(pen, bf_pre_rl);\n\n // And we're done\n pen.close();\n }", "public DTMIterator asNodeIterator() {\n/* 231 */ return new RTFIterator(this.m_dtmRoot, this.m_DTMXRTreeFrag.getXPathContext().getDTMManager());\n/* */ }", "public interface TreeInterface extends SymmetricDigraphInterface {\r\n /** Return parent of a tree node.\r\n * @precondition nonNull(node)\r\n */\r\n public IRNode getParent(IRNode node);\r\n\r\n /** The location is a value used by an IRSequence\r\n * to locate an element. For IRArray, it is an integer.\r\n * @precondition nonNull(node)\r\n */\r\n public IRLocation getLocation(IRNode node);\r\n\r\n /** Return the root of a subtree.\r\n */\r\n public IRNode getRoot(IRNode subtree);\r\n\r\n /** Return an enumeration of nodes in the subtree\r\n * starting with leaves and working toward the node given.\r\n * A postorder traversal.\r\n */\r\n public Iteratable<IRNode> bottomUp(IRNode subtree);\r\n\r\n /** Return an enumeration of nodes in the subtree\r\n * starting with this node and working toward the leaves.\r\n * A preorder traversal.\r\n */\r\n public Iteratable<IRNode> topDown(IRNode subtree);\r\n}", "@FunctionalInterface\npublic interface TreeGenerator {\n /**\n * Constructs a new tree data structure.\n *\n * @param type\n * the required return type of the tree\n * @param depth\n * the maximum depth of any nodes of the tree\n * @return the newly created tree data structure\n */\n Node generate(Type type, int depth);\n}", "public Iterator<StringNode> iterator()\r\n\t{\r\n\t\treturn this.children.iterator();\r\n\t}", "@Override\n public Iterator<Node<E>> iterator() {\n return new ArrayList<Node<E>>(graphNodes.values()).iterator();\n }", "@Override\n public Iterator<E> getLevelOrderIterator() {\n return new LevelOrderIterator();\n }", "public ReadOnlyIterator<ContextNode> getContextNodes();", "public interface\n BBlockNodeIterator\n{\n\n /** next\n * Get the next node in this basic block.\n * By repetitively invoking \"next\", all nodes in the basic block\n * are traversed.\n **/\n public IR\n next();\n\n /** hasNext\n * @return true if there is next node remaining in the basic block.\n **/\n public boolean\n hasNext();\n\n//##62 public IR // Get the node that is an instance of Stmt\n//##62 nextStmt(); //##60\n\n//##62 public boolean\n//##62 hasNextStmt();\n\n /** getNextExecutableNode\n * Get the node that refer/set data or change control flow directly.\n * The iterator skips such non-executable nodes as\n * labelNode, blockNode, listNode, stmtNode,\n * ifNode, forNode, whileNode, untilNode, switchNode,\n * progNode, subpDefNode, labelDefNode, infNode, subpNode,\n * typeNode, labeledStmtNode with non-null Stmt body, nullNode\n * and get executable statement body or expression\n * under the skipped node.\n * If a labeled statement has null statement body,\n * it is not skipped.\n **/\n public HIR\n getNextExecutableNode();\n\n}", "public void inOrderTraversal(){\n System.out.println(\"inOrderTraversal\");\n\n Stack<Node> stack = new ArrayStack<Node>();\n\n for(Node node = root; node!= null; node=node.getLeft()){\n stack.push(node);\n }\n while(!stack.isEmpty()){\n Node node = stack.pop();\n System.out.print(node.getData() + \" \");\n\n for(node=node.getRight(); node!= null; node = node.getLeft()){\n stack.push(node);\n }\n }\n\n System.out.println();\n }", "@Override\n public Iterator<T> iterator() {\n return new UsedNodesIterator<>(this);\n }", "public List<T> wantedNodesIterative(Predicate<T> p) {\n //PART 4 \n if(root == null){\n return null;\n }\n LinkedList<TreeNode<T>> stack = new LinkedList<>();\n stack.add(root);\n \n List<T> wantedNodes =new LinkedList<>();\n TreeNode<T> current;\n \n while(!stack.isEmpty()){\n current = stack.pop();\n if(p.check(current.data)){\n wantedNodes.add(current.data);\n }\n if(current.right != null){\n stack.addFirst(current.right);\n }\n if(current.left != null){\n stack.addFirst(current.left);\n }\n }\n return wantedNodes;\n }", "@Override\n public JsonParser traverse(ObjectReadContext readCtxt) {\n return new TreeTraversingParser(this, readCtxt);\n }", "public Iterator<Node> getNodeIter() {\n\t\treturn nodes.iterator();\n\t}", "public Iteratable<IRNode> topDown(IRNode subtree);", "protected PublicTreeIterator(Tree<T> tree) {\n\t\t\tsuper();\n\t\t\tthis.tree = tree;\n\t\t\tcursor = null;\n\t\t}", "@Override\r\n\tpublic Iterator<T> iterator() {\n\t\treturn new Iterator<T>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic boolean hasNext() {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tnodo<T> sig = sentinel;\r\n\t\t\t\tsentinel = sentinel.getNext();\r\n\t\t\t\treturn (sentinel != null) ? true : false;\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic T next() {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\treturn sentinel.getValue();\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t}", "public void inOrderIterative(TreeNode root)\r\n\t{\r\n\t\tif(root == null)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tStack<TreeNode> stack = new Stack<>();\r\n\t\tTreeNode temp=root;\r\n\t\twhile(!stack.isEmpty() || temp!=null)\r\n\t\t{\r\n\t\t\tif(temp!=null)\r\n\t\t\t{\r\n\t\t\t\tstack.push(temp);\r\n\t\t\t\ttemp=temp.left;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttemp=stack.pop();\r\n\t\t\t\tSystem.out.print(temp.data+\" \");\r\n\t\t\t\ttemp=temp.right;\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t}", "@Override\n\tpublic Iterator<Statement> iterator() {\n\t\treturn iterator(null, null, null);\n\t}", "public static void main(String[] args){\n\t\tTreeNode node1 = new TreeNode(1);\n\t\tTreeNode node2 = new TreeNode(2);\n\t\tTreeNode node3 = new TreeNode(3);\n\t\tTreeNode node4 = new TreeNode(4);\n\t\tTreeNode node5 = new TreeNode(5);\n\t\tTreeNode node6 = new TreeNode(6);\n\t\tTreeNode node7 = new TreeNode(7);\n\t\tnode4.left = node2;\n\t\tnode4.right = node6;\n\t\tnode2.left = node1;\n\t\tnode2.right = node3;\n\t\tnode6.left = node5;\n\t\tnode6.right = node7;\n\t\t/*\n\t\t * 4\n\t\t * /\n\t\t * 5\n\t\t * \\\n\t\t * 6\n\t\t */\n\t\t/*node4.left = node5;\n\t\tnode5.right = node6;*/\n\t\t\n\t\ttreeTraversal2 tt = new treeTraversal2();\n\t\tSystem.out.print(\"Inorder Rcur: \");tt.inorderTraverse(node4);//1234567\n\t\tSystem.out.println();\t\t\n\t\tSystem.out.print(\"Inorder Iter: \");tt.stackInorder(node4);//1234567\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"Preorder Rcur: \");tt.preorderTraverse(node4);//4213657\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"Preorder Iter: \"); tt.stackPreorder(node4);//4213657\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"Postorder Rcur: \");tt.postorderTraverse(node4);//1325764\n\t\tSystem.out.println();\t\t \n\t\tSystem.out.print(\"Postorder Iter: \");tt.stackPostorder(node4);//1325764\n\t\t//System.out.println();\n\t\t//System.out.print(\"Postorder Iter: \");tt.twoStackPostorder(node4);//1325764\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"Level Iter: \");tt.levelTraverse(node4);//4261357\n\t}", "@Override\n\tpublic Iterator iterator() {\n\t\treturn new TrieIterator(this.root,\"\");\n\t}", "@Override\n public Iterator<Item> iterator() {\n class DequeIterator implements Iterator<Item> {\n private Node node = first;\n @Override\n public boolean hasNext() {\n return node != null;\n }\n\n @Override\n public Item next() {\n if (!hasNext()) {\n throw new NoSuchElementException();\n }\n Item item = node.item;\n node = node.next;\n return item;\n }\n\n @Override\n public void remove() {\n throw new UnsupportedOperationException();\n }\n\n }\n return new DequeIterator();\n }", "private static List<Integer> printTree(Tree tree, List values){\n int height = heightOfTree(tree);\n\n for(int i=1;i<=height;i++) {\n System.out.println(\"\");\n printTreeInLevel(tree, i, values);\n }\n return values;\n}", "public void tree()\n\t{\n\t\tIterable<Position<FileElement>> toPrint = fileSystem.PreOrder();\n\t\tfor (Position<FileElement> p : toPrint)\n\t\t{\n\t\t\tint depth = fileSystem.getDepth(p);\n\t\t\tfor (int i = 0; i < depth; i++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tSystem.out.println(p.getValue());\n\t\t}\n\t}", "public Iterator<T> inorderIterator() { return new InorderIterator(root); }", "public void inOrderTraverseRecursive();", "@Override\n\t\tpublic String next() {\n\t\t\tString ret=null;\n\t\t\twhile(!this.stack.isEmpty() && localRoot!=null){\n\t\t\t\n\t\t\t}\n\t\t\treturn null ;\n\t\t}", "public static void createTree(SuccessorGenerator generator, GameState initialState)\n {\n LinkedList<GameState> currentLevel = new LinkedList<GameState>();\n currentLevel.add(initialState);\n Player currentPlayer = Player.PLAYER_MAX;\n \n int level = 0;\n while(true)\n {\n LinkedList<GameState> nextLevel = new LinkedList<GameState>();\n \n /*Gerando todas as ações possíveis para o nível atual.*/\n for(GameState state : currentLevel)\n {\n generator.generateSuccessors(state, currentPlayer);\n \n for(int i = 0; i < state.getChildren().size(); i++)\n {\n GameState successorState = state.getChildren().get(i);\n nextLevel.add(successorState);\n }\n }\n System.out.println(\"Expandindo nível \"+(level++)+\" com \"+nextLevel.size()+\" estados.\");\n \n /*Alternando jogadores*/\n currentPlayer = (currentPlayer == Player.PLAYER_MAX)?\n Player.PLAYER_MIN:\n Player.PLAYER_MAX; \n \n /*Busca termina quando todos os estados foram explorados*/\n if(nextLevel.isEmpty()) break;\n \n currentLevel.clear();\n currentLevel.addAll(nextLevel);\n }\n \n }", "public static void lmd_parseTree(){\n\n e_stack.push(\"$\");\n e_stack.push(pc.first_rule);\n head_node=new node(pc.first_rule);\n\n // Evaluate\n // Building the tree as well\n\n node cur=head_node;\n\n for(int i=0;i<token_stream.length;i++){\n System.out.println(e_stack);\n if(!pc.isTerminal(e_stack.peek())){\n String rule_token =pc.parse_Table.get(e_stack.pop(),token_stream[i]).right;\n\n if(!rule_token.equals(\"empty\")) {\n String to_put[]=rule_token.split(\" \");\n for(int j=to_put.length-1;j>=0;j--)\n e_stack.push(to_put[j]);\n\n // add children\n for(int j=0;j<to_put.length;j++)\n addNode(cur,to_put[j]);\n // set cur\n cur=cur.next;\n }\n else {\n // if rule_token is empty\n addNode(cur,\"empty\");\n cur=cur.next.next; // as \"empty\" node will not have any children\n }\n i--;\n }\n else {\n // if(e_stack.peek().equals(token_stream[i]))\n e_stack.pop();\n if(cur.next!=null ) cur=cur.next;\n }\n }\n }", "public DNode<E> iterator()\n {\n \treturn first;\t\t\n }", "@Override\n\tpublic Iterator<E> iterator()\n\t{\n\t\treturn new Iterator<E>() {\n\t\t\tprivate Node<E> current = first;\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean hasNext()\n\t\t\t{\n\t\t\t\treturn current.next != null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic E next()\n\t\t\t{\n\t\t\t\tif (hasNext())\n\t\t\t\t{\n\t\t\t\t\tcurrent = current.next;\n\t\t\t\t\treturn current.value;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthrow new NoSuchElementException();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}", "public Iterator<T> preorderIterator() { return new PreorderIterator(root); }", "public static <T> void inorderIterative(TreeNode<T> root)\n {\n // create an empty stack\n Stack<TreeNode> stack = new Stack();\n\n // start from root node (set current node to root node)\n TreeNode curr = root;\n\n // if current node is null and stack is also empty, we're done\n while (!stack.empty() || curr != null)\n {\n // if current node is not null, push it to the stack (defer it)\n // and move to its left child\n if (curr != null)\n {\n stack.push(curr);\n curr = curr.left;\n }\n else\n {\n // else if current node is null, we pop an element from stack,\n // print it and finally set current node to its right child\n curr = stack.pop();\n System.out.print(curr.value + \" \");\n\n curr = curr.right;\n }\n }\n }", "public static void main(String[] args) {\n\t\tTreeNode root=new TreeNode(5);\n\t\troot.left=new TreeNode(3);\n\t\troot.left.left=new TreeNode(1);\n\t\troot.left.right=new TreeNode(4);\n\t\troot.right=new TreeNode(7);\n\t\troot.right.left=new TreeNode(6);\n\t\troot.right.right=new TreeNode(8);\n\t\tBSTIterator b=new BSTIterator(root);\n\t\twhile(b.hasNext()){\n\t\t\tSystem.out.println(b.next());\n\t\t}\n\t}", "public static void build ()\r\n {\r\n lgt.insert(1);\r\n lgt.insert(2);\r\n lgt.insert(5);\r\n \r\n lgt.findRoot();\r\n lgt.insert(3);\r\n \r\n lgt.findRoot();\r\n lgt.insert(4);\r\n \r\n lgt.insert(6);\r\n lgt.findParent();\r\n lgt.insert(7);\r\n \r\n }", "public QuadTreeIterator() {\n\t\t\telements = new TreeSet();\n\t\t\tanalyze(((RootNode)root).children[0]);\n\t\t\tanalyze(((RootNode)root).children[1]);\n\t\t\tanalyze(((RootNode)root).children[2]);\n\t\t\tanalyze(((RootNode)root).children[3]);\n\t\t}", "public List<Long> depthTraverse(){\n return depthTraverseGen(null);\n }", "public Iterator nodeIterator() { return nodes.keySet().iterator(); }", "public IAstTopLevelNode[] getTopLevelNodes();", "public Iterator<T> postorderIterator() { return new PostorderIterator(root); }", "public Iterator<ParseTreeNode> children() {\r\n if ((_children == null) || (_children.size() == 0)) {\r\n return NULL_ITERATOR;\r\n }\r\n return _children.iterator();\r\n }", "private Loop parseFor(Tokenizer in) {\n\t\tLoop loop = new Loop();\n\t\tToken expectParen = in.next();\n\t\tif (expectParen.type != Token.TokenType.OPEN_PARENTHESIS)\n\t\t\tthrow new SyntaxError(\"Expected ( got: '\"+expectParen+\"'\"+expectParen.generateLineChar());\n\t\tloop.initialize = parseExpr(in,OperatorLevel.lowest);\n\t\tToken expectSemi = in.next();\n\t\tif (expectSemi.type != Token.TokenType.SEMICOLON)\n\t\t\tthrow new SyntaxError(\"Expected ; got: '\"+expectSemi+\"'\"+expectSemi.generateLineChar());\n\t\tloop.condition = parseExpr(in,OperatorLevel.lowest);\n\t\texpectSemi = in.next();\n\t\tif (expectSemi.type != Token.TokenType.SEMICOLON)\n\t\t\tthrow new SyntaxError(\"Expected ; got: '\"+expectSemi+\"'\"+expectSemi.generateLineChar());\n\t\tloop.increment = parseParen(in);\n\t\tloop.body = parseStmt(in);\n\t\treturn loop;\n\t}", "@Test\n public void whenAddOneToEmptyTreeThenIteratorHasNext() {\n tree.add(1);\n\n Iterator<Integer> iterator = this.tree.iterator();\n\n assertThat(iterator.next(), is(1));\n }", "Iterator<CtElement> descendantIterator();", "public String inOrderTraverse(){\r\n\r\n\t\t//Stack that keeps track of where we go\r\n\t\tStack<BinarySearchTree> traverseStack = new Stack<BinarySearchTree>();\r\n\t\t\r\n\t\t//This is where we want to start\r\n\t\tBinarySearchTree curr = this;\r\n\t\t\r\n\t\t//When true, the string is returned\r\n\t\tBoolean done = false;\r\n\t\t\r\n\t\t//The string to return\r\n\t\tString treeAsString = \"\";\r\n\t\t\r\n\t\t//INORDER: LEFT > ROOT > RIGHT\r\n\r\n\t\twhile(!done){\r\n\t\t\tif(curr != null){\r\n\t\t\t\t\r\n\t\t\t\t//We need to get left first push it onto the stack\r\n\t\t\t\ttraverseStack.push(curr);\r\n\r\n\t\t\t\t//Getting the left first\r\n\t\t\t\tcurr = curr.getLeftChild();\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\r\n\t\t\t\t//curr is null. We checked left.\r\n\t\t\t\tif(!traverseStack.isEmpty()){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//pop the stack to get the item\r\n\t\t\t\t\tcurr = traverseStack.pop();\r\n\r\n\t\t\t\t\t//append the item\r\n\t\t\t\t\ttreeAsString += curr.toString() + \" \";\r\n\r\n\t\t\t\t\t//Check the right\r\n\t\t\t\t\tcurr = curr.getRightChild();\r\n\t\t\t\t}\r\n\t\t\t\t//curr was null, the stack was empty, we visited all\r\n\t\t\t\t//of the 'nodes'\r\n\t\t\t\telse{\r\n\t\t\t\t\tdone = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn treeAsString;\r\n\t}", "NodeIterable(Node firstChild) {\n next = firstChild;\n }", "public void inOrderTraversal() {\n beginAnimation();\n treeInOrderTraversal(root);\n stopAnimation();\n\n }", "public void levelOrder(){\n Iterator iter = iterator();\n while(iter.hasNext() == true) {\n System.out.println(iter.next());\n }\n }", "public BinTreeLeafIterator(BinTree<E> tree) {\n\t\tthis.tree = tree;\n\t\tif(!tree.isEmpty())\n\t\t\tactual=this.firstLeaf();\n\n\t}", "private static int nodeDepthsIterativeStack(Node root) {\n\t\tStack<Level>st = new Stack<>();\n\t\tst.add(new Level(root, 0));\n\t\tint result = 0;\n\t\twhile(!st.isEmpty()) {\n\t\t\tLevel curr = st.pop();\n\t\t\tif(curr.root == null)\n\t\t\t\tcontinue;\n\t\t\tSystem.out.println(curr.toString());\n\t\t\tresult += curr.depth;\n\t\t\t// Push right before left to process the nodes in inorder fashion.\n\t\t\tst.push(new Level(curr.root.right, curr.depth+1));\n\t\t\tst.push(new Level(curr.root.left, curr.depth+1));\n\t\t}\n\t\treturn result;\n\t}", "public Iterator trip() {\n\t\tStack path = new Stack();\n\t\ttry {\n\t\t\t// initializes path to the stack of nodes from starting point to end\n\t\t\t// point\n\t\t\tpath = path(BusLines, BusLines.getNode(start), BusLines.getNode(dest));\n\n\t\t\t// checks if there is a path, otherwise return null\n\t\t\tif (path == null) {\n\t\t\t\treturn null;\n\t\t\t} else {\n\t\t\t\treturn path.iterator();\n\t\t\t}\n\t\t} catch (GraphException e) {\n\t\t\tSystem.out.println(\"Error: the path does not exists.\");\n\t\t}\n\t\treturn null;\n\n\t}", "public final Iterator<CodeFragmentList> getDefinitionIterator()\n {\n IteratorList iterList = new IteratorList();\n\n Model.addDefinitionIterators(iterList, getTopLevelInitializerIterator());\n\n Iterator iter = statefulEventInitializers.iterator();\n while (iter.hasNext())\n {\n iterList.add(((Initializer)iter.next()).getDefinitionsIterator());\n }\n \n iterList.add(root.getSubDefinitionsIterator());\n \n if (getVersion() >= 4)\n \titerList.add(statesModel.getSubDefinitionIterators());\n\n return iterList.toIterator();\n }", "Collection<Tree<V, E>> getTrees();", "public HyperTableLeafIterator() {\n this.stack = new LinkedList<>();\n this.stack.add(table);\n }", "private void treeBreadthFirstTraversal() {\n Node currNode = root;\n java.util.LinkedList<Node> queue = new java.util.LinkedList<Node>();\n\n // Highlights the first Node.\n queueNodeSelectAnimation(currNode, \"Exploring \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n\n // Explores Nodes until the queue is empty.\n while (true) {\n\n // Marks that this Node's children should be explored.\n for (int i = 0; i < getNumChildren(); ++i) {\n if (currNode.children[i] != null) {\n queue.addLast(currNode.children[i]);\n queueQueueAddAnimation(currNode.children[i],\n \"Queueing \" + currNode.children[i].key,\n AnimationParameters.ANIM_TIME);\n\n }\n }\n\n // Pops the next Node from the queue.\n if (!queue.isEmpty()) {\n currNode = queue.pop();\n queueListPopAnimation(\"Popped \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n queueNodeSelectAnimation(currNode, \"Exploring \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n\n }\n // If the queue is empty, breaks.\n else break;\n\n }\n }", "public static <TT> CollectionTree.IterationState<TT> getIterationState( Iterable<TT> iterable ) {\r\n return new CollectionTree.IterationState<TT>( iterable.iterator() );\r\n }", "protected void createTree() {\n\n\t\tint nextPlayer = opponent;\n\n\t\tQueue<Node> treeQueue = new LinkedList<Node>();\n\t\tWinChecker winCheck = new WinChecker();\n\n\t\ttreeQueue.add(parent);\n\n\t\twhile (!treeQueue.isEmpty()) {\n\t\t\tNode currentNode = treeQueue.poll();\n\n\t\t\tif (currentNode.getMove().Row != -1\n\t\t\t\t\t&& currentNode.getMove().Col != -1) {\n\t\t\t\tgb.updateBoard(currentNode.getMove());\n\n\t\t\t\tif (winCheck.getWin(gb) >= 0) {\n\t\t\t\t\tgb.revertBoard(currentNode.getMove());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tgb.revertBoard(currentNode.getMove());\n\t\t\t}\n\n\t\t\t// Restricting the depth to which we will create the tree\n\t\t\tif (currentNode.getPly() > 2) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tfor (List<Hexagon> tempList : this.gb.getBoard()) {\n\t\t\t\tfor (Hexagon tempHex : tempList) {\n\n\t\t\t\t\tif (tempHex == null) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (tempHex.getValue() == EMPTY) {\n\n\t\t\t\t\t\tif (currentNode.getPly() % 2 == 0) {\n\t\t\t\t\t\t\tnextPlayer = opponent;\n\t\t\t\t\t\t} else if (currentNode.getPly() % 2 == 1) {\n\t\t\t\t\t\t\tnextPlayer = player;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tMove nextMove = new Move(nextPlayer, false,\n\t\t\t\t\t\t\t\ttempHex.getRow(), tempHex.getColumn());\n\n\t\t\t\t\t\tNode newNode = new Node(currentNode.getPly() + 1,\n\t\t\t\t\t\t\t\tnextMove);\n\t\t\t\t\t\tnewNode.setParent(currentNode);\n\n\t\t\t\t\t\tcurrentNode.children.add(newNode);\n\n\t\t\t\t\t\ttreeQueue.add(newNode);\n\t\t\t\t\t\ttempHex.setValue(EMPTY);\n\t\t\t\t\t}// End of if statement\n\n\t\t\t\t}// End of inner ForLoop\n\t\t\t}// End of outer ForLoop\n\n\t\t\t// currentNode.printChildren();\n\n\t\t}// End of While Loop\n\n\t}", "public void traverseStack(){\n // check if there is any stack present or not\n if(this.arr==null){\n System.out.println(\"No stack present, first create a stack\");\n return;\n }\n // check if stack is empty\n if(this.topOfStack==-1){\n System.out.println(\"Stack is empty, can't traverse\");\n return;\n }\n // if stack is not empty\n System.out.println(\"Printing stack...\");\n for(int i=0;i<=this.topOfStack;i++){\n System.out.print(this.arr[i]+\" \");\n }\n System.out.println();\n }", "@Override\n public Iterator<E> iterator() {\n return new InsideIterator(first);\n }" ]
[ "0.7168008", "0.66566795", "0.6615237", "0.6584421", "0.6532601", "0.6487994", "0.6474783", "0.64136314", "0.6319098", "0.62989044", "0.61766547", "0.6163283", "0.6068262", "0.6050103", "0.60401815", "0.6016144", "0.59674627", "0.59573424", "0.5956943", "0.5931568", "0.5924445", "0.58441937", "0.5828348", "0.58232135", "0.5822441", "0.5822441", "0.5822441", "0.5815195", "0.580346", "0.5769882", "0.5671437", "0.5650779", "0.5649182", "0.5619717", "0.5589992", "0.55678844", "0.5561095", "0.55562764", "0.55501646", "0.5547085", "0.55068797", "0.5505479", "0.54748625", "0.5431071", "0.5429788", "0.54295784", "0.5415622", "0.5407667", "0.53946334", "0.539051", "0.53900576", "0.5375577", "0.53550965", "0.5345165", "0.5337936", "0.5318554", "0.53003526", "0.5289979", "0.52724725", "0.52489185", "0.52464885", "0.5227871", "0.5220424", "0.520814", "0.5192407", "0.5192159", "0.51894134", "0.51823974", "0.51704496", "0.51644826", "0.51617765", "0.51444423", "0.5141874", "0.5138296", "0.51318353", "0.5125126", "0.5106734", "0.5106607", "0.51045024", "0.51018506", "0.51017255", "0.50842696", "0.5083468", "0.5082634", "0.5069402", "0.50684756", "0.5065047", "0.5064662", "0.5060315", "0.50566936", "0.5054218", "0.50538164", "0.5053164", "0.50488585", "0.50461", "0.5043362", "0.5042329", "0.50372875", "0.5035533", "0.50308454" ]
0.77204263
0
Creates the Add Grocery View
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.add_item_to_grocery_screen); //Sets the title and colour of the taskbar setTitle("Add New Grocery List Item"); setColour(ContextCompat.getColor(this, R.color.greenColour3)); //Initializes the UI elements initViews(); allergyActions = new AllergyActions(checkNuts, checkSoy, checkLactose, checkGluten, checkFish, checkEgg); //Creates on click listener for cancel button, just returns to grocery list screen btnCancel.setOnClickListener(v -> finish()); //Creates on click listener for add button btnAdd.setOnClickListener(v -> { //Creates item based on inputted values and adds Item newItem = initItem(); try { //If an item with this name does not exist yet, then add it in if (listActions.getDuplicateByName(newItem, groceryActions.getGroceryList()) == null) { groceryActions.addToGrocery(newItem); //Once the item is added, return to grocery list screen finish(); } else { Toast.makeText(AddGroceryItemActivity.this, "An item with this name already exists in Grocery List.", Toast.LENGTH_SHORT).show(); } } catch (InvalidInputException e) { Toast.makeText(AddGroceryItemActivity.this, e.getMessage(), Toast.LENGTH_SHORT).show(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void Create() {\n\n initView();\n }", "public AddUserView() {\n initComponents();\n }", "public void addButtonClicked(View view) {\n\n Products product = new Products(johnsInput.getText().toString());\n\n dbHandler.addProduct(product);\n printDatabase();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.add, container, false);\n }", "public void addGrocery(String title)\n {\n SQLiteDatabase db = this.getWritableDatabase();\n System.out.println(\"\\n\\nAdding to grocery list \"+title);\n ContentValues values = new ContentValues();\n values.put(KEY_TITLE,title);\n db.insert(TABLE_GROCERIES,null,values);\n db.close();\n }", "public AddOperationView() {\n super(\"add_operation.fxml\", \"Einsatz hinzufügen\");\n }", "@Override\n public void onViewCreated(View view, Bundle savedInstanceState) {\n dataBuilder.getTasks(prefs.getString(\"id\", \"\"));\n\n ImageButton addTaskButton = (ImageButton) view.findViewById(R.id.add_task);\n\n addTaskButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n int fragmentId = ((ViewGroup)(getView().getParent())).getId();\n\n getFragmentManager().beginTransaction().replace(fragmentId, new TaskAdd()).addToBackStack(null).commit();\n }\n });\n\n super.onViewCreated(view, savedInstanceState);\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_add_order, container, false);\r\n\r\n initViews(view);\r\n getAllInventories();\r\n getAllClients();\r\n return view;\r\n }", "@RequestMapping(value = \"/add\")\n\tpublic String addItem(Model model) {\n\t\tmodel.addAttribute(\"item\", new Item());\n\t\tmodel.addAttribute(\"shops\", srepository.findAll());\n\t\treturn \"additem\";\n\t}", "private void addViews() {\n\t}", "public void createItem(View view) {\n \t\n String[] temp = getCurrentItemTypes();\n \n Intent intent = new Intent(this, CreateItem.class);\n intent.putExtra(EDIT, \"no\");\n intent.putExtra(TYPES, temp);\n startActivityForResult(intent, 1);\n }", "public void add(View view) {\n Intent addIntent = new Intent(this, AddTask.class);\n addIntent.putExtra(\"com.example.joshua.livetogether.aptID\", mAptID);\n startActivity(addIntent);\n }", "private void buildView() {\n this.setHeaderInfo(model.getHeaderInfo());\n\n CWButtonPanel buttonPanel = this.getButtonPanel();\n \n buttonPanel.add(saveButton);\n buttonPanel.add(saveAndCloseButton);\n buttonPanel.add(cancelButton);\n \n FormLayout layout = new FormLayout(\"pref, 4dlu, 200dlu, 4dlu, min\",\n \"pref, 2dlu, pref, 2dlu, pref, 2dlu, pref\"); // rows\n\n layout.setRowGroups(new int[][]{{1, 3, 5}});\n \n CellConstraints cc = new CellConstraints();\n this.getContentPanel().setLayout(layout);\n \n this.getContentPanel().add(nameLabel, cc.xy (1, 1));\n this.getContentPanel().add(nameTextField, cc.xy(3, 1));\n this.getContentPanel().add(descLabel, cc.xy(1, 3));\n this.getContentPanel().add(descTextField, cc.xy(3, 3));\n this.getContentPanel().add(amountLabel, cc.xy(1, 5));\n this.getContentPanel().add(amountTextField, cc.xy(3, 5));\n }", "void addGroceryItem(String item) {\n\n\t}", "private void addViewBody() {\n\t\tJButton medicosButton = new JButton(\"Médicos\");\n\t\tmedicosButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new MedicosView());\n\t\t});\n\t\tthis.add(medicosButton);\n\n\t\tJButton clientesButton = new JButton(\"Clientes\");\n\t\tclientesButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new ClientesView());\n\t\t});\n\t\tthis.add(clientesButton);\n\n\t\tJButton novaConsultaButton = new JButton(\"Nova Consulta\");\n\t\tnovaConsultaButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new CadastroConsultaView());\n\t\t});\n\t\tthis.add(novaConsultaButton);\n\n\t\tJButton novoTesteButton = new JButton(\"Novo Teste [EM BREVE]\");\n\t\tnovoTesteButton.setEnabled(false);\n\t\tthis.add(novoTesteButton);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_add_new_incident, container, false);\n\n initView(view);\n incidentData();\n\n return view;\n }", "public String addNew() {\r\n\t\ttry {\r\n\t\t\tgetNavigationPanel(2);\r\n\t\t\treturn \"questData\";\r\n\t\t} catch(Exception e) {\r\n\t\t\tlogger.error(\"Exception in addNew in action:\" + e);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "@Override\n public void Create() {\n initView();\n initData();\n }", "public AddItem() {\n initComponents();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_add_farmacy_info, container, false);\n unbinder = ButterKnife.bind(this, view);\n setUpHomeActivity();\n pharmacistHomeActivity = (PharmacistHomeActivity) getActivity();\n pharmacistHomeActivity.setToolBar(View.VISIBLE, \"Add New Pharmacy\", new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n pharmacistHomeActivity.setToolBar(View.GONE, null, null);\n onBack();\n }\n });\n getGovernor();\n return view;\n }", "public Add() {\n initComponents();\n }", "@FXML\r\n\t\tpublic void addButton(ActionEvent event) {\r\n\t\t\t// get name, notes, and due date from fields\r\n\t\t\tString taskName = name.getText();\r\n\t\t\tString taskNotes = notes.getText();\r\n\t\t\tLocalDate taskDate = date.getValue();\r\n\t\t\t\r\n\t\t\tif (taskName.isEmpty()) {\r\n\t\t\t\t// validate that taskName is not empty\r\n\t\t\t\tnameLabel.setText(\"Must have a name!\");\r\n\t\t\t\tname.setStyle(warningStyle);\r\n\t\t\t} else {\r\n\t\t\t\tnameLabel.setText(\"\");\r\n\t\t\t\tname.setStyle(defaultStyle);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (taskDate == null) {\r\n\t\t\t\t// validate that taskDate is not empty \r\n\t\t\t\tdateLabel.setText(\"Must provide a due date!\");\r\n\t\t\t\tdate.setStyle(warningStyle);\r\n\t\t\t} else {\r\n\t\t\t\tdateLabel.setText(\"\");\r\n\t\t\t\tdate.setStyle(defaultStyle);\r\n\t\t\t}\r\n\t\t\t\n\t\t\tif (taskDate != null && !taskName.isEmpty()) {\r\n\t\t\t\t// if everything is good, make a task\r\n\t\t\t\tGuiBasedApp.addTask(taskName, taskNotes, taskDate);\r\n\t\t\t\t\r\n\t\t\t\t// launch the Home Screen Scene\r\n\t\t\t\tGuiBasedApp.launchHomeScreenScene();\r\n\t\t\t}\r\n\t\t}", "public void addToList(View view) {\n Items newItem = new Items();\n EditText ETNew = (EditText) findViewById(R.id.ETNew);\n newItem.todo = ETNew.getText().toString();\n newItem.done = false;\n helper.create(newItem);\n Toast.makeText(this, \"Item added\", Toast.LENGTH_SHORT).show();\n adaptList2();\n ETNew.setText(\"\");\n ETNew.setHint(\"my new to-do\");\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_add_plant_from_database, container, false);\n mContext = getActivity();\n mongoDbSetup = MongoDbSetup.getInstance(mContext);\n findPlantsList();\n findWidgets(v);\n\n return v;\n\n }", "public ADD() {\n initComponents();\n }", "@FXML\n void addTaskClicked(ActionEvent event)\n {\n createTask();\n }", "public void add(View project){\n projects.add(project);\n }", "@RequestMapping(\"/recipe/new\")\n public String newRecipe(Model model){\n model.addAttribute(\"recipe\", new RecipeCommand());\n \n return \"recipe/recipeForm\";\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_site_progress_add, container, false);\n setHasOptionsMenu(true);\n ButterKnife.bind(this, view);\n\n initializeUI();\n bindData();\n return view;\n }", "public void onAddByWebSitePressed( ) {\n Router.Instance().changeView(Router.Views.AddFromWebSite);\n }", "public void AddCollection(View view) {\n Intent intent = new Intent(this, AddCollectionActivity.class);\n this.startActivity(intent);\n }", "public void addGenreAction()\n\t{\n\t\tViewNavigator.loadScene(\"Add Genre\", ViewNavigator.ADD_GENRE_SCENE);\n\t}", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t Bundle savedInstanceState) {\n\t\tView view = inflater.inflate(R.layout.fragment_category_new_edit, container, false);\n\t\tinitUI(view);\n\t\tfragmentManager = getFragmentManager();\n\t\tsetGridViewIcon(); //設置GridView相關\n\n\t\tif (newEdit.equalsIgnoreCase(\"new\")) { //新增\n\t\t\tgetActivity().setTitle(\n\t\t\t\t\togl4jo3.shaowei.ogl4jo3.accounting.R.string.title_income_category_new);\n\t\t\tivCategoryIcon.setImageResource(R.drawable.ic_category_other);\n\t\t\tcategoryIcon = R.drawable.ic_category_other;\n\t\t\tcategoryID = -1;\n\t\t\tbtnDel.setVisibility(View.GONE); //新增時隱藏刪除按鈕\n\t\t} else { //編輯\n\t\t\tgetActivity().setTitle(\n\t\t\t\t\togl4jo3.shaowei.ogl4jo3.accounting.R.string.title_income_category_edit);\n\t\t\tivCategoryIcon.setImageResource(category.getIcon());\n\t\t\tcategoryIcon = category.getIcon();\n\t\t\tcategoryID = category.getId();\n\t\t\tetCategoryName.setText(category.getName());\n\t\t}\n\t\tsetOnClickListener();\n\n\t\treturn view;\n\t}", "public void addData(View view) {\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "public void addItem(View view) {\n mainActivityPresenter.startEventEditActivity( this);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n // Inflate the container\n View view = inflater.inflate(R.layout.fragment_quote_add, container, false);\n // set up the text views\n mAddNameTextView = (EditText) view.findViewById(R.id.add_name_text);\n mAddSourceTextView = (EditText) view.findViewById(R.id.add_source_text);\n mAddQuoteTextView = (EditText) view.findViewById(R.id.add_quote_text);\n return view;\n }", "@RequestMapping(value = \"/food/add\", method = RequestMethod.POST)\n\tpublic String add(HttpServletRequest request, Map<String, Object> model) throws JsonProcessingException {\n\t\tFood food = new Food(request.getParameter(\"name\"), request.getParameter(\"brand\"),\n\t\t\t\trequest.getParameter(\"quality\"), request.getParameter(\"type\"));\n\t\tList<Food> foods = foodService.findAll();\n\t\tfoodService.add(food);\n\n\t\tmodel.put(\"foods\", foods);\n\n\t\tmodel.put(\"types\", Food.TYPE.values());\n\t\tmodel.put(\"qualities\", Food.QUALITY.values());\n\t\tmodel.put(\"qualitycounts\", mapper.writeValueAsString(foodService.qualityCounts(foods)));\n\n\t\treturn \"index\";\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n addView = inflater.inflate(R.layout.fragment_add_category, container, false);\n catImageRef = FirebaseStorage.getInstance().getReference().child(\"Category Images\");\n addNewCategoryBtn = (Button) addView.findViewById(R.id.add_new_category);\n selectCategoryImage = (ImageView) addView.findViewById(R.id.select_category_img);\n inputCategoryName = (EditText) addView.findViewById(R.id.category_name);\n\n selectCategoryImage.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n openGallery();\n }\n });\n addNewCategoryBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n validateCategoryData();\n }\n });\n // Toast.makeText(getActivity(), \"\", Toast.LENGTH_SHORT).show();\n return addView;\n }", "public void btn_AddActivity(View view) {\n startActivity(new Intent(this, add_Recipe.class));\n }", "public New_shipment() {\n initComponents();\n init();\n \n }", "public ViewCreatePagamento() {\n initComponents();\n clientesDAO cDAO = DaoFactory.createClientesDao(); \n matriculaDAO mDAO = DaoFactory.createMatriculaDao();\n \n cmbIDClientes.addItem(null);\n cDAO.findAll().forEach((p) -> {\n cmbIDClientes.addItem(p.getNome());\n });\n \n \n txtDataAtual.setText(DateFormat.getDateInstance().format(new Date()));\n }", "public void addFood(View view) {\n\t\tContext context = getApplicationContext();\n\t\tif (foodName.isEmpty()) {\n\t\t\tCharSequence text = \"Select a food\";\n\t\t\tint duration = Toast.LENGTH_SHORT;\n\n\t\t\tToast toast = Toast.makeText(context, text, duration);\n\t\t\ttoast.show();\n\t\t} else if (location.isEmpty()) {\n\t\t\tCharSequence text = \"Select a location\";\n\t\t\tint duration = Toast.LENGTH_SHORT;\n\n\t\t\tToast toast = Toast.makeText(context, text, duration);\n\t\t\ttoast.show();\n\t\t} else {\n\t\t\t// Valid input, package name and location and send back array to\n\t\t\t// stockactivity\n\t\t\tIntent resultIntent = new Intent();\n\t\t\tresultIntent.putExtra(\"foodName\", foodName);\n\t\t\tresultIntent.putExtra(\"location\", location);\n\t\t\tsetResult(Activity.RESULT_OK, resultIntent);\n\t\t\tfinish();\n\t\t overridePendingTransition(R.anim.fade_in, R.anim.fade_out);\n\t\t}\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_add_new_entry, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.add_task, container, false);\n\n mTitleField = view.findViewById(R.id.title_edit_text);\n mDescription = view.findViewById(R.id.description_text_view);\n mDateButton = view.findViewById(R.id.button_date);\n mTimeButton = view.findViewById(R.id.button_time);\n CheckBox solvedCheckBox = view.findViewById(R.id.check_box_is_done);\n mDone = view.findViewById(R.id.button_done_add);\n mShare = view.findViewById(R.id.button_share);\n mPhotoButton = view.findViewById(R.id.btn_camera);\n mPhotoView = view.findViewById(R.id.task_photo);\n mGalleryButton = view.findViewById(R.id.btn_gallery);\n\n mTitleField.setText(mTask.getTitle());\n mDescription.setText(mTask.getMDescription());\n\n String simpleDate = getDateString();\n mDateButton.setText(simpleDate);\n String date = getTimeString();\n mTimeButton.setText(date);\n solvedCheckBox.setChecked(mTask.getMDone());\n\n titleETHandler();\n descriptionETHandler();\n doneBtnHandle();\n checkBoxHandle(solvedCheckBox);\n dateBtnHandle();\n timeBtnHandle();\n handleShareButton();\n handlePhotoButton();\n updatePhotoView();\n handleGalleryButton();\n\n return view;\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_add_recipe, container, false);\n\n view.findViewById(R.id.add_recipe_save).setOnClickListener(this);\n view.findViewById(R.id.add_recipe_clear).setOnClickListener(this);\n\n if(recipe != null) {\n ((EditText) view.findViewById(R.id.add_recipe_name)).setText(recipe.getName());\n ((EditText) view.findViewById(R.id.add_recipe_spices)).setText(Utils.convertListToCsv(recipe.getSpices()));\n ((EditText) view.findViewById(R.id.add_recipe_ingredients)).setText(Utils.convertListToCsv(recipe.getIngredients()));\n ((EditText) view.findViewById(R.id.add_recipe_steps)).setText(recipe.getSteps());\n }\n\n return view;\n }", "public Add_E() {\n initComponents();\n this.setTitle(\"Add Engineer\");\n }", "private void initViews() {\n inputName = findViewById(R.id.inputGroceryItemName);\n inputQuantityToBuy = findViewById(R.id.inputGroceryItemQuantity);\n inputUnits = findViewById(R.id.inputGroceryItemUnits);\n inputPrice = findViewById(R.id.inputGroceryItemPrice);\n inputCalories = findViewById(R.id.inputGroceryItemCalories);\n\n btnCancel = findViewById(R.id.btnCancelAddGrocery);\n btnAdd = findViewById(R.id.btnAddGroceryItem);\n\n checkEgg = findViewById(R.id.inputCheckGroceryEggs);\n checkFish = findViewById(R.id.inputCheckGroceryFish);\n checkGluten = findViewById(R.id.inputCheckGroceryGluten);\n checkLactose = findViewById(R.id.inputCheckGroceryLactose);\n checkSoy = findViewById(R.id.inputCheckGrocerySoy);\n checkNuts = findViewById(R.id.inputCheckGroceryNuts);\n }", "public AddItems() {\n initComponents();\n \n }", "@RequestMapping(value = \"/add\")\n public String addForm(Model model) {\n model.addAttribute(\"service\",fservice.findAllServices());\n model.addAttribute(\"customer\", mservice.findAllCustomer());\n model.addAttribute(\"customer\", new Customer());\n return \"customer-form\";\n }", "public static void testAddTodoView(){\n }", "void onAddClicked();", "public Viewemployeeexpenditure() {\n initComponents();\n view1();\n \n }", "public void addIngredient(View view) {\n LinearLayout layout = findViewById(R.id.recipeIngredientsInputLayout);\n EditText text = new EditText(getApplicationContext());\n text.setHint(\"Recipe Ingredient\");\n layout.addView(text);\n }", "@GetMapping(\"/showFormForAdd\")\r\n\tpublic String showFormForAdd(Model theModel){\n\t\tCustomer theCustomer = new Customer();\r\n\t\t\r\n\t\ttheModel.addAttribute(\"customer\",theCustomer);\r\n\t\t\r\n\t\treturn \"customer-form\";\r\n\t}", "public View onCreateView(@NonNull LayoutInflater inflater,\n ViewGroup container, Bundle savedInstanceState) {\n \n View root = inflater.inflate(R.layout.fragment_add_training, container, false);\n controller = Controller.getInstance(root.getContext()); // database\n Button dateButton = root.findViewById(R.id.at_button_date);\n Button submit = root.findViewById(R.id.at_button_submit);\n\n // initialize form\n setCalendarToFrench();\n initForm(root);\n\n // event click on calendar button\n dateButton.setOnClickListener(v -> chooseDateFromCalendar(dateButton));\n\n // event click on submit button\n submit.setOnClickListener(v -> submitForm());\n\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v= inflater.inflate(R.layout.fragment_add_cake, container, false);\n SaveButton= v.findViewById(R.id.UpdateAddeess);\n AdminName=v.findViewById(R.id.Country);\n SessionManagement s1= new SessionManagement(getContext());\n AdminName.setText(s1.getAdminSession());\n SaveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n AddNewCake(v);\n\n }\n });\n return (v);\n }", "private void createAndAddViews() {\n \t\t// Create the layout parameters for each field\n \t\tfinal LinearLayout.LayoutParams labelParams = new LinearLayout.LayoutParams(\n \t\t\t\t0, LayoutParams.WRAP_CONTENT, 0.3f);\n \t\tlabelParams.gravity = Gravity.RIGHT;\n \t\tlabelParams.setMargins(0, 25, 0, 0);\n \t\tfinal LinearLayout.LayoutParams valueParams = new LinearLayout.LayoutParams(\n \t\t\t\t0, LayoutParams.WRAP_CONTENT, 0.7f);\n \t\tvalueParams.gravity = Gravity.LEFT;\n \t\tvalueParams.setMargins(0, 25, 0, 0);\n \n \t\t// Add a layout and text views for each property\n \t\tfor (final StockProperty property : m_propertyList) {\n \t\t\tLog.d(TAG, \"Adding row for property: \" + property.getPropertyName());\n \n \t\t\t// Create a horizontal layout for the label and value\n \t\t\tfinal LinearLayout layout = new LinearLayout(this);\n \t\t\tlayout.setLayoutParams(new LinearLayout.LayoutParams(\n \t\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));\n \n \t\t\t// Create a TextView for the label\n \t\t\tfinal TextView label = new TextView(this);\n \t\t\tlabel.setLayoutParams(labelParams);\n \t\t\tlabel.setText(property.getLabelText());\n \t\t\tlabel.setTextAppearance(this, android.R.style.TextAppearance_Medium);\n \t\t\tlayout.addView(label);\n \n \t\t\t// Configure and add the value TextView (created when the property\n \t\t\t// was constructed)\n \t\t\tfinal TextView value = property.getView();\n \t\t\tvalue.setLayoutParams(valueParams);\n \t\t\tvalue.setHint(\"None\");\n \t\t\tvalue.setTextAppearance(this, android.R.style.TextAppearance_Medium);\n \t\t\tvalue.setTypeface(null, Typeface.BOLD);\n \t\t\tlayout.addView(value);\n \n \t\t\t// Add the row to the main layout\n \t\t\tm_resultsLayout.addView(layout);\n \t\t}\n \t}", "@RequestMapping(\"/newRecipe\")\r\n\tpublic ModelAndView newRecipe() {\r\n\t\tModelAndView mav = new ModelAndView();\r\n\r\n\t\tmav.addObject(\"recipe\", new Recipe());\r\n\t\tmav.addObject(\"newFlag\", true);\r\n\t\tmav.setViewName(\"recipe/editRecipe.jsp\");\r\n\r\n\t\treturn mav;\r\n\t}", "@GetMapping(\"/add\")\n\tpublic String showFormForAdd(Model model) {\n\t\tMemo memo = new Memo();\n\t\t\n\t\t// load categories for select options\n\t\tMap<String, String> mapCategories = generateMapCategories();\n\t\t\n\t\t// add to the model\n\t\tmodel.addAttribute(\"memo\", memo);\n\t\tmodel.addAttribute(\"categories\", mapCategories);\n\t\t\n\t\treturn \"add\";\n\t}", "public ProductCreate() {\n initComponents();\n }", "public void addIngredient(View view) {\n // find the input boxes\n EditText ingredientName = findViewById(R.id.input_Ingredient);\n EditText ingredientQuantity = findViewById(R.id.input_Quantity);\n\n // get the values\n String name = ingredientName.getText().toString();\n String quantity = ingredientQuantity.getText().toString();\n\n if (!(name.equals(\"\"))) {\n // assign it to the recipe\n newRecipe.addIngredient(new Ingredient(name, quantity));\n\n // update the listview for the ingredients\n updateIngredientListView();\n\n // remove the contents of those fields\n ingredientName.setText(\"\");\n ingredientQuantity.setText(\"\");\n }\n else {\n Toast.makeText(this, \"You must enter a name for your ingredient!\", Toast.LENGTH_SHORT).show();\n }\n }", "public void AddItem(View view) {\n /*adds a new friend to the friends tree*/\n appendFriendToExistingFriendsTree(friendsDatabaseReference);\n }", "public void addNewAnimalAction() {\n\t\tAnimalModel newAnimalModel = new AnimalModel(\"\", \"\");\n\n\t\teditAnimalDetail(newAnimalModel, AnimalDetailPanel.NEW_ANIMAL);\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_grocery);\n //Custom class created to handle database operations\n DatabaseService dbService = new DatabaseService(this);\n ArrayList<String> dataStore = dbService.readGroceriesFromDb();\n Button button = (Button)findViewById(R.id.add_button);\n ListView activeList = (ListView)findViewById(R.id.grocery_list);\n //Set the ListView's adapter to a default array adapter with the list read form the database as its content\n activeList.setAdapter(new ArrayAdapter<String>(this, R.layout.grocery_layout, dataStore));\n //Below are custom Onclick listeners I created so that this activity stays clean :)\n activeList.setOnItemClickListener(new DeleteEntryListener(this, dataStore));\n activeList.setOnItemLongClickListener(new EditEntryListener(this, dataStore));\n button.setOnClickListener(new AddToListListener(this));\n }", "public void addNewItemClicked(View view) {\n// Toast.makeText(CheckboxNoteActivity.this, \"RelativeLayout Clicked Successfully\", Toast.LENGTH_SHORT).show();\n addNewListItem();\n }", "@FXML\n\tpublic void newOrderButtonAction() {\n\t\t\n\t\tcurrentOrder = new NewOrder();\n\t\tVBox main = new VBox();\n\t\tVBox.setVgrow(main, Priority.ALWAYS);\n\t\tVBox.setMargin(main, new Insets(5));\n\t\tmain.setStyle(\"-fx-border-insets: 0; \"\n\t\t\t\t+ \"-fx-border-width: 2; \"\n\t\t\t\t+ \"-fx-border-color: black lightgray lightgray black\");\n\t\t/*\n\t\t * Create top and bottom part of the OrderBox and\n\t\t * update currentOrder with this Order's variables to \n\t\t * be referenced later.\n\t\t */\n\t\tHBox top = createTopOrderBox();\n\t\tVBox bot = createBottomOrderBox();\n\t\t\n\t\t//Combine the top and bottom part od the OrderBox\n\t\tmain.getChildren().addAll(top, bot);\n\t\t\n\t\t//Iterate the total number of orders for display on labels.\n\t\tnoOfOrders++;\n\t\t\n\t\tSeparator sep = new Separator();\n\t\t\n\t\t//Add the display pieces together and add to the Window\n\t\torderEntryBox.getChildren().addAll(main, sep);\n\t\t\n\t\t/*\n\t\t * Add the currentOrder now that it is complete.\n\t\t * These will be used to create ConfigOrders to\n\t\t * complete the ConfigFile.\n\t\t */\n\t\tnewOrders.add(currentOrder);\n\t}", "public void onClickAdd(View v) {\n Intent intent = new Intent(this, ItemFormActivity.class);\n startActivity(intent);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_add_work, container, false);\n initializeViews(view);\n tvDone.setOnClickListener(this);\n tvBack.setOnClickListener(this);\n return view;\n }", "private void addToTodoTaskGui(JLabel createLabelName, JLabel createLabelDescription,\r\n JLabel createLabelDueDate, JLabel createLabelPriority) {\r\n panelTask.add(createLabelName);\r\n panelTask.add(createLabelDescription);\r\n panelTask.add(createLabelDueDate);\r\n panelTask.add(createLabelPriority);\r\n panelTask.add(textFieldDueDate);\r\n\r\n panelTask.add(textFieldName);\r\n panelTask.add(textFieldDescription);\r\n panelTask.add(textFieldDueDate);\r\n panelTask.add(comboPriority);\r\n\r\n }", "private Container buildNewButtonContainer() {\n\n\t\tImage cancelImage = new Image(\"static/images/cancel.gif\", \"Cancel\");\n\t\tcancelImage.addAttribute(\"style\", \"cursor: pointer;\");\n\t\tcancelImage.addAttribute(\"onClick\", \"javascript:cancelReload()\");\n\n\t\tImage addAssetImage = new Image(\"static/images/save.gif\", \"Save\");\n\t\taddAssetImage.addAttribute(\"style\", \"cursor: pointer;\");\n\t\taddAssetImage.addAttribute(\"onClick\",\n\t\t\t\t\"javascript:InsertNewAssetDetails()\");\n\n\t\tContainer container = new Container(Type.DIV);\n\t\tcontainer.addComponent(addAssetImage);\n\t\tcontainer.addComponent(cancelImage);\n\t\tcontainer.addAttribute(\"style\", \"width: 100%\");\n\t\tcontainer.addAttribute(\"align\", \"center;\");\n\n\t\treturn container;\n\t}", "public void btnAddClicked(View view){\n List list = new List(input.getText().toString());\n dbHandler.addProduct(list);\n printDatabase();\n }", "@Override\r\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\r\n\t\t\t\tvenEditarPacks.init(\"NEW\",null);\r\n\t\t\t\tUI.getCurrent().addWindow(venEditarPacks);\r\n\t\t\t\t\r\n\t\t\t}", "@RequestMapping(value=\"addCat/{projectId}\", method = RequestMethod.GET)\n public String addCat(Model model, @PathVariable int projectId) {\n\n model.addAttribute(\"title\", \"Add Item to Shop For!\");\n model.addAttribute(new Category());\n model.addAttribute(\"projectId\", projectId);\n\n return \"category/addCat\";\n }", "public void clickCreate() {\n\t\tbtnCreate.click();\n\t}", "public void onClickAddNewItem(View v) {\n Intent intent = new Intent(EditFoodItemActivity.this, MainActivity.class);\n startActivity(intent);\n }", "@FXML\n void addNewCustomer(ActionEvent event) throws IOException {\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(\"/view/AddCustomer.fxml\"));\n loader.load();\n\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\n Parent scene = loader.getRoot();\n stage.setScene(new Scene(scene));\n stage.show();\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\taddNewItem();\n\t\t\t}", "public AssetRegistrationView() {\n initComponents();\n }", "public void addButtonClicked(){\n Products products = new Products(buckysInput.getText().toString());\n dbHandler.addProduct(products);\n printDatabase();\n }", "public void addGroceryItem(String item){\n groceryList.add(item);\n }", "private String renderCreatePage(Model model) {\n\t\tmodel.addAttribute(\"availableProviders\", providerService.getAllProviders());\n\t\treturn \"vm/create\";\n\t}", "@RequestMapping(value = \"add\", method = RequestMethod.GET)\r\n\tpublic ModelAndView add()\r\n\t{\r\n\t\treturn new ModelAndView(\"add\", \"person\", new Person());\r\n\t}", "public orderView() {\n initComponents();\n }", "View(int key, LinkedTaskList myNewList) {\n if(key == 1) { // add task\n JLabel repeatLabel = new JLabel(\"Is Your task repeated?\");\n JButton repeated = new JButton(\"Yes\");\n JButton notRepeated = new JButton(\"No\");\n\n repeated.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n dispose();\n new ViewAdd(\"yes\", myNewList);\n }\n });\n\n notRepeated.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n dispose();\n new ViewAdd(\"no\", myNewList);\n }\n });\n\n JPanel panel = new JPanel();\n panel.setLayout(new FlowLayout());\n\n panel.add(repeatLabel);\n panel.add(repeated);\n panel.add(notRepeated);\n\n setContentPane(panel);\n setBounds(900,300,300,100);\n setTitle(\"Add Task\");\n setResizable(false);\n setVisible(true);\n }\n }", "public CustomerView(JPanel topPanel, JPanel mainPanel, JPanel bottomPane) {\n super(topPanel, mainPanel, bottomPane);\n inventory = new ProductInventory();\n myShoppingCart = new ShoppingCart();\n addToCartBtn = new JButton[MAX_NUMB_PRODUCTS];\n }", "@RequestMapping(value = {\"/add_product\"}, method = RequestMethod.GET)\n public String viewProductAdd() {\n return \"product_detail_new\";\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n v=inflater.inflate(R.layout.fragment_addition_informaton, container, false);\n api = ApiClient.getClient().create(ApiInterface.class);\n parent=(NavigationActivity) getActivity();\n AllocateMemory(v);\n hideKeyboard(parent);\n setupUI(lv_additionalinfo_parent);\n additionalInfoAdapter.addAll(ProductDetailFragment.additionals);\n return v;\n }", "public AdicionarProdutoCarrinhoVIew() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public void create(ActionEvent actionEvent) {\n String grName = groupName.getText();\n ObservableList memList = addList.getCheckModel().getCheckedItems();\n\n if (memList == null) return;\n\n String memName = \"\";\n for (Object obj : memList ) {\n memName += obj.toString() + \"\\n\";\n }\n if (memName != \"\") {\n sender.requestNewGroup(grName, memName);\n chatUIController.newGr(grName);\n }\n return;\n }", "@FXML\r\n public void onActionToAddProductScreen(ActionEvent actionEvent) throws IOException {\r\n Parent root = FXMLLoader.load(getClass().getResource(\"/View_Controller/addProduct.fxml\"));\r\n Stage stage = (Stage) ((Button) actionEvent.getSource()).getScene().getWindow();\r\n Scene scene = new Scene(root, 980, 560);\r\n stage.setTitle(\"Add Product\");\r\n stage.setScene(scene);\r\n stage.show();\r\n }", "public void onNew() {\t\t\n\t\tdesignWidget.addNewForm();\n\t}", "@Override\n public View onCreateView(\n LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState\n ) {\n ViewGroup view = (ViewGroup) inflater.inflate(R.layout.fragment_first, container, false);\n\n\n view.findViewById(R.id.button_test).setOnClickListener(v -> {\n\n ItemChoose itemChoose = new ItemChoose(inflater.getContext());\n\n view.addView(itemChoose , new ActionBar.LayoutParams(300,300));\n view.invalidate();\n });\n\n return view;\n }", "@FXML\n void onActionAddCustomer(ActionEvent event) throws IOException {\n stage = (Stage) ((Button) event.getSource()).getScene().getWindow();\n scene = FXMLLoader.load(Objects.requireNonNull(getClass().getResource(\"/Views/AddCustomer.fxml\")));\n stage.setScene(new Scene(scene));\n stage.show();\n }", "public void createNewTask(View view) {\n try{\n newTaskLayout.checkTaskLayoutIsValid();\n ImageView taskImage = (ImageView) findViewById(R.id.imageViewBoard);\n String layoutImagePath = takeScreenshot(taskImage);\n newTaskLayout.setImagePath(layoutImagePath);\n\n // save new task\n HashMap<String, Integer> instructions = convertSpinnersToHashMap();\n Task newTask = new Task(newTaskLayout, instructions);\n Task.saveTask(getApplicationContext(), newTask);\n\n // alert user task created and return to task menu.\n Toast.makeText(this, \"new task created\", Toast.LENGTH_LONG).show();\n startActivity(new Intent(getApplicationContext(), TaskOptionsActivity.class));\n } catch (TaskLayoutException | InstructionsRequiredException e) {\n // layout was not valid on insufficient instructions set.\n makeMessageDialogue(e.getMessage());\n }\n }", "public AddFoodItemStage(FoodList foodList, FoodData foodData) {\n // initialize the foodList and foodData fields\n this.foodList = foodList;\n this.foodData = foodData;\n // create a new pane\n this.addFoodPane = new AnchorPane();\n createTextFieldLabels();\n handleConfirmEvent();\n handleCancelEvent();\n componentPositionAdjustment();\n StageAdjustment();\n }", "public String handleAdd() \n throws HttpPresentationException, webschedulePresentationException\n { \n\t try {\n\t Project project = new Project();\n saveProject(project);\n throw new ClientPageRedirectException(PROJECT_ADMIN_PAGE);\n\t } catch(Exception ex) {\n return showAddPage(\"You must fill out all fields to add this project\");\n }\n }", "@Override\n public void buttonClick(ClickEvent event) {\n \n \ttry {\n\t\t\t\t\tUI.getCurrent().getNavigator().addView(_nombreSeccion + \"Adm/\" + _titulo.getCaption(), new AdministradorClase(new Lista_Mensaje_V_Administrador(it.getIdTema())));\n\t\t\t\t} catch (PersistentException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tUI.getCurrent().getNavigator().navigateTo(_nombreSeccion+ \"Adm/\" + _titulo.getCaption());\n \t\n \t\n }", "public void AddContact(View view){\n Utils.Route_Start(ListContact.this,Contato.class);\n // Notificar, para atualizar a lista.\n\n }", "public String addNew() throws Exception {\r\n\t\tgetNavigationPanel(2);\r\n\t\tExpensesCategoryModel model = new ExpensesCategoryModel();\r\n\t\tmodel.initiate(context, session);\r\n\t\tmodel.getData(expenses, request);\r\n\t\texpenses.setLoadFlag(true);\r\n\t\treset();\r\n\t\t//\texpenses.setFlag(true);\r\n\r\n\t\texpenses.setPanelFlag(\"2\");\r\n\t\texpenses.setRetrnFlag(\"success\");\r\n\r\n\t\tmodel.terminate();\r\n\t\treturn \"success\";\r\n\r\n\t}" ]
[ "0.61666554", "0.5885604", "0.588472", "0.5882042", "0.5857107", "0.58187306", "0.5811952", "0.58114904", "0.5767592", "0.57503664", "0.5729588", "0.57229036", "0.5703734", "0.5693948", "0.5687276", "0.56755584", "0.56716156", "0.56566226", "0.5655169", "0.5645854", "0.56374437", "0.5603174", "0.5586519", "0.5583348", "0.55689514", "0.5559664", "0.5557711", "0.5555159", "0.5551576", "0.55501676", "0.5545659", "0.5540996", "0.5537352", "0.55306095", "0.55293417", "0.551472", "0.5509669", "0.5507339", "0.55045235", "0.55016875", "0.549852", "0.5491246", "0.5490829", "0.5490171", "0.5489843", "0.54839337", "0.548193", "0.5478967", "0.5477439", "0.5474068", "0.5470956", "0.5459935", "0.5452696", "0.54525894", "0.5445342", "0.54417783", "0.54360324", "0.5434954", "0.5432487", "0.5428821", "0.54272467", "0.54218334", "0.54208183", "0.54163563", "0.5415685", "0.54148895", "0.5414751", "0.54131", "0.54105806", "0.5404272", "0.54037607", "0.5398027", "0.5392639", "0.5389976", "0.53851736", "0.5383778", "0.53818965", "0.53811556", "0.53721213", "0.5372089", "0.537151", "0.53615457", "0.5359366", "0.53546333", "0.53530735", "0.5347208", "0.53445446", "0.5344264", "0.5342991", "0.53422534", "0.53411424", "0.5338297", "0.53373325", "0.5334236", "0.5326967", "0.53195965", "0.53148186", "0.5313467", "0.5309876", "0.53064626" ]
0.61793405
0
Initialize new item with the inputted information, sets default values for empty fields
private Item initItem() { String name = inputName.getText().toString(); int quantityToBuy = -1; if (!inputQuantityToBuy.getText().toString().equals("")) quantityToBuy = Integer.parseInt(inputQuantityToBuy.getText().toString()); String units = inputUnits.getText().toString(); double price = 0; if (!inputPrice.getText().toString().equals("")) price = Double.parseDouble(inputPrice.getText().toString()); int calories = 0; if (!inputCalories.getText().toString().equals("")) calories = Integer.parseInt(inputCalories.getText().toString()); ArrayList<String> allergies = allergyActions.getAllergies(); return new Item(name, 0, units, quantityToBuy, 0, allergies, calories, price); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Item() {\r\n this.name = \"\";\r\n this.description = \"\";\r\n this.price = 0F;\r\n this.type = \"\";\r\n this.available = 0;\r\n this.wholesaler = new Wholesaler();\r\n this.wholesalerId = 0;\r\n this.category = new Category();\r\n this.categoryId = 0; \r\n }", "public ItemInfo () {}", "public Item()\r\n {\r\n // Initialize instance variables\r\n \r\n }", "public NewItems() {\n super();\n }", "public Item(String initName, String itemDesc)\n {\n // initialise instance variables\n name = initName;\n desc = itemDesc;\n }", "private void init() {\n FieldWrapper id = new FieldWrapper();\n id.fieldDescription = new HashMap<String, Object>();\n id.fieldDescription.put(\"fullName\", \"Id\");\n id.fieldDescription.put(\"type\", \"Text\");\n\n FieldWrapper name = new FieldWrapper();\n name.fieldDescription = new HashMap<String, Object>();\n name.fieldDescription.put(\"fullName\", \"Name\");\n\n FieldWrapper createdBy = new FieldWrapper();\n createdBy.fieldDescription = new HashMap<String, Object>();\n createdBy.fieldDescription.put(\"fullName\", \"CreatedBy\");\n createdBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper lastModifiedBy = new FieldWrapper();\n lastModifiedBy.fieldDescription = new HashMap<String, Object>();\n lastModifiedBy.fieldDescription.put(\"fullName\", \"LastModifiedBy\");\n lastModifiedBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper owner = new FieldWrapper();\n owner.fieldDescription = new HashMap<String, Object>();\n owner.fieldDescription.put(\"fullName\", \"Owner\");\n owner.fieldDescription.put(\"type\", \"Lookup\");\n\n fieldDescribe = new HashMap<String, FieldWrapper>();\n\n fieldDescribe.put((String) id.fieldDescription.get(\"fullName\"), id);\n fieldDescribe.put((String) name.fieldDescription.get(\"fullName\"), name);\n fieldDescribe.put((String) createdBy.fieldDescription.get(\"fullName\"), createdBy);\n fieldDescribe.put((String) lastModifiedBy.fieldDescription.get(\"fullName\"), lastModifiedBy);\n fieldDescribe.put((String) owner.fieldDescription.get(\"fullName\"), owner);\n }", "public DessertItem() {\n this(\"\");\n }", "public Item(){\n description = \"No description avaible for this item\";\n weight = 0;\n }", "public Item()\r\n\t{\r\n\t\tserialNum = 00000;\r\n\t\tweight = 0.0;\r\n\t}", "public Item() {}", "public Item_Record() {\n super(Item_.ITEM_);\n }", "public Item() \r\n\t{\r\n\t\tname = \"AbstractItem\";\r\n\t\tdescription = \"Example Item Generated\";\r\n\t\tprice = 0;\r\n\t}", "public Item(String itemName, String itemDescription){\n this.itemName = itemName;\n this.itemDescription = itemDescription;\n}", "@Override\n\tpublic void initializeItemFields(CharacterClass item) {\n\t\titem.setStartingMainhandInstance(weaponBag.getItem(item.getStartingMainhand()));\n\t\titem.setStartingOffhandInstance(weaponBag.getItem(item.getStartingOffhand()));\n\n\t\titem.setStartingHelmetInstance(equipmentBag.getItem(item.getStartingHelmet()));\n\t\titem.setStartingChestInstance(equipmentBag.getItem(item.getStartingChest()));\n\t\titem.setStartingGlovesInstance(equipmentBag.getItem(item.getStartingGloves()));\n\t\titem.setStartingPantsInstance(equipmentBag.getItem(item.getStartingPants()));\n\t\titem.setStartingBootsInstance(equipmentBag.getItem(item.getStartingBoots()));\n\t\titem.setStartingRing1Instance(equipmentBag.getItem(item.getStartingRing1()));\n\t\titem.setStartingRing2Instance(equipmentBag.getItem(item.getStartingRing2()));\n\t\titem.setStartingNeckInstance(equipmentBag.getItem(item.getStartingNeck()));\n\n\t\t// Initialize Skills\n\t\tif(item.getSkillInstances() == null)\n\t\t\titem.setSkillInstances(new ArrayList<>());\n\n\t\tfor(String id: item.getSkills()) {\n\t\t\tSkill skill = skillBag.getItem(id);\n\t\t\titem.getSkillInstances().add(skill);\n\t\t}\n\t}", "public Item() {\n\t}", "public Item() {\n\t}", "public void initForAddNew() {\r\n\r\n\t}", "public Item(){}", "public ItemRecord() {\n super(Item.ITEM);\n }", "public Item(String input) {\n name = input;\n }", "public Item createItem() {\n if(pickUpImplementation == null)\n {\n pickUpImplementation = new DefaultPickUp();\n }\n\n if(lookImplementation == null)\n {\n lookImplementation = new DefaultLook(R.string.default_look);\n }\n\n if(defaultItemInteraction == null)\n {\n throw new IllegalArgumentException(\"No default interaction specified!\");\n }\n\n\n return new Item(\n id,\n name,\n pickUpImplementation,\n lookImplementation,\n useImplementation,\n defaultItemInteraction\n );\n }", "public Item()\n {\n super();\n }", "public ItemRecord(String itemid, String productid, BigDecimal listprice, BigDecimal unitcost, Integer supplier, String status, String attr1, String attr2, String attr3, String attr4, String attr5) {\n super(Item.ITEM);\n\n set(0, itemid);\n set(1, productid);\n set(2, listprice);\n set(3, unitcost);\n set(4, supplier);\n set(5, status);\n set(6, attr1);\n set(7, attr2);\n set(8, attr3);\n set(9, attr4);\n set(10, attr5);\n }", "Item(){\r\n\t\tthis(0, new Weight(5), new DukatAmount(0));\r\n\t}", "private Item(){}", "@Override\r\n\tpublic Item constructItem() {\r\n try {\r\n @SuppressWarnings(\"unchecked\")\r\n T entity = (T) entityClass.newInstance();\r\n BeanInfo info = Introspector.getBeanInfo(entityClass);\r\n for (PropertyDescriptor pd : info.getPropertyDescriptors()) {\r\n for (Object propertyId : queryDefinition.getPropertyIds()) {\r\n if (pd.getName().equals(propertyId)) {\r\n Method writeMethod = pd.getWriteMethod();\r\n Object propertyDefaultValue = queryDefinition.getPropertyDefaultValue(propertyId);\r\n writeMethod.invoke(entity, propertyDefaultValue);\r\n }\r\n }\r\n }\r\n return toItem(entity);\r\n } catch (Exception e) {\r\n throw new RuntimeException(\"Error in bean construction or property population with default values.\", e);\r\n }\r\n }", "public Item() {\n }", "public Item() {\n }", "public InventoryItem(){\r\n this.itemName = \"TBD\";\r\n this.sku = 0;\r\n this.price = 0.0;\r\n this.quantity = 0;\r\n nItems++;\r\n }", "private void initializeData() {\n lblItem.setText(product.getName());\n txtReference.setText(product.getTransaction().getReferenceNumber());\n txtItem.setText(product.getName());\n txtDescription.setText(product.getDescription());\n txtBrand.setText(product.getBrand());\n txtModel.setText(product.getModel());\n txtQuantity.setText(String.valueOf(product.getQuantity()));\n txtUnit.setText(product.getUnit());\n txtProductDate.setDate(product.getProduct_date());\n txtOrigPrice.setText(String.valueOf(product.getOriginalPrice()));\n txtAgent.setText(product.getAgent());\n txtContactPerson.setText(product.getContactPerson());\n try { \n txtSupplier.setText(((Supplier)product.getSuppliers().toArray()[0]).getName());\n } catch(ArrayIndexOutOfBoundsException ex) {\n System.out.println(ex.toString());\n }\n }", "@Override\r\n\tpublic void init() {\n\t\tint numOfItems = loader.getNumOfItems();\r\n\t\tsetStoreSize(numOfItems);\r\n\r\n\t\tfor (int i = 0; i < numOfItems; i++) {\r\n DrinksStoreItem item = (DrinksStoreItem) loader.getItem(i);\r\n\t\t\tStoreObject brand = item.getContent();\r\n\t\t\tStoreObject existingBrand = findObject(brand.getName());\r\n\t\t\tif (existingBrand != null) {\r\n\t\t\t item.setContent(existingBrand);\r\n\t\t\t}\r\n\t\t\taddItem(i, item);\t\r\n\t\t}\r\n\t}", "public ModifyItem() {\n initComponents();\n }", "@Override\n public void initialize() {\n this.product = new Product(this.productId,this.productName,this.productPrice,this.productInv,this.productMin,this.productMax);\n productTitleLabel.setText(\"Modify Product\");\n }", "public EnterpriseBeansItem() {\n super();\n }", "@SuppressWarnings(\"unused\")\n public Item() {\n }", "public ShoppingListItem() {}", "public ItemManager() {\n itemMap = new HashMap<>();\n importantItemList = new ArrayList<>();\n\n }", "public ItemPro() {\n initComponents();\n comboFill();\n }", "public void inputItemDetails()\r\n\t{\r\n\t\tserialNum = inputValidSerialNum();\r\n\t\tweight = inputValidWeight();\r\n\t}", "protected Item() {\n }", "public Item(String itemName, double itemPrice, int numPurchased)\n {\n \tname = itemName;\n \tprice = itemPrice;\n \tquantity = numPurchased;\n }", "public FinalMysteryItem() {\n int randomIndex = new Random().nextInt(7);\n item = new Item(listOfPossibleNames[randomIndex], PRICE_TO_BUY);\n }", "public OrderItem() {}", "public Item_Record(Integer _Id_, String name_, String description_, String code_, Double price_, Double retailPrice_, Double costPrice_, Object _Search_, String[] _Types_, String _LastModified_, Integer _Version_) {\n super(Item_.ITEM_);\n\n set(0, _Id_);\n set(1, name_);\n set(2, description_);\n set(3, code_);\n set(4, price_);\n set(5, retailPrice_);\n set(6, costPrice_);\n set(7, _Search_);\n set(8, _Types_);\n set(9, _LastModified_);\n set(10, _Version_);\n }", "@Override\r\n\tprotected void init() {\n\t\tupdateValues();\r\n\t}", "public POJOCompteItem() {\n compte = new TreeMap<Date, Integer>();\n items = new ArrayList<Item>();\n }", "private void setItem(){\n item = new String[4];\n item[0] = title;\n item[1] = DueDate;\n item[2] = Description;\n item[3] = \"incomplete\";\n }", "public ItemsLM(String fld, boolean single) { super(fld); this.single = single;}", "private void fillFields() {\n\t\tInteger owner = this.contractor.getOwner();\n\n\t\tnameField.setText(getTrimmedValue(this.contractor.getName()));\n\t\tlocationField.setText(getTrimmedValue(this.contractor.getLocation()));\n\t\townerField.setText(owner == null ? \"\" : owner.toString());\n\t\tsizeField.setText(contractor.getSize().toString());\n\t\trateField.setText(Contractor.RATE_FORMAT.format(this.contractor\n\t\t\t\t.getRate()));\n\t\tspecialtiesList.setListData(this.contractor.getSpecialties());\n\t}", "public Item( Item p ) {\n\t\tif( p != null ) {\n\t\t\tvalue = p.value;\n\t\t\tname = p.name;\n\t\t}\n\t}", "public ModuleObjectAttributeItem() {}", "private void makeObject() {\n\t\t\n\t\tItem I1= new Item(1,\"Cap\",10.0f,\"to protect from sun\");\n\t\tItemMap.put(1, I1);\n\t\t\n\t\tItem I2= new Item(2,\"phone\",100.0f,\"Conversation\");\n\t\tItemMap.put(2, I2);\n\t\t\n\t\tSystem.out.println(\"Objects Inserted\");\n\t}", "@NonNull\n protected AbstractEntityItem.Builder newBuilder(\n @NonNull IRequiredValueModelNodeItem item,\n @NonNull ItemType itemType,\n @NonNull String identifier) {\n return new AbstractEntityItem.Builder()\n .instance(item, itemType)\n .originalIdentifier(identifier)\n .source(ObjectUtils.requireNonNull(item.getBaseUri(), \"item must have an associated URI\"));\n }", "private void initData() {\n ContractList conl = new ContractList();\n String iCard = txtindentify.getText().trim();\n if (conl.getacc(iCard) == 0) {\n txtAcc.setText(\"NEW CUSTOMER\");\n\n } else {\n Customer cus = new Customer();\n CustomerList cl = new CustomerList();\n cus = cl.getcus(iCard);\n txtAcc.setText(Integer.toString(cus.acc));\n\n }\n }", "public void addItem() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter Item Name: \");\n\t\tString itemName = scanner.nextLine();\n\t\tSystem.out.print(\"Enter Item Description: \");\n\t\tString itemDescription = scanner.nextLine();\n\t\tSystem.out.print(\"Enter minimum bid price for item: $\");\n\t\tdouble basePrice = scanner.nextDouble();\n\t\tLocalDate createDate = LocalDate.now();\n\t\tItem item = new Item(itemName, itemDescription, basePrice, createDate);\n\t\taddItem(item);\n\t}", "public UseCaseItem() {\n delegate = new MyModel.Builder().build();\n }", "public PurchaseOrderItem () {\n\t\tsuper();\n\t}", "@Test\n public void constructorInitializesAllItemsInUnknownState() {\n FirstAidItem firstAidItem = Tests.buildFirstAidItem(Point.pt(2.5, 3.5));\n WeaponItem weaponItem = Tests.buildWeaponItem(Point.pt(1.5, 0.5), Weapon.WeaponType.HANDGUN);\n\n Bot bot = Tests.mockBot();\n ItemMemory itemMemory = new ItemMemory(bot, asList(firstAidItem, weaponItem));\n\n assertThat(itemMemory.get(firstAidItem).getState(), is(ItemMemoryRecord.State.UNKNOWN));\n assertThat(itemMemory.get(weaponItem).getState(), is(ItemMemoryRecord.State.UNKNOWN));\n }", "private void populateFields() {\n\t\ttypeNameTF.setText(\"\");\n\t\tunitsTF.setText(\"\");\n\t\tunitMeasureTF.setText(\"\");\n\t\tvalidityDaysTF.setText(\"\");\n\t\treorderPointTF.setText(\"\");\n\t\tnotesTF.setText(\"\");\n\t\tstatusCB.getItems().addAll(\"Active\", \"Inactive\");\n\t\tstatusCB.setValue(\"Active\");\n\t}", "public LeastMoviableItemForm() {\n initComponents();\n LeastMoviableItem();\n }", "public Source(String name, String description, String story, double mass, \n String itemtype, String itemname, String itemdescription, String itemstory, \n double itemmass, double itemnutrition) \n {\n super(name, description, story, mass);\n this.itemtype = itemtype;\n \n this.itemname = itemname;\n this.itemdescription = itemdescription;\n this.itemstory = itemstory; \n this.itemmass = itemmass;\n this.itemnutrition = itemnutrition;\n \n //creates item of the type itemtype, which is specified upon creation of the source\n if(itemtype.equals(\"Drink\")) {new Drink(itemname, itemdescription, itemstory, itemmass, itemnutrition);}\n else if(itemtype.equals(\"Food\")) {new Food (itemname, itemdescription, itemstory, itemmass, itemnutrition);}\n else if(itemtype.equals(\"Item\")) {item = new Item (itemname, itemdescription, itemstory, itemmass);} \n }", "private void initFields(){\n labels.put(\"patientID\", new JLabel(\"Patient ID:\"));\n labels.put(\"newOwed\", new JLabel(\"New Owed:\"));\n \n fields.put(\"patientID\", new JTextField());\n fields.put(\"newOwed\", new JTextField());\n }", "protected FollowersItem() {\n hashDupA = hashDupB = \"\";\n aw = null;\n }", "public Item(int id, String name, int quantity, double price, Supplier supplier){\r\n toolId = id;\r\n toolName = name;\r\n toolQuantity = quantity;\r\n toolPrice = price;\r\n toolSupplier = supplier;\r\n }", "public GItem(Item i) {\n this.mGItem = i.getId();\n this.title = i.getTitle();\n\n if (!i.getAddress().equals(\"\")){\n this.address = i.getAddress();\n }\n\n if (i instanceof OfficerItem){\n this.type = 1;\n\n } else if (i instanceof CompanyItem){\n this.type = 0;\n }\n\n }", "private AgendaItemDefinition() {\r\n \tthis.id = null;\r\n \tthis.agendaId = null;\r\n \tthis.ruleId = null;\r\n \tthis.subAgendaId = null;\r\n \tthis.whenTrueId = null;\r\n \tthis.whenFalseId = null;\r\n \tthis.alwaysId = null;\r\n \t\r\n \tthis.rule = null;\r\n \tthis.subAgenda = null;\r\n \t\r\n \tthis.whenTrue = null;\r\n \tthis.whenFalse = null;\r\n \tthis.always = null;\r\n \t\r\n this.versionNumber = null;\r\n }", "Quantity initQuantity(Quantity iQuantity)\n {\n iQuantity.updateElementValue(\"Quantity\");\n return iQuantity;\n }", "public AddItemViewParameters() {\n\t}", "public Inventory() {\r\n initialize();\r\n }", "public Item(\n int itemId ,\n int currentQty ,\n int minQty ,\n int maxQty ,\n BufferedImage icon ,\n String label, \n String desc ,\n String attr)\n {\n this.itemId = itemId ;\n this.currentQty=currentQty;\n this.minQty=minQty;\n this.maxQty=maxQty;\n this.icon=icon;\n this.label=label;\n }", "@Override\n\tpublic Item create() {\n\t\tLOGGER.info(\"Shoe Name\");\n\t\tString item_name = util.getString();\n\t\tLOGGER.info(\"Shoe Size\");\n\t\tdouble size = util.getDouble();\n\t\tLOGGER.info(\"Set Price\");\n\t\tdouble price = util.getDouble();\n\t\tLOGGER.info(\"Number in Stock\");\n\t\tlong stock = util.getLong();\n\t\tItem newItem = itemDAO.create(new Item(item_name, size, price, stock));\n\t\tLOGGER.info(\"\\n\");\n\t\treturn newItem;\n\t}", "public AddItem() {\n initComponents();\n }", "protected Product(Parcel in) {\r\n quantity = in.readInt();\r\n name = in.readString();\r\n checked = in.readByte() != 0;\r\n }", "public @NotNull Item newItem();", "public Item(String itemName, String itemList, String itemNote, int itemNumStocks, String itemExpireDate, int itemID) {\n this.itemName = itemName;\n this.itemList = itemList;\n this.itemNote = itemNote;\n this.itemNumStocks = itemNumStocks;\n this.itemExpireDate = itemExpireDate;\n this.itemID = itemID;\n }", "public Inventory() {\n this.SIZE = DEFAULT_SIZE;\n this.ITEMS = new ArrayList<>();\n }", "public QuestionPoolItemData(){\n }", "public static void createItem() {\n //Initializing an item and putting it in a room airport\n itemLocation.addItem(airport, new PickableItem(\"Bottle\", \"This is a bottle that have been left behind by someone\", 2, false));\n itemLocation.addItem(airport, new PickableItem(\"Boardingpass\", \"This is a boardingpass to get on the plane to Hawaii: 126AB\", 1, false));\n\n //Initializing an item and putting it in a room beach\n itemLocation.addItem(beach, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Fish\", \"Why are you inspecting this item, its GOD damn fish\", 1, true));\n itemLocation.addItem(beach, new PickableItem(\"Fish\", \"Why are you inspecting this item, its GOD damn fish\", 1, true));\n itemLocation.addItem(beach, new PickableItem(\"Flint\", \"This a flint, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Rope\", \"This is some rope that has been washed up on the beach shore from the plane crash \", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n itemLocation.addItem(beach, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n //non pickable item\n itemLocation.addItem(beach, new Item(\"GiantRock\", \"The giant rock dont look like it can be moved\", 100));\n itemLocation.addItem(beach, new Item(\"GiantLog\", \"The giant log dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room jungle\n itemLocation.addItem(jungle, new PickableItem(\"Berry\", \"this is berries, maybe its poisonous try ur luck!! \", 1, true));\n itemLocation.addItem(jungle, new PickableItem(\"Berry\", \"this is berries, maybe its poisonous try ur luck!! \", 1, true));\n itemLocation.addItem(jungle, new PickableItem(\"Lumber\", \"This is a log of tree, maybe it can be used to craft something to get away from this island \", 3, false));\n itemLocation.addItem(jungle, new PickableItem(\"Lian\", \"This is a lian from the jungle, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Lian\", \"This is a lian from the jungle, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n //non pickable item\n itemLocation.addItem(jungle, new Item(\"GiantLog\", \"The giant log dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room mountain\n itemLocation.addItem(mountain, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(mountain, new PickableItem(\"Egg\", \"This is some wild eggs, maybe it can be used for food\", 1, true));\n itemLocation.addItem(mountain, new PickableItem(\"Lumber\", \"This is a log of tree, maybe it can be used to craft something to get away from this island \", 3, false));\n\n //Initializing an item and putting it in a room cave\n itemLocation.addItem(cave, new PickableItem(\"Shroom\", \"these shrooms look suspecius, but maybe the can be\", 1, true));\n itemLocation.addItem(cave, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new PickableItem(\"Waterbottle\", \"This is freshwater found in the jungle, maybe you can drink it\", 2, true));\n itemLocation.addItem(cave, new PickableItem(\"Flint\", \"This a flint, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new Item(\"GiantRock\", \"The giant rock dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room camp\n itemLocation.addItem(camp, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(camp, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n itemLocation.addItem(camp, new PickableItem(\"Egg\", \"This is some wild eggs, maybe it can be used for food\", 1, true));\n\n //Initializing an item and putting it in a room seaBottom\n itemLocation.addItem(seaBottom, new PickableItem(\"Backpack\", \"This is a backpack from the plane crash maybe you can use it to carry more items \", 0, false));\n itemLocation.addItem(seaBottom, new PickableItem(\"WaterBottle\", \"This is a water bottle from the plan crash \", 1, true));\n itemLocation.addItem(seaBottom, new PickableItem(\"Rope\", \"This is some rope that has been washed up on the beach shore from the plane crash\", 2, false));\n }", "public ItemmatlBean() {\n }", "public Item(int weigth, String name, String description) {\n this.weigth = weigth;\n this.name = name;\n this.description = description;\n }", "public void init(String rawInfo) {\n try {\n destination = setValue(\"Destination\", rawInfo);\n vehicleNumber = Integer.parseInt(setValue(\"VehicleNo\", rawInfo));\n longitude = Double.parseDouble(setValue(\"Longitude\", rawInfo));\n latitude = Double.parseDouble(setValue(\"Latitude\", rawInfo));\n direction = setValue(\"Direction\", rawInfo);\n } catch (IllegalStateException e) {\n // This happens if the init string is in an invalid format. Set all members to their\n // default values.\n destination = \"null\";\n vehicleNumber = -1;\n longitude = 0.0;\n latitude = 0.0;\n direction = \"West\";\n }\n }", "public void initItems() {\n List<Integer> emptySlots = NimbleServer.enchantmentConfig.getEmptySlots();\n for (int i = 0; i < getSize(); i++) {\n if(!(emptySlots.contains(i))) {\n getInventory().setItem(i, getFiller());\n }\n }\n }", "public Invoice(){\r\n this.userName = \"\";\r\n this.InvoiceCode = \"\";\r\n this.items = new ArrayList<>();\r\n this.amount = 0.0;\r\n \r\n }", "public RestaurantItem() {\n }", "Item(String name, String description, String userRequirements, int amount, Condition condition, boolean reservable, int locationID) {\n this.name = name;\n this.description = description;\n this.userRequirements = userRequirements;\n this.ID = nextID;\n nextID++;\n this.amount = amount;\n this.condition = condition;\n this.reservable = reservable;\n this.locationID = locationID;\n }", "Item(Weight weight){\r\n\t\tthis(0, weight, new DukatAmount(0));\r\n\t}", "public AbstractItemFactory(){\n this.setDefault();\n }", "public SellItem() {\n initComponents();\n }", "AdapterItems(int ID, String product)\n {\n this.ID=ID;\n this.product=product;\n //this. Description=Description;\n }", "public void InitData() {\n this.mItemTitleIds = new int[]{R.string.can_rvs_camera, R.string.can_ccaqyxfz};\n this.mItemTypes = new CanScrollCarInfoView.Item[]{CanScrollCarInfoView.Item.POP, CanScrollCarInfoView.Item.SWITCH};\n this.mPopValueIds[0] = new int[]{R.string.can_hjyxfzxt, R.string.can_dccsyxfzxt};\n this.mCarData = new CanDataInfo.LuxgenOd_SetData();\n }", "public ListItems() {\n itemList = new ArrayList();\n }", "public void init() throws IllegalArgumentException {\r\n\t\tthis.listItemMapper = ListItemMapper.listitemMapper();\r\n\t\tthis.itemMapper = ItemMapper.itemMapper();\r\n\t\tthis.personMapper = PersonMapper.personMapper();\r\n\t\tthis.shoppingListMapper = ShoppingListMapper.shoppinglistMapper();\r\n\t\tthis.storeMapper = StoreMapper.storeMapper();\r\n\t\tthis.groupMapper = GroupMapper.groupMapper();\r\n\t\tthis.responsibilityMapper = ResponsibilityMapper.responsibilityMapper();\r\n\t\tthis.favoriteItemMapper = FavoriteItemMapper.favoriteItemMapper();\r\n\r\n\t}", "public FlyerFeaturedItem() {}", "public void inicializarItemInvoice() {\r\n\t\ttry {\r\n\t\t\teditarItem = false;\r\n\t\t\trequired = true;\r\n\t\t\tpo = new PO();\r\n\t\t\tlistPos = new ArrayList<PO>();\r\n\t\t\titemInvoice = null;\r\n\t\t\titemPO = null;\r\n\t\t\tpartNumber = null;\r\n\t\t\tBasicFiltroPO filtroPO = new BasicFiltroPO();\r\n\r\n\t\t\tCarga c = facade.getCargaById(invoice.getCarga().getId());\r\n\t\t\tfiltroPO.setFilial(c.getFilial());\r\n\t\t\tlistPos = facade.listarPO(filtroPO);\r\n\t\t\tpoConverter = new ConverterUtil<PO>(listPos);\r\n\r\n\t\t} catch (BusinessException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public RecentItem() {\n }", "public Item()\r\n {\r\n gen = new Random();\r\n color = new Color(gen.nextInt());\r\n x = 200;\r\n w = 100;\r\n h = 18;\r\n }", "public Item(String id, int index) {\n this.id = id;\n this.itemIndex = index;\n this.dataBank = new DataBank();\n this.usersRatings = new SortedRatingList();\n }", "@Override\n protected void init()\n throws ReadWriteException\n {\n // 商品マスタ\n _ItemHandler = new ItemHandler(getConnection());\n _ItemKey = new ItemSearchKey();\n\n // 商品固定棚マスタ\n _fixedHandler = new FixedLocateInfoHandler(getConnection());\n _fixedKey = new FixedLocateInfoSearchKey();\n\n // 入荷予定情報\n _recHandler = new ReceivingPlanHandler(getConnection());\n _recKey = new ReceivingPlanSearchKey();\n\n // 入庫予定情報\n _stHandler = new StoragePlanHandler(getConnection());\n _stKey = new StoragePlanSearchKey();\n\n // 出庫予定情報\n _retHandler = new RetrievalPlanHandler(getConnection());\n _retKey = new RetrievalPlanSearchKey();\n\n // 入出庫作業情報\n _wIHandler = new WorkInfoHandler(getConnection());\n _wIKey = new WorkInfoSearchKey();\n\n // 出荷予定情報\n _shipHandler = new ShipPlanHandler(getConnection());\n _shipKey = new ShipPlanSearchKey();\n\n // 移動作業情報\n _moveHandler = new MoveWorkInfoHandler(getConnection());\n _moveKey = new MoveWorkInfoSearchKey();\n\n // 棚卸作業情報\n _invHandler = new InventWorkInfoHandler(getConnection());\n _invKey = new InventWorkInfoSearchKey();\n\n // 在庫情報\n _stkHandler = new StockHandler(getConnection());\n _stkKey = new StockSearchKey();\n\n // 作業単位数マスタ\n _wkUnitHandler = new WorkingUnitHandler(getConnection());\n _wkUnitKey = new WorkingUnitSearchKey();\n\n // AS/RSソフトゾーン情報\n _softHandler = new SoftZoneHandler(getConnection());\n _softKey = new SoftZoneSearchKey();\n }", "public InventoryEntry() {\n super();\n }", "protected abstract void makeItem();" ]
[ "0.68478274", "0.68420607", "0.66655093", "0.6582235", "0.65248305", "0.6468744", "0.64475816", "0.63730085", "0.63707346", "0.6320819", "0.6316589", "0.63121814", "0.6310636", "0.63017154", "0.62681913", "0.62681913", "0.62655866", "0.62368226", "0.62190163", "0.62154746", "0.6208966", "0.62046254", "0.620303", "0.6197929", "0.6176663", "0.61682725", "0.6128148", "0.6128148", "0.61175203", "0.61142397", "0.60922486", "0.6088666", "0.6071063", "0.60611176", "0.6025773", "0.60178787", "0.59814256", "0.59684086", "0.59572726", "0.5953617", "0.59487176", "0.5927955", "0.5913534", "0.5899667", "0.58927095", "0.5886538", "0.58624315", "0.5861593", "0.58599085", "0.5844734", "0.5842872", "0.58060604", "0.57995784", "0.57826126", "0.57705367", "0.57701474", "0.5767034", "0.57419646", "0.57377124", "0.5734927", "0.5727879", "0.5726153", "0.57235855", "0.57223994", "0.570892", "0.5702732", "0.5700631", "0.5689784", "0.5688732", "0.5688498", "0.56873393", "0.5685147", "0.5684899", "0.56807303", "0.56789565", "0.566643", "0.56583804", "0.56552064", "0.56397474", "0.56376374", "0.5637115", "0.5634406", "0.5633291", "0.5629569", "0.56283426", "0.5620663", "0.56169116", "0.561645", "0.56157804", "0.56086516", "0.55911124", "0.55880964", "0.55868983", "0.55801", "0.55789465", "0.5577373", "0.5577116", "0.55741215", "0.55692226", "0.5565492" ]
0.7579651
0
Initialize the UI elements
private void initViews() { inputName = findViewById(R.id.inputGroceryItemName); inputQuantityToBuy = findViewById(R.id.inputGroceryItemQuantity); inputUnits = findViewById(R.id.inputGroceryItemUnits); inputPrice = findViewById(R.id.inputGroceryItemPrice); inputCalories = findViewById(R.id.inputGroceryItemCalories); btnCancel = findViewById(R.id.btnCancelAddGrocery); btnAdd = findViewById(R.id.btnAddGroceryItem); checkEgg = findViewById(R.id.inputCheckGroceryEggs); checkFish = findViewById(R.id.inputCheckGroceryFish); checkGluten = findViewById(R.id.inputCheckGroceryGluten); checkLactose = findViewById(R.id.inputCheckGroceryLactose); checkSoy = findViewById(R.id.inputCheckGrocerySoy); checkNuts = findViewById(R.id.inputCheckGroceryNuts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initUI() {\n }", "public void init()\n {\n buildUI(getContentPane());\n }", "void initUI();", "@Override\r\n\tprotected void initUI() {\n\r\n\t}", "private void initUI() {\n tvQuote = (TextView) findViewById(R.id.tvQuote);\n tvBeginButton = (TextView) findViewById(R.id.tvBeginButton);\n\n tvBeginButton.setOnClickListener(this);\n\n loadBackground();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "private void initUI() {\n\t\tthis.horizontalLayout = new XdevHorizontalLayout();\n\t\tthis.gridLayout = new XdevGridLayout();\n\t\tthis.button = new XdevButton();\n\t\tthis.button2 = new XdevButton();\n\t\tthis.label = new XdevLabel();\n\n\t\tthis.button.setCaption(\"go to HashdemoView\");\n\t\tthis.button2.setCaption(\"go to CommonView\");\n\t\tthis.label.setValue(\"Go into code tab to view comments\");\n\n\t\tthis.gridLayout.setColumns(2);\n\t\tthis.gridLayout.setRows(2);\n\t\tthis.button.setWidth(200, Unit.PIXELS);\n\t\tthis.button.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button, 0, 0);\n\t\tthis.button2.setWidth(200, Unit.PIXELS);\n\t\tthis.button2.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button2, 1, 0);\n\t\tthis.label.setWidth(100, Unit.PERCENTAGE);\n\t\tthis.label.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.label, 0, 1, 1, 1);\n\t\tthis.gridLayout.setComponentAlignment(this.label, Alignment.TOP_CENTER);\n\t\tthis.gridLayout.setSizeUndefined();\n\t\tthis.horizontalLayout.addComponent(this.gridLayout);\n\t\tthis.horizontalLayout.setComponentAlignment(this.gridLayout, Alignment.MIDDLE_CENTER);\n\t\tthis.horizontalLayout.setExpandRatio(this.gridLayout, 10.0F);\n\t\tthis.horizontalLayout.setSizeFull();\n\t\tthis.setContent(this.horizontalLayout);\n\t\tthis.setSizeFull();\n\n\t\tthis.button.addClickListener(event -> this.button_buttonClick(event));\n\t\tthis.button2.addClickListener(event -> this.button2_buttonClick(event));\n\t}", "public UI() {\n initComponents();\n }", "private void initUI() {\n\t\tfileInputPanel.setLayout(new GridBagLayout());\n\n\t\tGridBagConstraints gridBagConstraints = new GridBagConstraints();\n\t\tgridBagConstraints.insets = new Insets(10, 5, 10, 5);\n\t\tgridBagConstraints.anchor = GridBagConstraints.NORTH;\n\t\tgridBagConstraints.gridwidth = 2;\n\n\t\tJLabel title = new JLabel(\"Welcome to ANNie\");\n\t\ttitle.setFont(new Font(\"Serif\", Font.BOLD, 36));\n\n\t\tfileInputPanel.add(title, gridBagConstraints);\n\n\t\tgridBagConstraints.gridwidth = 1;\n\t\tgridBagConstraints.insets = new Insets(10, 5, 10, 5);\n\n\t\tfileInputPanel.setBorder(BorderFactory.createLineBorder(Color.black));\n\n\t\tcreateFileDropdownArea(gridBagConstraints);\n\t\tcreateLabelSelectArea(gridBagConstraints);\n\t\tcreateButtons(gridBagConstraints);\n\t}", "private void initUI() {\r\n\t\t//Äußeres Panel\r\n\t\tContainer pane = getContentPane();\r\n\t\tGroupLayout gl = new GroupLayout(pane);\r\n\t\tpane.setLayout(gl);\r\n\t\t//Abstende von den Containern und dem äußeren Rand\r\n\t\tgl.setAutoCreateContainerGaps(true);\r\n\t\tgl.setAutoCreateGaps(true);\r\n\t\t//TextFeld für die Ausgabe\r\n\t\tJTextField output = view.getTextField();\r\n\t\t//Die jeweiligen Panels für die jeweiigen Buttons\r\n\t\tJPanel brackets = view.getBracketPanel();\r\n\t\tJPanel remove = view.getTop2Panel();\r\n\t\tJPanel numbers = view.getNumbersPanel();\r\n\t\tJPanel last = view.getBottomPanel();\r\n\t\t//Anordnung der jeweiligen Panels durch den Layout Manager\r\n\t\tgl.setHorizontalGroup(gl.createParallelGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tgl.setVerticalGroup(gl.createSequentialGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tpack();\r\n\t\tsetTitle(\"Basic - Taschenrechner\");\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\tsetResizable(false);\r\n\t}", "public void setupUI() {\r\n\t\t\r\n\t\tvPanel = new VerticalPanel();\r\n\t\thPanel = new HorizontalPanel();\r\n\t\t\r\n\t\titemName = new Label();\r\n\t\titemName.addStyleName(Styles.page_title);\r\n\t\titemDesc = new Label();\r\n\t\titemDesc.addStyleName(Styles.quest_desc);\r\n\t\titemType = new Label();\r\n\t\titemType.addStyleName(Styles.quest_lvl);\r\n\t\t\r\n\t\tVerticalPanel img = new VerticalPanel();\r\n\t\timg.add(new Image(imgDir));\r\n\t\t\r\n\t\tvPanel.add(itemName);\r\n\t\tvPanel.add(itemDesc);\r\n\t\tvPanel.add(img);\r\n\t\tvPanel.add(hPanel);\r\n\t\t\r\n\t\tVerticalPanel mainPanel = new VerticalPanel();\r\n\t\tmainPanel.setWidth(\"100%\");\r\n\t\tvPanel.addStyleName(NAME);\r\n\t\t\r\n\t\tmainPanel.add(vPanel);\r\n \tinitWidget(mainPanel);\r\n }", "private void initialize() {\n\tif (setup == false) {\n\t elementList.add(new GUISlider());\n\t elementList.add(new GUIChart());\n\t elementList.add(new GUIStatsDisplay());\n\t elementList.add(new GUIPID());\n\t elementList.add(new GUITimer());\n\t elementList.add(new GUINumericUpDown());\n\t setup = true;\n\t}\n }", "protected void initialize()\n {\n uiFactory.configureUIComponent(this, UI_PREFIX);\n\n initializeFields();\n initializeLabels();\n initLayout();\n }", "private void initUI() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\trenderer = new LWJGLRenderer();\n\t\t\tgui = new GUI(stateWidget, renderer);\n\t\t\tthemeManager = ThemeManager.createThemeManager(StateWidget.class.getResource(\"gameui.xml\"), renderer);\n\t\t\tgui.applyTheme(themeManager);\n\t\t\t\n\t\t} catch (LWJGLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "protected void initUI() {\n\r\n\t\t((Button) findViewById(R.id.project_site_start_wifiscan_button)).setOnClickListener(this);\r\n\r\n\t\t// ((Button) findViewById(R.id.project_site_calculate_ap_positions_button)).setOnClickListener(this);\r\n\r\n\t\t// ((Button) findViewById(R.id.project_site_add_known_ap)).setOnClickListener(this);\r\n\r\n\t\t((Button) findViewById(R.id.project_site_step_detect)).setOnClickListener(this);\r\n\t\t\r\n\t\t((ToggleButton) findViewById(R.id.project_site_toggle_autorotate)).setOnClickListener(this);\r\n\r\n\t\tmultiTouchView = ((MultiTouchView) findViewById(R.id.project_site_resultview));\r\n\t\tmultiTouchView.setRearrangable(false);\r\n\r\n\t\tmultiTouchView.addDrawable(map);\r\n\r\n\t\tif (site.getTitle().equals(ProjectSite.UNTITLED)) {\r\n\t\t\tshowDialog(DIALOG_TITLE);\r\n\t\t} else {\r\n\t\t\tif (freshSite) {\r\n\t\t\t\t// start configuration dialog\r\n\t\t\t\tshowDialog(DIALOG_FRESH_SITE);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private void initUI() {\r\n\t\tthis.verticalLayout = new XdevVerticalLayout();\r\n\t\tthis.verticalLayout2 = new XdevVerticalLayout();\r\n\t\r\n\t\tthis.setSpacing(false);\r\n\t\tthis.setMargin(new MarginInfo(false));\r\n\t\tthis.verticalLayout.setSpacing(false);\r\n\t\tthis.verticalLayout.setMargin(new MarginInfo(false));\r\n\t\tthis.verticalLayout2.setMargin(new MarginInfo(false));\r\n\t\r\n\t\tthis.verticalLayout2.setSizeFull();\r\n\t\tthis.verticalLayout.addComponent(this.verticalLayout2);\r\n\t\tthis.verticalLayout.setComponentAlignment(this.verticalLayout2, Alignment.MIDDLE_CENTER);\r\n\t\tthis.verticalLayout.setExpandRatio(this.verticalLayout2, 20.0F);\r\n\t\tthis.verticalLayout.setSizeFull();\r\n\t\tthis.addComponent(this.verticalLayout);\r\n\t\tthis.setComponentAlignment(this.verticalLayout, Alignment.MIDDLE_CENTER);\r\n\t\tthis.setExpandRatio(this.verticalLayout, 10.0F);\r\n\t\tthis.setSizeFull();\r\n\t\r\n\t\tthis.addContextClickListener(event -> this.this_contextClick(event));\r\n\t}", "public mainUI() {\n initComponents();\n }", "private void initUI()\r\n\t{\r\n\t\tthis.label = new Label();\r\n\t\t\r\n\t\tthis.label.setText(\"This view is also saveable\");\r\n\t\t\r\n\t\tthis.label.setSizeUndefined();\r\n\t\tthis.add(this.label);\r\n\t\tthis.setSizeFull();\r\n\t}", "private void InitializeUI(){\n\t\t//Set up the menu items, which are differentiated by their IDs\n\t\tArrayList<MenuItem> values = new ArrayList<MenuItem>();\n\t\tMenuItem value = new MenuItem();\n\t\tvalue.setiD(0); values.add(value);\n\t\t\n\t\tvalue = new MenuItem();\n\t\tvalue.setiD(1); values.add(value);\n\t\t\n\t\tvalue = new MenuItem();\n\t\tvalue.setiD(2); values.add(value);\n\t\t\n\t\tvalue = new MenuItem();\n\t\tvalue.setiD(3); values.add(value);\n\t\t\n\t\tvalue = new MenuItem();\n\t\tvalue.setiD(4); values.add(value);\n\n MenuAdapter adapter = new MenuAdapter(this, R.layout.expandable_list_item3, values);\n \n // Assign adapter to List\n setListAdapter(adapter);\n \n //Set copyright information\n Calendar c = Calendar.getInstance();\n\t\tString year = String.valueOf(c.get(Calendar.YEAR));\n\t\t\n\t\t//Set up the copyright message which links to the author's linkedin page\n TextView lblCopyright = (TextView)findViewById(R.id.lblCopyright);\n lblCopyright.setText(getString(R.string.copyright) + year + \" \");\n \n TextView lblName = (TextView)findViewById(R.id.lblName);\n lblName.setText(Html.fromHtml(\"<a href=\\\"http://uk.linkedin.com/in/lekanbaruwa/\\\">\" + getString(R.string.name) + \"</a>\"));\n lblName.setMovementMethod(LinkMovementMethod.getInstance());\n\t}", "public UI() {\n initComponents();\n setResizable(false);\n }", "private void initUI() {\n mLocalContainer = findViewById(R.id.local_video_view_container);\n mRemoteContainer = findViewById(R.id.remote_video_view_container);\n\n mCallBtn = findViewById(R.id.btn_call);\n mMuteBtn = findViewById(R.id.btn_mute);\n mSwitchCameraBtn = findViewById(R.id.btn_switch_camera);\n }", "public void init() {\r\n\r\n add(btnUn);\r\n add(btnDeux);\r\n add(btnTrois);\r\n add(btnQuatre);\r\n add(btnCinq);\r\n\r\n btnUn.setBounds(120, 120, 100, 75);\r\n btnDeux.setBounds(120, 310, 100, 75);\r\n btnDeux.setTransferHandler(new TransferHandler(\"icon\"));\r\n btnTrois.setBounds(360, 310, 100, 75);\r\n btnQuatre.setBounds(160, 600, 100, 75);\r\n btnQuatre.setTransferHandler(new TransferHandler(\"icon\"));\r\n btnCinq.setBounds(360, 600, 100, 75);\r\n\r\n }", "public void InitUI() {\n this.mSetData = new CanDataInfo.CAN_Msg();\n this.mDoorInfo = new CanDataInfo.CAN_DoorInfo();\n setBackgroundResource(R.drawable.can_vw_carinfo_bg);\n this.mDoorIcons = new CustomImgView[6];\n if (MainSet.GetScreenType() == 5) {\n InitUI_1280x480();\n } else {\n InitUI_1024x600();\n }\n this.mOilItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mTempItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mElctricItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mTrunkUpItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mParkingItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mXhlcItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mRPMItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mSpeedItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mDistanceItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mLqywdItemTxt.setText(TXZResourceManager.STYLE_DEFAULT);\n }", "private void initializeUI() {\n emailTV = findViewById(R.id.email);\n passwordTV = findViewById(R.id.password);\n regBtn = findViewById(R.id.register);\n progressBar = findViewById(R.id.progressBar);\n nameTV = findViewById(R.id.displayName);\n }", "public abstract void initUiAndListener();", "private void setupUI(){\n this.setupTimerSchedule(controller, 0, 500);\n this.setupFocusable(); \n this.setupSensSlider();\n this.setupInitEnable();\n this.setupDebugger();\n }", "private void initialiseUI()\n { \n // The actual data go in this component.\n String defaultRootElement = \"icr:regionSetData\";\n JPanel contentPanel = initialiseContentPanel(defaultRootElement);\n pane = new JScrollPane(contentPanel);\n \n panelLayout = new GroupLayout(this);\n\t\tthis.setLayout(panelLayout);\n\t\tthis.setBackground(DAOConstants.BG_COLOUR);\n\n\t\tpanelLayout.setAutoCreateContainerGaps(true);\n\n panelLayout.setHorizontalGroup(\n\t\t\tpanelLayout.createParallelGroup()\n\t\t\t.addComponent(pane, 10, 520, 540)\n );\n\n panelLayout.setVerticalGroup(\n\t\t\tpanelLayout.createSequentialGroup()\n .addComponent(pane, 10, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE)\n );\n }", "public void initUI() {\n\t\tadd(board);\r\n\t\t//Set if frame is resizable by user\r\n\t\tsetResizable(false);\r\n\t\t//call pack method to fit the \r\n\t\t//preferred size and layout of subcomponents\r\n\t\t//***important head might not work correctly with collision of bottom and right borders\r\n\t\tpack();\r\n\t\t//set title for frame\r\n\t\tsetTitle(\"Snake\");\r\n\t\t//set location on screen(null centers it)\r\n\t\tsetLocationRelativeTo(null);\r\n\t\t//set default for close button of frame\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "private void initUI() {\n\t\tStage stage = Stage.createStage();\n\n\t\tControl formPanel = buildFormTestTab();\n\n\t\tControl cellPanel = buildCellTestTab();\n\t\t\n\t\tTabPanel tabbedPane = new TabPanel();\n\t\ttabbedPane.add(\"Form Test\", formPanel);\n\t\ttabbedPane.add(\"Cell Layout Test\", cellPanel);\n\n\t\tstage.setContent(tabbedPane);\n\t}", "public BridgingUI() {\n initComponents();\n initUserActions();\n }", "private void initComponents() {\n\n setLayout(new java.awt.BorderLayout());\n }", "private void initComponents() {\r\n\r\n setLayout(new java.awt.BorderLayout());\r\n }", "private void init() {\n initView();\n setListener();\n }", "public RummyUI(){\n \n //Call method initComponents\n initComponents();\n \n }", "protected void setupUI() {\n textView = (TextView) findViewById(R.id.textView);\n viewGradeButton = (Button) findViewById(R.id.viewAllBillsButton);\n viewDash = (Button) findViewById(R.id.viewDash);\n\n //Listen if the buttons is clicked\n viewGradeButton.setOnClickListener(onClickViewGradeButton);\n viewDash.setOnClickListener(onClickViewDash);\n\n }", "private void initialize() {\r\n\t\t// set specific properties and add inner components.\r\n\t\tthis.setBorder(BorderFactory.createEtchedBorder());\r\n\t\tthis.setSize(300, 400);\r\n\t\tthis.setLayout(new BorderLayout());\r\n\t\taddComponents();\r\n\t}", "private void initializeUI() {\n MedUtils.displayMedInfo(coverArt, playBinding.thumbIv, playBinding.titleTv,\n playBinding.subtitleTv, selectedMed);\n\n playBinding.playPauseBt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n switch (MediaPlayerService.getState()) {\n case Constants.STATE_PLAY:\n mediaPlayerService.pauseAction();\n break;\n case Constants.STATE_PAUSE:\n mediaPlayerService.playAction();\n break;\n case Constants.STATE_NOT_INIT:\n startMediaPlayerService();\n break;\n }\n }\n });\n\n playBinding.stopBt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n mediaPlayerService.stopAction();\n }\n });\n }", "public void init() {\n fIconkit = new Iconkit(this);\n\n\t\tsetLayout(new BorderLayout());\n\n fView = createDrawingView();\n\n Panel attributes = createAttributesPanel();\n createAttributeChoices(attributes);\n add(\"North\", attributes);\n\n Panel toolPanel = createToolPalette();\n createTools(toolPanel);\n add(\"West\", toolPanel);\n\n add(\"Center\", fView);\n Panel buttonPalette = createButtonPanel();\n createButtons(buttonPalette);\n add(\"South\", buttonPalette);\n\n initDrawing();\n setBufferedDisplayUpdate();\n setupAttributes();\n }", "protected void setupUI() {\r\n this.setLayout(new GridLayout((this.needDefaultValue) ? 3 : 2, 2));\r\n\r\n this.nameLabel = new JLabel(this.nameLabelText);\r\n this.add(this.nameLabel);\r\n this.add(this.nameTextField);\r\n\r\n this.typeLabel = new JLabel(this.typeLabelText);\r\n this.add(this.typeLabel);\r\n this.add(this.typeDropDown);\r\n\r\n if (this.needDefaultValue) {\r\n this.defValLabel = new JLabel(this.defValLabelText);\r\n this.add(this.defValLabel);\r\n this.add(this.defValueTextField);\r\n }\r\n }", "private void initComponents() {\n\t\t\n\t}", "private void initComponents() {\n\t\t\n\t}", "private void init() {\n setBackground(LIGHT_GRAY);\n Box layout = new Box(BoxLayout.Y_AXIS);\n\n jump = createButton(\"Jump\", null);\n exit = createButton(\"Exit!\", null);\n fly = createButton(\"Fly\", null);\n Jfloat = createButton(\"Float\", null);\n layout.add(Box.createRigidArea(new Dimension(0, 150)));\n layout.add(jump);\n layout.add(Box.createRigidArea(new Dimension(0, 25)));\n layout.add(Jfloat);\n layout.add(Box.createRigidArea(new Dimension(0, 25)));\n layout.add(fly);\n layout.add(Box.createRigidArea(new Dimension(0, 25)));\n layout.add(exit);\n add(layout);\n }", "private void initView(){\n\t\tinitSize();\n\t\tinitText();\n\t\tinitBackground();\n\t\tthis.setOnClickListener(this);\n\t\tthis.setOnLongClickListener(this);\n\t}", "private void initializeUi() {\n scanner = findViewById(R.id.surfaceView);\n cameraPreview = findViewById(R.id.surfaceView);\n bt_cross = findViewById(R.id.bt_cross);\n cargando = cargando();\n }", "private void init() {\n setText(\"Case Name\");\n createFieldsComp();\n GuiUtil.addSeparator(shell, SWT.HORIZONTAL);\n createBottomActionButtons();\n }", "private void initComponent() {\n\t\taddGrid();\n\t\taddToolBars();\n\t}", "public void init()\n\t\t{\n\t\t\t//Makes Lists\n\t\t\tmakeLists();\n\n\t\t\t//layout for GUI\n\t\t\tGridLayout layout = new GridLayout(2,4, 5 ,5);\n\t\t\tsetLayout(layout);\n\n\t\t\t//add panels to window\n\t\t\tadd(Panel_1);\n\t\t\tadd(Panel_2);\n\t\t\tadd(Panel_3);\n\t\t\tadd(Panel_4);\n\n\t\t\t//create buttons\n\t\t\tCalculateButton = new JButton(\"Calculate\");\n\t\t ExitButton = new JButton(\"Exit\");\n\n\t\t\t//connect event handlers to buttons\n\t\t CalculateButton.addActionListener(new ButtonListener());\n\t\t ExitButton.addActionListener(new ButtonListener());\n\n\t\t\t//add buttons to window\n\t\t add(CalculateButton);\n\t\t add(ExitButton);\n\n\t\t //make window visible\n\t\t\tsetVisible(true);\n\t\t}", "public seViewAnswerUI() {\n initComponents();\n }", "private void initUIElements() \n\t{\n\t\t// Init UI element collections.\n\t\tbarcharts\t\t= new HashMap<String, BarChart>();\n\t\t//spinners\t\t= new HashMap<String, Spinner<Float>>();\n\t\trangeSliders\t= new HashMap<String, RangeSlider>();\n\t\tvBoxes\t\t\t= new HashMap<String, VBox>();\n\t\t\n\t\t// Remove deprecated UI elements in parameter configuration grid pane.\n\t\tint vboxCount = 0;\n\t\tfor (Object child : parameterConfiguration_gridPane.getChildren().toArray()) {\n\t\t\tNode node = (Node)child;\n\t\t\t\n\t\t\t//System.out.println(node.getClass().getName());\n\t\t\tswitch (node.getClass().getName()) \n\t\t\t{\n\t \t\t// Replace TextFields with numeric steppers / spinners.\n\t \t\tcase \"javafx.scene.control.TextField\":\n\t \t\t\t// Set initial values.\n\t \t\t\tif (node.getId().contains(\"min\"))\n\t \t\t\t\t((TextField)node).setText(\"0\");\n\t \t\t\telse\n\t \t\t\t\t((TextField)node).setText(\"100\");\n\t \t\tbreak;\n\t \t\t\n\t \t\tcase \"javafx.scene.layout.VBox\":\n\t \t\t\tVBox currentVBox = ((VBox)node);\n\t \t\t\t// Look for Sliders in VBox nodes; replace with RangeSliders.\n\t \t\t\tfor (Object vboxChild : currentVBox.getChildren().toArray()) {\n\t \t\t\t\tNode vboxNode = (Node)vboxChild;\n\t \t\t\t\t\n\t \t\t\t\tif (vboxNode.getClass().getName() == \"javafx.scene.control.Slider\") {\n\t \t\t\t\t\tcurrentVBox.getChildren().remove(vboxNode);\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\t// Store references to VBoxes.\n\t \t\t\tswitch(vboxCount++)\n\t \t\t\t{\n\t \t\t\t\tcase 0:\n\t \t\t\t\t\tvBoxes.put(\"alpha\", currentVBox);\n\t \t\t\t\tbreak;\n\t \t\t\t\t\n\t \t\t\t\tcase 1:\n\t \t\t\t\t\tvBoxes.put(\"eta\", currentVBox);\n\t \t\t\t\tbreak;\n\t \t\t\t\t\n\t \t\t\t\tcase 2:\n\t \t\t\t\t\tvBoxes.put(\"kappa\", currentVBox);\n\t \t\t\t\tbreak;\n\t \t\t\t}\n\t \t\tbreak;\n\t \t}\n\t }\n\t\t\n\t\t// Init barcharts.\n\t\tinitBarcharts();\n\t\t\n\t\t// Init range sliders.\n\t\tinitRangeSliders();\n\t\t\n\t\t// Init textfields.\n\t\tinitTextFields();\n\t\t\n\t\t// Init combobox.\n\t\tinitComboBoxes();\n\t}", "public UI() \n {\n // initiate attributs\n loadedDictionaryFilename = \"\";\n lexiNodeTrees = new ArrayList<>();\n \n // initiate window component\n initComponents();\n setTitle(\"Dictio\");\n \n // empty lists\n this.getSearchSuggestionList().setModel( new DefaultListModel() );\n this.getAllWordsList().setModel( new DefaultListModel() );\n }", "public void init() {\n initComponents();\n initData();\n }", "private void initComponents()\n {\n //LAYOUT\n initLayoutComponents();\n \n //TRANSITION COMPONENTS\n initTransitionComponents();\n \n //SEARCH PANE COMPONENTS\n initSearchComponents();\n \n //RESULTS PANE COMPONENTS\n initResultComponents();\n \n // CRAWLER CONTROLS\n initCrawlerControlsComponents();\n \n // KEYWORD BAR\n initKeywordBarComponents();\n \n //WORKER CONTROLS\n initWorkerComponents();\n \n //URL COMPONENTS\n initURLMenuComponents();\n\n //BASE LAYOUT COMPONENTS\n initBaseLayout();\n }", "private void initUi() {\n mToolbsr = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(mToolbsr);\n\n fab = (FloatingActionButton) findViewById(R.id.fab);\n mDrawerLayout = (DrawerLayout) findViewById(R.id.drawerLayout);\n mNavigationView = (NavigationView) findViewById(R.id.nav_view);\n\n tabLayout = (TabLayout) findViewById(R.id.tabs);\n viewPager = (ViewPager) findViewById(R.id.viewpager);\n }", "private void initialize() {\n\t\tjLabel3 = new JLabel();\n\t\tjLabel = new JLabel();\n\t\tthis.setLayout(null);\n\t\tthis.setBounds(new java.awt.Rectangle(0, 0, 486, 377));\n\t\tjLabel.setText(PluginServices.getText(this,\n\t\t\t\t\"Areas_de_influencia._Introduccion_de_datos\") + \":\");\n\t\tjLabel.setBounds(5, 20, 343, 21);\n\t\tjLabel3.setText(PluginServices.getText(this, \"Cobertura_de_entrada\")\n\t\t\t\t+ \":\");\n\t\tjLabel3.setBounds(6, 63, 190, 21);\n\t\tthis.add(jLabel, null);\n\t\tthis.add(jLabel3, null);\n\t\tthis.add(getLayersComboBox(), null);\n\t\tthis.add(getSelectedOnlyCheckBox(), null);\n\t\tthis.add(getMethodSelectionPanel(), null);\n\t\tthis.add(getResultSelectionPanel(), null);\n\t\tthis.add(getExtendedOptionsPanel(), null);\n\t\tconfButtonGroup();\n\t\tlayersComboBox.setSelectedIndex(0);\n\t\tinitSelectedItemsJCheckBox();\n\t\tdistanceBufferRadioButton.setSelected(true);\n\t\tlayerFieldsComboBox.setEnabled(false);\n\t\tverifyTypeBufferComboEnabled();\n\t}", "public void initGUI(){\n\t\t\n\t\t//the layout is a new BorderLayout\n\t\tsetLayout(new BorderLayout());\n\t\t\n\t\t//the label will be north\t\n\t\tadd(createHeroList(), BorderLayout.NORTH);\n\t\t\n\t\t//the questions will be displayed center\t\t\n\t\tadd(createQuestions(), BorderLayout.CENTER);\n\t\t//the button panel should be south\n\t\tadd(createAnswerButtonPanel(), BorderLayout.SOUTH);\n\t\t\n\t\t\n\t\t \n\t}", "public uitax() {\n initComponents();\n }", "private void init() {\r\n\r\n createGUI();\r\n\r\n setSize(new Dimension(600, 600));\r\n setTitle(\"Grid - Regular Grid Renderer\");\r\n }", "@Override\n public void initialiseUiCells() {\n }", "public void initialize() {\n\t\tbombLabel.setText(\"Flag: \" + game.getFlagCounter() + \"/\" + game.getNumOfBombs());\n\t\ttimerLabel.setText(\"Time: \" + 0);\n\t\tboard.getStyleClass().add(\"grid\");\n\t\tbtnArray = new Button[game.getHeight()][game.getWidth()];\n\t\tfor (int x = 0; x < game.getHeight(); x++) {\n\t\t\tfor (int y = 0; y < game.getWidth(); y++) {\n\t\t\t\tButton btn = new Button(\"\");\n\t\t\t\tbtnArray[x][y] = btn;\n\t\t\t\tbtn.setMaxSize(50, 50);\n\t\t\t\tbtn.setMinSize(50, 50);\n\t\t\t\t//Add Button to the board (GridPane)\n\t\t\t\tboard.add(btn, x, y);\n\t\t\t\tbtn.setId(x + \" . \" + y);\n\t\t\t\tbtn.setOnMouseClicked(e -> TileClicked(e));\n\t\t\t}\n\t\t}\n\t}", "private void init() {\r\n\t\tthis.setBackground(Color.decode(\"#c5dfed\"));\r\n\r\n\t\tthis.initPanelButtons();\r\n\r\n\t\tUtilityClass.addBorder(this, 20, 20, 20, 20);\r\n\t\t\r\n\t\tthis.title.setFont(ConstantView.FONT_TITLE_CRUD);\r\n\t\tthis.title.setHorizontalAlignment(JLabel.CENTER);\r\n\t\tthis.add(title, BorderLayout.NORTH);\r\n\t\t\r\n\t\tthis.add(panelButtons, BorderLayout.SOUTH);\r\n\t\tthis.jPanelFormClient.setOpaque(false);\r\n\t\tthis.add(jPanelFormClient, BorderLayout.CENTER);\r\n\t}", "private void initialize() {\r\n this.setSize(new Dimension(800,600));\r\n this.setContentPane(getJPanel());\r\n\r\n List<String> title = new ArrayList<String>();\r\n title.add(\"Select\");\r\n title.add(\"Field Id\");\r\n title.add(\"Field Name\");\r\n title.add(\"Field Type\");\r\n title.add(\"Image\");\r\n\r\n List<JComponent> componentList = new ArrayList<JComponent>();\r\n componentList.add(checkInit);\r\n componentList.add(fieldIdInit);\r\n componentList.add(filedNameInit);\r\n componentList.add(fieldTypeInit);\r\n componentList.add(imageButton);\r\n\r\n String []arrColumn = {\"SELECT\", \"FIELD_ID\", \"FIELD_NAME\", \"FIELD_TYPE\", \"FIELD_VALUE\"};\r\n String []arrTitle = {\"SELECT\", \"FIELD_ID\", \"FIELD_NAME\", \"FIELD_TYPE\", \"FIELD_VALUE\"};\r\n // init grid\r\n grid = new GridUtils(pageSheet, title, componentList, arrColumn, preButton, afterButton, 5, arrTitle);\r\n // set title\r\n grid.setPageInfo(pageInfoLbl);\r\n \r\n searchDetailList();\r\n \r\n initComboBox();\r\n \r\n setTitle(\"Page Select page\");\r\n\t}", "protected void setupUI() {\n\n }", "private void initializeWidgets() {\n\t\timg_home = (ImageView) findViewById(R.id.img_home);\n\t\tlv_customer_info = (ListView) findViewById(R.id.lv_customer_info);\n\t\tmc_ed_search = (AutoCompleteTextView) findViewById(R.id.mc_ed_search);\n\t\ttxv_invisible = (TextView) findViewById(R.id.txv_invisible);\n\t\ttxv_invisible.setVisibility(View.GONE);\n\t\tbtn_mc_genrate_invoice = (Button) findViewById(R.id.btn_mc_genrate_invoice);\n\t}", "public void initGui()\n {\n StringTranslate var2 = StringTranslate.getInstance();\n int var4 = this.height / 4 + 48;\n\n this.controlList.add(new GuiButton(1, this.width / 2 - 100, var4 + 24 * 1, \"Offline Mode\"));\n this.controlList.add(new GuiButton(2, this.width / 2 - 100, var4, \"Online Mode\"));\n\n this.controlList.add(new GuiButton(3, this.width / 2 - 100, var4 + 48, var2.translateKey(\"menu.mods\")));\n\t\tthis.controlList.add(new GuiButton(0, this.width / 2 - 100, var4 + 72 + 12, 98, 20, var2.translateKey(\"menu.options\")));\n\t\tthis.controlList.add(new GuiButton(4, this.width / 2 + 2, var4 + 72 + 12, 98, 20, var2.translateKey(\"menu.quit\")));\n this.controlList.add(new GuiButtonLanguage(5, this.width / 2 - 124, var4 + 72 + 12));\n }", "public void initGui()\n {\n StringTranslate var1 = StringTranslate.getInstance();\n int var2 = this.func_73907_g();\n\n for (int var3 = 0; var3 < this.options.keyBindings.length; ++var3)\n {\n this.controlList.add(new GuiSmallButton(var3, var2 + var3 % 2 * 160, this.height / 6 + 24 * (var3 >> 1), 70, 20, this.options.getOptionDisplayString(var3)));\n }\n\n this.controlList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, var1.translateKey(\"gui.done\")));\n this.screenTitle = var1.translateKey(\"controls.minimap.title\");\n }", "public GUI() {\n\t\tinitComponents();\n\t}", "private void initUI() {\n\t\tPanel p = new Panel();\n\t\tp.setLayout(new BorderLayout());\n\t\t\n\t\tPanel flowLayoutPanel = new Panel();\n\t\tflowLayoutPanel.setLayout(new FlowLayout());\n\t\t\n\t\ttextArea = new JTextArea();\n\t\t\n\t\tMyCloseButton exitButton = new MyCloseButton(\"Exit\");\n\t\t/*\n\t\texit.addActionListener(new ActionListener(){\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\t\t\t\n\t\t});\n\t\t*/\n\t\tMyOpenButton saveButton = new MyOpenButton(\"Open\");\n\t\t/*\n\t\tsaveButton.addActionListener(new ActionListener(){\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\n\t\t});\n\t\t*/\n\t\tMySaveButton mySaveButton =new MySaveButton(\"Save\");\n\t\t//setVisible(mb);\n\t\tp.add(flowLayoutPanel, BorderLayout.SOUTH);\n\t\tflowLayoutPanel.add(exitButton);\n\t\tflowLayoutPanel.add(saveButton);\n\t\tflowLayoutPanel.add(mySaveButton);\n\t\tp.add(textArea, BorderLayout.CENTER); \n\t\tadd(p);\n\t\t\n\t\tcreateMenu();\n\t\t\n\t\tsetTitle(\"Text Editor\");\n\t\tsetSize(600, 600);\n\t\tsetLocationRelativeTo(null);\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\n\t}", "public void init() {\n setLayout(new BorderLayout());\n }", "private void init() {\n List<Contructor> list = servisContructor.getAllContructors();\n for (Contructor prod : list) {\n contructor.add(new ContructorViewer(prod));\n }\n\n Label label = new Label(\"Catalog Contructors\");\n label.setLayoutX(140);\n label.setLayoutY(20);\n label.setStyle(\"-fx-font-size:20px\");\n\n initTable();\n table.setLayoutX(120);\n table.setLayoutY(60);\n table.setStyle(\"-fx-font-size:16px\");\n\n GridPane control = new ControlPanel(this, 2).getPanel();\n control.setLayoutX(120);\n control.setLayoutY(300);\n\n panel.setAlignment(Pos.CENTER);\n panel.add(label, 0, 0);\n panel.add(table, 0, 1);\n panel.add(control, 0, 2);\n }", "public LinkNodesUI() {\n initComponents();\n }", "protected void initControl() {\n\t\t\r\n\t}", "private void initUI() {\n // deal with toolbar\n setSupportActionBar(activityToolbar);\n if(getSupportActionBar() != null) {\n getSupportActionBar().setTitle(\"\");\n } else {\n Timber.w(\"Action bar is null? Strange behavior might occur\");\n }\n\n // deal with nav drawer\n drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);\n drawerLayout.addDrawerListener(drawerListener);\n\n }", "private void init() {\n\t\tcreateSubjectField();\n\t\tcreateTextField();\n\t\tcreateButton();\n\t\tsetupSubjectPanel();\n\t\tsetupToDoPanel();\n\n\t\tsetBorder(BorderFactory.createTitledBorder(\"To Do List\"));\n\t\tsetLayout(new BorderLayout());\n\t\tadd(pnlSubject, BorderLayout.NORTH);\n\t\tadd(scroll, BorderLayout.CENTER);\n\t\tadd(pnlButton, BorderLayout.SOUTH);\n\t}", "private void init() {\n setLayout(new BorderLayout());\n setBackground(ProgramPresets.COLOR_BACKGROUND);\n add(getTitlePanel(), BorderLayout.NORTH);\n add(getTextPanel(), BorderLayout.CENTER);\n add(getLinkPanel(), BorderLayout.SOUTH);\n }", "protected void init() {\r\n\t\tsetBackground(Color.black);\r\n\t\tsetForeground(Color.white);\r\n\t\taddMouseListener(this);\r\n\t\taddMouseMotionListener(this);\r\n\t\tcreateSelection();\r\n\t\tsel.addListener(this);\r\n\t\tcreateSection();\r\n\t\tsection.addListener(this);\r\n\t\tsetOpaque(true);\r\n\t\tremoveAll();\r\n\t}", "@Override\n\tpublic void initGui() {\n\t\tfield_154330_a.init();\n\t\tsuper.initGui();\n\t}", "private void initialize() {\n this.setLayout(new BorderLayout());\n this.setSize(300, 200);\n this.setPreferredSize(new java.awt.Dimension(450, 116));\n this.add(getListPanel(), java.awt.BorderLayout.CENTER);\n this.add(getButtonPanel(), java.awt.BorderLayout.SOUTH);\n }", "@Override\n public void init() // set up GUI\n {\n setLayout(new FlowLayout());\n\n customerView = new CustomerView(); // initialize customerView\n \n add(customerView); // add customerView to the GUI\n }", "public final void initUI() {\n\t\tsetLayout(new BoxLayout(this, BoxLayout.X_AXIS));\n\t\tadd(new Box.Filler(minSize, prefSize, null));\n\t\t\n\t\tJPanel nameChoicePanel = new JPanel();\n\t\tnameChoicePanel.setLayout(new BoxLayout(nameChoicePanel, BoxLayout.Y_AXIS));\n\t\tnameChoicePanel.setName(\"Panel\");\n\t\t\n\t\t// Add instructions for what to do:\n\t\tinstructionLabel = new JLabel(\"Enter your name here:\", JLabel.CENTER);\n\t\tinstructionLabel.setMinimumSize(new Dimension(0, 40));\n\t\tinstructionLabel.setPreferredSize(new Dimension(instructionLabel.getPreferredSize().width, 40));\n\t\tinstructionLabel.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tnameChoicePanel.add(instructionLabel);\n\t\t\n\t\t// Add textfield for user's name\n\t\tnameField = new JTextField(10);\n\t\tnameField.setName(\"textField\");\n\t\tnameField.getDocument().addDocumentListener(this);\n\t\tnameField.setMinimumSize(new Dimension(nameField.getWidth(), 41));\n\t\tnameField.setMaximumSize(new Dimension(250, 41));\n\t\t\n\t\tnameChoicePanel.add(nameField);\n\t\t\n\t\t// Add button\n\t\ttimeToPick = new JButton(\"Pick your team\");\n\t\ttimeToPick.setName(\"Test\");\n\t\ttimeToPick.addActionListener(nameChoiceListener);\n\t\ttimeToPick.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\t\n\t\ttimeToPick.setEnabled(false);\n\t\tnameChoicePanel.add(timeToPick);\n\t\t\n\t\t// Add name choice panel dimensions\n\t\tadd(nameChoicePanel);\n\t\tadd(new Box.Filler(minSize, prefSize, null));\n\t\tnameChoicePanel.setMinimumSize(new Dimension(400,240));\n\t\tnameChoicePanel.setPreferredSize(new Dimension(400,240));\n\t}", "private void initControlUI() {\n typeAdapter = new SpinnerSimpleAdapter(self, android.R.layout.simple_spinner_item, self.getResources().getStringArray(R.array.arr_feedback_type));\n spnType.setAdapter(typeAdapter);\n }", "public intrebarea() {\n initComponents();\n }", "private void initComponents() {\n // Create the RGB and the HSB radio buttons.\n createRgbHsbButtons();\n\n \n \n ColorData initial = new ColorData(new RGB(255, 255, 255), 255);\n\n // Create the upper color wheel for the display.\n upperColorWheel = new ColorWheelComp(shell, this, upperWheelTitle);\n // upperColorWheel.setColor(colorArray.get(0));\n upperColorWheel.setColor(initial);\n\n // Create the color bar object that is displayed\n // in the middle of the dialog.\n colorBar = new ColorBarViewer(shell, this, sliderText, cmapParams);\n\n // Create the lower color wheel for the display.\n lowerColorWheel = new ColorWheelComp(shell, this, lowerWheelTitle);\n // lowerColorWheel.setColor(colorArray.get(colorArray.size() - 1));\n lowerColorWheel.setColor(initial);\n\n // Create the bottom control buttons.\n createBottomButtons();\n }", "private void initElements() {\n uploadingProgressBar = (ProgressBar) findViewById(R.id.scanning_result_uploading_bar);\n scanningBlurScoreProgressBarContainer = (RelativeLayout) findViewById(R.id.scanning_blur_score_progress_container);\n resultImgAndLoadingLayout = (RelativeLayout) findViewById(R.id.scaning_result_img_and_loading);\n fpResultImg = (ImageView) resultImgAndLoadingLayout.findViewById(R.id.scanning_result_img);\n scanningThumb = (ImageView) findViewById(R.id.scanning_progressbar_thumb);\n jumpMsg = (TextView) findViewById(R.id.scanning_status_msg);\n }", "private void uiInit() {\n mRemoveIcon = findViewById(R.id.remove_icon);\n mRemoveIcon.setOnClickListener(v -> {\n if (mListener != null && mRemoveEnabled) {\n mListener.onRemoveClicked(mEntry);\n }\n });\n\n mDragIcon = findViewById(R.id.drag_icon);\n }", "public userinterface() {\n initComponents();\n }", "private void initComponents() {\n LOOGER.info(\"Get init components\");\n this.loadButton = new JButton(\"Load\");\n this.fillButton = new JButton(\"Fill\");\n this.deleteButton = new JButton(\"Delete\");\n this.setLayout(new FlowLayout());\n LOOGER.info(\"components exit\");\n }", "public void initComponents() {\n\t\taddButton = new JButton(addFlightText);\n\t\tdelayButton = new JButton(delayFlightText);\n\t\tquitButton = new JButton(quitText);\n\t\t// TODO: Add button instanciations for other operations\n\n\t\t// Initialize display area\n\t\tdisplayArea = new JTextArea(LINE_COUNT, LINE_SIZE);\n\t\tdisplayArea.setEditable(false);\n\t\tscrollPane = new JScrollPane(displayArea, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,\n\t\t\t\tJScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);\n\t}", "protected void initializeGUI() {\n\n\t}", "@Override\n\tpublic void initGui()\n {\n this.controlList.clear();\n //Keyboard.enableRepeatEvents(true);\n\n int var1 = (this.width - this.bookImageWidth) / 2;\n int var2 = (this.height - this.bookImageHeight - 40) / 2;\n this.controlList.add(this.buttonNextPage = new GuiButtonNextPage(1, var1 + 120, var2 + 154, true));\n this.controlList.add(this.buttonPreviousPage = new GuiButtonNextPage(2, var1 + 38, var2 + 154, false));\n this.controlList.add(this.buttonIndex = new GuiButtonNextPage(8, var1 + 28, var2 + 10, false));\n this.controlList.add(this.buttonMenu1 = new GuiButtonSelect(3, var1 + 35, var2 + 30, 110, 20, \"\"));\n this.controlList.add(this.buttonMenu2 = new GuiButtonSelect(4, var1 + 35, var2 + 55, 110, 20, \"\"));\n this.controlList.add(this.buttonMenu3 = new GuiButtonSelect(5, var1 + 35, var2 + 80, 110, 20, \"\"));\n this.controlList.add(this.buttonMenu4 = new GuiButtonSelect(6, var1 + 35, var2 + 105, 110, 20, \"\"));\n this.controlList.add(this.buttonMenu5 = new GuiButtonSelect(7, var1 + 35, var2 + 130, 110, 20, \"\"));\n this.controlList.add(this.bookmark = new GuiButtonBookmark(9, var1 + 142, var2 + 7, false));\n this.updateButtons();\n }", "private void initUI() {\n\t\t//Creating the window for our game\n\t\tframe = new JFrame(GAME_TITLE);\n\t\tframe.setSize(BOARD_WIDTH, BOARD_HEIGHT);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setResizable(false);\n\t\tframe.setLocationRelativeTo(null);\n\t\tframe.setVisible(true);\n\t\t\n\t\t//Creating a canvas to add to the window\n\t\tcanvas = new Canvas();\n\t\tcanvas.setPreferredSize(new Dimension(BOARD_WIDTH, BOARD_HEIGHT));\n\t\tcanvas.setMaximumSize(new Dimension(BOARD_WIDTH, BOARD_HEIGHT));\n\t\tcanvas.setMinimumSize(new Dimension(BOARD_WIDTH, BOARD_HEIGHT));\n\t\t\n\t\tframe.add(canvas);\n\t\tframe.pack();\n\t\t\n\t}", "private void initialize()\n {\n this.setPreferredSize(new com.ulcjava.base.application.util.Dimension(549,426));\n this.add(getComboBox(), com.ulcjava.base.application.ULCBorderLayoutPane.NORTH);\n }", "public void init() {\n\t\tsetSize(500,300);\n\t}", "public HealthUI() {\n init();\n }", "private void initUI() {\n\t\tmBtnVoidImage = (Button)findViewById(R.id.btn_tutorial_void);\n\t\tmBtnVoidImage.setText(R.string.capture_check_void);\n\t\tmBtnVoidImage.setOnClickListener(this);\n\t}", "private void initialize() {\r\n\t\tGridBagConstraints gridBagConstraints1 = new GridBagConstraints();\r\n\t\tgridBagConstraints1.gridx = 0;\r\n\t\tgridBagConstraints1.gridy = 1;\r\n\t\tlaunchSubLabel = new JLabel();\r\n\t\tlaunchSubLabel.setText(Message.getMessage(\"reportmaker.process.sublabel\"));\r\n\t\tGridBagConstraints gridBagConstraints = new GridBagConstraints();\r\n\t\tgridBagConstraints.gridx = 0;\r\n\t\tgridBagConstraints.gridy = 0;\r\n\t\tthis.setSize(800, 400);\r\n\t\tthis.setLayout(new GridBagLayout());\r\n\t\tthis.setPreferredSize(new Dimension(800, 400));\r\n\t\tthis.setBackground(Color.white);\r\n\t\tthis.add(getLaunchButton(), gridBagConstraints);\r\n\r\n\t\tGridBagConstraints gridBagConstraints2 = new GridBagConstraints();\r\n\t\tgridBagConstraints2.insets = new Insets(50, 0, 0, 0);\r\n\t\tgridBagConstraints2.gridx = 0;\r\n\t\tgridBagConstraints2.gridy = 2;\r\n\t\tthis.add(getViewButton(), gridBagConstraints2);\r\n\t\tthis.add(launchSubLabel, gridBagConstraints1);\r\n\t}", "private void initialize() {\n\t\tthis.setBounds(100, 100, 950, 740);\n\t\tthis.setLayout(null);\n\n\t\n\t}", "public void initialize() {\n\t\ttoolBar.setDrawingPanel(this.drawingPanel);\r\n\t\t//component initialize\r\n\t\tmenuBar.initialize();\r\n\t\ttoolBar.initialize();\r\n\t\tdrawingPanel.initialize();\r\n\t\t\r\n\t}", "@Override\n\tpublic void initializeControls() {\n\t\t\n\t}", "private void initializeUI() {\r\n this.parentFrame = game.getFrame();\r\n parentFrame.setEnabled(false); // Disable main game UI during the ending dialog.\r\n createResultPopup();\r\n }", "public void initUI() {\n\t\t\n\t\tTextView mitaxiregistermanually_tv_label= (TextView)findViewById(R.id.mitaxiregistermanually_tv_label);\n\t\t mitaxiregistermanually_tv_label.setTypeface(new fonts(this).getTypeFace(fonts.FLAG_MAMEY));\n\t\t mitaxiregistermanually_tv_label.setTextColor(getResources().getColor(R.color.color_vivos));\n\t\t \n\t\t TextView mitaxiregistermanually_tv_paranoico_texto= (TextView)findViewById(R.id.mitaxiregistermanually_tv_paranoico_texto);\n\t\t mitaxiregistermanually_tv_paranoico_texto.setTypeface(new fonts(this).getTypeFace(fonts.FLAG_ROJO));\n\t\t mitaxiregistermanually_tv_paranoico_texto.setTextColor(getResources().getColor(R.color.color_vivos));\n\t\t \n\t\t mitaxiregistermanually_ll_contactos =(LinearLayout)findViewById(R.id.mitaxiregistermanually_ll_contactos);\n\t\t\n\t\t mitaxiregistermanually_tv_agregar=(TextView) findViewById(R.id.mitaxiregistermanually_tv_agregar);\n\t\t mitaxiregistermanually_tv_agregar.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(!emergencia_esta_Ocupado[0]||!emergencia_esta_Ocupado[1]){\n\t\t\t\t\taddContact(null,null);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t \n\t\n\n\t\t \n\t\t ImageView mitaxiregistermanually_iv_ayuda=(ImageView)findViewById(R.id.mitaxiregistermanually_iv_ayuda);\n\t\t mitaxiregistermanually_iv_ayuda.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\tnew\tDialogos().mostrarParaQue(RegistroContactosEmergenciaActivity.this).show();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t \n\t\t \n\t\t mitaxiregistermanually_cv_paranoico = (CheckBox) findViewById(R.id.mitaxiregistermanually_cv_paranoico); \n\t\t SharedPreferences prefs = getSharedPreferences(\"MisPreferenciasTrackxi\",Context.MODE_PRIVATE);\n boolean panic = prefs.getBoolean(\"panico\", false);\n mitaxiregistermanually_cv_paranoico.setChecked(panic); \n \t \n \n\t\t mitaxiregistermanually_cv_paranoico.setOnCheckedChangeListener(new OnCheckedChangeListener() { \n\n\t\t @Override \n\t\t public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { \n\n\t\t\t if (buttonView.isChecked()){ \n\t\t\t\t if(validaEditText(R.string.Registro_manual_datos_paranoico_sin_contac)){\n\t\t\t\t\t if((!emergencia_esta_Ocupado[0]&&!emergencia_esta_Ocupado[1])){\n\t\t\t\t\t\t buttonView.setChecked(false);\n\t\t\t\t\t\t Dialogos.Toast(RegistroContactosEmergenciaActivity.this,getResources().getString(R.string.Registro_manual_datos_paranoico_sin_contac) , Toast.LENGTH_LONG);\n\t\t\t\t \t}\n\t\t\t\t }else{\n\t\t\t\t\t buttonView.setChecked(false);\n\t\t\t\t }\n\t\t\t }\n\n\t\t }\n\t\t });\n\t\t \n\t\t Button mitaxiregistermanually_btn_guardar =(Button)findViewById(R.id.mitaxiregistermanually_btn_guardar);\n\t\t mitaxiregistermanually_btn_guardar.setTypeface(new fonts(this).getTypeFace(fonts.FLAG_ROJO));\n\t\t mitaxiregistermanually_btn_guardar.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tback();\n\t\t\t}\n\t\t});\n\t\t \n\t\t \n\t\tllenarContactos();\n\t\t\n\t}", "public void initUI() {\n\t\t\n\t\tsetPreferredSize(new Dimension((int)((2*Board.NUMBER_OF_FREE_COLUMNS)+1)*Board.TILE_SIZE + 2*Board.GAP_WIDTH, (int)((2*Board.NUMBER_OF_FREE_ROWS)+1)*Board.TILE_SIZE));\n\t\tsetLayout(new GridLayout(10,1));\n\t\taddKeyListener(this);\n\t\tsetBackground(Color.WHITE);\n\t\tJLabel label1 = new JLabel();\n\t\t\n\t\tlabel1.setFont(new Font(\"Verdana\", Font.BOLD, 55));\n\t\t\n\t\tlabel1.setHorizontalAlignment(SwingConstants.CENTER);\n\t\t\n\t\tlabel1.setText(\"Player \"+winner+\" has won!\");\n\t \n\t add(label1);\n\t}" ]
[ "0.8334569", "0.8110223", "0.7877526", "0.78095996", "0.78046584", "0.77479655", "0.7747182", "0.77442205", "0.7639943", "0.76336676", "0.76007134", "0.7598221", "0.75834316", "0.7555738", "0.75457674", "0.7532837", "0.7523427", "0.75190157", "0.7452636", "0.74461156", "0.7436918", "0.7412417", "0.7405568", "0.73975384", "0.7394242", "0.73835695", "0.73784804", "0.7357219", "0.7325414", "0.73142016", "0.73088825", "0.7308819", "0.7302526", "0.730215", "0.72924095", "0.7283228", "0.72760993", "0.72689295", "0.72668743", "0.7261311", "0.7261311", "0.7258618", "0.7249063", "0.7247379", "0.7231765", "0.72206783", "0.72092813", "0.7205196", "0.72013026", "0.7196672", "0.7182348", "0.7181366", "0.7175725", "0.7171207", "0.7166217", "0.7134441", "0.7126276", "0.710624", "0.71000767", "0.7099732", "0.70948714", "0.70914257", "0.7089625", "0.70842695", "0.7080895", "0.7077377", "0.7073468", "0.7072396", "0.7068197", "0.70650554", "0.7059944", "0.7059415", "0.70590764", "0.7049452", "0.7045057", "0.70438987", "0.7040562", "0.704003", "0.7039072", "0.7034465", "0.70339364", "0.70323175", "0.702213", "0.7021385", "0.7019643", "0.70141524", "0.70041406", "0.7000462", "0.699939", "0.69992286", "0.6996976", "0.6991186", "0.6988512", "0.69862616", "0.6980965", "0.6977778", "0.6972218", "0.6962831", "0.6957488", "0.69574565", "0.6951206" ]
0.0
-1
Sets myReturnValue to the Xcoor of the turtle.
@Override public void execute() { this.setMyReturnValue(myHandler.getXcor()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setReturn(float xreturn)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(RETURN$0, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(RETURN$0);\r\n }\r\n target.setFloatValue(xreturn);\r\n }\r\n }", "public void xsetReturn(org.apache.xmlbeans.XmlFloat xreturn)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlFloat target = null;\r\n target = (org.apache.xmlbeans.XmlFloat)get_store().find_element_user(RETURN$0, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlFloat)get_store().add_element_user(RETURN$0);\r\n }\r\n target.set(xreturn);\r\n }\r\n }", "public void setReturnValue(Object value) {\n this.returnValue = value;\n }", "public org.apache.xmlbeans.XmlFloat xgetReturn()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlFloat target = null;\r\n target = (org.apache.xmlbeans.XmlFloat)get_store().find_element_user(RETURN$0, 0);\r\n return target;\r\n }\r\n }", "void setReturnValue(Object returnValue) {\r\n this.returnValue = returnValue;\r\n }", "@Override\n\tpublic double execute() {\n\t\tList<TurtleModel> prevousTurtlesTold = myContext.getCanvasModel().getTurtlesTold();\n\n\t\t// execute\n\t\tMap<Integer, TurtleModel> myTurtleMap = myContext.getCanvasModel().getTurtleMap();\n\t\tdouble valueToReturn = 0;\n\n\t\tfor (TurtleModel turtle : myTurtleMap.values()) {\n\t\t\tmyContext.getCanvasModel().tellTurtles(turtle);\n\t\t\tmyContext.getCanvasModel().setActiveTurtleID(turtle.getID());\n\t\t\tif (myCondition.toValue() == 1) {\n\t\t\t\tvalueToReturn = myListNode.toValue();\n\t\t\t}\n\t\t}\n\n\t\t// set turtlesTold back\n\t\tmyContext.getCanvasModel().tellTurtles(prevousTurtlesTold);\n\t\treturn valueToReturn;\n\t}", "protected SimulatorValue giveResult() {\n\tthis.evalExpression();\n\treturn value;\n }", "public double X()\r\n {\r\n return curX;\r\n }", "public int showTurtle () {\n myTurtleShowing = true;\n return 1;\n }", "public int getXCor(){\n return this.xCor;\n }", "public void setReturnValueFloat(float value) {\n \t\tcpu.fpr[_f0] = value;\r\n \t}", "public void setX(double X)\r\n {\r\n curX = X;\r\n }", "double setx(double x) {\n return this.x;\n }", "public double x() { return x; }", "public double x() {\n\t\treturn x;\n\t}", "public double GetX(){\n return this._X;\n }", "public double X_r() {\r\n \t\treturn getX();\r\n \t}", "public int getX()\n {\n return rettangoloX; \n }", "public Double x() {\n return x;\n }", "public int x() {\n\t\treturn x;\n\t}", "public void setX(double value) {\n this.x = value;\n }", "private void showReturn(Node node, int x) {\r\n String a = setToInfinity(x);\r\n String in = \"v\" + node.getId();\r\n Text t = lang.newText(new Offset(-25, -30, pMap.get(node.getId()), \"NE\"),\r\n a, \"i\" + node.getId(), null);\r\n pMap.put(in, t);\r\n Text value = (Text) pMap.get(in);\r\n value.changeColor(\"\", textHighlightColor, null, null);\r\n }", "public Object getReturnValue() {\n return returnValue;\n }", "public double x() {\n return _x;\n }", "public double x() {\n return _x;\n }", "public void setX(double value) {\n\t\tthis.x = value;\n\t}", "public int x() {\n return x;\n }", "public void resetCurrX() {\n currX = getStartX;\n }", "public void setX(double value) {\n\t\t\t\tthis.x = value;\n\t\t\t}", "public int getX()\r\n {\r\n return myX;\r\n }", "public double x() { return _x; }", "public double getXValue(){\r\n\t\treturn ((Double)(super.xValue) ).doubleValue();\r\n\t}", "double getx() {\n return this.x;\n }", "public int x()\n {\n return x;\n }", "public void setX(Double x);", "public double x() {\r\n return this.x;\r\n }", "public double getX() { return x; }", "double getX(){\r\n\t\treturn x;\r\n\t}", "public void writeReturn() {\n writer.println(\"@LCL\");\n writer.println(\"D=M\");\n writer.println(\"@R13\");\n writer.println(\"M=D\");\n\n //RET = *(FRAME - 5)\n writer.println(\"@5\");\n writer.println(\"D=A\");\n writer.println(\"@R13\");\n writer.println(\"A=M-D\"); //A-REG => MEM(LCL-5) => 312\n writer.println(\"D=M\"); //D-REG => 9\n writer.println(\"@R14\");\n writer.println(\"M=D\"); //R14 = 9\n\n //*ARG = POP();\n decStackPtr();\n writer.println(\"A=M\");\n writer.println(\"D=M\"); //store result in d reg.\n\n writer.println(\"@ARG\"); //@2\n writer.println(\"A=M\"); //A-REG = RAM[2]\n writer.println(\"M=D\"); //ram[A-reg] = D\n \n //SP = ARG+1\n writer.println(\"@ARG\");\n writer.println(\"D=M\");\n writer.println(\"@SP\");\n writer.println(\"M=D+1\");\n\n //That = *(FRAME-1)\n pushSymbol(1, \"THAT\");\n\n //THIS = *(FRAME-2)\n pushSymbol(2, \"THIS\");\n\n //ARG\n pushSymbol(3, \"ARG\");\n\n //LCL\n pushSymbol(4, \"LCL\");\n\n //goto ret\n writer.println(\"@R14\"); //This was the problem!! had R13 instead of 14!\n writer.println(\"A=M\");\n writer.println(\"0;JMP\");\n \n }", "public int getx() {\n return x;\n }", "public int x()\r\n {\r\n return x;\r\n }", "public double getX(){\n return x;\n }", "public XRemote xnext() throws Exception {\n\t\treturn xnextNode();\r\n\t}", "public double x() {return _x;}", "public String getValue() {\r\n return xValue;\r\n }", "@Override\n public double execute() throws IllegalStateException {\n checkError();\n return getValue(X);\n }", "public Symbol getReturnSymbol() {\n\t\treturn this.returnSymbol;\n\t}", "public void setX(double newX) {\r\n x = newX;\r\n }", "public int x() {\n\t\treturn _x;\n\t}", "public double getX()\n {\n return x;\n }", "public int getX ()\n {\n return coX;\n }", "public double getX(){\r\n return x;\r\n }", "public void setExchResult(double value) {\n this.exchResult = value;\n }", "public void setX(double x){\n this.x = x;\n }", "public void setX(double x){\n this.x = x;\n }", "public abstract void setTurtleRecursive(TurtleModel value);", "public abstract Code vreturn();", "public int x(){\n return x;\n }", "@Override\n public int getX() {\n calledNumberX++;\n int tempX;\n switch (calledNumberX) {\n case 2:\n tempX = super.getX() + 40;\n break;\n case 3:\n tempX = super.getX() + 40;\n break;\n default:\n tempX = super.getX();\n break;\n }\n return tempX;\n }", "public String getx()\n\t{\n\t\treturn x.getText();\n\t}", "void setValue(R value);", "public float getReturn()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(RETURN$0, 0);\r\n if (target == null)\r\n {\r\n return 0.0f;\r\n }\r\n return target.getFloatValue();\r\n }\r\n }", "public void setRet(int ret) {\n\t\tthis.ret = ret;\n\t}", "public double getX() {\n return x;\r\n }", "Variable getReturn();", "public int getX() { return x; }", "public int getX() { return x; }", "public int getX() { return x; }", "public void setX(double x) {\n this.x = x;\r\n }", "public void set_return(Fact param) {\r\n local_returnTracker = true;\r\n\r\n this.local_return = param;\r\n\r\n\r\n }", "public final void entryRuleXReturnExpression() throws RecognitionException {\r\n try {\r\n // InternalDroneScript.g:1830:1: ( ruleXReturnExpression EOF )\r\n // InternalDroneScript.g:1831:1: ruleXReturnExpression EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXReturnExpressionRule()); \r\n }\r\n pushFollow(FOLLOW_1);\r\n ruleXReturnExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXReturnExpressionRule()); \r\n }\r\n match(input,EOF,FOLLOW_2); 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 return ;\r\n }", "public int getX()\n {\n return x;\n }", "public int getX()\n {\n return x;\n }", "public int Getx(){\n\t\treturn x;\n\t}", "public void setXY(int rettangolo_X, int rettangolo_Y){\n \tboolean bo = informaPreUpdate();\n\t\trettangoloY = rettangolo_Y;\n\t\trettangoloX = rettangolo_X;\n\t\tinformaPostUpdate(bo);\n }", "int getCoorX();", "public int hideTurtle () {\n myTurtleShowing = false;\n return 0;\n }", "public double getPX(){\n\t\treturn previousX;\n\t}", "void setX(double x){\r\n\t\tthis.x=x;\r\n\t}", "public int getX(){\n return x;\n }", "public int getX(){\n return x;\n }", "public int getX(){\n return x;\n }", "int getX() {\n return x;\n }", "int getX() {\n return x;\n }", "public void setX(double value) {\n origin.setX(value);\n }", "public abstract double getRadiusX();", "public void NewX(double x){\n\t\tthis.x = x;\n\t}", "@Override\n public void setTurtlePosition(double xPosition, double yPosition) {\n screenCreator.setTurtlePosition(xPosition,yPosition);\n }", "public void visitReturn(Quad obj) {\n if(obj.getOperator() == Operator.Return.RETURN_V.INSTANCE) {\n return;\n }\n Operand src = Return.getSrc(obj);\n Set r;\n if (obj.getOperator() == Return.THROW_A.INSTANCE) {\n r = thrown;\n } else {\n r = returned;\n }\n \n if (TRACE_INTRA) out.println(\"Visiting: \"+obj);\n if (src instanceof RegisterOperand) {\n Register src_r = ((RegisterOperand)src).getRegister();\n addToSet(r, getRegister(src_r));\n } else \n if(src instanceof ConstOperand){\n // String constant\n Node n = handleConst((ConstOperand) src, new QuadProgramLocation(method, obj));\n //System.err.println(\"Before : \" + r);\n r.add(n);\n //System.err.println(\"Before : \" + r);\n } else {\n System.err.println(\"Unexpected \" + obj);\n }\n }", "@Override\n\tpublic void xuat() {\n\t\tsuper.xuat();\n\t}", "public int getX() { return x;}", "public int getX() { return x;}", "public void setFrameX(double anX) { double x = _x + anX - getFrameX(); setX(x); }", "public void setX(double x)\n {\n this.x = x;\n }", "public double getX() {\n return x;\n }", "public int getX() {return x;}", "public int getX() {return x;}", "@Override\n public String toString()\n {\n return \"xValue: \" + xValue;\n }", "public int x() {\n\t\treturn this.x;\n\t}", "public double getX() {\n return x;\n }" ]
[ "0.6417213", "0.6221858", "0.5764516", "0.5527735", "0.5524643", "0.5492727", "0.54905987", "0.5310632", "0.5300272", "0.5250013", "0.5188379", "0.51607096", "0.51424104", "0.5124299", "0.5096838", "0.5089584", "0.5072294", "0.5067303", "0.5062015", "0.50467443", "0.5046263", "0.50462145", "0.50146157", "0.50122255", "0.50122255", "0.49951133", "0.4991618", "0.49785465", "0.49767908", "0.49627346", "0.49407008", "0.4936711", "0.49323693", "0.49287185", "0.4926324", "0.49227157", "0.49226913", "0.4907691", "0.48998904", "0.4898937", "0.4884569", "0.48754403", "0.4871153", "0.48683465", "0.48652014", "0.48633423", "0.48603022", "0.48601657", "0.48549187", "0.4847025", "0.48436093", "0.48407024", "0.48371634", "0.48357025", "0.48357025", "0.4828099", "0.48198462", "0.4818122", "0.4817469", "0.48094946", "0.47986266", "0.47889528", "0.47860742", "0.47827217", "0.47826126", "0.4781688", "0.4781688", "0.4781688", "0.4777578", "0.4776885", "0.47693396", "0.4766756", "0.4766756", "0.47657248", "0.47641763", "0.4759054", "0.47575477", "0.47531983", "0.47484842", "0.47429574", "0.47429574", "0.47429574", "0.474292", "0.474292", "0.47420362", "0.47397986", "0.47377297", "0.473564", "0.47269064", "0.4726279", "0.47225764", "0.47225764", "0.47201622", "0.47152534", "0.47113645", "0.47102144", "0.47102144", "0.47085735", "0.47002175", "0.4694254" ]
0.5802015
2
/ Reads from an input file
static String readFile(String path, Charset encoding) throws IOException { byte[] encoded = Files.readAllBytes(Paths.get(path)); return new String(encoded, encoding); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void readFromFile() {\n\t\tPath filePath = Paths.get(inputFile);\n\n\t\ttry (BufferedReader reader = Files.newBufferedReader(filePath,\n\t\t\t\tCharset.forName(\"UTF-8\"));) {\n\t\t\tString line = null;\n\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tString[] splitLine = line.split(\",\");\n\t\t\t\tcurrentGen.setValue(Integer.parseInt(splitLine[0]),\n\t\t\t\t\t\tInteger.parseInt(splitLine[1]), true);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Could not find file provided.\");\n\t\t}\n\t}", "public void readFromFile() {\n\n\t}", "public static void reading(String fileName)\n {\n\n }", "public InputStream readFile( String fileName, FileType type );", "public void fileRead() {\n\t\tString a, b;\n\t\t\n\t\twhile (input.hasNext()) {\n\t\t\ta = input.next();\n\t\t\tb = input.next();\n\t\t\tSystem.out.printf(\"%s %s\\n\", a, b);\n\t\t}\n\t}", "public void fileRead(String filename) throws IOException;", "public void readFile();", "protected abstract Object readFile(BufferedReader buf) throws IOException, FileParseException;", "public abstract void readFromFile( ) throws Exception;", "protected abstract void readFile();", "@Override\n public Ini read(Path path) throws IOException {\n try (Reader reader = Files.newBufferedReader(path)) {\n return read(reader);\n }\n }", "private void readFile() {\r\n\t\tScanner sc = null; \r\n\t\ttry {\r\n\t\t\tsc = new Scanner(inputFile);\t\r\n\t\t\twhile(sc.hasNextLine()){\r\n\t\t\t\tgrade.add(sc.nextLine());\r\n\t } \r\n\t\t}\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tsc.close();\r\n\t\t}\t\t\r\n\t}", "private void load(FileInputStream input) {\n\t\t\r\n\t}", "public void processInput(String theFile){processInput(new File(theFile));}", "void openInput(String file)\r\n\t{\n\t\ttry{\r\n\t\t\tfstream = new FileInputStream(file);\r\n\t\t\tin = new DataInputStream(fstream);\r\n\t\t\tis = new BufferedReader(new InputStreamReader(in));\r\n\t\t}catch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.err.println(e);\r\n\t\t}\r\n\r\n\t}", "@Override\n public Ini read(File file) throws IOException {\n try ( Reader reader = new FileReader(file)) {\n return read(reader);\n }\n }", "public static void readfile() {\r\n\t\t// read input file\r\n\t\ttry {\r\n\t\t File inputObj = new File(\"input.txt\");\r\n\t\t Scanner inputReader = new Scanner(inputObj);\r\n\t\t int i = 0;\r\n\t\t while (inputReader.hasNextLine()) {\r\n\t\t String str = inputReader.nextLine();\r\n\t\t str = str.trim();\r\n\t\t if(i == 0) {\r\n\t\t \tnumQ = Integer.parseInt(str);\r\n\t\t \torign_queries = new String[numQ];\r\n\t\t \t//queries = new ArrayList<ArrayList<String>>();\r\n\t\t }\r\n\t\t else if(i == numQ + 1) {\r\n\t\t \tnumKB = Integer.parseInt(str);\r\n\t\t \torign_sentences = new String[numKB];\r\n\t\t \t//sentences = new ArrayList<ArrayList<String>>();\r\n\t\t }\r\n\t\t else if(0 < i && i< numQ + 1) {\t\r\n\t\t \torign_queries[i-1] = str;\r\n\t\t \t//queries.add(toCNF(str));\r\n\t\t }\r\n\t\t else {\r\n\t\t \torign_sentences[i-2-numQ] = str;\r\n\t\t \t//sentences.add(toCNF(str));\r\n\t\t }\t\t \r\n\t\t i++;\r\n\t\t }\r\n\t\t inputReader.close();\r\n\t\t } catch (FileNotFoundException e) {\r\n\t\t System.out.println(\"An error occurred when opening the input file.\");\r\n\t\t }\r\n\t}", "public void readData(String infile) throws Exception {\r\n \t\tScanner in = new Scanner(new FileReader(infile));\r\n \t}", "List readFile(String pathToFile);", "public abstract void readFromFile(String key, String value);", "public interface ReaderFromFile {\n\t\n\tpublic List<Data> readDataFromFile (String filename);\n}", "public void openFile(){\n\t\ttry{\n\t\t\t//input = new Scanner (new File(\"input.txt\")); // creates file \"input.txt\" or will rewrite existing file\n\t\t\tFile inFile = new File(\"input.txt\");\n\t\t\tinput = new Scanner(inFile);\n\t\t\t//for (int i = 0; i < 25; i ++){\n\t\t\t\t//s = input.nextLine();\n\t\t\t\t//System.out.println(s);\n\t\t\t//}\n\t\t}catch (SecurityException securityException){ // catch errors\n\t\t\tSystem.err.println (\"You do not have the write access to this file.\");\n\t\t\tSystem.exit(1);\n\t\t}catch (FileNotFoundException fnf){// catch errors\n\t\t\tSystem.err.println (\"Trouble opening file\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "private void ReadTextFile(String FilePath) {\n\t\t\n\t\t\n\t}", "private void readInter() throws FileNotFoundException {\n\t\t\r\n\t\tFile file = new File(\"input.txt\");\r\n\r\n\t\tScanner input = new Scanner(file);\r\n\r\n\t\twhile (input.hasNext()) {\r\n\r\n\t\t\tint x = input.nextInt();\r\n\t\t\tint y = input.nextInt();\r\n\t\t\t\r\n\t\t\tintervals.add(new Point(x, y));\r\n\t\t}\r\n\t\t\r\n\t\t//Close 'input.txt'\r\n\t\tinput.close();\r\n\t\t\r\n\t}", "private void ReadInputFile(String filePath){\n String line;\n\n try{\n BufferedReader br = new BufferedReader(new FileReader(filePath));\n while((line = br.readLine()) != null){\n //add a return at each index\n inputFile.add(line + \"\\r\");\n }\n\n\n }catch(IOException ex){\n System.out.print(ex);\n }\n\n }", "public abstract void read(DataInput input) throws IOException;", "public abstract T readDataFile(String fileLine);", "public void readIn(String file) {\r\n\r\n\t\ttry {\r\n\r\n\t\t\t/** Initialise loop variable **/\r\n\r\n\t\t\tusedSize = 0;\r\n\r\n\t\t\t/** Set up file for reading **/\r\n\r\n\t\t\tFileReader reader = new FileReader(file);\r\n\r\n\t\t\tScanner in = new Scanner(reader);\r\n\r\n\t\t\t/** Loop round reading in data while array not full **/\r\n\r\n\t\t\twhile (in.hasNextInt() && (usedSize < size)) {\r\n\r\n\t\t\t\tA[usedSize] = in.nextInt();\r\n\r\n\t\t\t\tusedSize++;\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (IOException e) {\r\n\r\n\t\t\tSystem.out.println(\"Error processing file \" + file);\r\n\r\n\t\t}\r\n\r\n\t}", "public FilesInputStreamLoad readFile() throws ArcException {\r\n\tFile dir = new File(this.archiveChargement + \".dir\");\r\n\tString fileName = ManipString.substringAfterFirst(this.idSource, \"_\");\r\n\tFile toRead = new File(dir + File.separator + ManipString.redoEntryName(fileName));\r\n\tFilesInputStreamLoad filesInputStreamLoadReturned = null;\r\n\ttry {\r\n\t\tfilesInputStreamLoadReturned = new FilesInputStreamLoad (toRead);\r\n\t} catch (IOException ioReadException) {\r\n\t\tthrow new ArcException(ioReadException, ArcExceptionMessage.FILE_READ_FAILED, toRead);\r\n\t}\r\n\treturn filesInputStreamLoadReturned;\r\n }", "public void parseInputFile(String filename) throws BadInputFormatException {\r\n\t\tString line;\r\n\r\n\t\ttry {\r\n\t\t\tInputStream fis = new FileInputStream(filename);\r\n\t\t\tInputStreamReader isr = new InputStreamReader(fis);\r\n\t\t\tBufferedReader br = new BufferedReader(isr);\r\n\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tparseMessage(line);\r\n\t\t\t}\r\n\t\t\tbr.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public InputFileReader(String fileName) throws IOException{\n\t\t\n\t\tthis.contentsByLine = new ArrayList<>();\n\t\t\n\t\ttry {\n\t\t\tStream<String> stream = Files.lines(Paths.get(fileName));\n\t\t\tcontentsByLine = stream.collect(Collectors.toList());\n\t\t\tstream.close();\n\t\t} catch(IOException e) {\n\t\t\tthrow e;\n\t\t}\n\t}", "public static void processInput() throws IOException {\r\n\t\t\r\n\t\t//Out statement let user know the input file is being read\t\r\n\t\tScanner scnr;\r\n\t\tString[] splitString;\r\n\t\t\r\n\t\tFile file = new File(\"Project_04_Input01.txt\");\r\n\t\tscnr = new Scanner(file);\r\n\t\t\r\n\t\tSystem.out.println(\"Reading data from \" + file + \"...\");\r\n\t\t\r\n\t\twhile(scnr.hasNextLine()) {\r\n\t\t\tString line = scnr.nextLine();\r\n\t\t\tsplitString = line.split(\",\");\r\n\r\n\t\t\tif (splitString[0].contains(\"STUDENT\")) {\r\n\t\t\t\t\r\n\t\t\t\t// Call processStudentData\r\n\t\t\t\tprocessStudentData(splitString);\r\n\t\t\t\tSystem.out.println(\"'STUDENT' has been found in the file.\");\r\n\r\n\t\t\t} // End if\r\n\t\t\t\r\n\t\t\telse if (splitString[0].contains(\"GRADEITEM\") ) {\r\n\t\t\t\t\r\n\t\t\t\t// Call processGradeItemData\r\n\t\t\t\tprocessGradeItemData(splitString);\r\n\t\t\t\tSystem.out.println(\"'GRADEITEM' has been found in the file.\");\r\n\t\t\t\t\r\n\t\t\t} // End if\r\n\t\t} // End while\r\n\t\t\r\n\t\t// Close the file\r\n\t\tscnr.close();\r\n\t\t\t\r\n\t}", "public static void main (String[] args) throws IOException\n {\n Scanner fileScan, lineScan;\n String fileName;\n\n Scanner scan = new Scanner(System.in);\n\n System.out.print (\"Enter the name of the input file: \");\n fileName = scan.nextLine();\n fileScan = new Scanner(new File(fileName));\n\n // Read and process each line of the file\n\n\n\n\n }", "public boolean readDataFile();", "public void readFromTxtFile(String filename){\n try{\n File graphFile = new File(filename); \n Scanner myReader = new Scanner(graphFile); \n parseFile(myReader);\n myReader.close();\n } \n catch(FileNotFoundException e){\n System.out.println(\"ERROR: DGraphEdges, readFromTxtFile: file not found.\");\n e.printStackTrace();\n } \n }", "abstract void read();", "public List<RankList> readInput(String inputFile) {\n/* 661 */ return FeatureManager.readInput(inputFile, mustHaveRelDoc, useSparseRepresentation);\n/* */ }", "public static void readMyFile() throws IOException {\n\n List<String> allLines = Files.readAllLines(Paths.get(\"src/ErfansInputFile\"));\n System.out.println(\"allLines = \" + allLines);\n System.out.println(\"Reading the file in my computer. \");\n\n throw new FileNotFoundException(\"Kaboom, file is not found!!!\");\n }", "public InputData getData() throws IOException {\n\n ObjectMapper mapper = new ObjectMapper();\n return mapper.readValue(Paths.get(inFile).toFile(), InputData.class);\n }", "void readFile()\n {\n Scanner sc2 = new Scanner(System.in);\n try {\n sc2 = new Scanner(new File(\"src/main/java/ex45/exercise45_input.txt\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n while (sc2.hasNextLine()) {\n Scanner s2 = new Scanner(sc2.nextLine());\n while (s2.hasNext()) {\n //s is the next word\n String s = s2.next();\n this.readFile.add(s);\n }\n }\n }", "MafSource readSource(File sourceFile);", "public abstract void runInput(String stringFile) throws IOException;", "void citire(FileReader f);", "protected abstract E readFile() throws Exception;", "public static File readFile(String inputName) throws IOException\r\n {\r\n String fileName = inputName; \r\n File file = new File(fileName);\r\n if (!file.canRead())\r\n {\r\n System.err.println(file.getCanonicalPath() + \": cannot be read\"); \r\n }\r\n return file; \r\n }", "@Override\r\n\tpublic DocumentData read(File in) throws Exception {\r\n\t\tDocumentData doc = new DocumentData(in);\r\n\t\tBufferedReader reader = FileHandler.getBufferedReader(in);\r\n\t\tBufferedReader nested = null;\r\n\t\tString inpath = in.getAbsolutePath();\r\n\t\tFile nestin = new File (inpath.substring(0,inpath.length()-5)+SUBSUFFIX);\r\n\t\tif(nestin.exists())\r\n\t\t\tnested = FileHandler.getBufferedReader(nestin);\r\n\t\tint lcnt=0;\r\n\t\tint scnt=0;\r\n\t\tint start=-1;\r\n\t\tint nstart = -1;\r\n\t\tSentenceData sent = null;\r\n\t\twhile(true){\r\n\t\t\tString line = reader.readLine();\r\n\t\t\tString nline = null;\r\n\t\t\tif(nested!=null)\r\n\t\t\t\tnline = nested.readLine();\r\n\t\t\tif(line==null) {\r\n\t\t\t\tif(sent!=null){\r\n\t\t\t\t\tdoc.addSentenceData(sent);\r\n\t\t\t\t\tsent=null;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tline = line.trim();\r\n\t\t\tlcnt++;\r\n\t\t\tif(line.length()==0){\r\n\t\t\t\tif(sent!=null){\r\n\t\t\t\t\tdoc.addSentenceData(sent);\r\n\t\t\t\t\tsent=null;\r\n\t\t\t\t\tscnt=0;\r\n\t\t\t\t}else\r\n\t\t\t\t\tSystem.out.println(\"Skip empty line in line:\"+lcnt);\r\n\t\t\t}else if(line.startsWith(\"#\")){\r\n\t\t\t\tSystem.out.println(\"Skip comments in line:\"+lcnt+\"; \"+line);\r\n\t\t\t}else{\r\n\t\t\t\tif(sent==null)\r\n\t\t\t\t\tsent = new SentenceData();\r\n\t\t\t\tscnt++;\r\n\t\t\t\t\r\n\t\t\t\tString tmp[] = line.split(\"\\t\");\r\n\t\t\t\tsent.addTokens(tmp[0]);\r\n\t\t\t\tString mark = tmp[tmp.length-1];// last column is the markables;\r\n\t\t\t\tif(mark.equals(\"O\")){\r\n\t\t\t\t\tif(start>=0)\r\n\t\t\t\t\t\tsent.addMarkables(start, scnt-1);\r\n\t\t\t\t\tstart=-1;\r\n\t\t\t\t}else if(mark.startsWith(\"I-\")||mark.startsWith(\"B-\")){\r\n\t\t\t\t\tif(start<0)\r\n\t\t\t\t\t\tstart = scnt;//support both IOB1 and IOB2\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthrow new Exception(\"Please input only IOB or IOB2 scheme (main): \"+lcnt+\": \"+line);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(nline!=null){\r\n\t\t\t\t\tString ntmp[] = nline.split(\"\\t\");\r\n\t\t\t\t\tString nmark = ntmp[ntmp.length-1];\r\n\t\t\t\t\tif(nmark.equals(\"O\")){\r\n\t\t\t\t\t\tif(nstart>=0)\r\n\t\t\t\t\t\t\tsent.addMarkables(start, scnt-1);\r\n\t\t\t\t\t\tnstart=-1;\r\n\t\t\t\t\t}else if(nmark.startsWith(\"I-\")||nmark.startsWith(\"B-\")){\r\n\t\t\t\t\t\tif(nstart<0)\r\n\t\t\t\t\t\t\tnstart = scnt;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthrow new Exception(\"Please input only IOB or IOB2 scheme (nested): \"+lcnt+\": \"+nline);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn doc;\r\n\t}", "public void readFile(File inputFile) throws IOException {\n\t\tCSVParser csvParser = CSVParser.parse(inputFile, charset, csvFormat);\n\t\trecordList = csvParser.getRecords();\n\t}", "private int inputFile(Integer parameterIndex) throws ExceptionMalformedInput\n {\n this.inputFile = parseParameter(args, parameterIndex+1);\n//TODO check that the file exists and is readable\n return parameterIndex + 1;\n }", "public Input readFromFile (String fileName) {\n\t\tFileReader fr = null;\n\t\tBufferedReader br = null;\n\t\tString sCurrentLine = \"test\";\n\t\tint numberOfProducts = 0;\n\t\tint numberOfSurveys = 0;\n\t\tList <String> products = new ArrayList<> ();\n\t\tList <String> surveyPrices = new ArrayList<> ();\n\t\tInput input = new Input ();\n\t\t\n\t\ttry {\n\t\t\tfr = new FileReader(fileName);\n\t\t\tbr = new BufferedReader(fr);\n\t\t\tint line = 1;\n\t\t\tboolean isAllProductsAdded = false;\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\t\t\n\t\t\t\tif (line == 1 ) {\n\t\t\t\t\tnumberOfProducts = new Integer(sCurrentLine).intValue();\n\t\t\t\t}else {\n\t\t\t\t\tif (products.size() == numberOfProducts) {\n\t\t\t\t\t\tif (numberOfSurveys == 0) {\n\t\t\t\t\t\t\tnumberOfSurveys = new Integer(sCurrentLine).intValue();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsurveyPrices.add(sCurrentLine);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (products.size() < numberOfProducts )\n\t\t\t\t\t\t\tproducts.add(sCurrentLine);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tline++;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tinput.setNumberOfProducts(numberOfProducts);\n\t\tinput.setNumberofSurveyedPrices(numberOfSurveys);\n\t\tinput.setProducts(products);\n\t\tinput.setSurveys(surveyPrices);\n\t\treturn input;\n\t}", "private void openAndReadFile() throws IOException {\n\t\tFileReader fr = new FileReader(path);\n\t\tBufferedReader textreader = new BufferedReader(fr);\n\t\tString line;\n\t\tString[] parsedLine;\n\t\twhile ((line = textreader.readLine()) != null) {\n\t\t\tparsedLine = pattern.split(line);\n\t\t\tif (parsedLine.length == 2) {\n\t\t\t\tfileData.put(parsedLine[0], parsedLine[1]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Couldn't read line \" + line + \" in \" + path);\n\t\t\t}\n\t\t}\n\t\ttextreader.close();\n\t\tfr.close();\n\t}", "public static void readFile(String fileName)throws FileNotFoundException{ \r\n\t\t\r\n\t\tScanner sc = new Scanner(fileName);\r\n\t\t \r\n\t\twhile (sc.hasNextLine()) {\r\n\t\t\tString q1 = sc.next();\r\n\t\t\tString q1info = sc.next();\r\n\t\t}\r\n\t}", "public ReadFile (String file) throws java.io.FileNotFoundException\n {\n reader = new java.io.FileReader(file);\t\t//Construct the file reader\n br = new java.io.BufferedReader(reader);\t//Wrap it with a BufferedReader\n assert this.isValid(); \t\t\t//Make sure all is well and we can read the file\n }", "public interface FileReader {\n\n String read(String fileName);\n}", "private void readFromFile(){\n\t\t\n\t\ttry {\n\t\t\tFile file=new File(\"controller.txt\");\n\t\t\tFileInputStream fin;\n\t\t\tfin = new FileInputStream(file);\n\t\t\tDataInputStream din=new DataInputStream(fin);\n\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(din));\n\t\t\t\n\t\t\tfor(int i=0; i<2; i++){\n\t\t\t\tif(i==0)\n\t\t\t\t\tcodedUserName=br.readLine();\n\t\t\t\telse \n\t\t\t\t\tcodedPassword=br.readLine();\n\t\t\t}\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void readFile(String name) {\n\t\tString filename = this.path + name;\n\t\tFile file = new File(filename);\n\t\t\n\t\t\n\t\ttry {\t\t \n\t\t\tScanner reader = new Scanner(file);\n\t\t\t\n\t\t\twhile (reader.hasNextLine()) {\n\t\t\t\tString data = reader.nextLine();\n\t\t System.out.println(data);\n\t\t\t}\n\t\t reader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t System.out.println(\"File not found!\");\n\t\t} \n\t}", "protected abstract InputStream getInStreamImpl(String filename) throws IOException;", "public abstract boolean read(String line);", "private void readFromFile(String filename) {\n\t\ttry {\n\t\t Scanner read = new Scanner(new File(filename));\n\t\t String line;\n\t\t int counter = 0;\n\t\t String temp;\n\t\t line = read.nextLine();\n\t\t temp = line.substring(0);\n\t\t height = convertToInt(temp);\n\n\t\t line = read.nextLine();\n\t\t temp = line.substring(0);\n\n\t\t length = convertToInt(temp);\n\t\t size = height*length;\n\t\t \n\t\t squares = new Square[size][size];\n\n\t\t while(read.hasNextLine()) {\n\t\t\t\tline = read.nextLine();\n\t\t \tfor (int i = 0; i < line.length(); i++) {\n\t\t \t temp = line.substring(i, i+1);\n\n\t\t \t if (temp.equals(\".\")) {\n\t\t \t\t\tsquares[counter][i] = new FindValue(0);\n\t\t \t } \n\t\t \t else {\n\t\t\t\t\t\tsquares[counter][i] = new PreFilled(convertToInt(temp));\n\t\t\t \t\t}\n\t\t \t}\n\t\t \tcounter++;\n\t\t }\n\t\t} catch(IOException e) {\n\t\t e.printStackTrace();\n\t\t}\n }", "public static void main(String[] args) throws FileNotFoundException {\n\n\t\t// define a file object for the file on our computer we want to read\n\t\t// provide a path to the file when defining a File object\n\t\t//\n\t\t// paths can be: absolute - code all the parts from the root folder of your OS (Windows)\n\t\t//\n\t\t// paths can be: relative - code the part from the assumed current position to the file\n\t\t//\n\t\t// absolute paths should be avoided - they tightly couple the program to the directory structure it was created on\n\t\t//\t\t\t\t\t\t\t\t\t\t\tif the program is run on a machine with a different directory structure it won't work\n\t\t//\t\t\t\t\t\t\t\t\t\t\t\tbecause the absolute path doesn't exist in a different directory structure\n\t\t//\n\t\t// relative paths are preferred because you have loosely coupled the file to the directory structure\n\t\t//\t\t\tit is more likely that the relative paths will be the same from machine to machine\n\t\t//\n\t\t// path: . = current directory\n\t\t//\t\t/ = then (sub-directory or file follows)\n\t\t//\t\tnumbers.txt - file name\n\n\t\tFile theFile = new File(\"./data/numbers.txt\"); // give the File object the path to our file\n\n\t\t// define a scanner for the File object we created for the file on our computer\n\t\tScanner scannerForFile = new Scanner(theFile); // give Scanner the file object we created\n\n\t\tString aLine = \"\"; // hold a line of input from the file\n\n\n\t\tint sum = 0; // hold the sum of the numbers in a line\n\n\t\t// if we want to get all the lines in the file\n\t\t// we need to go through and get each line in the file one at a time\n\t\t// but we can't get a line from the file if there are no more lines in the file\n\t\t// we can use the Scanner class hasNextLine() method to see if there is another line in the file\n\t\t// we can set a loop to get a line from the file and process it as long as there are lines in the file\n\t\t// we will use while loop since we want loop based on a condition (as long as there are line in the file)\n\t\t// \t\t\tand not a count of lines in the file, in which case we would use a for-loop\n\t\t//\t\t\t\tfor-each-loops only work for collection classes\n\n\t\t// add up each line from my file\n\t\t// the file has one or more numbers separated by a single space in each line\n\n\t\twhile (scannerForFile.hasNextLine()) { // loop while there ia a line in the file\n\n\t\t\taLine = scannerForFile.nextLine(); // get a line from the file and store it in aLine\n\n\t\t\t// break apart the numbers in the line based on spaces\n\t\t\t// String .split() will create an array of Strings of the values separated by the delimiter\n\n\t\t\tString[] theNumbers = aLine.split(\" \"); // break apart the numbers in the line based on spaces\n\n\t\t\tSystem.out.println(\"Line from the file: \" + aLine); // display the line from the file\n\n\t\t\t// reset teh sum to 0 to clear it of the value from the last time through the loop\n\t\t\tsum = 0;\n\n\t\t\t// loop through the array of Strings holding the numbers from the line in the file\n\n\t\t\tfor (String aNumber : theNumbers) { // aNumber will hold the current element that is in the array\n\t\t\t\t\tsum = sum + Integer.parseInt(aNumber); // add the number to a sum after converting the String to an int\n\t\t\t}\n\n\t\t\t// now that we have the sum, we can display it\n\n\t\t\tSystem.out.println(\"Sum of the numbers is: \" + sum);\n\t\t\tSystem.out.println(\"Average of the numbers is: \" + sum / theNumbers.length);\n\n\t\t} // end of while loop\n\n\n\t\t\n}", "public Object readObject(File file, int format) throws IOException, FileNotFoundException;", "void fileReader(String filename) \r\n\t\t{\r\n\r\n\t\ttry (Scanner s = new Scanner(new FileReader(filename))) { \r\n\t\t while (s.hasNext()) { \r\n\t\t \tString name = s.nextLine(); // read name untill space\r\n\t\t \tString str[] = name.split(\",\");\r\n\t\t \tString nam = str[0]; \r\n\t\t \tint number = Integer.parseInt(str[1]); // read number untill space\r\n\t\t this.addContact(nam, number);\r\n\t\t\r\n\t\t }\t\t \r\n\t\t \r\n\t\t} \r\n\t\tcatch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t}", "public String readFromFile() throws IOException {\n return br.readLine();\n }", "Auditorium(java.util.Scanner input, java.io.File file){\r\n\t\t\r\n\t\tString line = input.next(); // read in next line from file // or nextLine()\r\n\t\tboolean flag = true;\r\n\t\tcolumns = line.length();\r\n\t\twhile(line != \"\" && flag != false) {\r\n\t\t\trows++; // increment number of rows\r\n\t\t\tif (!input.hasNext())\r\n\t\t\t\tflag = false;\r\n\t\t\tparseLine(line, rows, columns); // send line, array, and rows to a parse function\r\n\t\t\tif(input.hasNext())\r\n\t\t\t\tline = input.next(); //read in next line\r\n\t\t}\r\n\t}", "private boolean parseInput(String fileName)\n {\n try\n {\n Scanner in = new Scanner(new File(fileName));\n\n this.numIntxns = in.nextInt();\n this.roads = new Road[in.nextInt()];\n this.cities = new City[in.nextInt()];\n\n for (int i = 0; i < this.roads.length; i++)\n {\n int start = in.nextInt();\n int end = in.nextInt();\n double length = in.nextDouble();\n\n this.roads[i] = new Road(start, end, length);\n }\n\n for (int i = 0; i < this.cities.length; i++)\n {\n int intersectionNum = in.nextInt();\n String name = in.next();\n\n this.cities[i] = new City(intersectionNum, name);\n }\n\n if (in.hasNextInt())\n {\n this.signs = new Sign[in.nextInt()];\n }\n\n for (int i = 0; i < this.signs.length; i++)\n {\n int start = in.nextInt();\n int end = in.nextInt();\n double length = in.nextDouble();\n\n this.signs[i] = new Sign(start, end, length);\n }\n }\n // lazy catch statement because computer science is hard\n catch (Exception e)\n {\n System.out.println(e.getMessage());\n return false;\n }\n\n return true;\n }", "public static String read(String filename) throws IOException {\n // Reading input by lines:\n BufferedReader in = new BufferedReader(new FileReader(filename));\n// BufferedInputStream in2 = new BufferedInputStream(new FileInputStream(filename));\n String s;\n int s2;\n StringBuilder sb = new StringBuilder();\n while((s = in.readLine())!= null)\n sb.append( s + \"\\n\");\n// sb.append((char) s2);\n in.close();\n return sb.toString();\n }", "public abstract boolean canDecodeInput(File file) throws IOException;", "protected abstract void parseFile(File f) throws IOException;", "public void readInFile(String filename) {\r\n String lineOfData = new String (\"\");\r\n boolean done = false;\r\n //set up the BufferedReader\r\n BufferedReader fin = null;\r\n\ttry {\r\n fin = new BufferedReader(new InputStreamReader(new FileInputStream(filename)));\r\n lineOfData = fin.readLine();\r\n\t}\r\n catch(Exception c) {\r\n System.out.println(\"ERROR: Input read failed!\");\r\n }\r\n\r\n //read in additional strings until the file is empty\r\n while (done != true){\r\n String temp[] = lineOfData.split(\" \");\r\n graph.add(new Edge(temp[0], temp[1], Integer.parseInt(temp[2]))); //add current string to graph\r\n try {\r\n lineOfData = fin.readLine();\r\n if (lineOfData == null){\r\n done = true;\r\n }\r\n }\r\n catch(IOException ioe){\r\n System.out.println(\"ERROR: Input read failed!\");\r\n }\r\n }\r\n }", "@Override\n protected void read(){\n try(BufferedReader bufferedReader = new BufferedReader(new FileReader(getPath()));) {\n\n String frequencyString;\n\n String frequencyFileFormat = \"([a-z]\\\\s\\\\d+\\\\.\\\\d+)\";\n Pattern pattern = Pattern.compile(frequencyFileFormat);\n Matcher matcher;\n\n String[] frequency;\n\n // Read in each line of the frequencies file\n while ((frequencyString = bufferedReader.readLine()) != null) {\n // Match the frequency format to a individual frequency\n matcher = pattern.matcher(frequencyString);\n if(matcher.find()){\n\n // Split the string into the character and its frequency\n frequency = matcher.group(1).split(\" \");\n\n // Add the string and its corresponding frequency to the frequencies hash map\n frequencies.put(frequency[0], Double.parseDouble(frequency[1]));\n \n }\n }\n\n // Only set to true if it successfully reads the whole file\n setFileRead();\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }", "public void read_file(String filename)\n {\n out.println(\"READ\");\n out.println(filename);\n try\n {\n String content = null;\n content = in.readLine();\n System.out.println(\"READ content : \"+content);\n }\n catch (IOException e) \n {\n \tSystem.out.println(\"Read failed\");\n \tSystem.exit(-1);\n }\n }", "String input() {\n\n try {\n\n FileReader reader = new FileReader(\"the text.txt\");\n BufferedReader bufferedReader = new BufferedReader(reader);\n StringBuilder builder = new StringBuilder();\n String line;\n\n while ((line = bufferedReader.readLine()) != null)\n builder.append(line);\n\n return builder.toString();\n\n } catch (IOException e) {\n\n System.out.println(\"Input Failure\");\n return null;\n }\n }", "private static Scanner determineInputSource(String[] args) throws FileNotFoundException{\n if (args.length > 0) {\n //Reading from file\n return new Scanner(new File(args[0]));\n }\n else {\n //Reading from standard Input\n return new Scanner(System.in);\n }\n }", "public InputReader(File file){\n try {\n inputStream = new Scanner(file);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n instantiate();\n assert(invariant());\n }", "public void readVotes(File inFile);", "@Override\n\tpublic boolean readFile(String filename) {\n\t\ttry {\n\t\t\tScanner input = new Scanner(new File(filename));\n\t\t\tString row = input.nextLine();\n\t\t\tString[] sarr = row.split(\",\");\n\t\t\tString ingredientsWatch = \"\";\n\t\t\t// Gets the String type of ingredients to watch\n\t\t\t// Identify the gender and create the Female or Male object\n\t\t\tif (sarr[0].equals(\"Female\")) {\n\t\t\t\tStringBuilder sBuilder =new StringBuilder();\n\t\t\t\tfor(int j =5;j<sarr.length-1;j++) {\n\t\t\t\t\tsBuilder=sBuilder.append(sarr[j].trim()+\",\");\t\n\t\t\t\t}\n\t\t\t\tsBuilder=sBuilder.append(sarr[sarr.length-1]);\n\t\t\t\tingredientsWatch = sBuilder.toString();\n\t\t\t\tFemale female=new Female(Float.parseFloat(sarr[1]), Float.parseFloat(sarr[2]), \n\t\t\t\t\t\tFloat.parseFloat(sarr[3]), Float.parseFloat(sarr[4]), ingredientsWatch);\n\t\t\t\tNutriByte.person=female;\n\t\t\t}else {\n\t\t\t\tStringBuilder sBuilder =new StringBuilder();\n\t\t\t\tfor(int j =5;j<sarr.length-1;j++) {\t\n\t\t\t\t\tsBuilder=sBuilder.append(sarr[j].trim()+\",\");\n\t\t\t\t}\n\t\t\t\tsBuilder=sBuilder.append(sarr[sarr.length-1]);\n\t\t\t\tingredientsWatch = sBuilder.toString();\n\t\t\t\t// Creates the object using its constructor\n\t\t\t\tMale male=new Male(Float.parseFloat(sarr[1]), Float.parseFloat(sarr[2]), \n\t\t\t\t\t\tFloat.parseFloat(sarr[3]), Float.parseFloat(sarr[4]), ingredientsWatch);\n\t\t\t\tNutriByte.person=male;\n\t\t\t\tinput.close();\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\t\n\t\treturn true;\n\t}", "public static void readDataFile(String INPUT_FILENAME) {\r\n File dataFile = new File(INPUT_FILENAME);\r\n Scanner fileScanner = null;\r\n String oneLine;\r\n String [] lineValues;\r\n int lineCount = 0;\r\n \r\n System.out.println(\"Reading data file...\");\r\n System.out.println();\r\n \r\n try {\r\n fileScanner = new Scanner(dataFile);\r\n }\r\n catch (FileNotFoundException e) {\r\n System.err.println(\"FILE NOT FOUND: \" + INPUT_FILENAME);\r\n System.exit(1);\r\n }\r\n \r\n while (fileScanner.hasNextLine()) {\r\n oneLine = fileScanner.nextLine();\r\n lineValues = oneLine.split(\",\");\r\n lineCount++;\r\n \r\n if (lineValues[0].equalsIgnoreCase(\"REALTOR\")) {\r\n if (lineValues[1].equalsIgnoreCase(\"ADD\")) {\r\n addRealtor(lineValues);\r\n } else {\r\n System.out.println(\" ERROR: A line in the file is not \"\r\n + \"formatted correctly to ADD an object.\");\r\n }\r\n } else if (lineValues[0].equalsIgnoreCase(\"PROPERTY\")) {\r\n if (lineValues[1].equalsIgnoreCase(\"ADD\")) {\r\n addProperty(lineValues);\r\n } else {\r\n System.out.println(\" ERROR: A line in the file is not \"\r\n + \"formatted correctly to ADD an object.\");\r\n }\r\n } else {\r\n System.out.println(\" ERROR: A line in the file is not \"\r\n + \"designated as REALTOR or PROPERTY.\");\r\n }\r\n }\r\n \r\n //Close data file\r\n fileScanner.close();\r\n \r\n System.out.println();\r\n System.out.println(\"Data Read Finished: Read \" + lineCount \r\n + \" lines of data.\");\r\n System.out.println();\r\n }", "public void read() {\n String line = \"\";\n int counter = 0;\n try {\n input = new BufferedReader(new FileReader(file));\n while (line != null) {\n if (!(line.equals(\"arglebargle\"))) {//not a default\n names.add(line);\n }\n }\n input.close();\n }\n catch (IOException e) {\n }\n }", "public MyInputStream(String fileName)\n {\n try\n {\n in = new BufferedReader\n (new FileReader(fileName));\n }\n catch (FileNotFoundException e)\n {throw new MyInputException(e.getMessage());}\n }", "public void readFile(File file){\n try{\n scan = new Scanner(file);\n while(scan.hasNextLine()){\n String line = scan.nextLine();\n if(line.startsWith(\"//\")){\n continue;\n }\n process(line);\n }\n }catch(IOException e){\n Alert alert = new Alert(AlertType.INFORMATION);\n alert.setTitle(\"\");\n alert.setHeaderText(null);\n alert.setContentText(\"Oops the input was not read properly\");\n alert.showAndWait();\n e.printStackTrace();\n }catch(NullPointerException e){\n Alert alert = new Alert(AlertType.INFORMATION);\n alert.setTitle(\"\");\n alert.setHeaderText(null);\n alert.setContentText(\"Oops the input was not read properly\");\n alert.showAndWait();\n e.printStackTrace();\n \n }\n }", "private static String readInput() {\n String kbString = \"\";\n File kbFile = new File(\"kb.txt\");\n if(kbFile.canRead()){\n try {\n FileInputStream fileInputStream = new FileInputStream(kbFile);\n\n int c;\n while((c = fileInputStream.read()) != -1){\n kbString += (char) c;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return kbString;\n }", "static Stream<String> readIn(File file) \r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn Files.readAllLines(file.toPath()).stream();\r\n\t\t} \r\n\t\tcatch (IOException ioe) \r\n\t\t{\r\n\t\t\tthrow new UncheckedIOException(ioe);\r\n\t\t}\r\n\t}", "public static Scanner openInput(String fname){\n\t Scanner infile = null;\n\t try {\n\t infile = new Scanner(new File(fname));\n\t } catch(FileNotFoundException e) {\n\t System.out.printf(\"Cannot open file '%s' for input\\n\", fname);\n\t System.exit(0);\n\t }\n\t return infile;\n\t }", "private void fileRead(String path)\n\t{\n\t\ttry\n\t\t{\n\t\t\t// create file\n\t\t\tFile file = new File(path);\n\t\t\tFileInputStream fileStream = new FileInputStream(file);\n\t\t\t\n\t\t\t// data read\n\t\t\tthis.dataContent = new byte[(int)file.length()];\n\t\t\tint ret = fileStream.read(this.dataContent, 0, (int)file.length());\n\t\t}\n\t\tcatch(FileNotFoundException e)\n\t\t{\n\t\t\tSystem.out.println(\"File Not Found : \" + e.getMessage());\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tSystem.out.println(\"Failed File Read : \" + e.getMessage());\n\t\t}\n\t\t\n\t}", "public void readFromFile(String fileName)\r\n\t{\r\n\r\n\t\tScanner fileScanner = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tfileScanner = new Scanner(new File(fileName));\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\twhile(fileScanner.hasNext())\r\n\t\t{\r\n\t\t\tString fileLine = fileScanner.nextLine();\r\n\t\t\tString[] splitLines = fileLine.split(\" \",2);\r\n\t\t\t//checks each word and makes sure it is ok\r\n\t\t\tif(splitLines[0].equalsIgnoreCase(\"Name\"))\r\n\t\t\t{\r\n\t\t\t\tname = splitLines[1];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(splitLines[0].equalsIgnoreCase(\"Speed\"))\r\n\t\t\t{\r\n\t\t\t\tspeed = Double.parseDouble(splitLines[1]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(splitLines[0].equalsIgnoreCase(\"Strength\"))\r\n\t\t\t{\r\n\t\t\t\tstrength = Integer.parseInt(splitLines[1]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(splitLines[0].equalsIgnoreCase(\"HP\"))\r\n\t\t\t{\r\n\t\t\t\thp = Integer.parseInt(splitLines[1]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(splitLines[0].equalsIgnoreCase(\"Weapon\"))\r\n\t\t\t{\r\n\t\t\t\t\tweapon = splitLines[1];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tfileScanner.close();\r\n\t\r\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n Scanner scanner = new Scanner(new FileInputStream(\"/Users/guoziren/IdeaProjects/剑指offer for Java/src/main/java/com/ustc/leetcode/algorithmidea/dynamicprogramming/input.txt\"));\n }", "@Test\n\tpublic void testReadTxtFile() throws FileNotFoundException {\n\t\tFileParser fp = new FileParser();\n\t\tArrayList<String> parsedLines = fp.readTxtFile(\"test.txt\");\n\t\tassertEquals(\"This is a test file\", parsedLines.get(0));\n\t\tassertEquals(\"University of Virginia\", parsedLines.get(1));\n\n\t\tArrayList<String> parsedWords = fp.readTxtFile(\"test1.txt\");\n\t\tassertEquals(\"test\", parsedWords.get(0));\n\t\tassertEquals(\"file\", parsedWords.get(1));\n\t}", "public String parse(File file);", "private void readFileByLines(String inputName){\n File file = new File(inputName);\n BufferedReader reader = null;\n\n try {\n reader = new BufferedReader(new FileReader(file));\n\n String tempString = null;\n this.inputContent = new StringBuilder();\n\n while((tempString = reader.readLine()) != null){\n this.inputContent.append(tempString);\n this.inputContent.append(\" \");\n }\n\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (reader != null) {\n try {\n reader.close();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }\n }\n }", "public static void readFile( String file ) throws Exception\r\n\t{\r\n\t\tString format;\r\n\t\tint width, height, maxPixel;\r\n\t\t\r\n\t\tScanner get = new Scanner( new FileReader( file ) );\r\n\t\t\r\n\t\tformat = get.next();\r\n\t\twidth = get.nextInt();\r\n\t\theight = get.nextInt();\r\n\t\tmaxPixel = get.nextInt();\r\n\t\t\r\n\t\tif ( ( width != WIDTH ) || ( height != HEIGHT ) || ( maxPixel != MAX_PIXEL ) )\r\n\t\t{\r\n\t\t\tSystem.out.println( \"Error in file format. Exiting...\" );\r\n\t\t\tSystem.exit( 1 );\r\n\t\t}\r\n\t\t\t\r\n\t\tif ( format.equals(\"P2\") )\r\n\t\t{\r\n\t\t\tfor ( int i = 0; i < WIDTH; i++ )\r\n\t\t\t{\r\n\t\t\t\tfor ( int j = 0; j < HEIGHT; j++ )\r\n\t\t\t\t{\r\n\t\t\t\t\torig_pixels[i][j] = get.nextByte( );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ( format.equals( \"P5\" ) )\r\n\t\t{\r\n\t\t\tget.close();\r\n\t\t\t\r\n\t\t\tDataInputStream input = new DataInputStream( new FileInputStream( file ) );\r\n\r\n\t\t\tfor ( int i = 0; i < 15; i++ )\r\n\t\t\t\tinput.readUnsignedByte();\r\n\t\t\t\r\n\t\t\tfor ( int i = 0; i < WIDTH; i++ )\r\n\t\t\t{\r\n\t\t\t\tfor ( int j = 0; j < HEIGHT; j++ )\r\n\t\t\t\t{\r\n\t\t\t\t\torig_pixels[i][j] = input.readUnsignedByte();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tinput.close();\r\n\t\t}\r\n\t\t\r\n\t}", "private static void initializeInput(String filename) {\n\t\t// Reading from specified file.\n\t\ttry\n\t\t{\n\t\t\tfileInput = new Scanner(new FileInputStream(filename));\n\t\t}\n\t\tcatch(FileNotFoundException e) \n\t\t{ \n\t\t\tSystem.err.println(\"\\nFile not found. Please re-enter.\");\n\t\t\tinitializeInput(getFilename());\n\t\t}\n\t}", "public String readFileIntoString(String filepath) throws IOException;", "List<String[]> readCsv(String inputFilePath)throws IOException;", "public void readInput(String fileName){\n\n BufferedReader reader;\n try {\n reader = new BufferedReader(new FileReader(fileName));\n String line = reader.readLine(); //read first line\n int numLine =1; //keep track the number of line\n while (line != null) {\n String[] tokens = line.trim().split(\"\\\\s+\"); //split line into token\n if(numLine==1){ //for the first line\n intersection = Integer.parseInt(tokens[0]); //set the number of intersection\n roadways = Integer.parseInt(tokens[1]); // set the number of roadways\n coor = new Coordinates[intersection];\n g = new Graph(intersection);//create a graph\n line = reader.readLine();\n numLine++;\n }\n else if(numLine>1&&numLine<intersection+2){ //for all intersection\n while(numLine>1&&numLine<intersection+2){\n tokens = line.trim().split(\"\\\\s+\");\n coor[Integer.parseInt(tokens[0])] = new Coordinates(Integer.parseInt(tokens[1]),Integer.parseInt(tokens[2])); //add into coor array to keep track the coor of intersection\n line = reader.readLine();\n numLine++;\n }\n }\n else if(numLine ==intersection+2){ //skip the space line\n line = reader.readLine();\n numLine++;\n while(numLine<roadways+intersection+3){ // for all the roadways, only include the number of roadways mention in the first line\n tokens = line.trim().split(\"\\\\s+\");\n int fst = Integer.parseInt(tokens[0]);\n int snd = Integer.parseInt(tokens[1]);\n g.addEgde(fst,snd,coor[fst].distTo(coor[snd]));\n line = reader.readLine();\n numLine++;\n }\n }\n else if(numLine >= roadways+intersection+3)\n break;\n }\n reader.close();\n } catch (FileNotFoundException e){\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void readFile() {\n\t\tbufferedReader = null;\n\t\ttry {\n\t\t\tFileReader fileReader = new FileReader(\"/home/bridgeit/Desktop/number.txt\");\n\t\t\tbufferedReader = new BufferedReader(fileReader);\n\n\t\t\tString line;\n\t\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\t\tString[] strings = line.split(\" \");\n\t\t\t\tfor (String integers : strings) {\n\t\t\t\t\thl.add(Integer.parseInt(integers));\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File Not Found...\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\tbufferedReader.close();\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}", "public void readFile(String file)\n\t{\t\n\t\tfindPieces(file);\n\t}", "String[] readFile(String path) {\n ArrayList<String> list = new ArrayList<>();\n String[] output = null;\n Scanner reader;\n File file;\n\n try {\n file = new File(path);\n reader = new Scanner(file);\n while (reader.hasNextLine()) {\n list.add(reader.nextLine());\n }\n output = new String[list.size()];\n for (int i = 0; i < list.size(); i++) output[i] = list.get(i);\n reader.close();\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found exception\");\n }\n return output;\n }", "public static void main(String[] args) throws FileNotFoundException {\n\t\t\t\n\t\tScanner scan = new Scanner(new File(\"input.txt\"));\n\t\t\n\t\tParser parse;\n\t\tCode code = new Code();\n\t\tSymbolTable st = new SymbolTable();\n\t\t\n\t\twhile(scan.hasNextLine()) {\n\t\t\tString inCode = scan.nextLine();\t\n\t\t\tparse = new Parser(inCode);\n\t\t}\n\t\t\n\t}", "@Override\n public Ini read(InputStream in) throws IOException {\n return read(new InputStreamReader(in));\n }", "public List<Task> readFile() throws FileNotFoundException, DukeException {\n List<Task> output = new ArrayList<>();\n Scanner sc = new Scanner(file);\n while (sc.hasNext()) {\n output.add(readTask(sc.nextLine()));\n }\n return output;\n }", "public void readFile() throws Exception, FileNotFoundException, NumberFormatException, MalformedParameterizedTypeException {\n // my user or my file might be kind of crazy! -> will check for these exceptions!\n }", "public void readFile(String filename) throws IOException {\n BufferedReader buffer = new BufferedReader(new FileReader(filename));\n\n String line;\n int row = 0;\n isFirstLine = true;\n\n while ((line = buffer.readLine()) != null) {\n String[] vals = line.trim().split(\"\\\\s+\");\n int length = vals.length;\n \n if(isFirstLine) {\n \tfor(int col = 0; col < 2; col++) {\n \t\tif(col == 0)\n \t\t\trowSize = Integer.parseInt(vals[col]);\n \t\telse\n \t\t\tcolSize = Integer.parseInt(vals[col]);\n \t}\n \tskiMap = new int[rowSize][colSize];\n \tisFirstLine = false;\n }\n else {\n \tfor (int col = 0; col < length; col++) {\n \tskiMap[row][col] = Integer.parseInt(vals[col]);\n }\n \t row++;\n }\n }\n \n if(buffer != null)\n \tbuffer.close();\n }" ]
[ "0.74096334", "0.7185401", "0.7021419", "0.7005595", "0.6936809", "0.6919391", "0.6917227", "0.678438", "0.6754779", "0.66757476", "0.6661487", "0.6640523", "0.6613936", "0.6564036", "0.65591735", "0.652484", "0.6458474", "0.64215577", "0.63737726", "0.6364007", "0.6313647", "0.6272971", "0.62717116", "0.6255207", "0.62430525", "0.6213079", "0.62100714", "0.62031585", "0.61897194", "0.6177794", "0.6173914", "0.6171987", "0.6171954", "0.6156335", "0.61503345", "0.6133948", "0.61247283", "0.6118145", "0.6117179", "0.6114947", "0.6113368", "0.61115265", "0.61033237", "0.6102352", "0.6102218", "0.6101565", "0.6097911", "0.60975873", "0.60929024", "0.6092807", "0.6091816", "0.607132", "0.60629755", "0.6057567", "0.60346764", "0.60260355", "0.6018282", "0.60178834", "0.5990702", "0.5990286", "0.5979155", "0.5978607", "0.59739596", "0.5954839", "0.59511924", "0.59421307", "0.5937199", "0.59371656", "0.5934913", "0.5930579", "0.59298855", "0.5927236", "0.5926966", "0.5921366", "0.5919041", "0.5915785", "0.59126794", "0.59044176", "0.5900006", "0.5896814", "0.58963233", "0.5895875", "0.5893476", "0.5873011", "0.5871212", "0.58688545", "0.58619833", "0.58574986", "0.58547634", "0.58420134", "0.58377534", "0.5833548", "0.5827609", "0.58182615", "0.5817954", "0.58156896", "0.58136046", "0.5811305", "0.581018", "0.58045655", "0.5790298" ]
0.0
-1
add method to send projectiles from hero to outside to compare
@Override protected void simpleUpdate() { if(danks.isEmpty()){ danks.clear(); newDanks(); } ArrayList<Projectiles> projs = hero.getArray(); Iterator<Dank> enemIt = danks.iterator(); while(enemIt.hasNext()){ Dank e = enemIt.next(); if(hero.getBounds().intersects(e.getBounds())){ if(!isPaused) isPaused = !isPaused; gameOver = true; projs.clear(); } for(int j = 0; j < projs.size(); j++){ if(e.getBounds().intersects(projs.get(j).getBounds())){ score += e.getSpeed(); enemIt.remove(); projs.remove(j); } } e.move(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sendProjectile(long itemid, byte type, String modelName, String name, byte material, float startX, float startY, float startH, float rot, byte layer, float endX, float endY, float endH, long sourceId, long targetId, float projectedSecondsInAir, float actualSecondsInAir) {\n/* 5593 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 5597 */ if (vz.getWatcher().getWurmId() == targetId) {\n/* */ \n/* 5599 */ if (vz.getWatcher().getWurmId() == sourceId) {\n/* 5600 */ vz.sendProjectile(itemid, type, modelName, name, material, startX, startY, startH, rot, layer, endX, endY, endH, -1L, -1L, projectedSecondsInAir, actualSecondsInAir);\n/* */ } else {\n/* */ \n/* 5603 */ vz.sendProjectile(itemid, type, modelName, name, material, startX, startY, startH, rot, layer, endX, endY, endH, sourceId, -1L, projectedSecondsInAir, actualSecondsInAir);\n/* */ }\n/* */ \n/* 5606 */ } else if (vz.getWatcher().getWurmId() == sourceId) {\n/* */ \n/* 5608 */ if (vz.getWatcher().getWurmId() == targetId) {\n/* 5609 */ vz.sendProjectile(itemid, type, modelName, name, material, startX, startY, startH, rot, layer, endX, endY, endH, -1L, -1L, projectedSecondsInAir, actualSecondsInAir);\n/* */ } else {\n/* */ \n/* 5612 */ vz.sendProjectile(itemid, type, modelName, name, material, startX, startY, startH, rot, layer, endX, endY, endH, -1L, targetId, projectedSecondsInAir, actualSecondsInAir);\n/* */ } \n/* */ } else {\n/* */ \n/* 5616 */ vz.sendProjectile(itemid, type, modelName, name, material, startX, startY, startH, rot, layer, endX, endY, endH, sourceId, targetId, projectedSecondsInAir, actualSecondsInAir);\n/* */ }\n/* */ \n/* 5619 */ } catch (Exception e) {\n/* */ \n/* 5621 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ } \n/* */ } \n/* */ }", "public void Update() {\r\n\t\t//if player is near and haven't fired in a while, fire a projectile\r\n\t\tif(!playerNear().equals(\"n\") && j > 250){\r\n\t\t\tfireProjectile(playerNear());\r\n\t\t\tj = 0;\r\n\t\t}\r\n\t\tj++;\r\n\r\n\t\t//COLLISION\r\n\t\tfor(int i = 0; i < AdventureManager.currentRoom.projectiles.size(); i++){ //Checks for collision with player projectiles\r\n\t\t\tif(((AdventureManager.currentRoom.projectiles.get(i).x + 50 > x) && (AdventureManager.currentRoom.projectiles.get(i).x + 50 < x+50) &&(AdventureManager.currentRoom.projectiles.get(i).y + 50> y) &&(AdventureManager.currentRoom.projectiles.get(i).y + 50< y+98) )\r\n\t\t\t\t\t|| ((AdventureManager.currentRoom.projectiles.get(i).x > x) && (AdventureManager.currentRoom.projectiles.get(i).x < x+50) &&(AdventureManager.currentRoom.projectiles.get(i).y + 50> y) &&(AdventureManager.currentRoom.projectiles.get(i).y + 50< y+98) )\r\n\r\n\t\t\t\t\t\t) {\r\n\r\n\t\t\t\t\tswitch(AdventureManager.currentRoom.projectiles.get(i).type) {\r\n\t\t\t\t\tcase \"fireball\": health -= AdventureManager.toon.intelligence; break;\r\n\t\t\t\t\tcase \"sword\": health -= AdventureManager.toon.strength;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tAdventureManager.currentRoom.projectiles.get(i).kill();\r\n\t\t\t\t}\r\n\t\t}\r\n\t\tif((AdventureManager.toon.y < y+50) && (AdventureManager.toon.y > y+40) && //Checks for collision with player\r\n\t\t\t\t(((AdventureManager.toon.x > x) && (AdventureManager.toon.x < x+50))\r\n\t\t\t\t|| ((AdventureManager.toon.x+50 > x) && AdventureManager.toon.x+50 < x+50))) {\r\n\t\t\tAdventureManager.toon.y = y+55; AdventureManager.toon.repaint();\r\n\t\t\tif(contact <= 0){\r\n\t\t\t\tAdventureManager.toon.damage(1);\r\n\t\t\t\tcontact = 50;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if((AdventureManager.toon.y+100 < y) && (AdventureManager.toon.y+100 > y-5) && (((AdventureManager.toon.x >= x) && (AdventureManager.toon.x <= x+50)) //Checks for collision with player\r\n\t\t\t\t|| ((AdventureManager.toon.x+50 >= x) && (AdventureManager.toon.x+50 <= x+50))\r\n\t\t\t\t|| ((AdventureManager.toon.x+25 >= x) && AdventureManager.toon.x+25 <= x+50))) {\r\n\t\t AdventureManager.toon.y = y-105; AdventureManager.toon.repaint();\r\n\t\t AdventureManager.toon.jumpCount = 25;\r\n\t\t if(contact <= 0){\r\n\t\t\t AdventureManager.toon.damage(1);\r\n\t\t\t contact = 50;\r\n\t\t }\r\n\t\t}\r\n\t\telse if(((AdventureManager.toon.x + 50) > x) && ((AdventureManager.toon.x+50)<x+20) && ( //Left Collision\r\n\t\t\t\t((AdventureManager.toon.y > y) && (AdventureManager.toon.y < y+50)) ||\r\n\t\t\t\t((AdventureManager.toon.y + 25 > y) && (AdventureManager.toon.y + 25 < y+45)) ||\r\n\t\t\t\t((AdventureManager.toon.y + 50 > y) && (AdventureManager.toon.y + 50 < y+45)) ||\r\n\t\t\t\t((AdventureManager.toon.y + 75 > y) && (AdventureManager.toon.y + 75 < y+45)) ||\r\n\t\t\t\t((AdventureManager.toon.y + 100 > y) && (AdventureManager.toon.y + 100 < y+45))\r\n\r\n\r\n\t\t\t\t) ) {\r\n\t\t\tAdventureManager.toon.x = x-51; AdventureManager.toon.repaint();\r\n\t\t\tif(contact <= 0){\r\n\t\t\t\tAdventureManager.toon.damage(1);\r\n\t\t\t\tcontact = 50;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(((AdventureManager.toon.x) > x+40) && ((AdventureManager.toon.x)<x+50) && ( //Right Collision\r\n\t\t\t\t((AdventureManager.toon.y > y) && (AdventureManager.toon.y < y+50)) ||\r\n\t\t\t\t((AdventureManager.toon.y + 25 > y) && (AdventureManager.toon.y + 25 < y+50)) ||\r\n\t\t\t\t((AdventureManager.toon.y + 50 > y) && (AdventureManager.toon.y + 50 < y+50)) ||\r\n\t\t\t\t((AdventureManager.toon.y + 75 > y) && (AdventureManager.toon.y + 75 < y+50)) ||\r\n\t\t\t\t((AdventureManager.toon.y + 100 > y) && (AdventureManager.toon.y + 100 < y+50))\r\n\r\n\r\n\t\t\t\t) ) {\r\n\t\t\tAdventureManager.toon.x = x+51; AdventureManager.toon.repaint();\r\n\t\t\tif(contact <= 0){\r\n\t\t\t\tAdventureManager.toon.damage(1);\r\n\t\t\t\tcontact = 50;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcontact--;\r\n\t\tif(health<=0){\r\n\t\t\tsetVisible(false);\r\n\t\t\talive = false;\r\n\t\t\tAdventureManager.currentRoom.enemies.remove(this);\r\n\t\t}\r\n\r\n\r\n\r\n\t\t\tif((y+100)>=AdventureManager.floorHeight) {\r\n\t\t\t\ty= AdventureManager.floorHeight -100;\r\n\t\t\t\tgravity *= 0;\r\n\r\n\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tgravity = 3;}\r\n\r\n\t\t\ty += gravity; setLocation(x,y);\r\n\r\n\t\t\tswitch(movetype) {\r\n\t\t\tcase 0: chasePlayer(); break;\r\n\t\t\tcase 1: randomMove(); break;\r\n\t\t\tcase 2: dontMove(); break;\r\n\t\t\t}\r\n\r\n\t\t\t}", "private void initiateProjectile() {\n\t}", "void use(ATile clickedTile, GodSim g);", "public void processMove(MahjongSolitaireMove move)\n {\n // REMOVE THE MOVE TILES FROM THE GRID\n ArrayList<MahjongSolitaireTile> stack1 = tileGrid[move.col1][move.row1];\n ArrayList<MahjongSolitaireTile> stack2 = tileGrid[move.col2][move.row2]; \n MahjongSolitaireTile tile1 = stack1.remove(stack1.size()-1);\n MahjongSolitaireTile tile2 = stack2.remove(stack2.size()-1);\n \n // MAKE SURE BOTH ARE UNSELECTED\n tile1.setState(VISIBLE_STATE);\n tile2.setState(VISIBLE_STATE);\n \n // SEND THEM TO THE STACK\n tile1.setTarget(TILE_STACK_X + TILE_STACK_OFFSET_X, TILE_STACK_Y + TILE_STACK_OFFSET_Y);\n tile1.startMovingToTarget(MAX_TILE_VELOCITY);\n tile2.setTarget(TILE_STACK_X + TILE_STACK_2_OFFSET_X, TILE_STACK_Y + TILE_STACK_OFFSET_Y);\n tile2.startMovingToTarget(MAX_TILE_VELOCITY);\n stackTiles.add(tile1);\n stackTiles.add(tile2); \n \n // MAKE SURE THEY MOVE\n movingTiles.add(tile1);\n movingTiles.add(tile2);\n \n // AND MAKE SURE NEW TILES CAN BE SELECTED\n selectedTile = null;\n \n // PLAY THE AUDIO CUE\n miniGame.getAudio().play(MahjongSolitairePropertyType.MATCH_AUDIO_CUE.toString(), false);\n \n // NOW CHECK TO SEE IF THE GAME HAS EITHER BEEN WON OR LOST\n \n // HAS THE PLAYER WON?\n if (stackTiles.size() == NUM_TILES)\n {\n // YUP UPDATE EVERYTHING ACCORDINGLY\n endGameAsWin();\n }\n else\n {\n // SEE IF THERE ARE ANY MOVES LEFT\n MahjongSolitaireMove possibleMove = this.findMove();\n if (possibleMove == null)\n {\n // NOPE, WITH NO MOVES LEFT BUT TILES LEFT ON\n // THE GRID, THE PLAYER HAS LOST\n endGameAsLoss();\n }\n }\n }", "void update(List<IProjectile> projectilesList, float newAgle, boolean hasTarget);", "public void areaEffect(Player player){\n if(object.getProperties().containsKey(\"endLevel\")) {\n System.out.println(\"Fin du level\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n PlayScreen.setEndLevel();\n }\n\n if(object.getProperties().containsKey(\"startBossFight\")) {\n\n System.out.println(\"Start Boss Fight\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n\n TiledMapTileLayer.Cell cell = new TiledMapTileLayer.Cell();\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 6, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 7, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 8, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 9, cell);\n\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 6, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 7, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 8, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 9, cell);\n\n PlayScreen.cameraChangeBoss(true);\n setCategoryFilterFixture(GameTest.GROUND_BIT, PlayScreen.getFixtureStartBoss());\n\n }\n\n if(object.getProperties().containsKey(\"blueKnight\")) {\n System.out.println(\"Changement en bleu\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n getCell().setTile(null);\n PlayScreen.setColorKnight(\"blue\");\n }\n\n if(object.getProperties().containsKey(\"greyKnight\")) {\n System.out.println(\"Changement en gris\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n getCell().setTile(null);\n PlayScreen.setColorKnight(\"grey\");\n }\n\n if(object.getProperties().containsKey(\"redKnight\")) {\n System.out.println(\"Changement en rouge\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n getCell().setTile(null);\n PlayScreen.setColorKnight(\"red\");\n }\n\n }", "public void elementosMapa() {\n\t\t\n\t\tHeroes heroe = (Heroes) ven.getHeroe();\n\t\t\n\t\tif(heroe.getPosX() >= 250 && heroe.getPosX() <= 302 && heroe.getPosY() >= 208 && heroe.getPosY() <= 255 && pregunta1 == false) {\n\n\t\t\tString respuesta = JOptionPane.showInputDialog(this, \"¿Cuántas transformaciones sufre Freezer?\" + \"\\n\" + \"a) 4\" + \"\\n\" + \"b) 5\" + \"\\n\" + \"c) 2\");\n\t\t\t\n\t\t\tif(respuesta == null){\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tthrow new RespuestaNulaException();\n\t\t\t\t} catch (RespuestaNulaException e) {\n\t\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta.equalsIgnoreCase(\"a\")) {\n\t\t\t\t\n\t\t\t\tpregunta1 = true;\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es correcta, acabas de ganar una nueva esfera :D\");\n\t\t\t\tven.modificarEsfera(2);\n\t\t\t\tven.actualizarInfo();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta != \"a\") {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es incorrecta :(\");\n\t\t\t\theroe.setPosX(281); \n\t\t\t\theroe.setPosY(311);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\telse if(heroe.getPosX() >= 1148 && heroe.getPosX() <= 1202 && heroe.getPosY() >= 33 && heroe.getPosY() <= 84 && pregunta2 == false) {\n\t\t\t\n\t\t\tString respuesta = JOptionPane.showInputDialog(this, \"¿Quién logró liberar la espada Z?\" + \"\\n\" + \"a) Goten\" + \"\\n\" + \"b) Goku\" + \"\\n\" + \"c) Gohan\");\n\t\t\t\n\t\t\tif(respuesta == null){\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tthrow new RespuestaNulaException();\n\t\t\t\t} catch (RespuestaNulaException e) {\n\t\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta.equalsIgnoreCase(\"c\")) {\n\t\t\t\t\n\t\t\t\tpregunta2 = true;\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es correcta, acabas de ganar una nueva esfera\");\n\t\t\t\tven.modificarEsfera(4);\n\t\t\t\tven.actualizarInfo();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta != \"a\") {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es incorrecta :(\");\n\t\t\t\theroe.setPosX(1280);\n\t\t\t\theroe.setPosY(119);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\telse if(heroe.getPosX() >= 50 && heroe.getPosX() <= 103 && heroe.getPosY() >= 558 && heroe.getPosY() <= 607 && pregunta3 == false) {\n\t\t\t\n\t\t\t\n\t\t\tString respuesta = JOptionPane.showInputDialog(this, \"¿Quién es hijo de Paragus?\" + \"\\n\" + \"a) Bardock\" + \"\\n\" + \"b) Broly\" + \"\\n\" + \"c) Freezer\");\n\t\t\t\n\t\t\tif(respuesta == null){\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tthrow new RespuestaNulaException();\n\t\t\t\t} catch (RespuestaNulaException e) {\n\t\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta.equalsIgnoreCase(\"b\")) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tpregunta3 = true;\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es correcta, acabas de ganar una nueva esfera :D\");\n\t\t\t\tven.modificarEsfera(6);\n\t\t\t\tven.actualizarInfo();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta != \"b\") {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es incorrecta :(\");\n\t\t\t\theroe.setPosX(135);\n\t\t\t\theroe.setPosY(593);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\telse if(heroe.getPosX() >= 70 && heroe.getPosX() <= 130 && heroe.getPosY() >= 1 && heroe.getPosY() <= 55 && pregunta4 == false) {\n\n\t\t\tString respuesta = JOptionPane.showInputDialog(this, \"¿Quién se convirtío primero en SSJ2?\" + \"\\n\" + \"a) Goku\" + \"\\n\" + \"b) Trunks\" + \"\\n\" + \"c) Gohan\");\n\t\t\t\n\t\t\tif(respuesta == null){\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tthrow new RespuestaNulaException();\n\t\t\t\t} catch (RespuestaNulaException e) {\n\t\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta.equalsIgnoreCase(\"c\")) {\n\t\t\t\t\n\t\t\t\tpregunta4 = true;\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es correcta, has aumentado el poder de tus ataques :D\");\n\t\t\t\theroe.setAtaque1(20);\n\t\t\t\theroe.setAtaque2(20);\n\t\t\t\theroe.setAtaque3(20);\n\t\t\t\theroe.setAtaqueEspecial(20);\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta != \"c\") {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es incorrecta :(\");\n\t\t\t\theroe.setPosX(208); \n\t\t\t\theroe.setPosY(47);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\n\t\telse if(heroe.getPosX() >= 585 && heroe.getPosX() <= 640 && heroe.getPosY() >= 258 && heroe.getPosY() <= 310 && pregunta5 == false) {\n\n\t\t\tString respuesta = JOptionPane.showInputDialog(this, \"¿Quién mantuvo su cola hasta la muerte?\" + \"\\n\" + \"a) Vegeta\" + \"\\n\" + \"b) Bardock\" + \"\\n\" + \"c) Gohan\");\n\t\t\t\n\t\t\tif(respuesta == null){\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tthrow new RespuestaNulaException();\n\t\t\t\t} catch (RespuestaNulaException e) {\n\t\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta.equalsIgnoreCase(\"b\")) {\n\t\t\t\t\n\t\t\t\tpregunta5 = true;\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es correcta, has aumentado el poder de tus ataques :D\");\n\t\t\t\theroe.setAtaque1(20);\n\t\t\t\theroe.setAtaque2(20);\n\t\t\t\theroe.setAtaque3(20);\n\t\t\t\theroe.setAtaqueEspecial(20);\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta != \"b\") {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es incorrecta :(\");\n\t\t\t\theroe.setPosX(577); \n\t\t\t\theroe.setPosY(356);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\telse if(heroe.getPosX() >= 396 && heroe.getPosX() <= 444 && heroe.getPosY() >= 230 && heroe.getPosY()<= 300 && Broly == false) {\n\t\t\t\n\t\t\tVillanos villano = (Villanos) ven.getJuego().getHeroe(\"Broly\");\n\t\t\tvillanoActual = \"Broly\";\n\t\t\t\n\t\t\tint resp = JOptionPane.showConfirmDialog(null,\"Broly: \" + villano.getFrasePelea() + \"\\n\" + \"\\n\" + \"¿Desea pelear para ganar una esfera?\" , \"Batallar\", JOptionPane.YES_NO_OPTION);\n\n\t\t\tif(resp == JOptionPane.YES_OPTION) {\n\n\t\t\t\tven.getBatalla().getFondo().setImagenRuta(\"Datos/Fondos/FondoBatalla3.jpg\");\n\t\t\t\theroe.setVida(500);\n\t\t\t\tvillano.setVida(500);\n\t\t\t\tven.visualizarBatalla();\n\t\t\t\theroe.setPosX(414);\n\t\t\t\theroe.setPosY(352);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}else if(resp == JOptionPane.NO_OPTION) {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Debes pelear para ganar una esfera :(\");\n\t\t\t\theroe.setPosX(414);\n\t\t\t\theroe.setPosY(352);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\telse if(heroe.getPosX() >= 1235 && heroe.getPosX() <= 1295 && heroe.getPosY() >= 290 && heroe.getPosY() <= 360 && Freezer == false) {\n\t\t\tVillanos villano = (Villanos) ven.getJuego().getHeroe(\"Freezer\");\n\t\t\tvillanoActual = \"Freezer\";\n\t\t\t\n\t\t\tint resp = JOptionPane.showConfirmDialog(null,\"Freezer: \" + villano.getFrasePelea() + \"\\n\" + \"\\n\" + \"¿Desea pelear para ganar una esfera?\" , \"Batallar\", JOptionPane.YES_NO_OPTION);\n\t\t\t\n\t\t\tif(resp == JOptionPane.YES_OPTION) {\n\n\t\t\t\tven.getBatalla().getFondo().setImagenRuta(\"Datos/Fondos/FondoBatalla2.png\");\n\t\t\t\theroe.setVida(500);\n\t\t\t\tvillano.setVida(500);\n\t\t\t\tven.visualizarBatalla();\n\t\t\t\theroe.setPosX(1279);\n\t\t\t\theroe.setPosY(229);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}else if(resp == JOptionPane.NO_OPTION) {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Debes pelear para ganar una esfera :(\");\n\t\t\t\theroe.setPosX(1279);\n\t\t\t\theroe.setPosY(229);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\telse if(heroe.getPosX() >= 1015 && heroe.getPosX() <= 1067 && heroe.getPosY() >= 7 && heroe.getPosY() <= 57 && MajinB == false) {\n\t\t\tVillanos villano = (Villanos) ven.getJuego().getHeroe(\"Majin boo\");\n\t\t\tvillanoActual = \"Majin boo\";\n\t\t\t\n\t\t\tint resp = JOptionPane.showConfirmDialog(null,\"Majin boo: \" + villano.getFrasePelea() + \"\\n\" + \"\\n\" + \"¿Desea pelear para ganar una esfera?\" , \"Batallar\", JOptionPane.YES_NO_OPTION);\n\t\t\t\n\t\t\tif(resp == JOptionPane.YES_OPTION) {\n\n\t\t\t\tven.getBatalla().getFondo().setImagenRuta(\"Datos/Fondos/FondoBatalla4.jpg\");\n\t\t\t\theroe.setVida(500);\n\t\t\t\tvillano.setVida(500);\n\t\t\t\tven.visualizarBatalla();\n\t\t\t\theroe.setPosX(1020);\n\t\t\t\theroe.setPosY(106);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}else if(resp == JOptionPane.NO_OPTION) {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Debes pelear para ganar una esfera :(\");\n\t\t\t\theroe.setPosX(1020);\n\t\t\t\theroe.setPosY(106);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}else if(heroe.getPosX() >= 222 && heroe.getPosX() <= 294 && heroe.getPosY() >= 480 && heroe.getPosY() <= 560 && Cell == false) {\n\t\t\tVillanos villano = (Villanos) ven.getJuego().getHeroe(\"Cell\");\n\t\t\tvillanoActual = \"Cell\";\n\t\t\t\n\t\t\tint resp = JOptionPane.showConfirmDialog(null,\"Cell: \" + villano.getFrasePelea() + \"\\n\" + \"\\n\" + \"¿Desea pelear para ganar una esfera?\" , \"Batallar\", JOptionPane.YES_NO_OPTION);\n\t\t\t\n\t\t\tif(resp == JOptionPane.YES_OPTION) {\n\n\t\t\t\tven.getBatalla().getFondo().setImagenRuta(\"Datos/Fondos/FondoBatalla.jpg\");\n\t\t\t\theroe.setVida(500);\n\t\t\t\tvillano.setVida(500);\n\t\t\t\tven.visualizarBatalla();\n\t\t\t\theroe.setPosX(364);\n\t\t\t\theroe.setPosY(583);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}else if(resp == JOptionPane.NO_OPTION) {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Debes pelear para ganar una esfera :(\");\n\t\t\t\theroe.setPosX(364);\n\t\t\t\theroe.setPosY(583);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}else if(heroe.getPosX() >= 900 && heroe.getPosX() <= 988 && heroe.getPosY() >= 314 && heroe.getPosY() <= 421) {\n\t\t\t\n\t\t\theroe.setPosX(956);\n\t\t\theroe.setPosY(484);\n\t\t\t\n\t\t\tString respuesta = JOptionPane.showInputDialog(this, \"¿Qué deseas hacer \" + ven.getNombreUsuario() + \"?\" + \"\\n\" + \"a) Guardar puntaje\" + \"\\n\" + \"b) Ver información de los personajes\" + \"\\n\" + \"c) Ver puntajes\");\n\t\t\tif(respuesta.equalsIgnoreCase(\"a\")) {\n\t\t\t\t\n\t\t\t\tven.guardarPuntaje();\n\t\t\t\t\n\t\t\t\t\n\t\t\t}else if(respuesta.equalsIgnoreCase(\"c\")){\n\t\t\t\tven.cargarPuntajes();\n\t\t\t\tven.visualizarPuntajes();\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta.equalsIgnoreCase(\"b\")) {\n\t\t\t\t\n\t\t\t\tString per = JOptionPane.showInputDialog(this, \"¿De qué personaje deseas ver la información \" + ven.getNombreUsuario() + \"\\n\" + \"a) Goku\" + \"\\n\" + \"b) Roshi\" + \"\\n\" + \"c) Vegeta\" + \"\\n\" + \"d) Freezer\" + \"\\n\" + \"e) Cell\" + \"\\n\" + \"f) Majin boo\" + \"\\n\" + \"g) Broly\");\n\t\t\t\t\n\t\t\t\tif(per.equalsIgnoreCase(\"a\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Goku\");\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(per.equalsIgnoreCase(\"b\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Roshi\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(per.equalsIgnoreCase(\"c\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Vegeta\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(per.equalsIgnoreCase(\"d\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Freezer\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(per.equalsIgnoreCase(\"e\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Cell\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(per.equalsIgnoreCase(\"f\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Majin boo\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(per.equalsIgnoreCase(\"g\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Broly\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else {\n\t\t\t\ttry {\n\t\t\t\t\tthrow new CaracterEquivocadoException();\n\t\t\t\t} catch (CaracterEquivocadoException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t\n\t\t}\n\t\t\n\t}", "private void computeMovableTilesToDisplayToPlayer() {\n \tfor (Entity enemyEntity : allCreaturesOfCurrentRoom) {\n \t\tAIComponent aiComponent = Mappers.aiComponent.get(enemyEntity);\n \t\tif (aiComponent.getSubSystem() != null) {\n \t\t\tboolean handledInSubSystem = aiComponent.getSubSystem().computeMovableTilesToDisplayToPlayer(this, enemyEntity, room);\n \t\t\tif (handledInSubSystem) continue;\n \t\t}\n \t\t\n \tMoveComponent moveCompo = Mappers.moveComponent.get(enemyEntity);\n \tAttackComponent attackCompo = Mappers.attackComponent.get(enemyEntity);\n \t\n \t\t//clear the movable tile\n \t\tmoveCompo.clearMovableTiles();\n \t\tif (attackCompo != null) attackCompo.clearAttackableTiles();\n \t\t\n \t\tmoveCompo.setMoveRemaining(moveCompo.getMoveSpeed());\n \t\t\n \t//Build the movable tiles list\n \t\ttileSearchService.buildMoveTilesSet(enemyEntity, room);\n \t\tif (attackCompo != null) attackTileSearchService.buildAttackTilesSet(enemyEntity, room, false, true);\n \t\tmoveCompo.hideMovableTiles();\n \t\tif (attackCompo != null) attackCompo.hideAttackableTiles();\n \t}\n }", "void logShot(UUID shooter, UUID projectile);", "@Override\n public Dimension render(Graphics2D graphics) {\n for (Projectile projectile : new ArrayList<Projectile>(projectiles.keySet())) {\n if (projectile.getRemainingCycles() <= 0)\n projectiles.remove(projectile);\n }\n\n // Add all projectiles in the client to the render list.\n ArrayList<Projectile> toRender = new ArrayList<Projectile>();\n for (Projectile p : this.client.getProjectiles()) {\n if (this.config.showShamanPoison() && p.getId() == SHAMAN_BLOBS)\n toRender.add(p);\n else if (this.config.showTektonFlares() && p.getId() == TEKTON_SPARKS)\n toRender.add(p);\n else if (this.config.showVasaRocks() && p.getId() == VASA_ROCKS)\n toRender.add(p);\n }\n\n // Track the projectiles on the render list if they don't already exist and are not dead.\n for (Projectile p : toRender) {\n if (p.getRemainingCycles() <= 0 || projectiles.containsKey(p))\n continue;\n\n int totalTicks = p.getEndCycle() - p.getStartMovementCycle();\n\n double deltaX = p.getVelocityX() * totalTicks;\n double deltaY = p.getVelocityY() * totalTicks;\n\n deltaX = Math.round(deltaX / 128d) * 128d;\n deltaY = Math.round(deltaY / 128d) * 128d;\n\n int newX = p.getX1() + (int) deltaX;\n int newY = p.getY1() + (int) deltaY;\n\n // If the projectile launch resulted from an entity doing an animation, use X() as base instead of X1().\n if (p.getId() == SHAMAN_BLOBS) {\n newX = (int) (p.getX() + deltaX);\n newY = (int) (p.getY() + deltaY);\n }\n\n LocalPoint raw = new LocalPoint(newX, newY);\n WorldPoint world = WorldPoint.fromLocal(client, raw);\n projectiles.put(p, world);\n }\n\n // Render the projectiles.\n for (Projectile p : projectiles.keySet()) {\n WorldPoint world = projectiles.get(p);\n LocalPoint local = LocalPoint.fromWorld(client, world);\n\n Polygon poly = Perspective.getCanvasTilePoly(client, local);\n\n if (poly == null)\n continue;\n\n Color color = config.getOverlayColor();\n int strokeWidth = 2;\n int outlineAlpha = 255;\n int fillAlpha = 10;\n\n graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), outlineAlpha));\n graphics.setStroke(new BasicStroke(strokeWidth));\n graphics.draw(poly);\n\n graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), fillAlpha));\n graphics.fill(poly);\n }\n\n return null;\n }", "void move_missiles() {\n // Ship missiles\n ship.moveMissiles();\n for (int i = 0; i < ship_missile_image_views.size(); i++) {\n ship_missile_image_views.get(i).setY(ship.missiles.get(i).y_position);\n }\n\n // Enemy missiles\n Alien.moveMissiles();\n for (int i = 0; i < alien_missile_image_views.size(); i++) {\n alien_missile_image_views.get(i).setY(Alien.missiles.get(i).y_position);\n }\n }", "public void sendNewProjectile(long itemid, byte type, String modelName, String name, byte material, Vector3f startingPosition, Vector3f startingVelocity, Vector3f endingPosition, float rotation, boolean surface) {\n/* 5629 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 5633 */ vz.sendNewProjectile(itemid, type, modelName, name, material, startingPosition, startingVelocity, endingPosition, rotation, surface);\n/* */ }\n/* 5635 */ catch (Exception e) {\n/* */ \n/* 5637 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ } \n/* */ } \n/* */ }", "public void makeProjectile(float time){\n Geometry proj_geo = new Geometry(\"bullet projectile\", sphere);\n proj_geo.setMaterial(proj_mat);\n \n //Attach geometry to rootNode\n rootNode.attachChild(proj_geo);\n //Configure position and direction vectors\n proj_geo.setLocalTranslation(cam.getLocation());\n proj_geo.lookAt(cam.getDirection(), cam.getUp());\n \n proj_ctrl = new ProjectileControl();\n //proj_phy = new ProjectilePhysicsControl();\n proj_geo.addControl(proj_ctrl);\n \n proj_ctrl.setLinearVelocity(cam.getDirection().mult(40));\n proj_ctrl.setLifetime(1f);\n \n //proj_geo.addControl(proj_phy);\n bulletAppState.getPhysicsSpace().addCollisionListener(this);\n }", "public void setObjectives(TiledMap map)\r\n/* 72: */ {\r\n/* 73: 80 */ this.mission = true;\r\n/* 74: 81 */ for (int x = 0; x < getWidthInTiles(); x++) {\r\n/* 75: 83 */ for (int y = 0; y < getHeightInTiles(); y++)\r\n/* 76: */ {\r\n/* 77: 85 */ this.reach[x][y] = checkTileProperty(x, y, \"reach\", \"true\");\r\n/* 78: 86 */ if (this.reach[x][y] != 0) {\r\n/* 79: 88 */ this.reachablePlaces += 1;\r\n/* 80: */ }\r\n/* 81: 90 */ this.fire[x][y] = checkTileProperty(x, y, \"fire\", \"true\");\r\n/* 82: 91 */ if (this.fire[x][y] != 0) {\r\n/* 83: 93 */ this.burnPlaces += 1;\r\n/* 84: */ }\r\n/* 85: */ }\r\n/* 86: */ }\r\n/* 87: */ }", "public void act() \n {\n World myWorld = getWorld();\n \n Mapa mapa = (Mapa)myWorld;\n \n EnergiaMedicZ vidaMZ = mapa.getEnergiaMedicZ();\n \n EnergiaGuerriZ vidaGZ = mapa.getEnergiaGuerriZ();\n \n EnergiaConstrucZ vidaCZ = mapa.getEnergiaConstrucZ();\n \n GasZerg gasZ = mapa.getGasZerg();\n \n CristalZerg cristalZ = mapa.getCristalZerg();\n \n BunkerZerg bunkerZ = mapa.getBunkerZerg();\n \n Mina1 mina1 = mapa.getMina1();\n Mina2 mina2 = mapa.getMina2();\n Mina3 mina3 = mapa.getMina3();\n \n \n //movimiento del personaje\n if(Greenfoot.isKeyDown(\"b\")){\n if(Greenfoot.isKeyDown(\"d\")){\n if(getX()<1000){\n setLocation(getX()+1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"a\")){\n if(getX()<1000){\n setLocation(getX()-1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"w\")){\n if(getY()<600){\n setLocation(getX(),getY()-1);\n }\n }\n if(Greenfoot.isKeyDown(\"s\")){\n if(getY()<600){\n setLocation(getX(),getY()+1);}\n }\n }\n else if(Greenfoot.isKeyDown(\"z\")){\n if(Greenfoot.isKeyDown(\"d\")){\n if(getX()<1000){\n setLocation(getX()+1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"a\")){\n if(getX()<1000){\n setLocation(getX()-1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"w\")){\n if(getY()<600){\n setLocation(getX(),getY()-1);\n }\n }\n if(Greenfoot.isKeyDown(\"s\")){\n if(getY()<600){\n setLocation(getX(),getY()+1);}\n }}\n //encuentro con objeto\n \n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"d\"))\n {\n setLocation(getX()-1,getY());\n }\n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"a\"))\n {\n setLocation(getX()+1,getY());\n }\n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"w\"))\n {\n setLocation(getX(),getY()+1);\n }\n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"s\"))\n {\n setLocation(getX(),getY()-1);\n }\n \n \n //probabilida de daño al enemigo\n \n if(isTouching(MedicTerran.class) && Greenfoot.getRandomNumber(100)==3)\n {\n \n vidaCZ.removervidaCZ();\n \n }\n \n if(isTouching(ConstructorTerran.class) && (Greenfoot.getRandomNumber(100)==3 ||\n Greenfoot.getRandomNumber(100)==2||Greenfoot.getRandomNumber(100)==1))\n {\n \n vidaCZ.removervidaCZ();\n \n }\n if(isTouching(GuerreroTerran.class) && (Greenfoot.getRandomNumber(100)==3||\n Greenfoot.getRandomNumber(100)==2||Greenfoot.getRandomNumber(100)==1||Greenfoot.getRandomNumber(100)==4||Greenfoot.getRandomNumber(100)==5))\n {\n \n vidaCZ.removervidaCZ();\n \n }\n \n \n \n //encuentro con Bunker\n \n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"d\"))\n {\n setLocation(getX()-1,getY());\n }\n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"a\"))\n {\n setLocation(getX()+1,getY());\n }\n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"w\"))\n {\n setLocation(getX(),getY()+1);\n }\n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"s\"))\n \n {\n setLocation(getX(),getY()-1);\n }\n \n //AccionesUnicas\n \n if(isTouching(YacimientoDeGas.class) && gasZ.gasZ < 100)\n {\n \n gasZ.addGasZ();\n \n }\n \n \n if(isTouching(Mina1.class) && cristalZ.cristalZ < 20) {\n \n cristalZ.addCristalZ();\n mina1.removemina1();\n \n }\n \n if(isTouching(Mina2.class) && cristalZ.cristalZ < 20) {\n \n cristalZ.addCristalZ();\n mina2.removemina2();\n \n }\n \n if(isTouching(Mina3.class) && cristalZ.cristalZ < 20) {\n \n cristalZ.addCristalZ();\n mina3.removemina3();\n \n }\n \n \n if(isTouching(DepositoZ.class) && gasZ.gasZ > 4 && bunkerZ.bunkerZ() < 400){\n \n gasZ.removeGasZ();\n bunkerZ.addbunkerZ();\n }\n \n if(isTouching(DepositoZ.class) && cristalZ.cristalZ() > 0 && bunkerZ.bunkerZ() < 400 ){\n \n cristalZ.removeCristalZ();\n bunkerZ.addbunkerZ();\n }\n \n //determinar si la vida llega a 0\n \n if( vidaCZ.vidaCZ <= 0 )\n {\n \n getWorld().removeObjects(getWorld().getObjects(EnergiaConstrucZ.class)); \n \n getWorld().removeObjects(getWorld().getObjects(ConstructorZerg.class));\n \n EnergiaZerg energiaZ = mapa.getEnergiaZerg(); \n \n energiaZ.removenergiaCZ();\n }\n \n if( mina1.mina1() == 0 ){\n \n getWorld().removeObjects(getWorld().getObjects(Mina1.class)); \n \n getWorld().removeObjects(getWorld().getObjects(Cristal1.class));\n \n }\n \n if( mina2.mina2() == 0 ){\n \n getWorld().removeObjects(getWorld().getObjects(Mina2.class)); \n \n getWorld().removeObjects(getWorld().getObjects(Cristal2.class));\n \n }\n \n if( mina3.mina3() == 0 ){\n \n getWorld().removeObjects(getWorld().getObjects(Mina3.class)); \n \n getWorld().removeObjects(getWorld().getObjects(Cristal3.class));\n \n }\n \n \n}", "private void transferCommunalPile() {\n this.roundWinner.addToDeck(communalPile);\n communalPile = new Pile();\n }", "@Test\n public void testTimeOutOn() {\n // set up the world\n World world = makeWorld();\n \n // make the projectile\n ProjectileDefinition projectileDefinition = new ProjectileDefinition(0,\n \"testProjectileBaseCase\", \"resources/projectiles/test.png\", 0,\n 0, 1, 30, true, 10000, false, 0);\n\n Entity projectile = ProjectileEntities.createProjectile(world,\n projectileDefinition, 30, 30, null);\n \n ProjectileComponent pc = world.getComponent(projectile, ProjectileComponent.class).get();\n \n // Go just below the 10\n for (double total = 0; Math.abs(total - 10) > 0.01; total += 0.2) {\n // run the world\n world.process(total, 0.2);\n \n // the projectile should be there\n assertTrue(\"There should be a projectile that's alive\", \n isProjectileAlive(world, projectile));\n }\n \n world.process(10, 0.2);\n \n assertTrue(\"The projectile should be destroyed\", \n isProjectileDestroyed(world, projectile));\n }", "public void run() \n\t\t\t{\n\t\t\t\tif (Math.abs(player.getLocation().getX() - playerLoc.getX()) > 1\n\t\t\t\t\t\t|| Math.abs(player.getLocation().getY() - playerLoc.getY()) > 1\n\t\t\t\t\t\t|| Math.abs(player.getLocation().getZ() - playerLoc.getZ()) > 1)\n\t\t\t\t{\n\t\t\t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You cannot move while bandaging!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString name = player.getCustomName();\n\t\t\t\tif (name == null)\n\t\t\t\t\tname = player.getName();\n\t\t\t\t\n\t\t\t\t//Check that the recipient is still in roughly the same location\n\t\t\t\t//Skip if self-heal\n\t\t\t\tif (!player.equals(recipient))\n\t\t\t\t\tif (Math.abs(recipient.getLocation().getX() - recipientLoc.getX()) > 1\n\t\t\t\t\t\t|| Math.abs(recipient.getLocation().getY() - recipientLoc.getY()) > 1\n\t\t\t\t\t\t|| Math.abs(recipient.getLocation().getZ() - recipientLoc.getZ()) > 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You cannot bandage your patient while they are moving!\");\n\t\t\t\t\t\trecipient.sendMessage(ChatColor.YELLOW + name + \" cannot bandage you while you are moving!\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Remove item from player's inventory.\n\t \t\tplayer.getInventory().removeItem(new ItemStack(Material.getMaterial(item.toUpperCase()), 1));\n\t \t\tplayer.updateInventory();\n\t \t\t\t\n\t \t\t//Heal the other player.\n\t \t\trecipient.setHealth(recipient.getHealth() + amountToHeal);\n\n\t \t\t//Award experience.\n\t \t\tProfessionStats prof = new ProfessionStats(perms, data, config, player.getUniqueId());\n\t \t\t\n\t \t\tif (!prof.isPracticeFatigued(profession))\n\t \t\t\taddExperience(player, profession, config.getInt(\"healing.\" + item + \".exp\"));\n\t \t\t\t\n\t \t\t//Notify both parties.\n\t \t\tif (!player.equals(recipient))\n\t \t\t{\t \t\t\n\t \t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You bandaged \" + recipient.getName() + \"'s wounds.\");\n\t \t\t\trecipient.sendMessage(ChatColor.YELLOW + player.getName() + \" bandaged your wounds.\");\n\t \t\t}\n\t \t\telse\n\t \t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You bandaged your wounds.\");\n\t\t\t }", "public boolean isProjectile();", "private static void turretCode() throws GameActionException {\n\t\t//Attack Enemy\n\t\tRobotInfo[] visibleEnemyArray = rc.senseHostileRobots(rc.getLocation(), 1000000);\n\t\tSignal[] incomingSignals = rc.emptySignalQueue();\n\t\tSignal[] signals;\n\t\tif (incomingSignals.length>125) {\n\t\t\tsignals = new Signal[125];\n\t\t\tfor(int i=0; i<125; i++) {\n\t\t\t\tsignals[i]=incomingSignals[i];\n\t\t\t}\n\t\t} else {\n\t\t\tsignals = incomingSignals;\n\t\t}\n\t\tboolean unit = false;\n\t\tfor(Signal s:signals){\n\t\t\tint[] message = s.getMessage();\n\t\t\tif(s.getTeam()==rc.getTeam()){\n\t\t\t\tif(message!=null){\n\t\t\t\t\tif(message[0]%10==0){\n\t\t\t\t\t\tcenter = s.getLocation();\n\t\t\t\t\t\tint r = message[0]/10;\n\t\t\t\t\t\tradius=r;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tunit=true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (visibleEnemyArray.length > 0 || unit) {\n\t\t\tif (rc.isWeaponReady()) {\n\t\t\t\trc.attackLocation(Utility.toAttack(visibleEnemyArray, incomingSignals));\n\t\t\t}\n\t\t}else{\n\t\t\tMapLocation travel=turretFind();\n\t\t\tif(travel!=rc.getLocation()){\n\t\t\t\tgoal = travel;\n\t\t\t\trc.pack();\n\t\t\t}\n\t\t}\t\t\t\n\t}", "public void throwProjectile(Collection<GameObject> objects) {\n double radius = (this.getLevel() * 0.0001 + 0.025) * 5e10;\n double x = this.getR().cartesian(0) - Math.cos(rot) * radius;\n double y = this.getR().cartesian(1) - Math.sin(rot) * radius; \n \n double[] newRDouble = {x, y};\n Vector newR = new Vector(newRDouble);\n double[] newVDouble = {-Math.cos(rot) * 1e5, -Math.sin(rot) * 1e5};\n Vector newV = new Vector(newVDouble);\n Projectile proj = new Projectile(newR, newV, 1E25, 1);\n proj.setLevel(1);\n proj.setMass(1e20);\n objects.add(proj);\n }", "public boolean deployWeapon(int x, int y, Player opponent, Map attacked_map, Map current_player_map, Player current_player, int method_choice) {\n Ship temp_ship = new Minesweeper();\n //Catches if current player is trying to use a bomb on an underwater map or space map, returns false for not successful\n if (current_player.player_weapons.contains(this) && (attacked_map.getName().equals(\"UnderwaterMap\") || attacked_map.getName().equals(\"SpaceMap\"))) {\n bombOutputs(method_choice, 1, attacked_map, temp_ship, x, y);\n return false;\n }\n\n //Checks if coordinate is in bounds\n if (x > 10 || x < 0 || y > 10 || y < 0) {\n bombOutputs(method_choice, 2, attacked_map, temp_ship, x, y);\n return false;\n }\n\n int is_occupied = attacked_map.defensiveGrid.checkCellStatus(x,y);\n\n //Checks if there is a ship at the attacked location: 0 = no ship, 1 = ship exists, 2 = ship exists and already hit\n if (is_occupied == 0) {\n //no ship: miss!\n bombOutputs(method_choice, 3, attacked_map, temp_ship, x, y);\n\n if (method_choice == 2 || method_choice == 3) {\n current_player_map.offensiveGrid.setCellStatus(1, x, y);\n }\n } else if (is_occupied == 1) {\n //ship there: first time attacking!\n Ship attacked_ship = new Minesweeper();\n\n for (int i = 0; i < attacked_map.existing_ships.size(); i++){\n Ship shipy = attacked_map.existing_ships.get(i);\n ArrayList<Coordinate> coordsList = attacked_map.ship_coordinates.get(shipy);\n for (Coordinate coordinate : coordsList) {\n if (coordinate.x == x && coordinate.y == y) {\n attacked_ship = shipy;\n break;\n }\n }\n }\n\n //Check if captain's quarters at location\n Coordinate capt_quart = attacked_map.captains_quarters.get(attacked_ship);\n if (capt_quart.x == x && capt_quart.y == y) {\n //Check for armoured captain's quarters\n if (attacked_ship instanceof ArmoredShip) {\n //Armoured!\n //Armoured captains quarters hasn't been hit before\n if (((ArmoredShip) attacked_ship).getHitCount() == 0) {\n //Prints out a miss - some sneaky captain's quarters here\n bombOutputs(method_choice, 4, attacked_map, attacked_ship, x, y);\n if (method_choice == 2 || method_choice == 3) {\n current_player_map.offensiveGrid.setCellStatus(1, x, y);\n }\n ((ArmoredShip) attacked_ship).updateHitCount();\n }\n //Armoured captains quarters has been hit before\n else if (((ArmoredShip) attacked_ship).getHitCount() == 1){\n //Destroys entire ship!\n bombOutputs(method_choice, 5, attacked_map, attacked_ship, x, y);\n bombOutputs(method_choice, 6, attacked_map, attacked_ship, x, y);\n\n attacked_map.sinkShip(attacked_ship);\n\n if (method_choice == 2 || method_choice == 3) {\n current_player.incrementShipSunkCount();\n current_player.hasSunkFirstShip();\n }\n\n attacked_map.ship_health.replace(attacked_ship, 0);\n ArrayList<Coordinate> coordsList = attacked_map.ship_coordinates.get(attacked_ship);\n for (Coordinate coordinate : coordsList) {\n if (method_choice == 2 || method_choice == 3) {\n current_player_map.offensiveGrid.setCellStatus(2, coordinate.x, coordinate.y);\n }\n attacked_map.defensiveGrid.setCellStatus(2, coordinate.x, coordinate.y);\n }\n ((ArmoredShip) attacked_ship).updateHitCount();\n }\n }\n //Hit a captain's quarters but not armoured\n else {\n //Destroy the ship!\n bombOutputs(method_choice, 7, attacked_map, attacked_ship, x, y);\n attacked_map.sinkShip(attacked_ship);\n if (method_choice == 2 || method_choice == 3) {\n current_player.incrementShipSunkCount();\n current_player.hasSunkFirstShip();\n }\n\n attacked_map.ship_health.replace(attacked_ship, 0);\n ArrayList<Coordinate> coordsList = attacked_map.ship_coordinates.get(attacked_ship);\n for (Coordinate coordinate : coordsList) {\n if (method_choice == 2 || method_choice == 3) {\n current_player_map.offensiveGrid.setCellStatus(2, coordinate.x, coordinate.y);\n }\n attacked_map.defensiveGrid.setCellStatus(2, coordinate.x, coordinate.y);\n }\n }\n }\n //Not a captain's quarters there\n else {\n //Attack and hit!\n int current_health = attacked_map.ship_health.get(attacked_ship);\n current_health -= 1;\n attacked_map.ship_health.replace(attacked_ship, current_health);\n\n bombOutputs(method_choice, 8, attacked_map, temp_ship, x, y);\n if (method_choice == 2 || method_choice == 3) {\n current_player_map.offensiveGrid.setCellStatus(2, x, y);\n }\n attacked_map.defensiveGrid.setCellStatus(2, x, y);\n }\n } else if (method_choice == 2 || method_choice == 3) {\n //Already attacked, already hit a ship!\n bombOutputs(method_choice, 9, attacked_map, temp_ship, x, y);\n }\n\n return true;\n }", "private void shoot() {\n }", "private void shoot() {\n }", "@Override\n public void run(GameObject master) {\n // master.position.addThis(+5,30);\n shoot();\n this.isDone = true;\n }", "public boolean shoot() {\n if (!isReloading && System.currentTimeMillis() - previousShotTime > shootInterval * 1000 && ammoRemaining > 0) {\n\n previousShotTime = System.currentTimeMillis();\n\n ammoRemaining--;\n audioPlayer.setSpatial(holder);\n audioPlayer.playOnce();\n // score -= 50;\n Vec2 angle = Vec2\n .Vector2FromAngleInDegrees(transform.getGlobalRotation().getAngleInDegrees() - 90 + (Math.random() * spread * 2 - spread));\n\n Vec2 spawnPosition = transform.getWorldPosition();\n\n Projectile p = new Projectile(spawnPosition,\n Vec2\n .Vector2FromAngleInDegrees(\n transform.getGlobalRotation().getAngleInDegrees() - 90 + (Math.random() * spread * 2 - spread)),\n new Sprite(projectilePath));\n p.setSpeed(speed);\n p.setSource(holder);\n p.getCollider().addInteractionLayer(\"Block\");\n p.getCollider().addInteractionLayer(\"Hittable\");\n p.getCollider().addInteractionLayer(\"Walk\");\n p.setOnCollisionListener(other -> {\n if (other.getGameObject() instanceof Player && other.getGameObject() != holder) {\n Player player = (Player) other.getGameObject();\n player.hit(alteredDmg);\n if (GameEngine.DEBUG) {\n System.out.println(\"Bullet Hit \" + other.getName());\n }\n p.destroy();\n\n// player.destroy();\n } else if (other.getGameObject() instanceof Enemy) {\n Enemy e = ((Enemy) other.getGameObject());\n e.hit(alteredDmg);\n if (!e.isAlive()) { // CHeck if enemy survived\n ((Player) p.getSource()).killedEnemy();\n }\n p.destroy();\n } else if (other.getTag() == \"Block\") {\n p.destroy();\n }\n\n });\n return true;\n } else if(ammoRemaining <= 0){\n reloadWeapon();\n return false;\n }else\n return false;\n }", "public Command run() {\n Worm enemyWormSpecial = getFirstWormInRangeSpecial();\n if (enemyWormSpecial != null) {\n if (gameState.myPlayer.worms[1].id == gameState.currentWormId) {\n if (gameState.myPlayer.worms[1].bananaBombs.count > 0) {\n return new BananaBombCommand(enemyWormSpecial.position.x, enemyWormSpecial.position.y);\n }\n }\n if (gameState.myPlayer.worms[2].snowballs.count > 0) {\n return new SnowballCommand(enemyWormSpecial.position.x, enemyWormSpecial.position.y);\n }\n }\n\n //PRIORITAS 2: NORMAL ATTACK (Shoot)\n Worm enemyWorm = getFirstWormInRange();\n if (enemyWorm != null) {\n Direction direction = resolveDirection(currentWorm.position, enemyWorm.position);\n return new ShootCommand(direction);\n }\n\n //PRIORITAS 3: MOVE (Karena sudah opsi serang tidak memungkinkan)\n\n //Ambil semua koordinat di cell Worm saat ini selain current cell\n List<Cell> surroundingBlocks = getSurroundingCells(currentWorm.position.x, currentWorm.position.y);\n \n\n //Kalau Worm saat ini adalah Commander, masuk ke algoritma move khusus Commander\n if(gameState.currentWormId == 1){\n\n //Commander akan memprioritaskan untuk bergerak menuju Technician (Worm yang memiliki Snowball)\n Worm technicianWorm = gameState.myPlayer.worms[2];\n\n\n //Mencari cell yang akan menghasilkan jarak terpendek menuju Worm tujuan\n Cell shortestCellToTechnician = getShortestPath(surroundingBlocks, technicianWorm.position.x, technicianWorm.position.y);\n \n //Commander akan bergerak mendekati Technician sampai dengan jarak dia dan Technician paling dekat adalah 3 satuan\n if (euclideanDistance(currentWorm.position.x, currentWorm.position.y, technicianWorm.position.x, technicianWorm.position.y) > 3) {\n if(shortestCellToTechnician.type == CellType.AIR) {\n return new MoveCommand(shortestCellToTechnician.x, shortestCellToTechnician.y);\n }else if (shortestCellToTechnician.type == CellType.DIRT) {\n return new DigCommand(shortestCellToTechnician.x, shortestCellToTechnician.y);\n }\n }\n\n //Apabila Commander dan Technician sudah berdekatan, maka Commander akan bergerak mencari musuh terdekat untuk melancarkan serangan\n int min = 10000000;\n Worm wormMusuhTerdekat = opponent.worms[0];\n for (Worm calonMusuh : opponent.worms) {\n if (euclideanDistance(currentWorm.position.x, currentWorm.position.y, calonMusuh.position.x, calonMusuh.position.y) < min) {\n min = euclideanDistance(currentWorm.position.x, currentWorm.position.y, calonMusuh.position.x, calonMusuh.position.y);\n wormMusuhTerdekat = calonMusuh;\n }\n }\n\n //Mencari cell yang paling dekat ke musuh yang sudah ditemukan\n Cell shortestCellToEnemy = getShortestPath(surroundingBlocks, wormMusuhTerdekat.position.x, wormMusuhTerdekat.position.y);\n if(shortestCellToEnemy.type == CellType.AIR) {\n return new MoveCommand(shortestCellToEnemy.x, shortestCellToEnemy.y);\n }else if (shortestCellToEnemy.type == CellType.DIRT) {\n return new DigCommand(shortestCellToEnemy.x, shortestCellToEnemy.y);\n }\n }\n\n //Command move untuk worm selain Commando. Worm selain commando akan mendekat menuju posisi worm Commando\n Worm commandoWorm = gameState.myPlayer.worms[0];\n \n //Selama Commando masih hidup, maka Worm lainnya akan mendekat menuju Commando\n if (commandoWorm.health > 0) {\n //Cell cellCommandoWorm = surroundingBlocks.get(0);\n\n //Mencari cell yang membuat jarak menuju Commando paling dekat\n Cell shortestCellToCommander = getShortestPath(surroundingBlocks, commandoWorm.position.x, commandoWorm.position.y);\n\n if(shortestCellToCommander.type == CellType.AIR) {\n return new MoveCommand(shortestCellToCommander.x, shortestCellToCommander.y);\n }else if (shortestCellToCommander.type == CellType.DIRT) {\n return new DigCommand(shortestCellToCommander.x, shortestCellToCommander.y);\n }\n }\n\n // PRIORITAS 4: Bergerak secara acak untuk memancing musuh mendekat\n int cellIdx = random.nextInt(surroundingBlocks.size());\n Cell block = surroundingBlocks.get(cellIdx);\n if (block.type == CellType.AIR) {\n return new MoveCommand(block.x, block.y);\n } else if (block.type == CellType.DIRT) {\n return new DigCommand(block.x, block.y);\n }\n // Kalau udah enggak bisa ngapa-ngapain.\n return new DoNothingCommand();\n \n }", "void move(Tile t);", "public void move(long deltaTime) {\n\n Point currentTile = getOccupyingTile(position);\n\n /*\n if (!Simulator.getInstance().getTileMap().isInsideMap(currentTile))\n return;\n\n if (Simulator.getInstance().getTileMap().isAWall(currentTile) || Simulator.getInstance().getDestination().getDistanceMap().isNotInitialized(currentTile))\n return;\n*/\n\n if (Simulator.getInstance().getDestination().getDistanceMap().isNotInitialized(currentTile))\n return;\n\n setTargetVector(Simulator.getInstance().getDestination().getDistanceMap().getTiles()[currentTile.y][currentTile.x].getVector());\n\n\n if (!Simulator.getInstance().getDestination().getDistanceMap().isNotInitialized(currentTile) && Simulator.getInstance().getDestination().getDistanceMap().getTiles()[currentTile.y][currentTile.x].getVector().equals(new Point2D.Double(0.0, 0.0))) {\n setTargetVector(Simulator.getInstance().getDestination().getDistanceMap().getTiles()[currentTile.y][currentTile.x].getVector());\n double angle = 0;\n while ((angle >= 60 && angle <= 120) || (angle >= 150 && angle <= 210) || (angle >= 240 && angle <= 300) || (angle >= 330) || (angle <= 30)) {\n\n angle = Math.random() * 360;\n }\n setVector(new Point2D.Double(Math.cos(Math.toRadians(angle)) / 1.5, Math.sin(Math.toRadians(angle)) / 1.5));\n } else {\n setTargetVector(Simulator.getInstance().getDestination().getDistanceMap().getTiles()[currentTile.y][currentTile.x].getVector());\n }\n\n\n Point2D vectorDiff = new Point2D.Double(vector.getX() - targetVector.getX(), vector.getY() - targetVector.getY());\n\n if (vectorDiff.getX() < 0)\n vector.setLocation(vector.getX() + 0.001 * velocity * deltaTime, vector.getY());\n else if (vectorDiff.getX() > 0)\n vector.setLocation(vector.getX() - 0.001 * velocity * deltaTime, vector.getY());\n\n if (vectorDiff.getY() < 0)\n vector.setLocation(vector.getX(), vector.getY() + 0.001 * velocity * deltaTime);\n else if (vectorDiff.getY() > 0)\n vector.setLocation(vector.getX(), vector.getY() - 0.001 * velocity * deltaTime);\n\n\n Point2D newPosition = new Point2D.Double(\n position.getX() + (velocity * deltaTime) * vector.getX(), position.getY() + (velocity * deltaTime) * vector.getY());\n\n\n Point targetTile = getOccupyingTile(newPosition);\n\n\n Point direction = getDirection(currentTile, targetTile);\n\n\n if (!Simulator.getInstance().getTileMap().isInsideMap(targetTile) || Simulator.getInstance().getTileMap().isAWall(targetTile)\n || Simulator.getInstance().getDestination().getDistanceMap().isNotInitialized(targetTile)) {// || Simulator.getInstance().getDestination().getDistanceMap().getTiles()[targetTile.y][targetTile.x].getVector() == new Point2D.Double(0, 0)) {\n\n if (Simulator.getInstance().isUsingBounceCollision()) {\n if (direction.x > 0 || direction.x < 0)\n vector.setLocation(vector.getX() * -0.5, vector.getY());\n if (direction.y > 0 || direction.y < 0)\n vector.setLocation(vector.getX(), vector.getY() * -0.5);\n\n newPosition = new Point2D.Double(\n position.getX() + (velocity * deltaTime) * vector.getX(), position.getY() + (velocity * deltaTime) * vector.getY());\n\n\n targetTile = getOccupyingTile(newPosition);\n\n //Secondary check to make sure the bounce doesn't make it go out of bounds\n if (!Simulator.getInstance().getTileMap().isInsideMap(targetTile) || Simulator.getInstance().getTileMap().isAWall(targetTile)\n || Simulator.getInstance().getDestination().getDistanceMap().isNotInitialized(targetTile)) { //|| Simulator.getInstance().getDestination().getDistanceMap().getTiles()[targetTile.y][targetTile.x].getVector() == new Point2D.Double(0, 0)) {\n vector.setLocation(0, 0);\n } else {\n setPosition(newPosition);\n }\n\n\n } else {\n vector.setLocation(0, 0);\n }\n\n } else {\n setPosition(newPosition);\n }\n\n }", "public void randomWalkingAI(boolean hostile, ArrayList<Bullet> projectileList, ArrayList<ZOrderableSprite> zOrderableSpriteList) {\n if(aiTimer > aiTimeToChangeDecision) {\n currentDecision = (int)(Math.random()*3);\n aiTimer = 0;\n }\n // Randomize angle to walk\n if(aiTimer2 > aiTimeToAction) {\n\n angleToWalk = (float)(Math.random()*360);\n if(angleToWalk >= 270 || angleToWalk < 90) {\n direction = \"right\";\n } else {\n direction = \"left\";\n }\n\t\t\tanimation.setxFlipped(direction);\n aiTimer2 = 0f;\n }\n // Decisions and courses of action\n if(currentDecision == 0) {\n isMoving = false;\n } else if(currentDecision >= 1) {\n isMoving = true;\n float fpsBoundMoveSpeed = moveSpeed * (Gdx.graphics.getDeltaTime() * 60);\n float offsetX = (float)(fpsBoundMoveSpeed * Math.cos(Math.toRadians(angleToWalk)));\n float offsetY = (float)(fpsBoundMoveSpeed * Math.sin(Math.toRadians(angleToWalk)));\n if(offsetX < 0) {\n \tupdateMovementStepByStep(0, offsetX);\n\t\t\t} else if(offsetX > 0) {\n\t\t\t\tupdateMovementStepByStep(2, offsetX);\n\t\t\t}\n\t\t\tif(offsetY < 0) {\n\t\t\t\tupdateMovementStepByStep(1, offsetY);\n\t\t\t} else if(offsetY > 0) {\n\t\t\t\tupdateMovementStepByStep(3, offsetY);\n\t\t\t}\n }\n\n // hostile is true fs aiType = 1, false if aiType = 0\n // Verify is player is close enough to attack\n if(hostile && euclidianDistance(hitbox.getCenterX(), hitbox.getCenterY(), player.getHitbox().getCenterX(), player.getHitbox().getCenterY()) < hostileRange) {\n // Face player\n if(player.getHitbox().getX() <= hitbox.getCenterX()) {\n direction = \"left\";\n } else {\n direction = \"right\";\n }\n\t\t\tanimation.setxFlipped(direction);\n updateAttack(projectileList, zOrderableSpriteList);\n\n }\n }", "private Array<Tile>[] walk() {\n float targetY = currentTile.y + 1;\n Vector2 previousTile = new Vector2(currentTile.x, currentTile.y);\n\n Array<Vector2> tiles = new Array<Vector2>();\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n\n while(currentTile.y < targetY) {\n float rnd = random.nextFloat();\n\n if(rnd > 0.75f) { // up\n Array<Tile> grassRow = new Array<Tile>();\n Array<Tile> treeRow = new Array<Tile>();\n\n for(int x = 1; x <= 5; x++) {\n Vector2 vector = new Vector2(x, currentTile.y);\n\n GrassNEW grass = grassPool.obtain();\n grass.init(vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n grassRow.add(grass);\n\n if(!tiles.contains(vector, false)) {\n if(random.nextFloat() > 0.3) {\n TreeNEW tree = treePool.obtain();\n tree.init(vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n treeRow.add(tree);\n }\n } else {\n if(random.nextFloat() > 0.99) {\n Collectible power = new PowerUpSpikes(world, spikesTexture, vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n collectibles.add(power);\n } else {\n if(random.nextFloat() > 0.5) {\n Coin coin = new Coin(world, coinTexture, vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n collectibles.add(coin);\n }\n }\n }\n }\n\n currentTile.add(0, 1);\n\n Array<Tile>[] ret = new Array[2];\n ret[0] = grassRow;\n ret[1] = treeRow;\n\n return ret;\n } else if(rnd > 0.375) { // right\n if(currentTile.x < 5 && Math.abs(previousTile.x - currentTile.x) <= 2) {\n currentTile.add(1, 0);\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n }\n } else { // left\n if(currentTile.x > 1 && Math.abs(previousTile.x - currentTile.x) <= 2) {\n currentTile.add(-1, 0);\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n }\n }\n }\n\n return null; // will never happen\n }", "private void moveShipDown()\r\n\t\t{\r\n\t\t\t\tboolean moved = true;\r\n int currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n\r\n //if firstPlayer move unit down\r\n if(currentPlayer == 1)\r\n {\r\n int currentPos = worldPanel.player1.units[currentUnit - 1].getPosition();\r\n int temp1 = mapWidth * mapHeight - mapWidth;\r\n int temp2 = mapWidth * mapHeight;\r\n if(currentPos >= temp1 && currentPos < temp2)\r\n {\r\n int newPos = currentPos % mapHeight;\r\n int mapTemp = mapPieces[0][newPos];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(newPos);\r\n }//end if\r\n else\r\n {\r\n int mapTemp = mapPieces[0][currentPos + mapWidth];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(currentPos + mapWidth);\r\n }//end else\r\n }//end if\r\n\r\n //if secondPlayer move unit down\r\n if(currentPlayer == 2)\r\n {\r\n int currentPos = worldPanel.player2.units[currentUnit - 1].getPosition();\r\n int temp1 = mapWidth * mapHeight - mapWidth;\r\n int temp2 = mapWidth * mapHeight;\r\n if(currentPos >= temp1 && currentPos < temp2)\r\n {\r\n int newPos = currentPos % mapHeight;\r\n int mapTemp = mapPieces[0][newPos];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(newPos);\r\n }\r\n else\r\n {\r\n int mapTemp = mapPieces[0][currentPos + mapWidth];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(currentPos + mapWidth);\r\n }//end if\r\n }//end if\r\n\r\n //set up new player once unit has moved\r\n playerMoved(currentPlayer,currentUnit,moved);\r\n\r\n //set up new mapPosition if player moved\r\n if(moved == true)\r\n setMapPos();\r\n\t\t}", "@Override\n public void run() {\n\n // Get the current game information\n gameInfoResponse = gameEngine.gameInfo(selectedGameId);\n GameInfoResponse.Game currentGame = gameInfoResponse.getGame();\n MapConfiguration mapConfiguration = currentGame.getMapConfiguration();\n\n System.out.println(\"#################### ROUND \" + currentGame.getRound() + \" ####################\");\n System.out.println(\"SCORE : \" + currentGame.getScores().getScores());\n\n // Query the submarines\n SubmarinesResponse submarinesResponse = gameEngine.submarines(selectedGameId);\n List<Submarine> submarineList = submarinesResponse.getSubmarines();\n if (submarineList == null || submarineList.isEmpty()) {\n System.out.println(\"Submarine list is empty!\");\n return;\n }\n fleet.setSubmarines(submarineList);\n\n // Set new target if needed\n // TODO Find better way to do this\n fleet.setTarget(new Coordinate(900, submarineList.get(0).getPosition().y > 400 ? 600: 200 ));\n if(fleet.hasReachedTarget()) {\n fleet.setTarget(new Coordinate(900, 400));\n }\n\n // Gather sonar information for fleet\n List <Entity> visibleEntities = new ArrayList<>();\n for (Submarine submarine : submarineList) {\n // TODO Extend sonars somehow for fleet\n SonarResponse sonarResponse = gameEngine.sonar(selectedGameId, submarine.getId());\n List<Entity> entityList = sonarResponse.getEntities();\n if (entityList == null) {\n System.out.println(\"Entity list is null, continue with next submarine.\");\n } else {\n visibleEntities.addAll(entityList);\n }\n }\n fleet.setVisibleEntities(visibleEntities);\n\n // Move the fleet\n Map<Integer, MoveModification> moveModifications = fleet.getMoveModifications();\n for (Integer shipId: moveModifications.keySet()) {\n MoveModification moveModification = moveModifications.get(shipId);\n gameEngine.move(selectedGameId, shipId, moveModification.getSpeed(), moveModification.getTurn());\n }\n\n // Fire torpedoes\n Map<Integer, Double> shootingAngles = fleet.getShootingAngles();\n for (Integer shipId: shootingAngles.keySet()) {\n Double shootingAngle = shootingAngles.get(shipId);\n gameEngine.shoot(selectedGameId, shipId,shootingAngle);\n }\n\n\n\n\n\n /*\n // Give orders to each submarine\n for (Submarine submarine : submarineList) {\n // Use extended sonar whenever we can\n if (currentGame.getRound() != 0 && (currentGame.getRound() % mapConfiguration.getExtendedSonarCooldown() == 0)) {\n System.out.println(\"Sonar extended!\");\n gameEngine.extendSonar(selectedGameId, submarine.getId());\n }\n\n printSubmarineInformation(submarine);\n\n // Get the sonar information\n SonarResponse sonarResponse = gameEngine.sonar(selectedGameId, submarine.getId());\n List<Entity> entityList = sonarResponse.getEntities();\n\n if (entityList == null) {\n System.out.println(\"Entity list is null, continue with next submarine.\");\n continue;\n }\n\n guiEntities.addAll(entityList);\n\n int cooldownLeft = cooldownStore.get(submarine.getId());\n cooldownLeft = cooldownLeft > 0 ? cooldownLeft - 1 : 0;\n cooldownStore.put(submarine.getId(), cooldownLeft);\n\n System.out.println(\"visible entities:\");\n\n // Loop through each entity the sonar is seeing.\n for (Entity e : entityList) {\n printEntityInformation(e);\n\n if(!e.getOwner().getName().equals(\"Thats No Moon\") && e.getType().equals(\"Submarine\")) { // && IT IS A SHIP!\n if (cooldownLeft == 0) {\n // Red Alert\n // TODO Check for torpedo cooldown!\n try {\n double shootingAngle = ShootingComputer.getShootingAngle(submarine.getPosition(), e.getPosition(), e.getVelocity(), e.getAngle());\n System.out.println(\"Firing!\");\n gameEngine.shoot(selectedGameId, submarine.getId(), shootingAngle);\n cooldownStore.put(submarine.getId(), mapConfiguration.getTorpedoCooldown());\n } catch (Exception ise) {\n System.out.println(ise.getMessage());\n }\n } else {\n System.out.println(\"Reload is complete in \" + cooldownLeft + \" rounds.\");\n }\n }\n }\n\n System.out.println(\"---------------------------------------------------------------------------------\");\n\n\n }\n */\n guiInfoMessage.setEntities(visibleEntities);\n guiInfoMessage.setSubmarines(submarineList);\n guiInfoMessage.setGame(gameInfoResponse.getGame());\n\n // Update spark server with new informations\n sparkServer.updateMessage(guiInfoMessage);\n }", "GameState requestActionTile();", "public void simulation(){\n GameInformation gi = this.engine.getGameInformation();\n Point ball = gi.getBallPosition();\n Player playerSelected;\n int xTemp;\n team = gi.getTeam(ball.x , ball.y);\n\n //Attack\n if(team == gi.activeActor){\n selectAttackerPlayer(gi.getPlayerTeam(gi.activeActor));\n doAttackMoove(playerOne.getPosition(), gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n selectProtectPlayer(gi.getPlayerTeam(gi.activeActor));\n doProtectMoove(playerTwo.getPosition(), playerOne.getPosition() ,gi.cells[(int) playerTwo.getPosition().getX()][(int) playerTwo.getPosition().getY()].playerMoves);\n playerOne = null;\n playerTwo = null;\n this.engine.next();\n }\n else{//Defense\n selectCloserPlayer(gi.getPlayerTeam(gi.activeActor));\n doDefenseMoove(playerOne.getPosition(), this.engine.getGameInformation().getBallPosition() ,gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n selectCloserPlayer(gi.getPlayerTeam(gi.activeActor));\n doDefenseMoove(playerOne.getPosition(), this.engine.getGameInformation().getBallPosition() ,gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n TacklAction tackl = new TacklAction();\n tackl.setSource(playerOne.getPosition());\n VisualArea[] area;\n if ( area = tackl.getVisualArea(this.engine.getGameInformation() ) != null ){\n tackl.setDestination(area[0]);\n this.engine.performAction( tackl );\n }\n\n tackl.setSource(playerTwo.getPosition());\n\n if ( area = tackl.getVisualArea(this.engine.getGameInformation() ) != null ){\n tackl.setDestination(area[0]);\n this.engine.performAction( tackl );\n }\n playerOne = null;\n playerTwo = null;\n }\n }", "void animalMove(int x,int y, Living[][] map,int gridLength, int gridWidth){\r\n \r\n boolean age=map[x][y].getAge();\r\n boolean gender=map[x][y].getGender();\r\n boolean checkRight=false;\r\n boolean checkLeft=false;\r\n boolean checkUp=false;\r\n boolean checkDown=false;\r\n boolean up=false;\r\n boolean down=false;\r\n boolean right=false;\r\n boolean left=false;\r\n boolean baby=false;\r\n boolean turn=map[x][y].getMovement(); //Check to see if it moved before in the array\r\n \r\n double random=Math.random();\r\n \r\n \r\n \r\n \r\n //Checks to see if it is possible to even see to the left first\r\n if(y-1>=0){\r\n left=true;\r\n \r\n if(turn && (map[x][y-1] instanceof Plant) ){ //Check to see if there is plants and goes to plants\r\n map[x][y].gainHealth((map[x][y-1].getHealth()));\r\n map[x][y].setMovement(false); \r\n map[x][y-1]=map[x][y];\r\n map[x][y]=null;\r\n turn=false; \r\n }\r\n if(turn && (map[x][y-1] instanceof Sheep) && (age==map[x][y-1].getAge()) ){ \r\n //If the ages match they must be false to be adults and both be opposite genders\r\n if(turn && !(age) && !(gender==map[x][y-1].getGender()) && (map[x][y].getHealth()>19) && (map[x][y-1].getHealth()>19) ){\r\n \r\n //Success rate of conceiving\r\n if( (Math.random()<=0.85) ){ \r\n \r\n if( (x+1<gridLength) && (map[x+1][y]==null)&& !(baby) ){ //Following ifs check to see if a baby can be made surrounding the intitiating sheep\r\n map[x+1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true; \r\n }\r\n \r\n if( (x-1>=0) && (map[x-1][y]==null)&& !(baby) ){\r\n map[x-1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if((y+1<gridLength) && (map[x][y+1]==null) && !(baby) ){\r\n map[x][y+1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if(baby){ //If baby is made then sheep will lose health and turn is therefore over \r\n map[x][y].lowerHealth(10);\r\n map[x][y-1].lowerHealth(10);\r\n map[x][y].setMovement(false);\r\n map[x][y-1].setMovement(false);\r\n turn=false;\r\n baby=false;\r\n }\r\n }\r\n } \r\n }\r\n //If it can move to the left need to check if it can foresee more incase there wasn't any place for it to go\r\n if(y-2>=0){\r\n checkLeft=true;\r\n }\r\n }\r\n \r\n //Checks to see if it is possible to even see to the right first \r\n if(y+1<gridWidth){\r\n right=true;\r\n \r\n //Check to move on towards plants\r\n if(turn && (map[x][y+1] instanceof Plant)){\r\n map[x][y].gainHealth(map[x][y+1].getHealth()); \r\n map[x][y].setMovement(false); \r\n map[x][y+1]=map[x][y];\r\n map[x][y]=null;\r\n turn=false; \r\n }\r\n \r\n if(turn && (map[x][y+1] instanceof Sheep && age==map[x][y+1].getAge()) ){ \r\n //If the ages match they must be false to be adults and both be opposite genders\r\n if(turn && !(age) && !(gender==map[x][y+1].getGender()) && (map[x][y].getHealth()>19) && (map[x][y+1].getHealth()>19) ){\r\n \r\n //Success rate of conceiving\r\n if( (Math.random()<=0.85) ){\r\n \r\n if( (x+1<gridLength) && (map[x+1][y]==null) && !(baby) ){ //Following ifs check to see if a baby can be made surrounding the intitiating sheep\r\n \r\n map[x+1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true; \r\n }\r\n \r\n if( (x-1>=0) && (map[x-1][y]==null) && !(baby) ){\r\n map[x-1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if( (y-1>=0) && (map[x][y-1]==null) && !(baby) ){\r\n map[x][y-1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if(baby){ //If baby is made then sheeps will lose health and turn is therefore over \r\n map[x][y].lowerHealth(10);\r\n map[x][y+1].lowerHealth(10);\r\n map[x][y].setMovement(false);\r\n map[x][y+1].setMovement(false);\r\n turn=false; \r\n baby=false;\r\n }\r\n }\r\n } \r\n }\r\n \r\n //If it can move to the right need to check if it can foresee more incase there wasn't any place for it to go\r\n if(y+2<gridWidth){ \r\n checkRight=true;\r\n }\r\n } \r\n \r\n //Check to see if it can go up\r\n if(x-1>=0){\r\n up=true;\r\n \r\n //Check for plant to go on to upwards \r\n if(turn && (map[x-1][y] instanceof Plant) ){\r\n map[x][y].gainHealth(map[x-1][y].getHealth()); \r\n map[x][y].setMovement(false); \r\n map[x-1][y]=map[x][y];\r\n map[x][y]=null;\r\n turn=false;\r\n }\r\n \r\n if(turn && (map[x-1][y] instanceof Sheep) && (age==map[x-1][y].getAge()) ){ \r\n //If the ages match age must be false to be adults and both be opposite genders and have more then 19 health\r\n if(turn && !age && !(gender==map[x-1][y].getGender()) &&map[x][y].getHealth()>19 &&map[x-1][y].getHealth()>19){\r\n \r\n //Success rate of conceiving\r\n if( (Math.random()<=0.85) ){\r\n if( (y+1<gridLength) && (map[x][y+1]==null) && !(baby) ){ //Following ifs check to see if a baby can be made surrounding the intitiating sheep\r\n \r\n map[x][y+1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true; \r\n }\r\n if( (y-1>=0) && (map[x][y-1]==null) && !(baby) ){\r\n map[x][y-1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n \r\n if( (x+1<gridLength) && (map[x+1][y]==null) && !(baby) ){\r\n map[x+1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n \r\n if(baby){ //If baby is made then sheep will lose health and turn is therefore over \r\n map[x][y].lowerHealth(10);\r\n map[x-1][y].lowerHealth(10);\r\n map[x][y].setMovement(false);\r\n map[x-1][y].setMovement(false);\r\n turn=false; \r\n baby=false;\r\n }\r\n }\r\n } \r\n }\r\n \r\n //If it can move to upwards need to check if it can foresee more incase there wasn't any place for it to go\r\n if(x-2>=0){\r\n checkUp=true; \r\n }\r\n } \r\n //Check to see where to go downwards\r\n if(x+1<gridLength){\r\n down=true; \r\n \r\n //Check to see if any plants are downwards\r\n if(turn && (map[x+1][y] instanceof Plant) ){\r\n map[x][y].gainHealth( (map[x+1][y].getHealth()));\r\n map[x][y].setMovement(false);\r\n map[x+1][y]=map[x][y];\r\n map[x][y]=null;\r\n turn=false;\r\n } \r\n \r\n if(turn && (map[x+1][y] instanceof Sheep) && (age==map[x+1][y].getAge()) ){ \r\n \r\n //If the ages match they must be false to be adults and both be opposite genders\r\n if(turn && !(age) && !(gender==map[x+1][y].getGender()) && (map[x][y].getHealth()>=20) && (map[x+1][y].getHealth()>=20) ){\r\n \r\n //Success rate of conceiving\r\n if( (Math.random()<=0.85) ){\r\n if( (y+1<gridLength) && (map[x][y+1]==null) && !(baby) ){ //Following ifs check to see if a baby can be made surrounding the intitiating sheep \r\n map[x][y+1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true; \r\n }\r\n if( (y-1>=0) && (map[x][y-1]==null) && !(baby) ){\r\n map[x][y-1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if( (x-1>=0) && (map[x+1][y]==null) && !(baby) ){\r\n map[x-1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if(baby){ //If baby is made then sheep will lose health and turn is therefore over \r\n map[x][y].lowerHealth(10);\r\n map[x+1][y].lowerHealth(10);\r\n map[x][y].setMovement(false);\r\n map[x+1][y].setMovement(false);\r\n turn=false;\r\n baby=false;\r\n }\r\n }\r\n } \r\n } \r\n if(x+2<gridLength){\r\n checkDown=true;\r\n }\r\n } \r\n \r\n //Movement towards plant only if no immediate sheep/plants are there to move to\r\n if(turn && checkRight && (map[x][y+2] instanceof Plant) ){\r\n if(map[x][y+1]==null){\r\n \r\n map[x][y+1]=map[x][y];\r\n map[x][y]=null;\r\n map[x][y+1].setMovement(false);\r\n turn=false;\r\n }\r\n }\r\n if(turn && checkDown && (map[x+2][y] instanceof Plant) ){\r\n if(map[x+1][y]==null){\r\n map[x+1][y]=map[x][y];\r\n map[x][y]=null;\r\n map[x+1][y].setMovement(false);\r\n turn=false;\r\n }\r\n } \r\n if(turn && checkUp && (map[x-2][y] instanceof Plant) ){\r\n if(map[x-1][y]==null){\r\n \r\n map[x-1][y]=map[x][y];\r\n map[x][y]=null;\r\n map[x-1][y].setMovement(false);\r\n turn=false;\r\n }\r\n }\r\n \r\n if(turn && checkLeft && (map[x][y-2] instanceof Plant) ){\r\n if(map[x][y-1]==null){\r\n map[x][y-1]=map[x][y];\r\n map[x][y]=null;\r\n map[x][y-1].setMovement(false);\r\n turn=false;\r\n }\r\n }\r\n \r\n //Random Movement if there are no plants to move towards \r\n if(turn && right && (random<=0.2) ){\r\n if(map[x][y+1]==null){\r\n map[x][y].setMovement(false);\r\n map[x][y+1]=map[x][y];\r\n map[x][y]=null; \r\n }\r\n }\r\n if(turn && left && (random>0.2) && (random<=0.4) ){\r\n if(map[x][y-1]==null){\r\n map[x][y].setMovement(false);\r\n map[x][y-1]=map[x][y];\r\n map[x][y]=null;\r\n }\r\n }\r\n if(turn && up && (random>0.4) && (random<=0.6) ){\r\n if(map[x-1][y]==null){\r\n map[x][y].setMovement(false);\r\n map[x-1][y]=map[x][y];\r\n map[x][y]=null;\r\n }\r\n }\r\n if(turn && down && (random>0.6) && (random<=0.8) ){\r\n if(map[x+1][y]==null){\r\n map[x][y].setMovement(false);\r\n map[x+1][y]=map[x][y];\r\n map[x][y]=null;\r\n }\r\n }\r\n }", "public void defensive_act()\r\n\t{\r\n\t\tBullet closestBullet = IMAGINARY_BULLET;\r\n\t//\tBullet secondClosestBullet = IMAGINARY_BULLET;\r\n\t\t\r\n\t\tActor machines;\r\n\t\tEnumeration<Actor> opponent = ((MachineInfo)data.get(TankFrame.PLAYER_1)).getHashtable().elements();\r\n\t\twhile(opponent.hasMoreElements())\r\n\t\t{\r\n\t\t\tmachines = (Actor) opponent.nextElement();\r\n\t\t\tif(machines instanceof Bullet)\r\n\t\t\t{\r\n\t\t\t\tif(machines.getPoint().distance(getPoint()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\t{\r\n\t\t\t\t\tclosestBullet = (Bullet)machines;\r\n\t\t\t\t\tLine2D aim = new Line2D.Double(getCenterX(), getCenterY(), closestBullet.getPosX(), closestBullet.getPosY() );\r\n\t\t\t\t\tSystem.out.println(aim.getP1().distance(aim.getP2()));\r\n\t\t\t\t\tif(hasClearPath(aim) && aim.getP1().distance(aim.getP2()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\t\t\taimAndShoot(aim);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t/*\tif(machines.getPoint().distance(getPoint()) > secondClosestBullet.getPoint().distance(getPoint()) \r\n\t\t\t\t\t&& machines.getPoint().distance(getPoint()) < closestBullet.getPoint().distance(getPoint()))\r\n\t\t\t\t\tsecondClosestBullet = (Bullet)machines;*/\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t/*\r\n\t\t * Find the line\r\n\t\t */\r\n\t\t/*if(!closestBullet.equals(IMAGINARY_BULLET))\r\n\t\t{\r\n\t\t\tLine2D bulletPath = new Line2D(getLeftPoint(), closestBullet.getPoint());\r\n\t\t\tLine2D aim = new Line2D(getCenterX(), getCenterY(), (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim) && aim.getP1().distance(aim.getP2()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t\t/*bulletPath = new Line2D(getRightPoint(), closestBullet.getPoint());\r\n\t\t\taim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t\tbulletPath = new Line2D(getPoint(), closestBullet.getPoint());\r\n\t\t\taim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);*/\r\n\t\t\t\r\n\t\t//}\r\n\t/*\tif(!secondClosestBullet.equals(IMAGINARY_BULLET))\r\n\t\t{\r\n\t\t\tLine2D bulletPath = new Line2D(getLeftPoint(), secondClosestBullet.getPoint());\r\n\t\t\tLine2D aim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t}*/\r\n\r\n\t}", "public void action() {\n\t\tsuppressed = false;\r\n\t\tpilot.setLinearSpeed(8);\r\n\t\tpilot.setLinearAcceleration(4);\r\n\t\tColorThread.updatePos = false;\r\n\t\tColorThread.updateCritical = false;\r\n\t\t//create a array to save the map information\r\n\t\tfor (int a = 0; a < 8; a++) {\r\n\t\t\tfor (int b = 0; b < 8; b++) {\r\n\t\t\t\trobot.probability[a][b] = -1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int a = 0; a < 8; a++) {\r\n\t\t\tfor (int b = 0; b < 8; b++) {\r\n\t\t\t\tif (a == 0 || a == 7 || b == 0 || b == 7) {\r\n\t\t\t\t\trobot.probability[a][b] = 100;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int a = 0; a < 6; a++) {\r\n\t\t\tfor (int b = 0; b < 6; b++) {\r\n\t\t\t\tif (robot.map[a][b].getOccupied() == 1) {\r\n\t\t\t\t\trobot.probability[a + 1][b + 1] = 100;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Step1: use ArrayList to save all of the probability situation.\r\n\t\tfloat front, left, right, back;\r\n\t\tfront = USThread.disSample[0];\r\n\t\trobot.setmotorM(90);\r\n\t\tDelay.msDelay(1000);\r\n\t\tleft = USThread.disSample[0];\r\n\t\trobot.setmotorM(-180);\r\n\t\tDelay.msDelay(1000);\r\n\t\tright = USThread.disSample[0];\r\n\t\trobot.setmotorM(90);\r\n\t\tDelay.msDelay(1000);\r\n\t\trobot.correctHeading(180);\r\n\t\tDelay.msDelay(1000);\r\n\t\tback = USThread.disSample[0];\r\n\t\trobot.correctHeading(180);\r\n\t\tfor (int a = 1; a < 7; a++) {\r\n\t\t\tfor (int b = 1; b < 7; b++) {\r\n\t\t\t\tif (robot.probability[a][b] == -1) {\r\n\t\t\t\t\tif (((robot.probability[a][b + 1] == 100 && front < 0.25)\r\n\t\t\t\t\t\t\t|| (robot.probability[a][b + 1] == -1 && front > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a + 1][b] == 100 && right < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a + 1][b] == -1 && right > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b - 1] == 100 && back < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b - 1] == -1 && back > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a - 1][b] == 100 && left < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a - 1][b] == -1 && left > 0.25))) {\r\n\t\t\t\t\t\t//direction is north\r\n\t\t\t\t\t\trobot.listOfPro.add(new ProPoint(0, 0, a, b));\r\n\t\t\t\t\t\t//System.out.println(\"0 \"+a+\" \"+b);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (((robot.probability[a + 1][b] == 100 && front < 0.25)\r\n\t\t\t\t\t\t\t|| (robot.probability[a + 1][b] == -1 && front > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b - 1] == 100 && right < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b - 1] == -1 && right > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a - 1][b] == 100 && back < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a - 1][b] == -1 && back > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b + 1] == 100 && left < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b + 1] == -1 && left > 0.25))) {\r\n\t\t\t\t\t\t// direction is east\r\n\t\t\t\t\t\trobot.listOfPro.add(new ProPoint(1, 0, a, b));\r\n\t\t\t\t\t\t//System.out.println(\"1 \"+a+\" \"+b);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (((robot.probability[a][b - 1] == 100 && front < 0.25)\r\n\t\t\t\t\t\t\t|| (robot.probability[a][b - 1] == -1 && front > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a - 1][b] == 100 && right < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a - 1][b] == -1 && right > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b + 1] == 100 && back < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b + 1] == -1 && back > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a + 1][b] == 100 && left < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a + 1][b] == -1 && left > 0.25))) {\r\n\t\t\t\t\t\t// direction is sourth\r\n\t\t\t\t\t\trobot.listOfPro.add(new ProPoint(2, 0, a, b));\r\n\t\t\t\t\t\t//System.out.println(\"2 \"+a+\" \"+b);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (((robot.probability[a - 1][b] == 100 && front < 0.25)\r\n\t\t\t\t\t\t\t|| (robot.probability[a - 1][b] == -1 && front > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b + 1] == 100 && right < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b + 1] == -1 && right > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a + 1][b] == 100 && back < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a + 1][b] == -1 && back > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b - 1] == 100 && left < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b - 1] == -1 && left > 0.25))) {\r\n\t\t\t\t\t\t// direction is west\r\n\t\t\t\t\t\trobot.listOfPro.add(new ProPoint(3, 0, a, b));\r\n\t\t\t\t\t\t//System.out.println(\"3 \"+a+\" \"+b);\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//Step 2: use loop to take control of robot walk and check the location correction\r\n\t\tboolean needLoop = true;\r\n\t\tint loopRound = 0;\r\n\t\twhile (needLoop) {\r\n\t\t\t// One of way to leave the loop is at the hospital\r\n\t\t\tif ((ColorThread.leftColSample[0] >= 0.2 && ColorThread.leftColSample[1] < 0.2\r\n\t\t\t\t\t&& ColorThread.leftColSample[1] >= 0.14 && ColorThread.leftColSample[2] <= 0.8)\r\n\t\t\t\t\t&& (ColorThread.rightColSample[0] >= 0.2 && ColorThread.rightColSample[1] < 0.2\r\n\t\t\t\t\t\t\t&& ColorThread.rightColSample[1] >= 0.11 && ColorThread.rightColSample[2] <= 0.08)) {\r\n\t\t\t\trobot.updatePosition(0, 0);\r\n\t\t\t\tint numOfAtYellow = 0;\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif (robot.listOfPro.get(i).getNowX() == 1 && robot.listOfPro.get(i).getNowY() == 1) {\r\n\t\t\t\t\t\tnumOfAtYellow++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(numOfAtYellow == 1) {\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif (robot.listOfPro.get(i).getNowX() == 1 && robot.listOfPro.get(i).getNowY() == 1) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.setDirection(false);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 3) {\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// do not to set the heading, because the default value is 0.\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t}else {\r\n\t\t\t\t\t//have two way to go to the yellow part\r\n\t\t\t\t\tfront = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(90);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tleft = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(-180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tright = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(90);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\trobot.correctHeading(180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tback = USThread.disSample[0];\r\n\t\t\t\t\trobot.correctHeading(180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tif(front<0.25 && right<0.25 && left>0.25 && back>0.25) {\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t}else if(front<0.25 && right>0.25 && back>0.25 && left<0.25) {\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t}else if(front>0.25 && right>0.25 && back<0.25 && left<0.25) {\r\n\t\t\t\t\t\t// do not to set the heading, because the default value is 0.\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trobot.setDirection(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tneedLoop = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t//Another way to leave the loop is the robot arrive the green cell.\r\n\t\t\tif ((ColorThread.leftColSample[0] <= 0.09 && ColorThread.leftColSample[1] >= 0.17\r\n\t\t\t\t\t&& ColorThread.leftColSample[2] <= 0.09)\r\n\t\t\t\t\t&& (ColorThread.rightColSample[0] <= 0.09 && ColorThread.rightColSample[1] >= 0.014\r\n\t\t\t\t\t\t\t&& ColorThread.rightColSample[2] <= 0.11)) {\r\n\t\t\t\trobot.updatePosition(5, 0);\r\n\t\t\t\tint numOfAtGreen = 0;\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif (robot.listOfPro.get(i).getNowX() == 6 && robot.listOfPro.get(i).getNowY() == 1) {\r\n\t\t\t\t\t\tnumOfAtGreen++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(numOfAtGreen==1) {\r\n\t\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowX() == 6 && robot.listOfPro.get(i).getNowY() == 1) {\r\n\t\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\t\trobot.setDirection(false);\r\n\t\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 3) {\r\n\t\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// do not to set the heading, because the default value is 0.\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else {\r\n\t\t\t\t\tfront = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(90);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tleft = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(-180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tright = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(90);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\trobot.correctHeading(180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tback = USThread.disSample[0];\r\n\t\t\t\t\trobot.correctHeading(180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tif(front<0.25 && right<0.25 && left>0.25 && back>0.25) {\r\n\t\t\t\t\t\trobot.setDirection(false);\r\n\t\t\t\t\t}else if(front<0.25 && right>0.25 && back>0.25 && left<0.25) {\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t}else if(front>0.25 && right>0.25 && back<0.25 && left<0.25) {\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// do not to set the heading, because the default value is 0.\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tneedLoop = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t//The third way of leave the loop is the robot have already know his position and direction.\r\n\t\t\tint maxStepNumber = 0;\r\n\t\t\tint numberOfMaxSteps = 0;\r\n\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\tif (robot.listOfPro.get(i).getSteps() > maxStepNumber) {\r\n\t\t\t\t\tmaxStepNumber = robot.listOfPro.get(i).getSteps();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\tif (robot.listOfPro.get(i).getSteps() == maxStepNumber) {\r\n\t\t\t\t\tnumberOfMaxSteps++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (numberOfMaxSteps == 1) {\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif (robot.listOfPro.get(i).getSteps() == maxStepNumber) {\r\n\t\t\t\t\t\trobot.updatePosition(robot.listOfPro.get(i).getNowX() - 1,\r\n\t\t\t\t\t\t\t\trobot.listOfPro.get(i).getNowY() - 1);\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.setDirection(false);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 3) {\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// do not to set the heading, because the default value is 0.\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tneedLoop = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t//The below part are the loops.\r\n\t\t\tfront = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(90);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tleft = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(-180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tright = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(90);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\trobot.correctHeading(180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tback = USThread.disSample[0];\r\n\t\t\trobot.correctHeading(180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\t// move\r\n\t\t\t\r\n\t\t\tif (front > 0.25) {\r\n\t\t\t\trobot.getPilot().travel(25);\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif(robot.listOfPro.get(i).getSteps()==loopRound) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 0) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() + 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() + 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() - 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() - 1);\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} else if (left > 0.25) {\r\n\t\t\t\trobot.correctHeading(-90);\r\n\t\t\t\trobot.getPilot().travel(25);\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif(robot.listOfPro.get(i).getSteps()==loopRound) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 0) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(3);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() - 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(0);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() + 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(1);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() + 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(2);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() - 1);\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} else if (right > 0.25) {\r\n\t\t\t\trobot.correctHeading(90);\r\n\t\t\t\trobot.getPilot().travel(25);\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif(robot.listOfPro.get(i).getSteps()==loopRound) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 0) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(1);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() + 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(2);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() - 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(3);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() - 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(0);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() + 1);\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} else {\r\n\t\t\t\trobot.correctHeading(180);\r\n\t\t\t\trobot.getPilot().travel(25);\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif(robot.listOfPro.get(i).getSteps()==loopRound) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 0) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(2);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() - 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(3);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() - 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(0);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() + 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(1);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() + 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// It time to check the around situation\r\n\t\t\tfront = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(90);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tleft = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(-180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tright = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(90);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\trobot.correctHeading(180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tback = USThread.disSample[0];\r\n\t\t\trobot.correctHeading(180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t//System.out.println(robot.listOfPro.get(i).getSteps());\r\n\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 0) {\r\n\t\t\t\t\t\tif (((front < 0.25\r\n\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro.get(i).getNowY()\r\n\t\t\t\t\t\t\t\t\t\t+ 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (front > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() + 1] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((left < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t- 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (left > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() - 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((right < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (right > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() + 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((back < 0.25 && robot.probability[robot.listOfPro.get(i)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getNowX()][robot.listOfPro.get(i).getNowY() - 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (back > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() - 1] == -1))) {\r\n\t\t\t\t\t\t\t//It is correct when the robot have the same data information with estimate information\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setSteps(robot.listOfPro.get(i).getSteps() + 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\tif (((left < 0.25\r\n\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro.get(i).getNowY()\r\n\t\t\t\t\t\t\t\t\t\t+ 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (left > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() + 1] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((back < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t- 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (back > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() - 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((front < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (front > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() + 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((right < 0.25 && robot.probability[robot.listOfPro.get(i)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getNowX()][robot.listOfPro.get(i).getNowY() - 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (right > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() - 1] == -1))) {\r\n\t\t\t\t\t\t\t//It is correct when the robot have the same data information with estimate information\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setSteps(robot.listOfPro.get(i).getSteps() + 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\tif (((back < 0.25\r\n\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro.get(i).getNowY()\r\n\t\t\t\t\t\t\t\t\t\t+ 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (back > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() + 1] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((right < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t- 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (right > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() - 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((left < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (left > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() + 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((front < 0.25 && robot.probability[robot.listOfPro.get(i)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getNowX()][robot.listOfPro.get(i).getNowY() - 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (front > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() - 1] == -1))) {\r\n\t\t\t\t\t\t\t//It is correct when the robot have the same data information with estimate information\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setSteps(robot.listOfPro.get(i).getSteps() + 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (((right < 0.25\r\n\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro.get(i).getNowY()\r\n\t\t\t\t\t\t\t\t\t\t+ 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (right > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() + 1] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((front < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t- 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (front > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() - 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((back < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (back > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() + 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((left < 0.25 && robot.probability[robot.listOfPro.get(i)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getNowX()][robot.listOfPro.get(i).getNowY() - 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (left > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() - 1] == -1))) {\r\n\t\t\t\t\t\t\t//It is correct when the robot have the same data information with estimate information\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setSteps(robot.listOfPro.get(i).getSteps() + 1);\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\tloopRound++;\r\n\t\t}\r\n\t\t// if is out the while loop, it will find the heading and the position of robot right now.\r\n\t\t//Step 3: It is time to use wavefront to come back to the hospital\r\n\t\trobot.restoreDefault();\r\n\t\trobot.RunMode = 1;\r\n\t\tColorThread.updatePos = true;\r\n\t\tColorThread.updateCritical = true;\r\n\t}", "private void updateTileCollisions(Mob mob) {\n\t\tif (mob instanceof Player) {\r\n\t\t\tmob.setScreenPosition(\r\n\t\t\t\t\tnew Point(\r\n\t\t\t\t\t\t\tMath.max(mob.getScreenPosition().x, mob.getWidth() / 2), \r\n\t\t\t\t\t\t\tMath.max(mob.getScreenPosition().y, mob.getHeight() / 2)));\r\n\t\t\tmob.setScreenPosition(\r\n\t\t\t\t\tnew Point(\r\n\t\t\t\t\t\t\tMath.min(mob.getScreenPosition().x, Display.getWidth() - mob.getWidth() / 2), \r\n\t\t\t\t\t\t\tMath.min(mob.getScreenPosition().y, Display.getHeight() - mob.getHeight() / 2)));\n\r\n\t\t\tmob.setAbsPosition(\r\n\t\t\t\t\tnew Point(\r\n\t\t\t\t\t\t\tMath.max(mob.getAbsPosition().x, mob.getWidth() / 2), \r\n\t\t\t\t\t\t\tMath.max(mob.getAbsPosition().y, mob.getHeight() / 2)));\r\n\t\t\tmob.setAbsPosition(\r\n\t\t\t\t\tnew Point(\r\n\t\t\t\t\t\t\tMath.min(mob.getAbsPosition().x, tilemap.getWidth() - mob.getWidth() / 2), \r\n\t\t\t\t\t\t\tMath.min(mob.getAbsPosition().y, tilemap.getHeight()) - mob.getHeight() / 2));\r\n\t\t}\r\n\r\n\t\tPoint center = mob.getScreenPosition().add(offset);\r\n\r\n\t\tboolean hitGround = false; // used to check for vertical collisions and determine \r\n\t\t// whether or not the mob is in the air\r\n\t\tboolean hitWater = false;\r\n\r\n\t\t//update mob collisions with tiles\r\n\t\tfor (int i = 0; i < tilemap.grid.length; i++) {\r\n\t\t\tfor (int j = 0; j < tilemap.grid[0].length; j++) {\r\n\r\n\t\t\t\tif (tilemap.grid[i][j] != null &&\r\n\t\t\t\t\t\ttilemap.grid[i][j].getAbsPosition().x > center.x - (250) &&\r\n\t\t\t\t\t\ttilemap.grid[i][j].getAbsPosition().x < center.x + (250) &&\r\n\t\t\t\t\t\ttilemap.grid[i][j].getAbsPosition().y > center.y - (250) &&\r\n\t\t\t\t\t\ttilemap.grid[i][j].getAbsPosition().y < center.y + (250)) {\r\n\r\n\t\t\t\t\tRectangle mobRect = mob.getBounds();\r\n\t\t\t\t\tRectangle tileRect = tilemap.grid[i][j].getBounds();\r\n\r\n\t\t\t\t\t// if mob intersects a tile\r\n\t\t\t\t\tif (mobRect.intersects(tileRect)) {\r\n\r\n\t\t\t\t\t\t// get the intersection rectangle\r\n\t\t\t\t\t\tRectangle rect = mobRect.intersection(tileRect);\r\n\r\n\t\t\t\t\t\t// if the mob intersects a water tile, adjust its movement accordingly\r\n\t\t\t\t\t\tif (tilemap.grid[i][j].type == TileMap.WATER) { \r\n\r\n\t\t\t\t\t\t\tmob.gravity = mob.defaultGravity * 0.25f;\r\n\t\t\t\t\t\t\tmob.jumpSpeed = mob.defaultJumpSpeed * 0.35f;\r\n\t\t\t\t\t\t\tmob.moveSpeed = mob.defaultMoveSpeed * 0.7f;\r\n\r\n\t\t\t\t\t\t\tif (!mob.inWater) { \r\n\t\t\t\t\t\t\t\tmob.velocity.x *= 0.2;\r\n\t\t\t\t\t\t\t\tmob.velocity.y *= 0.2;\r\n\t\t\t\t\t\t\t\tmob.inWater = true;\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\thitWater = true;\r\n\t\t\t\t\t\t\tmob.jumping = false;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\t\t// if intersection is vertical (and underneath player)\r\n\t\t\t\t\t\t\tif (rect.getHeight() < rect.getWidth()) {\r\n\r\n\t\t\t\t\t\t\t\t// make sure the intersection isn't really horizontal\r\n\t\t\t\t\t\t\t\tif (j + 1 < tilemap.grid[0].length && \r\n\t\t\t\t\t\t\t\t\t\t(tilemap.grid[i][j+1] == null || \r\n\t\t\t\t\t\t\t\t\t\t!mobRect.intersects(tilemap.grid[i][j+1].getBounds()))) {\r\n\r\n\t\t\t\t\t\t\t\t\t// only when the mob is falling\r\n\t\t\t\t\t\t\t\t\tif (mob.velocity.y <= 0) {\r\n\t\t\t\t\t\t\t\t\t\tmob.velocity.y = 0;\r\n\t\t\t\t\t\t\t\t\t\tmob.setAbsPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t\tmob.getAbsPosition().x, \r\n\t\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getAbsPosition().y + rect.getHeight() - 1)));\r\n\t\t\t\t\t\t\t\t\t\tmob.setScreenPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t\tmob.getScreenPosition().x, \r\n\t\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getScreenPosition().y + rect.getHeight() - 1)));\r\n\t\t\t\t\t\t\t\t\t\tmob.inAir = false;\t\r\n\t\t\t\t\t\t\t\t\t\tmob.jumping = false;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// if intersection is horizontal\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tmob.velocity.x = 0;\r\n\r\n\t\t\t\t\t\t\t\tif (mobRect.getCenterX() < tileRect.getCenterX()) {\r\n\t\t\t\t\t\t\t\t\tmob.setAbsPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getAbsPosition().x - rect.getWidth()), \r\n\t\t\t\t\t\t\t\t\t\t\tmob.getAbsPosition().y));\r\n\t\t\t\t\t\t\t\t\tmob.setScreenPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getScreenPosition().x - rect.getWidth()), \r\n\t\t\t\t\t\t\t\t\t\t\tmob.getScreenPosition().y));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\tmob.setAbsPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getAbsPosition().x + rect.getWidth()), \r\n\t\t\t\t\t\t\t\t\t\t\tmob.getAbsPosition().y));\r\n\t\t\t\t\t\t\t\t\tmob.setScreenPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getScreenPosition().x + rect.getWidth()), \r\n\t\t\t\t\t\t\t\t\t\t\tmob.getScreenPosition().y));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tfloat xToCenter = Math.abs((float)(mobRect.getCenterX() - tileRect.getCenterX()));\r\n\t\t\t\t\t\t\tfloat yToCenter = Math.abs((float)(mobRect.getCenterY() - tileRect.getCenterY())); \r\n\r\n\t\t\t\t\t\t\t// Check under the mob to see if it touches a tile. If so, hitGround = true\r\n\t\t\t\t\t\t\tif (yToCenter <= (mobRect.getHeight() / 2 + tileRect.getHeight() / 2) && \r\n\t\t\t\t\t\t\t\t\txToCenter <= (mobRect.getWidth() / 2 + tileRect.getWidth() / 2))\r\n\t\t\t\t\t\t\t\thitGround = true;\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// if mob doesn't intersect a tile vertically, they are in the air\r\n\t\tif (!hitGround) {\r\n\t\t\tmob.inAir = true;\r\n\t\t}\r\n\t\t// if the mob is not in the water, restore its default movement parameters\r\n\t\tif (!hitWater) {\r\n\t\t\tmob.gravity = mob.defaultGravity;\r\n\t\t\tmob.moveSpeed = mob.defaultMoveSpeed;\r\n\t\t\tmob.jumpSpeed = mob.defaultJumpSpeed;\r\n\t\t\tmob.inWater = false;\r\n\t\t}\r\n\t}", "public static void Transfer(JailPrisoner prisoner, Player player)\r\n \t{\r\n \t\tif (prisoner.getTransferDestination() == \"find nearest\") prisoner.setTransferDestination(JailZoneManager.findNearestJail(player.getLocation(), prisoner.getJail().getName()).getName());\r\n \t\t\r\n \t\tif (prisoner.getCell() != null)\r\n \t\t{\r\n \t\t\tInventory inventory = player.getInventory();\r\n \t\t\tJailCell cell = prisoner.getCell();\r\n \t\t\tcell.setPlayerName(\"\");\r\n \t\t\tfor (Sign sign : cell.getSigns())\r\n \t\t\t{\r\n \t\t\t\tsign.setLine(0, \"\");\r\n \t\t\t\tsign.setLine(1, \"\");\r\n \t\t\t\tsign.setLine(2, \"\");\r\n \t\t\t\tsign.setLine(3, \"\");\r\n \t\t\t\tsign.update();\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif (cell.getChest() != null) \r\n \t\t\t{\r\n \t\t\t\tfor (ItemStack i: cell.getChest().getInventory().getContents())\r\n \t\t\t\t{\r\n \t\t\t\t\tif (i == null || i.getType() == Material.AIR) continue;\r\n \t\t\t\t\tinventory.addItem(i);\r\n \t\t\t\t}\r\n \t\t\t\tcell.getChest().getInventory().clear();\r\n \t\t\t}\r\n \t\t\tif (cell.getSecondChest() != null) \r\n \t\t\t{\r\n \t\t\t\tfor (ItemStack i: cell.getSecondChest().getInventory().getContents())\r\n \t\t\t\t{\r\n \t\t\t\t\tif (i == null || i.getType() == Material.AIR) continue;\r\n \t\t\t\t\tinventory.addItem(i);\r\n \t\t\t\t}\r\n \t\t\t\tcell.getSecondChest().getInventory().clear();\r\n \t\t\t}\r\n \t\t\tprisoner.setCell(null);\r\n \t\t}\r\n \t\t\t\t\t\t\r\n \t\tprisoner.SetBeingReleased(true);\r\n \t\t\r\n \t\tString targetJail = prisoner.getTransferDestination();\r\n \t\tif (targetJail.contains(\":\"))\r\n \t\t{\r\n \t\t\tprisoner.setRequestedCell(targetJail.split(\":\")[1]);\r\n \t\t\ttargetJail = targetJail.split(\":\")[0];\t\t\t\r\n \t\t}\r\n \t\t\r\n \t\tJailZone jail = Jail.zones.get(targetJail);\r\n \t\tprisoner.setJail(jail);\r\n \t\tprisoner.setTransferDestination(\"\");\r\n \t\tprisoner.setOfflinePending(false);\r\n \t\tUtil.Message(jail.getSettings().getString(Setting.MessageTransfer), player);\r\n \t\tJail.prisoners.put(prisoner.getName(),prisoner);\r\n \r\n \t\tJailCell cell = jail.getRequestedCell(prisoner);\r\n \t\tif (cell == null || (cell.getPlayerName() != null && !cell.getPlayerName().equals(\"\") && !cell.getPlayerName().equals(prisoner.getName()))) \r\n \t\t{\r\n \t\t\tcell = null;\r\n \t\t\tcell = jail.getEmptyCell();\r\n \t\t}\r\n \t\tif (cell != null)\r\n \t\t{\r\n \t\t\tcell.setPlayerName(player.getName());\r\n \t\t\tprisoner.setCell(cell);\r\n \t\t\tplayer.teleport(prisoner.getTeleportLocation());\r\n \t\t\tprisoner.updateSign();\r\n \t\t\tif (jail.getSettings().getBoolean(Setting.StoreInventory) && cell.getChest() != null)\r\n \t\t\t{\r\n \t\t\t\tChest chest = cell.getChest();\r\n \t\t\t\tchest.getInventory().clear();\r\n \t\t\t\tfor (int i = 0;i<40;i++)\r\n \t\t\t\t{\r\n \t\t\t\t\tif (chest.getInventory().getSize() <= Util.getNumberOfOccupiedItemSlots(chest.getInventory().getContents())) break;\r\n \t\t\t\t\tif (player.getInventory().getItem(i) == null || player.getInventory().getItem(i).getType() == Material.AIR) continue;\r\n \t\t\t\t\tchest.getInventory().addItem(player.getInventory().getItem(i));\r\n \t\t\t\t\tplayer.getInventory().clear(i);\r\n \t\t\t\t}\r\n \t\t\t\t\t\t\t\t\r\n \t\t\t\tif (cell.getSecondChest() != null)\r\n \t\t\t\t{\r\n \t\t\t\t\tchest = cell.getSecondChest();\r\n \t\t\t\t\tchest.getInventory().clear();\r\n \t\t\t\t\tfor (int i = 0;i<40;i++)\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\tif (chest.getInventory().getSize() <= Util.getNumberOfOccupiedItemSlots(chest.getInventory().getContents())) break;\r\n \t\t\t\t\t\tif (player.getInventory().getItem(i) == null || player.getInventory().getItem(i).getType() == Material.AIR) continue;\r\n \t\t\t\t\t\tchest.getInventory().addItem(player.getInventory().getItem(i));\r\n \t\t\t\t\t\tplayer.getInventory().clear(i);\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tcell.update();\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\tplayer.teleport(prisoner.getTeleportLocation());\r\n \t\t}\r\n \t\t\r\n \t\tif (jail.getSettings().getBoolean(Setting.StoreInventory)) \r\n \t\t{\r\n \t\t\tprisoner.storeInventory(player.getInventory());\r\n \t\t\tplayer.getInventory().clear();\r\n \t\t}\r\n \t\t\r\n \t\tprisoner.SetBeingReleased(false);\r\n \t\tInputOutput.UpdatePrisoner(prisoner);\r\n \t}", "public void getTilePressed(View v){\n numpressed = numpressed + 1;\n if(numpressed>4){\n myTurn = true;\n showToast(\"Override: Your turn!\");\n }\n if(myTurn || is_debug){\n numpressed = 0;\n if(!MultiplayerManager.getInstance().enoughTimeBetweenCommands()){\n showToast(\"Please wait a second before issueing another command\");\n return;\n }\n int id = v.getId();\n String resource = v.getResources().getResourceEntryName(id);\n String resource_str = resource.replace(\"square_\", \"\");\n int tile = Integer.parseInt(resource_str);\n\n if(bombIntent){\n if(tile!=myTile && tile!=opponentTile && !bombs_location.contains(tile) && !powerup_location.contains(tile)){\n canPlaceBomb = false;\n placeBomb(tile, false);\n return;\n }else{\n showToast(\"Cant place there\");\n }\n }\n /**\n * check if tile is valid\n */\n if((tile==myTile+1 || tile==myTile-1 || tile==myTile+10 || tile==myTile+11 || tile == myTile+9 || tile==myTile-10 || tile ==myTile-11 || tile == myTile-9) && tile != opponentTile){\n MoveTileSelf(tile);\n checkPowerups(tile);\n }else{\n showToast(\"Can't move there imbecile\");\n }\n }else{\n showToast(\"Wait for your turn imbecile\");\n }\n }", "private void penguinStormReaction(){\n if(obstacle.getUserData().getAssetId().equals(OBSTACLE_CLOUD_ASSETS_ID)){\n if(penguin.isFrightStopped()){\n obstacle.setStormRaining(false);\n }else{\n obstacle.setStormRaining(true);\n }\n }\n }", "@Test\n public void notOnGroundTest(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{{0,0},{0,0}},new byte[][]{{1,0},{1,1}}, tilepath);\n Rect cBox = new Rect(2,2,2,2);\n assertFalse(tileMap.isOnGround(cBox));\n }", "private void multi(EntityManager manager) {\r\n if (manager.getAmmo(4) == 0 && !testMode) {\r\n changeGuns(0, manager);\r\n manager.outOfAmmo();\r\n return;\r\n }\r\n\r\n float newRotationR = rotationZ - 90;\r\n float newRotationL = rotationZ + 90;\r\n float newRotationD = rotationZ + 180;\r\n\r\n float leftX = (float) Math.sin(Math.toRadians(newRotationL));\r\n float leftY = (float) -Math.cos(Math.toRadians(newRotationL));\r\n\r\n float rightX = (float) Math.sin(Math.toRadians(newRotationR));\r\n float rightY = (float) -Math.cos(Math.toRadians(newRotationR));\r\n\r\n float downX = (float) Math.sin(Math.toRadians(newRotationD));\r\n float downY = (float) -Math.cos(Math.toRadians(newRotationD));\r\n\r\n Shot leftshot = new Shot(shotTexture, getX() + forwardX, getY() + forwardY, leftX * 100, leftY * 100, 150, 1.5f, 0, 1, 0, true, 200, false);\r\n\r\n Shot rightshot = new Shot(shotTexture, getX() + forwardX, getY() + forwardY, rightX * 100, rightY * 100, 150, 1.5f, 0, 0, 1, true, 200, false);\r\n\r\n Shot upshot = new Shot(shotTexture, getX() + forwardX, getY() + forwardY, forwardX * 100, forwardY * 100, 150, 1.5f, 1, 0, 0, true, 200, false);\r\n\r\n Shot downshot = new Shot(shotTexture, getX() + forwardX, getY() + forwardY, downX * 100, downY * 100, 150, 1.5f, 1, 1, 0.82f, true, 200, false);\r\n\r\n manager.addEntity(leftshot);\r\n manager.addEntity(rightshot);\r\n manager.addEntity(upshot);\r\n manager.addEntity(downshot);\r\n if (!testMode) manager.updateAmmo(4, -1, false);\r\n manager.shotFired(4);\r\n }", "@Test\n public void testTimeOutOver() {\n // set up the world\n World world = makeWorld();\n \n // make the projectile\n ProjectileDefinition projectileDefinition = new ProjectileDefinition(0,\n \"testProjectileBaseCase\", \"resources/projectiles/test.png\", 0,\n 0, 1, 30, true, 10000, false, 0);\n\n Entity projectile = ProjectileEntities.createProjectile(world,\n projectileDefinition, 30, 30, null);\n \n world.getComponent(projectile, ProjectileComponent.class).get();\n \n // Go just below the 10\n for (double total = 0; Math.abs(total - 10) > 0.01 && total < 10;\n total += 0.3) {\n // run the world\n world.process(total, 0.3);\n \n // the projectile should be there\n assertTrue(\"There should be a projectile that's alive\", \n isProjectileAlive(world, projectile));\n }\n \n world.process(10.2, 0.3);\n \n assertTrue(\"The projectile should be destroyed\", \n isProjectileDestroyed(world, projectile));\n }", "@Test\n public void tieBreakByMeeples() throws Exception{\n\n islandMap.addTileToMap(606, 0);\n islandMap.addTileToMap(607, 60);\n islandMap.addTileToMap(809,0);\n buildme.build(player1, islandMap,1, 807);\n\n islandMap.addTileToMap(609,60);\n islandMap.addTileToMap(611,0);\n islandMap.addTileToMap(612,60);\n islandMap.addTileToMap(614,0);\n\n buildme.build(player2, islandMap, 1, 610);\n buildme.build(player2, islandMap, 1,815);\n\n Assert.assertEquals(2, final1.tieBreaker(player1,player2));\n }", "private void moveShipUp()\r\n\t\t{\r\n\t\t\t\tboolean moved = true;\r\n int currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n\r\n //if firstPlayer move unit up\r\n if(currentPlayer == 1)\r\n {\r\n int currentPos = worldPanel.player1.units[currentUnit - 1].getPosition();\r\n if(currentPos >= 0 && currentPos < mapWidth)\r\n {\r\n int newPos = mapHeight -1;\r\n int newPos2 = mapHeight * newPos + currentPos;\r\n int mapTemp = mapPieces[0][newPos2];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(newPos2);\r\n }\r\n else\r\n {\r\n int mapTemp = mapPieces[0][currentPos - mapWidth];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(currentPos - mapWidth);\r\n }\r\n }//end if\r\n\r\n //if secondPlayer move unit up\r\n if(currentPlayer == 2)\r\n {\r\n int currentPos = worldPanel.player2.units[currentUnit - 1].getPosition();\r\n if(currentPos >= 0 && currentPos < mapWidth)\r\n {\r\n int newPos = mapHeight -1;\r\n int newPos2 = mapHeight * newPos + currentPos;\r\n int mapTemp = mapPieces[0][newPos2];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(newPos2);\r\n }\r\n else\r\n {\r\n int mapTemp = mapPieces[0][currentPos - mapWidth];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(currentPos - mapWidth);\r\n }//end else\r\n }//end if\r\n\r\n //set up new player once unit has moved\r\n playerMoved(currentPlayer,currentUnit,moved);\r\n\r\n //set up new mapPosition if player moved\r\n if(moved == true)\r\n setMapPos();\r\n\t\t}", "@Override\r\n public void update() {\r\n super.update();\r\n hero.checkForTileCollision(getXOverlap(hero.oldx,hero.oldx+width,hero.x,hero.x+width), getYOverlap(hero.oldy,hero.oldy+hero.height,hero.y, hero.y+hero.height));\r\n int i = 0;\r\n\r\n while (turningPoints[i]!= null)\r\n {\r\n if (intersects(turningPoints[i].x,turningPoints[i].y, turningPoints[i].width,turningPoints[i].height))\r\n {\r\n vx = -vx;\r\n vy = -vy;\r\n }\r\n i++;\r\n }\r\n }", "public void levelBrain2(ArrayList<GameObject> gameobject) {\n if ((_win_Level == true)&&(_save_Progres == false))\r\n { _save_Progres = true;\r\n gameobject.get(_player_Found_Value).setPlayerState(Static.PLAYER_STATE_LEVEL_COMPLETE);\r\n }\r\n\r\n\r\n\r\n if(_flag == 0)\r\n {\r\n\r\n\r\n int objectstofind = 1;\r\n\r\n int lenght = gameobject.size();\r\n for(int i = 0; i < lenght; i++)\r\n {\r\n if(_objects_Found < objectstofind) {\r\n if (gameobject.get(i).getObjectType() == Static.FLOATINGICEBLOCK) {\r\n if (gameobject.get(i).getObjectState() == Static.GENERAL_OBJECT_STATE_NEUTRAL) {\r\n\r\n\r\n gameobject.get(i).setOffScreenProjectile(0, GamePanel.HEIGHT / (100 / 50), 0, 150);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n gameobject.get(i).setGetToPoint(GamePanel.WIDTH / (100 / 45), 0, GamePanel.HEIGHT, GamePanel.WIDTH / (100 / 10), Color.GREEN);\r\n _objects_Found++;\r\n }\r\n }\r\n }\r\n else if(_objects_Found == objectstofind)\r\n {\r\n _objects_Found = 0;\r\n _flag++;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if((_lvl_2_Points == 1)&&(_flag == 1))\r\n {\r\n\r\n int objectstofind = 3;\r\n\r\n int lenght = gameobject.size();\r\n for(int i = 0; i < lenght; i++)\r\n {\r\n if(_objects_Found < objectstofind) {\r\n if (gameobject.get(i).getObjectType() == Static.FLOATINGICEBLOCK) {\r\n if (gameobject.get(i).getObjectState() == Static.GENERAL_OBJECT_STATE_NEUTRAL) {\r\n\r\n gameobject.get(i).setOffScreenProjectile(1, 0, 270, 80);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n\r\n if (_objects_Found == 1) {\r\n gameobject.get(i).setOffScreenProjectile(1, GamePanel.HEIGHT / (100 / 55), 270, 80);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n if (_objects_Found == 2) {\r\n gameobject.get(i).setOffScreenProjectile(0, -(GamePanel.HEIGHT / (100 / 40)), 0, 150);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n gameobject.get(i).setGetToPoint(0, -(GamePanel.HEIGHT / (100 / 40)), GamePanel.HEIGHT/ (100 / 50), GamePanel.WIDTH, Color.RED);\r\n }\r\n _objects_Found++;\r\n }\r\n }\r\n }\r\n else if(_objects_Found == objectstofind)\r\n {\r\n _objects_Found = 0;\r\n _flag++;\r\n break;\r\n }\r\n }\r\n\r\n }\r\n if((_lvl_2_Points == 4)&&(_flag ==2)) {\r\n\r\n int objectstofind = 1;\r\n\r\n\r\n int lenght = gameobject.size();\r\n for (int i = 0; i < lenght; i++) {\r\n if (_objects_Found < objectstofind) {\r\n if (gameobject.get(i).getObjectType() == Static.FLOATINGICEBLOCK) {\r\n if (gameobject.get(i).getObjectState() == Static.GENERAL_OBJECT_STATE_NEUTRAL) {\r\n\r\n gameobject.get(i).setOffScreenProjectile(2, GamePanel.HEIGHT, 170, 40);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n gameobject.get(i).setGetToPoint(GamePanel.WIDTH / (100 / 20), (GamePanel.HEIGHT / (100 / 30)), GamePanel.HEIGHT/ (100 / 20), GamePanel.WIDTH /(100 / 20), Color.YELLOW);\r\n _objects_Found++;\r\n }\r\n }\r\n }\r\n else if (_objects_Found == objectstofind) {\r\n _objects_Found = 0;\r\n _flag++;\r\n break;\r\n }\r\n }\r\n }\r\n //Ain't no smooth sailing from here, make sure their parting gift from level one is special.\r\n if((_lvl_2_Points == 5)&&(_flag == 3)) {\r\n int objectstofind = 3;\r\n\r\n\r\n int lenght = gameobject.size();\r\n for (int i = 0; i < lenght; i++) {\r\n if (_objects_Found < objectstofind) {\r\n if (gameobject.get(i).getObjectType() == Static.FLOATINGICEBLOCK) {\r\n if (gameobject.get(i).getObjectState() == Static.GENERAL_OBJECT_STATE_NEUTRAL) {\r\n\r\n if (_objects_Found == 0) {\r\n\r\n gameobject.get(i).setOffScreenProjectile(0, GamePanel.HEIGHT / (100 / 30) + GamePanel.HEIGHT / (100 / 20), 0, 400);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n gameobject.get(i).setGetToPoint(0, (GamePanel.HEIGHT / (100 / 30))+ GamePanel.HEIGHT / (100 / 20), GamePanel.HEIGHT / (100 / 50), GamePanel.WIDTH, Color.RED);\r\n }\r\n if (_objects_Found == 1) {\r\n\r\n gameobject.get(i).setOffScreenProjectile(3, GamePanel.WIDTH / (100 / 20) + GamePanel.WIDTH /(100 / 20), 90, 400);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n gameobject.get(i).setGetToPoint(GamePanel.WIDTH / (100 / 40), (GamePanel.HEIGHT / (100 / 50)), GamePanel.HEIGHT , GamePanel.WIDTH / (100 / 20), Color.RED);\r\n }\r\n if (_objects_Found == 2) {\r\n\r\n gameobject.get(i).setOffScreenProjectile(1, GamePanel.WIDTH / (100 / 20) + GamePanel.WIDTH /(100 / 15), 270, 500);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n\r\n _objects_Found++;\r\n }\r\n }\r\n } else if (_objects_Found == objectstofind) {\r\n _objects_Found = 0;\r\n _flag++;\r\n break;\r\n }\r\n\r\n }\r\n\r\n }\r\n if((_lvl_2_Points == 8)&&(_flag == 4))\r\n {\r\n\r\n int objectstofind = 2;\r\n\r\n int lenght = gameobject.size();\r\n for(int i = 0; i < lenght; i++)\r\n {\r\n if(_objects_Found < objectstofind) {\r\n if (gameobject.get(i).getObjectType() == Static.FLOATINGICEBLOCK) {\r\n if (gameobject.get(i).getObjectState() == Static.GENERAL_OBJECT_STATE_NEUTRAL) {\r\n\r\n\r\n if (_objects_Found == 0) {\r\n gameobject.get(i).setOffScreenProjectile(2, 0, 180, 80);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n if (_objects_Found == 1) {\r\n gameobject.get(i).setOffScreenProjectile(2, -(GamePanel.HEIGHT / (100 / 40)), 180, 150);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n _objects_Found++;\r\n }\r\n }\r\n }\r\n else if(_objects_Found == objectstofind)\r\n {\r\n _objects_Found = 0;\r\n _flag++;\r\n break;\r\n }\r\n }\r\n\r\n }\r\n if((_lvl_2_Points == 10)&&(_flag == 5))\r\n {\r\n int objectstofind = 5;\r\n\r\n int lenght = gameobject.size();\r\n for(int i = 0; i < lenght; i++)\r\n {\r\n if(_objects_Found < objectstofind) {\r\n if (gameobject.get(i).getObjectType() == Static.FLOATINGICEBLOCK) {\r\n if (gameobject.get(i).getObjectState() == Static.GENERAL_OBJECT_STATE_NEUTRAL) {\r\n\r\n\r\n if (_objects_Found == 0) {\r\n gameobject.get(i).setOffScreenProjectile(2, 0, 195, 80);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n if (_objects_Found == 1) {\r\n gameobject.get(i).setOffScreenProjectile(2, -(GamePanel.HEIGHT / (100 / 40)), 160, 400);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n if (_objects_Found == 2) {\r\n gameobject.get(i).setOffScreenProjectile(3, -(GamePanel.WIDTH/(100/1)) , 150, 200);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n if (_objects_Found == 3) {\r\n gameobject.get(i).setOffScreenProjectile(0, 0, 0, 150);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n if (_objects_Found == 4) {\r\n gameobject.get(i).setOffScreenProjectile(1, -GamePanel.WIDTH/(100/20), 270, 90);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n _objects_Found++;\r\n }\r\n }\r\n }\r\n else if(_objects_Found == objectstofind)\r\n {\r\n _objects_Found = 0;\r\n _flag++;\r\n break;\r\n }\r\n }\r\n\r\n }\r\n\r\n //THE PLAYER WON! KICK THEM THE FUCK OUT!\r\n if(_lvl_2_Points >= 15)\r\n {\r\n _win_Level = true;\r\n }\r\n\r\n //Check for scored points\r\n int lenght = gameobject.size();\r\n for (int i = 0; i < lenght; i++) {\r\n if(gameobject.get(i).getObjectType() == Static.FLOATINGICEBLOCK) {\r\n if (gameobject.get(i).getSpecialBooleanVar() == true) {\r\n _lvl_2_Points++;\r\n\r\n gameobject.get(i).setSpecialBooleanVar(false);\r\n _fx.play(_sound_ID, 1, 1, 0, 0, 1);\r\n\r\n }\r\n }\r\n }\r\n\r\n if(_save_Progres == true) {\r\n if(gameobject.get(_player_Found_Value).getObjectStatus() == Static.OBJECT_STATUS_INACTIVE)\r\n {\r\n //The player now has permission to go to level 2 but they won't make it much further.\r\n if (_readFile.returnProgress() < 3) {\r\n _readFile.saveLevelProgress(3);\r\n endMusic();\r\n gameobject.get(_player_Found_Value).returnToMenu();\r\n }\r\n endMusic();\r\n gameobject.get(_player_Found_Value).returnToMenu();\r\n }\r\n }\r\n }", "public ArrayList<Movable> getProjectiles(){\n\t\tArrayList<Movable> moving = new ArrayList<Movable>(temp);\n\t\ttemp = new ArrayList<Movable>();\n\t\treturn moving;\n\t}", "public void spawnEnemy(){\n\t\tint initTile = 0;\n\t\n\t\tfor(int i=0; i<screen.maps[screen.currentMap].path.getHeight(); i++){\n\t\t\tif(screen.maps[screen.currentMap].path.getCell(0, i).getTile().getProperties().containsKey(\"ground\") == true){\n\t\t\t\tinitTile = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\txCoor = 2;\n\t\tyCoor = (initTile)*64 + 2;\n\t\tbound = new Circle(xCoor+30, yCoor+30, 30);\n\t\tinGame = true;\n\t}", "public void trackAndFire() {\n \t \tdouble theta;\n double distanciaObjetivo = myPos.distance(objetivo.pos);\n //Hallar el proximo punto en un perímetro definido\n \t\t//(30,30) elimina bordes y despues el -60 para la longitud de los dados\n Rectangle2D.Double perimetro = new Rectangle2D.Double(30, 30, getBattleFieldWidth() - 60, getBattleFieldHeight() - 60);\n \n \n \n //if my cannon is locked and ready and i got some energy left fire with\n //appropiate energy to not get stuck, fire in the execute rather than now\n \n if(getGunTurnRemaining() == 0 && myEnergy > 1) {\n setFire( Math.min(Math.min(myEnergy/6.0, 1000/distanciaObjetivo), objetivo.energy/3.0) );\n }\n \n //any other case, ill get aim lock with this function\n //normalize sets between pi -pi\n setTurnGunRightRadians(Utils.normalRelativeAngle(angulo(objetivo.pos, myPos) - getGunHeadingRadians()));\n \n\n double distNextPunto = myPos.distance(futurePos);\n \n \n if(distNextPunto > 20) {\n \t//aun estamos lejos\n \n \t\t\n \t\t//theta es el angulo que hemos de cortar para ponernos \"encarando\" bien\n theta = angulo(futurePos, myPos) - getHeadingRadians();\n \n \n double sentido = 1;\n \n if(Math.cos(theta) < 0) {\n theta += Math.PI;\n sentido = -1;\n }\n \n setAhead(distNextPunto * sentido);\n theta = Utils.normalRelativeAngle(theta);\n setTurnRightRadians(theta);\n \n if(theta > 1)setMaxVelocity(0.0);\n else setMaxVelocity(8.0); // max\n \n \t\n \n } else {\n \t //ENTRO AQUI SI ME QUEDA POCO PARA LLEGAR, SMOOTH CORNERING\n\n \t\t\n //probar 1000 coordenadas\n int iterNum = 1000;\n Point2D.Double cand;\n for(int i =0; i < iterNum; i++){\n \n //i dont want it to be close to another bot, thats the meaning of distanciaObjetivo*0.8\n cand = hallarPunto(myPos, Math.min(distanciaObjetivo*0.8, 100 + iterNum*Math.random()), 2*Math.PI*Math.random());\n if(perimetro.contains(cand) && evalHeuristic(cand) < evalHeuristic(futurePos)) {\n futurePos = cand;\n }\n \n \n } \n \n prevPos = myPos;\n \n }\n }", "public void monsterComportement(float delta){\n\t\theroApproachLeft();\n\t\theroApproachRight();\n\t\theroVuRight();\n\t\theroVuLeft();\n\t\theroHoreZone();\n\t\theroHoreZoneMFix();\n\t\t\n\t\toldMonsterX = monster.getBX();\n\t\t\n\t\t\n\t\tif(heroHoreZone){\n\t\t\tif (monster.getBX()>=1200/conf.PPM){\n\t\t\t\tmonster.moveLeft(delta);\n\t }else if (monster.getBX()<=1000/conf.PPM ){\n\t\t\t\tmonster.moveRight(delta);\n\t }\n\t\t\tif(heroHoreZoneMFix){\n\t\t\t\tmonster.moveRight(delta);\n\t\t\t}\n\t\t}else{\n\t\t\t\n\t\t\tif(heroVuLeft || heroVuRight){\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(heroVuLeft){\n\t\t\t\t\tif (monster.getBX()>=1000/conf.PPM){\n\t\t\t\t\t\tmonster.moveLeft(delta);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tmonster.stopX();\n\t\t\t\t\t}\n\t\t\t\t\tif((System.currentTimeMillis() - lastFire>conf.fireDephasage/delta)){\n\t\t\t\t\t\tmonster.fire();\n\t\t\t\t\t\tlastFire = System.currentTimeMillis();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(heroVuRight){\n\t\t\t\t\tif (monster.getBX()<=1675/conf.PPM){\n\t\t\t\t\t\tmonster.moveRight(delta);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tmonster.stopX();\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\tif((System.currentTimeMillis() - lastFire>conf.fireDephasage/delta)){\n\t\t\t\t\t\tmonster.fire();\n\t\t\t\t\t\tlastFire = System.currentTimeMillis();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tif(hero.getBX()<monster.getBX() && i==1){\n\t\t\t\t\tmonster.moveLeft(delta);\n\t\t\t\t\ti=0;\n\t\t\t\t}\n\t\t\t\tif(hero.getBX()>monster.getBX() && i==0){\n\t\t\t\t\tmonster.moveRight(delta);\n\t\t\t\t\ti=1;\n\t\t\t\t}\n\t\t\t\tmonster.stopX();\n\t\t\t\tif((System.currentTimeMillis() - lastFire>conf.fireDephasage/delta)){\n\t\t\t\t\tmonster.fire();\n\t\t\t\t\tlastFire = System.currentTimeMillis();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tmonster.stopShooting();\n\t\t\n\t}", "public GameObject spawnBigBeamer(LogicEngine in_logicEngine) {\n\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/bigbeamer.png\",((float)LogicEngine.SCREEN_WIDTH/2),LogicEngine.SCREEN_HEIGHT+64,0);\r\n\t\tship.i_animationFrameSizeHeight = 115;\r\n\t\tship.i_animationFrameSizeWidth = 115;\r\n\t\t\r\n\t\t\r\n\t\tship.stepHandlers.add(new FlyStraightStep(new Vector2d(0,-1f)));\r\n\t\t\r\n\t\r\n\t\tship.v.setMaxForce(2.5f);\r\n\t\tship.v.setMaxVel(2.5f);\r\n\t\tship.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t\r\n\t\tint i_shootEvery = 80;\r\n\t\t\r\n\t\tBeamShot b = new BeamShot(i_shootEvery);\r\n\t\t\r\n\t\tb.b_flare=false;\r\n\t\tb.f_offsetX=-40;\r\n\t\tb.f_offsetY=-30;\r\n\t\tb.i_delay = 40;\r\n\t\tb.i_beamWidth = 15;\r\n\t\t\r\n\t\tBeamShot b2 = new BeamShot(i_shootEvery);\r\n\t\tb2.b_flare=false;\r\n\t\tb2.f_offsetX=40;\r\n\t\tb2.f_offsetY=-30;\r\n\t\tb2.i_delay = 40+(i_shootEvery/2);\r\n\t\tb2.i_beamWidth = 15;\r\n\t\tb.nextBeam = b2;\r\n\t\t\r\n\t\tship.shootEverySteps=1;\r\n\t\tship.shotHandler = b;\r\n\t\t\r\n\t\tHitpointShipCollision c = new HitpointShipCollision(ship, 100, 50f);\r\n\t\t\r\n\t\tif(!Difficulty.isHard())\r\n\t\t\tc.f_numberOfHitpoints = 200;\r\n\t\tif(!Difficulty.isMedium())\r\n\t\t\tc.f_numberOfHitpoints = 160;\r\n\t\t\r\n\t\tc.setExplosion(Utils.getBossExplosion(ship));\r\n\t\tship.collisionHandler = c;\r\n\t\t\r\n\t\tin_logicEngine.objectsEnemies.add(ship);\r\n\t\t\r\n\t\treturn ship;\r\n\t}", "void placeTower();", "public void fireProjectile(String direction){\r\n\t\tif(name.equals(\"Robot\"))AdventureManager.currentRoom.enemyProjectiles.add(new Projectile(x,y, direction, 5, \"laser\"));\r\n\t\telse AdventureManager.currentRoom.enemyProjectiles.add(new Projectile(x,y, direction, 3, \"fireball\"));\r\n\t}", "private void prepare()\n {\n treespawn treespawn2 = new treespawn();\n addObject(treespawn2,30,486);\n\n hantu hantu = new hantu();\n addObject(hantu,779,359);\n \n hantu hantu2 = new hantu();\n addObject(hantu2,88,84);\n \n bergerak bergerak2 = new bergerak();\n addObject(bergerak2,745,423);\n\n bergerak bergerak3 = new bergerak();\n addObject(bergerak3,266,566);\n \n bergerak bergerak4 = new bergerak();\n addObject(bergerak4,564,566);\n\n hantu hantu3 = new hantu();\n addObject(hantu3,671,490);\n \n hantu hantu4 = new hantu();\n addObject(hantu4,371,499);\n\n bergerak bergerak = new bergerak();\n addObject(bergerak,150,148);\n\n lantai lantai = new lantai();\n addObject(lantai,561,577); \n addObject(lantai,419,579); \n\n player player = new player();\n addObject(player,882,498);\n\n lantai3 lantai3 = new lantai3();\n addObject(lantai3,120,148);\n\n flyinglantai flyinglantai = new flyinglantai();\n addObject(flyinglantai,292,148);\n\n treespawn treespawn = new treespawn();\n addObject(treespawn,30,291);\n\n lantai4 lantai4 = new lantai4();\n addObject(lantai4,235,536);\n \n lantai4 lantai42 = new lantai4();\n addObject(lantai42,275,508);\n \n lantai4 lantai43 = new lantai4();\n addObject(lantai43,323,480);\n \n lantai4 lantai44 = new lantai4();\n addObject(lantai44,369,454);\n\n lantai2 lantai2 = new lantai2();\n addObject(lantai2,680,424);\n\n \n lantai3 lantai32 = new lantai3();\n addObject(lantai32,938,146);\n \n lantai4 lantai45 = new lantai4();\n addObject(lantai45,21,370);\n\n lantai4 lantai46 = new lantai4();\n addObject(lantai46,210,180);\n \n lantai4 lantai47 = new lantai4();\n addObject(lantai47,257,201);\n \n lantai4 lantai48 = new lantai4();\n addObject(lantai48,302,229);\n \n lantai4 lantai49 = new lantai4();\n addObject(lantai49,354,255);\n \n lantai4 lantai410 = new lantai4();\n addObject(lantai410,402,281);\n \n lantai4 lantai411 = new lantai4();\n addObject(lantai411,444,302);\n \n lantai4 lantai412 = new lantai4();\n addObject(lantai412,491,334);\n \n lantai4 lantai413 = new lantai4();\n addObject(lantai413,546,364);\n \n lantai4 lantai414 = new lantai4();\n addObject(lantai414,582,397);\n \n doorlv3 doorlv3 = new doorlv3();\n addObject(doorlv3,910,45);\n\n \n }", "private void setup()\n {\n // TO STUDENTS: Add, revise, or remove methods as needed to define your own game's world\n //addLeftGround();\n //addFences();\n //addMetalPlateSteps();\n addClouds();\n addEnemy();\n addCoin();\n //addRightGround();\n // add a metal plate\n for(int i=0; i<=3; i+=1)\n {\n //location\n int x = 10 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=3; i+=1)\n {\n //location\n int x = 11 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=4; i+=1)\n {\n //location\n int x = 10 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 10 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=4; i+=1)\n {\n //location\n int x = 11 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 10 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=1; i+=1)\n {\n //location\n int x = 17 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=1; i+=1)\n {\n //location\n int x = 18 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=7; i+=1)\n {\n //location\n int x = 17 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 7 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=7; i+=1)\n {\n //location\n int x = 18 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 7 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=3; i+=1)\n {\n //location\n int x = 24 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=3; i+=1)\n {\n //location\n int x = 25 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=5; i+=1)\n {\n //location\n int x = 24 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 10 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=5; i+=1)\n {\n //location\n int x = 25 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 10 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=6; i+=1)\n {\n //location\n int x = 31 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n }\n\n // add a metal plate\n for(int i=0; i<=6; i+=1)\n {\n //location\n int x = 32 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n }\n\n // add a metal plate\n for(int i=0; i<=1; i+=1)\n {\n //location\n int x = 31 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 13 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=1; i+=1)\n {\n //location\n int x = 32 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 13 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=1; i+=1)\n {\n //location\n int x = 42 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=1; i+=1)\n {\n //location\n int x = 43 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=6; i+=1)\n {\n //location\n int x = 42 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 8 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=6; i+=1)\n {\n //location\n int x = 43 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 8 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=4; i+=1)\n {\n //location\n int x = 47 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=4; i+=1)\n {\n //location\n int x = 48 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=5; i+=1)\n {\n //location\n int x = 47 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 10 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=5; i+=1)\n {\n //location\n int x = 48 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 10 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=2; i+=1)\n {\n //location\n int x = 52 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=2; i+=1)\n {\n //location\n int x = 53 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=6; i+=1)\n {\n //location\n int x = 52 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 8 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=6; i+=1)\n {\n //location\n int x = 53 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 8 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n addHero();\n }", "private static void updateNeighbourTileDoors(Creature creature, int tilex, int tiley) {\n/* 2989 */ if (Tiles.isSolidCave(Tiles.decodeType(Server.caveMesh.getTile(tilex, tiley - 1)))) {\n/* */ \n/* 2991 */ VolaTile newTile = Zones.getOrCreateTile(tilex, tiley - 1, true);\n/* 2992 */ newTile.getSurfaceTile().doorCreatureMoved(creature, 0, 0);\n/* */ }\n/* */ else {\n/* */ \n/* 2996 */ VolaTile newTile = Zones.getOrCreateTile(tilex, tiley - 1, false);\n/* 2997 */ newTile.getCaveTile().doorCreatureMoved(creature, 0, 0);\n/* */ } \n/* */ \n/* */ \n/* 3001 */ if (Tiles.isSolidCave(Tiles.decodeType(Server.caveMesh.getTile(tilex + 1, tiley)))) {\n/* */ \n/* 3003 */ VolaTile newTile = Zones.getOrCreateTile(tilex + 1, tiley, true);\n/* 3004 */ newTile.getSurfaceTile().doorCreatureMoved(creature, 0, 0);\n/* */ }\n/* */ else {\n/* */ \n/* 3008 */ VolaTile newTile = Zones.getOrCreateTile(tilex + 1, tiley, false);\n/* 3009 */ newTile.getCaveTile().doorCreatureMoved(creature, 0, 0);\n/* */ } \n/* */ \n/* */ \n/* 3013 */ if (Tiles.isSolidCave(Tiles.decodeType(Server.caveMesh.getTile(tilex, tiley + 1)))) {\n/* */ \n/* 3015 */ VolaTile newTile = Zones.getOrCreateTile(tilex, tiley + 1, true);\n/* 3016 */ newTile.getSurfaceTile().doorCreatureMoved(creature, 0, 0);\n/* */ }\n/* */ else {\n/* */ \n/* 3020 */ VolaTile newTile = Zones.getOrCreateTile(tilex, tiley + 1, false);\n/* 3021 */ newTile.getCaveTile().doorCreatureMoved(creature, 0, 0);\n/* */ } \n/* */ \n/* */ \n/* 3025 */ if (Tiles.isSolidCave(Tiles.decodeType(Server.caveMesh.getTile(tilex - 1, tiley)))) {\n/* */ \n/* 3027 */ VolaTile newTile = Zones.getOrCreateTile(tilex - 1, tiley, true);\n/* 3028 */ newTile.getSurfaceTile().doorCreatureMoved(creature, 0, 0);\n/* */ }\n/* */ else {\n/* */ \n/* 3032 */ VolaTile newTile = Zones.getOrCreateTile(tilex - 1, tiley, false);\n/* 3033 */ newTile.getCaveTile().doorCreatureMoved(creature, 0, 0);\n/* */ } \n/* */ }", "void moveHero(int x, int y) {\n setOnTile(heroC.getX(), heroC.getY(), false);\n // vector needed to aim\n setVector(x, y, heroC);\n setLastXYArray(heroC);\n //Log.i(\"dan\", \"SET VECTOR TO : \" + heroC.getVector());\n creatures.get(0).setX(x);\n creatures.get(0).setY(y);\n setOnTile(x, y, true);\n paintSquare(-1, -1);\n checkHeroHarrasing();\n checkEnemyDeath();\n addTurn();\n enemyTurn();\n saveGame(context, level, turn, creatures);\n }", "@Override\n\t\t\tpublic void shoot() {\n\t\t\t}", "protected Unit target() {\n\t\tUnit closest = null; // this variable will contain the closest Unit\n\t\tDouble min = (double) projectile_range; // this will contain the lowest distance\n\t\tList<Entity> entities = level.getEntities();\n\n\t\tfor (int i = 0; i < entities.size(); i++) {\n\t\t\tEntity e = entities.get(i);\n\t\t\tUnit u = (Unit) e; // casts e to Unit\n\t\t\tif (u.equals(this)) continue; // discounts self\n\t\t\tif (u.UNIT_R != UNIT_G && u.UNIT_G != UNIT_R) continue; // discounts Units from own team\n\t\t\tif (!(e instanceof Unit)) continue; // discounts non-Unit entities\n\n\t\t\tdouble distance = MathMachine.distance((u.getX() - x), (u.getY() - y));\n\t\t\t/*\n\t\t\t * int r = 0; int g = 0; for (int y = 0; y < level.getHeight() * 16; y++) { for (int x = 0; x < level.getWidth() * 16; x++) { if (level.redPixels[x + y * level.getWidth() * 16] == true) r++; if (level.greenPixels[x + y * level.getWidth() * 16] == true )g++; System.out.println(\"r: \" + r + \", \" + g); } }\n\t\t\t */\n\t\t\tif (UNIT_R) { // if it is a red unit\n\t\t\t\tif (distance < min) {\n\t\t\t\t\tint xt = (int) Math.round(u.getX());\n\t\t\t\t\tint yt = (int) Math.round(u.getY());\n\t\t\t\t\tif (level.redPixels[(int) Math.round(xt + level.getWidth() * 16.0 * yt)]) {\n\t\t\t\t\t\tclosest = u;\n\t\t\t\t\t\tmin = distance;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (UNIT_G) { // if it is a green unit\n\t\t\t\tif (distance < min) {\n\t\t\t\t\tSystem.out.println(level.greenPixels[(int) Math.round(u.getX() + level.getWidth() * 16.0 * u.getY())]);\n\n\t\t\t\t\tif (level.greenPixels[(int) Math.round(u.getX() + level.getWidth() * 16.0 * u.getY())]) {\n\t\t\t\t\t\tclosest = u;\n\t\t\t\t\t\tmin = distance;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn closest; // the program is fucked if null happens. just a headsup. hopefully you will remember if you get a null pointer exception.\n\t}", "public void doAi(){\n\t\t\tif(MathHelper.getRandom(0, Game.FRAMERATE * 5) == 5){\n\t\t\t\tsetScared(true);\n\t\t\t}\n\t\t\n\t\t//Update rectangle\n\t\tsetRectangle(getX(), getY(), getTexture().getWidth(), getTexture().getHeight());\n\t\t\n\t\trect = new Rectangle(getDestinationX(), getDestinationY(), 10, 10);\n\t\t\n\t\tif(rect.intersects(getRectangle())){\n\t\t\t\n\t\t\tif(StateManager.getState() == StateManager.STATE_BOSSTWO){\n\t\t\t\t\n\t\t\t\t\tsetDestinationX(StateGame.player.getX());\n\t\t\t\t\t\n\t\t\t\t\tsetDestinationY(StateGame.player.getY());\n\t\t\t\t\t\n\t\t\t\t\trect = new Rectangle(getDestinationX(), getDestinationY(), 10, 10);\n\t\t\t\t\treachedDestination = (true);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Check for collision with jelly\n\t\tint checkedJelly = (0);\n\t\twhile(checkedJelly < EntityJelly.JELLY.size() && EntityJelly.JELLY.get(checkedJelly) != null){\n\t\t\tif(EntityJelly.JELLY.get(checkedJelly).getDead() == false){\n\t\t\t\tif(getRectangle().intersects(EntityJelly.JELLY.get(checkedJelly).getRectangle())){\n\t\t\t\t\tsetHealth(getHealth() - 2);\n\t\t\t\t\tif(MathHelper.getRandom(1, 10) == 10){\n\t\t\t\t\tAnnouncer.addAnnouncement(\"-2\", 60, EntityJelly.JELLY.get(checkedJelly).getX(), EntityJelly.JELLY.get(checkedJelly).getY());\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tcheckedJelly++;\n\t\t}\n\t\t\n\t\t//If we're out of health, kill the entity\n\t\tif(getHealth() < 0){\n\t\t\tsetDead(true);\n\t\t}\n\t\t\n\t\tif(StateManager.getState() == StateManager.STATE_BOSSTWO){\n\t\t\tif(reachedDestination == true){\n\t\t\t\tif(getScared() == false){\n\t\t\t\tsetY(getY() + getSpeed());\n\t\t\t\t}else{\n\t\t\t\t\tsetY(getY() - getSpeed() * 3);\n\t\t\t\t\tsetX(getX() - getSpeed() * 3);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(getScared() == false){\n\t\t\t\tif(getX() < getDestinationX())\n\t\t\t\t\tsetX(getX() + getSpeed());\n\t\t\t\tif(getX() > getDestinationX())\n\t\t\t\t\tsetX(getX() - getSpeed());\n\t\t\t\tif(getY() < getDestinationY())\n\t\t\t\t\tsetY(getY() + getSpeed());\n\t\t\t\tif(getY() > getDestinationY())\n\t\t\t\t\tsetY(getY() - getSpeed());\n\t\t\t\t}else{\n\t\t\t\t\t\tsetY(getY() - getSpeed() * 3);\n\t\t\t\t\t\tsetX(getX() - getSpeed() * 3);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void checkCollision(Graphics g) {\n\t\t// collision detection for the tanks\n\t\tGraphics2D g2d = (Graphics2D) g.create();\n\t\tRectangle heroRectangle = hero.getBounds();\n\t\tRectangle hero2Rectangle = computer.getBounds();\n\t\tArrayList<Missile> heroMissiles = hero.getMissiles();\n\t\tArrayList<Missile> hero2Missile = computer.getMissiles();\n\n\t\t// hero1 --------------------\n\t\tAffineTransform at = g2d.getTransform();\n\t\tg2d.setTransform(at);\n\t\tat.rotate(Math.toRadians(hero.getAngle()), hero.getX() + hero.getImageWidth() / 2,\n\t\t\t\thero.getY() + hero.getImageHeight() / 2);\n\t\tGeneralPath heroPath = new GeneralPath();\n\t\theroPath.append(heroRectangle.getPathIterator(at), true);\n\t\tArea heroArea = new Area(heroPath);\n\n\t\t// hero2 ------------------------------\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tat.rotate(Math.toRadians(computer.getAngle()), computer.getX() + computer.getImageWidth() / 2,\n\t\t\t\tcomputer.getY() + computer.getImageHeight() / 2);\n\t\tGeneralPath hero2Path = new GeneralPath();\n\t\thero2Path.append(hero2Rectangle.getPathIterator(at), true);\n\t\tArea hero2Area = new Area(hero2Path);\n\n\t\t// tank1 -- tank2 collision\n\t\thero2Area.intersect(heroArea);\n\t\tif (!hero2Area.isEmpty()) {\n\t\t\tplay(\"tank-tank.wav\");\n\t\t\tposxt2 = computer.getX();\n\t\t\tposyt2 = computer.getY();\n\t\t\tposyt1 = hero.getY();\n\t\t\tposxt1 = hero.getX();\n\t\t\t\n\t\t\texplodet2 = true;\n\t\t\texplodet1 = true;\n\t\t\tg2d.setColor(Color.RED);\n\t\t\tg2d.fill(heroArea);\n\t\t\tcomputer.spawnGenerator();\n\t\t\twhile (getValidRespawnPosition((int) computer.getX(), (int) computer.getY(), computer.getImageWidth(),\n\t\t\t\t\tcomputer.getImageHeight())) {\n\t\t\t\tcomputer.spawnGenerator();\n\t\t\t}\n\n\t\t\thero.spawnGenerator();\n\t\t\twhile (getValidRespawnPosition((int) hero.getX(), (int) hero.getY(), hero.getImageWidth(),\n\t\t\t\t\thero.getImageHeight())) {\n\t\t\t\thero.spawnGenerator();\n\t\t\t}\n\t\t}\n\n\t\t// tank2 -- tank1 bullet collision\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tfor (int i = 0; i < heroMissiles.size(); i++) {\n\t\t\tMissile m = heroMissiles.get(i);\n\t\t\tRectangle tank1BulletRect = m.getBounds();\n\t\t\tGeneralPath tank1BulletPath = new GeneralPath();\n\t\t\ttank1BulletPath.append(tank1BulletRect.getPathIterator(at), true);\n\t\t\theroArea = new Area(heroPath);\n\t\t\thero2Area = new Area(hero2Path);\n\t\t\tArea tank1BulletArea = new Area(tank1BulletPath);\n\t\t\thero2Area.intersect(tank1BulletArea);\n\t\t\tif (!hero2Area.isEmpty()) {\n\t\t\t\tplay(\"bullet-tank.wav\");\n\t\t\t\tposxt2 = computer.getX();\n\t\t\t\tposyt2 = computer.getY();\n\t\t\t\texplodet2 = true;\n\t\t\t\tif (computer.getCurrentPowerup() == 5) {\n\t\t\t\t} else {\n\t\t\t\t\tp1score++;\n\t\t\t\t\tcomputer.spawnGenerator();\n\t\t\t\t\twhile (getValidRespawnPosition((int) computer.getX(), (int) computer.getY(),\n\t\t\t\t\t\t\tcomputer.getImageWidth(), computer.getImageHeight())) {\n\t\t\t\t\t\tcomputer.spawnGenerator();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\theroMissiles.remove(i);\n\t\t\t\tcomputer.setCurrentPowerup(0);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// tank1 -- tank1 bullet collision\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tfor (int i = 0; i < heroMissiles.size(); i++) {\n\t\t\tMissile m1 = heroMissiles.get(i);\n\t\t\tRectangle tankBulletRect = m1.getBounds();\n\t\t\tGeneralPath tankBulletPath = new GeneralPath();\n\t\t\ttankBulletPath.append(tankBulletRect.getPathIterator(at), true);\n\t\t\theroArea = new Area(heroPath);\n\t\t\thero2Area = new Area(hero2Path);\n\t\t\tArea tankBulletArea = new Area(tankBulletPath);\n\t\t\theroArea.intersect(tankBulletArea);\n\t\t\tif (!heroArea.isEmpty() && m1.isReflected()) {\n\t\t\t\tplay(\"bullet-tank.wav\");\n\t\t\t\tposyt1 = hero.getY();\n\t\t\t\tposxt1 = hero.getX();\n\t\t\t\texplodet1 = true;\n\t\t\t\tif (hero.getCurrentPowerup() == 5) {\n\t\t\t\t} else {\n\t\t\t\t\tp2score++;\n\t\t\t\t\thero.spawnGenerator();\n\t\t\t\t\twhile (getValidRespawnPosition((int) hero.getX(), (int) hero.getY(), hero.getImageWidth(),\n\t\t\t\t\t\t\thero.getImageHeight())) {\n\t\t\t\t\t\thero.spawnGenerator();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\theroMissiles.remove(i);\n\t\t\t\thero.setCurrentPowerup(0);\n\t\t\t}\n\t\t}\n\n\t\t// tank1 -- tank2 bullet collision\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tfor (int i = 0; i < hero2Missile.size(); i++) {\n\t\t\tMissile m1 = hero2Missile.get(i);\n\t\t\tRectangle tank2BulletRect = m1.getBounds();\n\t\t\tGeneralPath tank2BulletPath = new GeneralPath();\n\t\t\ttank2BulletPath.append(tank2BulletRect.getPathIterator(at), true);\n\t\t\theroArea = new Area(heroPath);\n\t\t\thero2Area = new Area(hero2Path);\n\t\t\tArea tank2BulletArea = new Area(tank2BulletPath);\n\t\t\theroArea.intersect(tank2BulletArea);\n\t\t\tif (!heroArea.isEmpty()) {\n\t\t\t\tplay(\"bullet-tank.wav\");\n\t\t\t\tposyt1 = hero.getY();\n\t\t\t\tposxt1 = hero.getX();\n\t\t\t\texplodet1 = true;\n\t\t\t\tif (hero.getCurrentPowerup() == 5) {\n\t\t\t\t} else {\n\t\t\t\t\tp2score++;\n\t\t\t\t\thero.spawnGenerator();\n\t\t\t\t\twhile (getValidRespawnPosition((int) hero.getX(), (int) hero.getY(), hero.getImageWidth(),\n\t\t\t\t\t\t\thero.getImageHeight())) {\n\t\t\t\t\t\thero.spawnGenerator();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\thero2Missile.remove(i);\n\t\t\t\thero.setCurrentPowerup(0);\n\t\t\t}\n\t\t}\n\n\t\t// tank1 -- powerup collision\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tfor (int i = 0; i < powerupArray.size(); i++) {\n\t\t\tRectangle powerupRectangle = (powerupArray.get(i)).getBounds();\n\t\t\tGeneralPath powerupPath = new GeneralPath();\n\t\t\tpowerupPath.append(powerupRectangle.getPathIterator(at), true);\n\t\t\theroArea = new Area(heroPath);\n\t\t\thero2Area = new Area(hero2Path);\n\t\t\tArea powerupArea = new Area(powerupPath);\n\t\t\theroArea.intersect(powerupArea);\n\t\t\tif (!heroArea.isEmpty()) {\n\t\t\t\tplay(\"powerup.wav\");\n\t\t\t\tif ((powerupArray.get(i)).getPowerupType() == 5) {\n\t\t\t\t\thero.setIndex(1);\n\t\t\t\t}\n\t\t\t\tint powerupType = (powerupArray.get(i)).getPowerupType();\n\t\t\t\thero.setCurrentPowerup(powerupType);\n\t\t\t\tpowerupArray.remove(i);\n\t\t\t}\n\t\t}\n\n\t\t// tank2 -- powerup collision\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tfor (int i = 0; i < powerupArray.size(); i++) {\n\t\t\tRectangle powerupRectangle = (powerupArray.get(i)).getBounds();\n\t\t\tGeneralPath powerupPath = new GeneralPath();\n\t\t\tpowerupPath.append(powerupRectangle.getPathIterator(at), true);\n\t\t\theroArea = new Area(heroPath);\n\t\t\thero2Area = new Area(hero2Path);\n\t\t\tArea powerupArea = new Area(powerupPath);\n\t\t\thero2Area.intersect(powerupArea);\n\t\t\tif (!hero2Area.isEmpty()) {\n\t\t\t\tplay(\"powerup.wav\");\n\t\t\t\tint powerupType = (powerupArray.get(i)).getPowerupType();\n\t\t\t\tcomputer.setCurrentPowerup(powerupType);\n\t\t\t\tpowerupArray.remove(i);\n\t\t\t}\n\t\t}\n\n\t\t// tank 1 and wall collision\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tfor (Wall w : wallArray) {\n\t\t\tRectangle wallRect = w.getBounds();\n\t\t\tGeneralPath wallPath = new GeneralPath();\n\t\t\twallPath.append(wallRect.getPathIterator(at), true);\n\t\t\theroArea = new Area(heroPath);\n\t\t\thero2Area = new Area(hero2Path);\n\t\t\tArea wallArea = new Area(wallPath);\n\t\t\theroArea.intersect(wallArea);\n\t\t\tif (!heroArea.isEmpty()) {\n\t\t\t\thero.setX(hero.getPrevX());\n\t\t\t\thero.setY(hero.getPrevY());\n\t\t\t}\n\t\t}\n\t}", "public void MoveTileOpponent(Integer position){\n Integer position_inverted = revertTile(position);\n String position_inverted_str = String.valueOf(position_inverted);\n\n ImageView player2 = findImageButton(\"square_\"+position_inverted_str);\n ImageView player2_old = findImageButton(\"square_\"+opponentTile.toString());\n player2.setImageDrawable(getResources().getDrawable(R.drawable.tank_red));\n player2_old.setImageDrawable(getResources().getDrawable(android.R.color.transparent));\n\n opponentTile = position_inverted;\n myTurn = true;\n canPlaceBomb = true;\n turnNumber = turnNumber + 1;\n\n if(ShotsCaller){\n placePowerup(null);\n }\n }", "private static void soldierCode() throws GameActionException {\n\t\tRobotInfo[] visibleEnemyArray = rc.senseHostileRobots(rc.getLocation(), 1000000);\n\t\tSignal[] incomingSignals = rc.emptySignalQueue();\n\t\tfor(Signal s:incomingSignals){\n\t\t\tint[] message = s.getMessage();\n\t\t\tif(s.getTeam()==rc.getTeam()){\n\t\t\t\tif(message!=null){\n\t\t\t\t\tif(message[0]%10==0){\n\t\t\t\t\t\tint x = message[1]/100000;\n\t\t\t\t\t\tint y = message[1]%100000;\n\t\t\t\t\t\tcenter= new MapLocation(x,y);\n\t\t\t\t\t\tint r = message[0]/10;\n\t\t\t\t\t\tradius=r;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint dist = rc.getLocation().distanceSquaredTo(center);\n\t\tif (visibleEnemyArray.length==0) {\n\t\t\tif (goal!=null&&(rc.senseRubble(goal)<100 || rc.senseRobotAtLocation(goal)!=null)) {\n\t\t\t\tgoal = null;\n\t\t\t\trc.setIndicatorString(0, \"done clearing\");\n\t\t\t}\t\n\t\t\tif(goal==null) {\n\t\t\t\tMapLocation[] locs = MapLocation.getAllMapLocationsWithinRadiusSq(rc.getLocation(), 8);\n\t\t\t\tArrayList<MapLocation> inside = new ArrayList<MapLocation>();\n\t\t\t\tfor(MapLocation loc: locs) {\n\t\t\t\t\tif (loc.distanceSquaredTo(center)<=1.5*radius) {\n\t\t\t\t\t\tinside.add(loc);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor(MapLocation l: inside) {\n\t\t\t\t\tif (rc.senseRubble(l)>99 && rc.senseRobotAtLocation(l)==null) {\n\t\t\t\t\t\tgoal = l;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tUtility.tryToMove(goal);\n\t\t\t}\n\t\t\t\n\t\t\tif (dist>radius && dist< 4*radius) { //Explore\n\t\t\t\tMapLocation travel = soldierFind();\n\t\t\t\tUtility.tryToMove(travel);\n\t\t\t}else{ //Move back\n\t\t\t\tMapLocation loc = center.add(center.directionTo(rc.getLocation()), (int)Math.pow(radius, 0.5)+1);\n\t\t\t\tUtility.tryToMove(loc);\n\t\t\t}\n\t\t} else { //Kite\n\t\t\tkite(visibleEnemyArray);\n\t\t}\n\t}", "public void update() {\r\n\r\n\t\tfor(int p=0;p<200;p++) {\r\n\t\t\tfor(int k=0;k<200;k++) {\r\n\r\n\t\t\t\tif(tileMap[p][k].getBuilding()!=null) {\r\n\t\t\t\t\tBuilding m=tileMap[p][k].getBuilding();\r\n\t\t\t\t\t//update the buildings\r\n\t\t\t\t\ttileMap[p][k].getBuilding().update();\r\n\r\n\t\t\t\t\t//Check if battery is giving off power\r\n\t\t\t\t\tif( (m instanceof LowTierBattery) || (m instanceof LargeBattery) || (m instanceof IndustrialGradeBattery) ) {\r\n\r\n\t\t\t\t\t\t//If it's a Battery\r\n\t\t\t\t\t\tLowTierBattery f =(LowTierBattery) tileMap[p][k].getBuilding();\t\r\n\r\n\t\t\t\t\t\t//Check if its getting power and charging\r\n\t\t\t\t\t\tif(checkPowerLine(p,k,3)) {\r\n\t\t\t\t\t\t\tpowerSwitcher(p,k,2,true); //If it is then give off power\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tpowerSwitcher(p,k,2,f.getCapacity()>0); ///if it isnt then only give power if there is capacity\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//If a building is generating power add power to tiles;\r\n\t\t\t\t\t}else if( (m instanceof SteamEngine) || (m instanceof HandCrankGenerator) || (m instanceof SteamTurbine) || (m instanceof WindTurbine) ) {\r\n\r\n\t\t\t\t\t\tpowerSwitcher(p,k,3,((PoweredBuilding) m).getPower()); //Adds power or remove power based on the status of the generators\r\n\r\n\t\t\t\t\t\t//Powerline only get power from other powerline or buildings\r\n\t\t\t\t\t}else if(m instanceof PowerLine) {\r\n\r\n\t\t\t\t\t\tpowerSwitcher(p,k,5,checkPowerLine(p,k,5)); //Checks if the powerline is powered by other buildings then give it to powerSwitch method\r\n\r\n\t\t\t\t\t}else if(m instanceof LargePowerLine) {\r\n\t\t\t\t\t\tpowerSwitcher(p,k,10,checkPowerLine(p,k,10)); //Checks if the powerline is powered by other buildings then give it to powerSwitch method\r\n\r\n\t\t\t\t\t\t//If its just a powered building enable it if the tile under it is powered;\r\n\t\t\t\t\t}else if((m instanceof PoweredBuilding)) {\r\n\t\t\t\t\t\t((PoweredBuilding) tileMap[p][k].getBuilding()).setPower(tileMap[p][k].getPowered());\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t//Pipe movement\r\n\t\t\t\t\tif(m instanceof Pipe ) {\r\n\t\t\t\t\t\tpipeCheck(p,k,m);\r\n\t\t\t\t\t}else if(m.getOutputInventorySize()>0) {\r\n\t\t\t\t\t\tbuildingPipeCheck(p,k,m);\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void updateLavaTiles() {\n for (Tile tile : getTiles()) {\n Random random = new Random();\n if (tile.getType().matches(\"BurnTile\")) {\n tile.setTexture(\"Volcano_\" + (random.nextInt(4) + 5));\n }\n }\n }", "void shoot();", "public void act() \r\n {\n if(getOneIntersectingObject(Player.class)!=null)\r\n {\r\n if(MenuWorld.gamemode == 1)\r\n //marcheaza regenerarea labirintului(trecere la nivelul urmator in Modul Contra Timp)\r\n TAworld.shouldRegen=true;\r\n else\r\n { \r\n //reseteaza variabilele care tin de modul de joc\r\n MenuWorld.gamemode=-1;\r\n MenuWorld.isPlaying=false;\r\n for(int i=0;i<4;i++)\r\n ItemCounter.gems_taken[i]=0;\r\n \r\n //arata fereastra de castig \r\n PMworld.shouldShowVictoryWindow=true;\r\n }\r\n \r\n }\r\n \r\n }", "@Test\n void grab() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n Square s = new Square(0, 4, false, true, false, true, false, 'b');\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setPlayerPosition(s);\n p.getPh().getPowerupDeck().getPowerups().clear();\n p.setTurn(true);\n AmmoTile a = new AmmoTile();\n PowerupDeck pud = new PowerupDeck();\n int[] cubes = new int[3];\n cubes[0] = 2;\n cubes[2] = 1;\n char[] c1 = {'b', 'b', 'b'};\n char[] c2 = {'r', 'r', 'r'};\n char[] c3 = {'y', 'y', 'y'};\n p.getPb().payAmmo(c1);\n p.getPb().payAmmo(c2);\n p.getPb().payAmmo(c3);\n a.setCubes(cubes);\n a.setPowerup(false);\n s.setAmmo(a);\n try{\n p.grab(p.getPlayerPosition(), pud);\n }catch (WrongSquareException e){}\n }", "public void buildMap() {\n // CUBES ENGINE INITIALIZATION MOVED TO APPSTATE METHOD\n // Here we init cubes engine\n CubesTestAssets.registerBlocks();\n CubesSettings blockSettings = CubesTestAssets.getSettings(this.app);\n blockSettings.setBlockSize(5);\n //When blockSize = 5, global coords should be multiplied by 3 \n this.blockScale = 3.0f;\n this.halfBlockStep = 0.5f;\n \n testTerrain = new BlockTerrainControl(CubesTestAssets.getSettings(this.app), new Vector3Int(4, 1, 4));\n testNode = new Node();\n int wallHeight = 3;\n //testTerrain.setBlockArea(new Vector3Int(0, 0, 0), new Vector3Int(32, 1, 64), CubesTestAssets.BLOCK_STONE);\n this.testTerrain.setBlockArea( new Vector3Int(3,0,43), new Vector3Int(10,1,10), CubesTestAssets.BLOCK_STONE); // Zone 1 Floor\n this.testTerrain.setBlockArea( new Vector3Int(3,1,43), new Vector3Int(10,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(3,1,52), new Vector3Int(10,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n this.testTerrain.setBlockArea( new Vector3Int(3,1,43), new Vector3Int(1,wallHeight,10), CubesTestAssets.BLOCK_WOOD); // West Wall\n this.testTerrain.setBlockArea( new Vector3Int(12,1,43), new Vector3Int(1,wallHeight,10), CubesTestAssets.BLOCK_WOOD); // East Wall\n \n this.testTerrain.removeBlockArea( new Vector3Int(12,1,46), new Vector3Int(1,wallHeight,4)); // Door A\n \n this.testTerrain.setBlockArea( new Vector3Int(12,0,45), new Vector3Int(13,1,6), CubesTestAssets.BLOCK_STONE); // Zone 2 Floor A\n this.testTerrain.setBlockArea( new Vector3Int(12,1,45), new Vector3Int(8,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(12,1,50), new Vector3Int(13,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n this.testTerrain.setBlockArea(new Vector3Int(19,0,42), new Vector3Int(6,1,3), CubesTestAssets.BLOCK_STONE); // Zone 2 Floor B\n this.testTerrain.setBlockArea( new Vector3Int(19,1,42), new Vector3Int(1,wallHeight,3), CubesTestAssets.BLOCK_WOOD); //\n this.testTerrain.setBlockArea( new Vector3Int(24,1,42), new Vector3Int(1,wallHeight,9), CubesTestAssets.BLOCK_WOOD); //\n \n this.testTerrain.setBlockArea( new Vector3Int(15,0,26), new Vector3Int(18,1,17), CubesTestAssets.BLOCK_STONE); // Zone 3 Floor\n this.testTerrain.setBlockArea( new Vector3Int(15,1,42), new Vector3Int(18,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(15,1,26), new Vector3Int(18,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n this.testTerrain.setBlockArea( new Vector3Int(15,1,26), new Vector3Int(1,wallHeight,17), CubesTestAssets.BLOCK_WOOD); // West Wall\n this.testTerrain.setBlockArea( new Vector3Int(32,1,26), new Vector3Int(1,wallHeight,17), CubesTestAssets.BLOCK_WOOD); // East Wall\n \n this.testTerrain.removeBlockArea( new Vector3Int(20,1,42), new Vector3Int(4,wallHeight,1)); // Door B\n this.testTerrain.removeBlockArea( new Vector3Int(15,1,27), new Vector3Int(1,wallHeight,6)); // Door C\n \n this.testTerrain.setBlockArea( new Vector3Int(10,0,26), new Vector3Int(5,1,8), CubesTestAssets.BLOCK_STONE); // Zone 4 Floor A\n this.testTerrain.setBlockArea( new Vector3Int(10,1,26), new Vector3Int(5,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(3,0,18), new Vector3Int(8,1,16), CubesTestAssets.BLOCK_STONE); // Zone 4 Floor B\n this.testTerrain.setBlockArea( new Vector3Int(3,1,18), new Vector3Int(1,wallHeight,16), CubesTestAssets.BLOCK_WOOD); // East Wall\n this.testTerrain.setBlockArea( new Vector3Int(10,1,18), new Vector3Int(1,wallHeight,9), CubesTestAssets.BLOCK_WOOD); // West Wall\n this.testTerrain.setBlockArea( new Vector3Int(3,1,33), new Vector3Int(13,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n \n this.testTerrain.setBlockArea( new Vector3Int(1,0,5), new Vector3Int(26,1,14), CubesTestAssets.BLOCK_STONE); // Zone 5\n this.testTerrain.setBlockArea( new Vector3Int(1,1,18), new Vector3Int(26,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(1,1,5), new Vector3Int(26,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n this.testTerrain.setBlockArea( new Vector3Int(1,1,5), new Vector3Int(1,wallHeight,14), CubesTestAssets.BLOCK_WOOD); // West Wall\n this.testTerrain.setBlockArea( new Vector3Int(26,1,5), new Vector3Int(1,wallHeight,14), CubesTestAssets.BLOCK_WOOD); // East Wall\n \n this.testTerrain.removeBlockArea( new Vector3Int(4,1,18), new Vector3Int(6,wallHeight,1)); // Door E\n \n // Populate the world with spawn points\n this.initSpawnPoints();\n \n //Add voxel world/map to collisions\n testTerrain.addChunkListener(new BlockChunkListener(){\n @Override\n public void onSpatialUpdated(BlockChunkControl blockChunk){\n Geometry optimizedGeometry = blockChunk.getOptimizedGeometry_Opaque();\n phyTerrain = optimizedGeometry.getControl(RigidBodyControl.class);\n if(phyTerrain == null){\n phyTerrain = new RigidBodyControl(0);\n optimizedGeometry.addControl(phyTerrain);\n bulletAppState.getPhysicsSpace().add(phyTerrain);\n }\n phyTerrain.setCollisionShape(new MeshCollisionShape(optimizedGeometry.getMesh()));\n }\n });\n \n testNode.addControl(testTerrain);\n rootNode.attachChild(testNode);\n }", "private void enemiesWillShoot(Graphics2D g2d, GameState state) {\n if (numOfRenderShoot == 75) {\n numOfRenderShoot = 0;\n for (int i = 0; i < state.getEnemyTanks().size(); i++) {\n if (state.getEnemyTanks().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyTanks().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyTanks().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyTanks().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyMissiles().add(new EnemyMissile(this, state, 10\n , state.getEnemyTanks().get(i)));\n state.getEnemyMissiles().get(state.getEnemyMissiles().size() - 1).missileDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n for (int i = 0; i < state.getEnemyCars().size(); i++) {\n if (state.getEnemyCars().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyCars().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyCars().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyCars().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyBullets().add(new EnemyBullet(this, state, 20\n , state.getEnemyCars().get(i)));\n state.getEnemyBullets().get(state.getEnemyBullets().size() - 1).bulletDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n for (int i = 0; i < state.getEnemyWallTurrets().size(); i++) {\n if (state.getEnemyWallTurrets().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyWallTurrets().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyWallTurrets().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyWallTurrets().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyWallTurretMissiles().add(new EnemyWallTurretMissile(this, state, 15\n , state.getEnemyWallTurrets().get(i)));\n state.getEnemyWallTurretMissiles().get(state.getEnemyWallTurretMissiles().size() - 1).missileDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n\n for (int i = 0; i < state.getEnemyTurrets().size(); i++) {\n if (state.getEnemyTurrets().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyTurrets().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyTurrets().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyTurrets().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyHomingMissiles().add(new EnemyHomingMissile(this, state, 15\n , state.getEnemyTurrets().get(i)));\n state.getEnemyHomingMissiles().get(state.getEnemyHomingMissiles().size() - 1).missileDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n }\n for (EnemyMissile enemyMissile : state.getEnemyMissiles()) {\n enemyMissile.paint(g2d, state);\n }\n for (EnemyBullet enemyBullet : state.getEnemyBullets()) {\n enemyBullet.paint(g2d, state);\n }\n for (EnemyWallTurretMissile enemyWallTurretMissile : state.getEnemyWallTurretMissiles()) {\n enemyWallTurretMissile.paint(g2d, state);\n }\n for (EnemyHomingMissile enemyHomingMissile : state.getEnemyHomingMissiles()) {\n enemyHomingMissile.paint(g2d, state);\n }\n }", "private void method_974(Car var1, Move var2) {\n if(this.field_754.method_249(var1.getTeammateIndex())) {\n var2.setBrake(true);\n }\n\n if(this.field_754.method_245(var1.getTeammateIndex())) {\n var2.setEnginePower(1.0D);\n } else if(this.field_754.method_247(var1.getTeammateIndex())) {\n var2.setEnginePower(-1.0D);\n }\n\n if(this.field_754.method_251(var1.getTeammateIndex())) {\n var2.setWheelTurn(-1.0D);\n } else if(this.field_754.method_253(var1.getTeammateIndex())) {\n var2.setWheelTurn(1.0D);\n }\n\n if(this.field_754.method_255(var1.getTeammateIndex())) {\n var2.setThrowProjectile(true);\n }\n\n if(this.field_754.method_257(var1.getTeammateIndex())) {\n var2.setUseNitro(true);\n }\n\n if(this.field_754.method_259(var1.getTeammateIndex())) {\n var2.setSpillOil(true);\n }\n\n }", "private void combatPhase() {\n \t\n \tpause();\n \tDice.setFinalValMinusOne();\n\n \t// Go through each battle ground a resolve each conflict\n \tfor (Coord c : battleGrounds) {\n \t\t\n \tClickObserver.getInstance().setTerrainFlag(\"\");\n \t\n \tSystem.out.println(\"Entering battleGround\");\n \t\tfinal Terrain battleGround = Board.getTerrainWithCoord(c);\n \t\t\n \t\t// find the owner of terrain for post combat\n \tPlayer owner = battleGround.getOwner();\n \t\n \t\t// simulate a click on the first battleGround, cover all other terrains\n \t\tClickObserver.getInstance().setClickedTerrain(battleGround);\n \t\tPlatform.runLater(new Runnable() {\n @Override\n public void run() {\n \t\tClickObserver.getInstance().whenTerrainClicked();\n \t\tBoard.applyCovers();\n \t\tClickObserver.getInstance().getClickedTerrain().uncover();\n \tClickObserver.getInstance().setTerrainFlag(\"Disabled\");\n }\n });\n \t\t\n \t\t// Get the fort\n \t Fort battleFort = battleGround.getFort(); \n \t\t\n \t\t// List of players to battle in the terrain\n \t\tArrayList<Player> combatants = new ArrayList<Player>();\n \t\t\n \t\t// List of pieces that can attack (including forts, city/village)\n \t\tHashMap<String, ArrayList<Piece>> attackingPieces = new HashMap<String, ArrayList<Piece>>();\n \t\t\n \t\tSystem.out.println(battleGround.getContents().keySet());\n \t\t\n \t\tIterator<String> keySetIterator = battleGround.getContents().keySet().iterator();\n\t \twhile(keySetIterator.hasNext()) {\n\t \t\tString key = keySetIterator.next();\n\t \t\t\n \t\t\tcombatants.add(battleGround.getContents().get(key).getOwner());\n \t\t\tattackingPieces.put(battleGround.getContents().get(key).getOwner().getName(), (ArrayList<Piece>) battleGround.getContents().get(key).getStack().clone()); \n \t\t\t\n\t \t}\n\t \t\n\t \t\n\t \t\n\t \t// if the owner of the terrain has no pieces, just a fort or city/village\n\t\t\tif (!combatants.contains(battleGround.getOwner()) && battleFort != null) {\n\t\t\t\tcombatants.add(battleGround.getOwner());\n\t\t\t\tattackingPieces.put(battleGround.getOwner().getName(), new ArrayList<Piece>());\n\t\t\t}\n\n \t\t// add forts and city/village to attackingPieces\n \t\tif (battleFort != null) {\n \t\t\tattackingPieces.get(battleGround.getOwner().getName()).add(battleFort);\n \t\t}\n \t\t\n \t\tkeySetIterator = attackingPieces.keySet().iterator();\n\t \twhile (keySetIterator.hasNext()) {\n\t \t\tString key = keySetIterator.next();\n\t \t\t\n\t \t\tfor (Piece p : attackingPieces.get(key)) {\n\t \t\t\tif (p.getName().equals(\"Baron Munchhausen\") || p.getName().equals(\"Grand Duke\")) {\n\t \t\t\t\tif (p.getOwner() != battleGround.getOwner())\n\t \t\t\t\t\t((Performable)p).specialAbility();\n\t \t\t\t}\n\t \t\t\t\t\n\t \t\t}\n\t \t}\n \t\t// TODO implement city/village\n// \t\tif (City and village stuff here)\n \t\tSystem.out.println(combatants);\n \t\t\n \t\tboolean exploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t// Fight until all attackers are dead, or until the attacker becomes the owner of the hex\n \t\twhile (combatants.size() > 1 || exploring) {\n \t\t\t\n /////////////Exploration\n \t// Check if this is an exploration battle:\n \t\t// Must fight other players first\n \t\t\tboolean fightingWildThings = false;\n \tif (exploring) {\n\n \t\t\t\t// Set the battleGround explored\n \t\t\t\tbattleGround.setExplored(true);\n \t\n \t\tString exploringPlayer = null;\n \t\tIterator<String> keySetIter = battleGround.getContents().keySet().iterator();\n \t \twhile(keySetIter.hasNext()) {\n \t \t\tString key = keySetIter.next();\n \t \t\texploringPlayer = key;\n \t \t}\n \t\tplayer = battleGround.getContents(exploringPlayer).getOwner();\n \t\tplayer.flipAllUp();\n \t \t\n \t\t// Get user to roll die to see if explored right away\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \tDiceGUI.getInstance().uncover();\n \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n \t \t\t\t+ \", roll the die. You need a 1 or a 6 to explore this terrain without a fight!\");\n \t }\n \t\t\t\t});\n \t\t\t\t\n \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n \t\t\t\tint luckyExplore = -1;\n \t\t\t\twhile (luckyExplore == -1) {\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\tluckyExplore = Dice.getFinalVal();\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// If success TODO FIX this \n \t\t\t\tif (luckyExplore == 1 || luckyExplore == 6) {\n \t\t\t\t\t\n \t\t\t\t\t// Cover die. Display msg\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t @Override\n \t\t public void run() {\n \t\t \tDiceGUI.getInstance().cover();\n \t\t \tGUI.getHelpText().setText(\"Attack phase: Congrats!\" + player.getName() \n \t\t \t\t\t+ \"!, You get the terrain!\");\n \t\t }\n \t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\texploring = false;\n \t\t\t\t\tbreak;\n \t\t\t\t\t\n \t\t\t\t} else { // Else failure. Must fight or bribe\n \t\t\t\t\t\n \t\t\t\t\tfightingWildThings = true;\n \t\t\t\t\t\n \t\t\t\t\t// Cover die. Display msg\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t @Override\n \t\t public void run() {\n \t\t \tDiceGUI.getInstance().cover();\n \t\t \tbattleGround.coverPieces();\n \t\t \tGUI.getHelpText().setText(\"Attack phase: Boooo!\" + player.getName() \n \t\t \t\t\t+ \"!, You have to bribe, or fight for your right to explore!\");\n \t\t }\n \t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\t\n \t\t\t\t\t// add luckyExplore amount of pieces to terrain under wildThing player\n \t\t\t\t\tfinal ArrayList<Piece> wildPieces = TheCup.getInstance().draw(luckyExplore);\n \t\t\t\t\t\t\n \t\t\t\t\t// Update the infopanel with played pieces. Active done button\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t @Override\n \t\t public void run() {\n \t\t \twildThings.playWildPieces(wildPieces, battleGround);\n \t\t GUI.getDoneButton().setDisable(false);\n \t\t battleGround.coverPieces();\n \t\t \tInfoPanel.showTileInfo(battleGround);\n \t\t \n \t\t }\n \t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\n \t\t\t\t\t//////Bribing here\n \t\t\t\t\tpause();\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectCreatureToBribe\");\n \t\t\t\t\t\n \t\t\t\t\t// Uncover the pieces that the player can afford to bribe\n \t\t\t\t\t// canPay is false if there are no Pieces that the user can afford to bribe\n \t\t\t\t\tboolean canPay = false;\n \t\t\t\t\tfor (final Piece p : battleGround.getContents(wildThings.getName()).getStack()) {\n \t\t\t\t\t\tif (((Combatable)p).getCombatValue() <= player.getGold()) {\n \t\t\t\t\t\t\tcanPay = true;\n \t\t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t\t\t @Override\n \t\t\t\t public void run() {\n \t\t\t\t \tp.uncover();\n \t\t\t\t }\n \t\t\t\t\t\t\t});\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\ttry { Thread.sleep(50); } catch( Exception e ){ return; }\n \t\t\t\t\t\n \t\t\t\t\t// Continue looping until there are no more pieces user can afford to bribe, or user hits done button\n \t\t\t\t\twhile (canPay && isPaused) {\n \t\t\t\t\t\t\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t\t @Override\n\t \t\t public void run() {\n\t \t\t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n\t \t\t \t\t\t+ \", Click on creatures you would like to bribe\");\n\t \t\t }\n \t\t\t\t\t\t});\n \t\t\t\t\t\t\n \t\t\t\t\t\t// wait for user to hit done, or select a piece\n \t\t\t\t\t\tpieceClicked = null;\n \t\t\t\t\t\twhile(pieceClicked == null && isPaused) {\n \t\t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\t}\n \t\t\t\t\t\tif (pieceClicked != null) {\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// spend gold for bribing. Remove clicked creature\n \t\t\t\t\t\t\tplayer.spendGold(((Combatable)pieceClicked).getCombatValue());\n \t\t\t\t\t\t\t((Combatable)pieceClicked).inflict();\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// cover pieces that are too expensive\n \t\t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t\t\t @Override\n \t\t\t\t public void run() {\n \t\t\t\t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n \t\t\t \t\t\t+ \" bribed \" + pieceClicked.getName());\n \t\t\t\t \tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t \tif (battleGround.getContents(wildThings.getName()) != null) {\n\t \t\t\t\t for (Piece p : battleGround.getContents(wildThings.getName()).getStack()) {\n\t \t\t\t\t \tif (((Combatable)p).getCombatValue() > player.getGold())\n\t \t\t\t\t \t\tp.cover();\n\t \t\t\t\t }\n \t\t\t\t \t}\n \t\t\t\t }\n \t\t\t\t\t\t\t});\n \t\t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// Check if there are any pieces user can afford to bribe and set canPay to true if so\n \t\t\t\t\t\t\tcanPay = false;\n \t\t\t\t\t\t\tif (battleGround.getContents(wildThings.getName()) == null || battleGround.getContents(wildThings.getName()).getStack().size() == 1)\n \t\t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\t\telse {\n\t \t\t\t\t\t\t\tfor (final Piece p : battleGround.getContents(wildThings.getName()).getStack()) {\n\t \t\t\t\t\t\t\t\tif (((Combatable)p).getCombatValue() <= player.getGold()) {\n\t \t\t\t\t\t\t\t\t\tcanPay = true;\n\t \t\t\t\t\t\t\t\t\tbreak;\n\t \t\t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t @Override\n\t\t\t public void run() {\n\t\t\t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n\t\t \t\t\t+ \" done bribing\");\n\t\t\t }\n \t\t\t\t\t});\n \t\t\t\t\tSystem.out.println(\"Made it past bribing\");\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\t\n \t\t\t\t\t// Done bribing, on to fighting\n \t\t\t\t\t\n \t\t\t\t\t// find another player to control wildThings and move on to regular combat\n \t\t\t\t\t// to be used later \n \t\t\t\t\tPlayer explorer = player;\n \t\t\t\t\tPlayer wildThingsController = null;\n \t\t\t\t\tfor (Player p : playerList) {\n \t\t\t\t\t\tif (!p.getName().equals(player.getName()))\n \t\t\t\t\t\t\twildThingsController = p;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// If wild things still has pieces left:\n \t\t\t\t\tif (battleGround.getContents().containsKey(wildThings.getName())) {\n\t \t\t\t\t\tcombatants.add(battleGround.getContents().get(wildThings.getName()).getOwner());\n\t \t \t\t\tattackingPieces.put(wildThings.getName(), (ArrayList<Piece>) battleGround.getContents().get(wildThings.getName()).getStack().clone()); \n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// cover pieces again\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \tbattleGround.coverPieces();\n \t }\n \t\t\t\t});\n \t\t\t\t\n \t\t\t\tplayer.flipAllDown();\n \t} // end if (exploring)\n \t\t\t\n \t\t\tSystem.out.println(\"combatants.size() > 1 : \" + combatants.size());\n \t\t\tSystem.out.println(combatants);\n \t\t\t\n \t\t\t// This hashMap keeps track of the player to attack for each player\n \t\t\tHashMap<String, Player> toAttacks = new HashMap<String, Player>();\n\n\t\t\t\t// each player selects which other player to attack in case of more than two combatants\n \t\t\tif (combatants.size() > 2) {\n \t\t\t\t\n \t\t\t\tfor (final Player p : combatants) {\n \t\t\t\t\tif (!p.isWildThing()) {\n\t \t \t\tpause();\n\t \t \t\tClickObserver.getInstance().setPlayerFlag(\"Attacking: SelectPlayerToAttack\");\n\t \t \t\tplayer = p;\n\t\t \tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t \tPlayerBoard.getInstance().applyCovers();\n\t\t \t \tbattleGround.coverPieces();\n\t\t \t \t GUI.getHelpText().setText(\"Attack phase: \" + player.getName()\n\t\t \t + \", select which player to attack\");\n\t\t\t \t \t}\n\t\t \t });\n\t\t \tfor (final Player pl : combatants) {\n\t\t \t\tif (!pl.getName().equals(player.getName())) {\n\t\t \t\t\tPlatform.runLater(new Runnable() {\n\t\t \t \t @Override\n\t\t \t \t public void run() {\n\t\t \t \t \tPlayerBoard.getInstance().uncover(pl);\n\t\t \t \t }\n\t\t \t\t\t});\n\t\t \t\t}\n\t\t \t}\n\t\t \twhile (isPaused) {\n\t\t \ttry { Thread.sleep(100); } catch( Exception e ){ return; } \n\t\t \t }\n\t\t \t\n\t\t \t// ClickObserver sets playerClicked, then unpauses. This stores what player is attacking what player\n\t\t \ttoAttacks.put(p.getName(), playerClicked);\n\t \t \t\tClickObserver.getInstance().setPlayerFlag(\"\");\n\t\t \t\n\t \t \t} \n \t\t\t\t}\n \t\t\t\tcombatants.remove(wildThings);\n \t\t\t\tPlayerBoard.getInstance().removeCovers();\n \t\t\t\t\n \t } else { // Only two players fighting\n \t \t\n \t \tfor (Player p1 : combatants) {\n \t \t\tfor (Player p2 : combatants) {\n \t \t\t\tif (!p1.getName().equals(p2.getName())) {\n \t \t \ttoAttacks.put(p1.getName(), p2);\n \t \t\t\t}\n \t \t\t}\n \t \t}\n \t }\n \t\t\t\n ///////////////////Call out bluffs here:\n \t\t\tbattleGround.flipPiecesUp();\n \t\t\tfor (final Player p : combatants) {\n \t\t\t\t\n \t\t\t\t// Make sure not wildThings\n \t\t\t\tif (!p.isWildThing()) {\n \t\t\t\t\t\n \t\t\t\t\tArrayList <Piece> callOuts = new ArrayList<Piece>();\n \t\t\t\t\t\n \t\t\t\t\tfor (final Piece ap : attackingPieces.get(p.getName())) {\n \t\t\t\t\t\t\n \t\t\t\t\t\t// If not supported the gtfo\n \t\t\t\t\t\tif (!ap.isSupported()) {\n\n \t\t\t\t\t\t\tcallOuts.add(ap);\n \t\t\t\t\t\t\t((Combatable)ap).inflict();\n \t\t\t\t\t\t\ttry { Thread.sleep(250); } catch( Exception e ){ return; } \n \t\t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t \t @Override\n\t \t \t public void run() {\n\t \t \t \tInfoPanel.showTileInfo(battleGround);\n\t \t \t \tGUI.getHelpText().setText(\"Attack phase: \" + p.getName()\n\t\t\t \t + \" lost their \" + ap.getName() + \" in a called bluff!\");\n\t \t \t }\n\t \t\t\t});\n \t\t\t\t\t\t\ttry { Thread.sleep(250); } catch( Exception e ){ return; } \n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\tfor (Piece co : callOuts) {\n \t\t\t\t\t\tattackingPieces.get(p.getName()).remove(co);\n \t\t\t\t\t}\n\t\t\t\t\t\tif (attackingPieces.get(p.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(p.getName());\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n \t\t\tPlayer baby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\t// Set up this HashMap that will store successful attacking pieces\n \t\t\tHashMap<String, ArrayList<Piece>> successAttacks = new HashMap<String, ArrayList<Piece>>();\n \t\t\t// Set up this HashMap that will store piece marked to get damage inflicted\n\t\t\t\tHashMap<String, ArrayList<Piece>> toInflict = new HashMap<String, ArrayList<Piece>>();\n \t\t\tfor (Player p : combatants) {\n \t\t\t\t\n \t\t\t\tsuccessAttacks.put(p.getName(), new ArrayList<Piece>());\n \t\t\t\ttoInflict.put(p.getName(), new ArrayList<Piece>());\n \t\t\t}\n \t\t\t\n \t\t\t// Array List of pieces that need to be used during a particular phase\n\t\t\t\tfinal ArrayList<Piece> phaseThings = new ArrayList<Piece>();\n\t\t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Magic!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t\n/////////////////////// Magic phase\n \t\t\tfor (final Player pl : combatants) {\n \t\t\t\t\n \t\t\t\tplayer = pl;\n \t\t\t\t// Cover all pieces\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \t\tbattleGround.coverPieces();\n \t }\n \t });\n \t\t\t\t\n \t\t\t\t// For each piece, if its magic. Add it to the phaseThings array\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) {\n \t\t\t\t\tif (p instanceof Combatable && ((Combatable)p).isMagic() && !(p instanceof Fort && ((Fort)p).getCombatValue() == 0)) \n \t\t\t\t\t\tphaseThings.add(p);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// uncover magic pieces for clicking\n \t\t\t\tif (phaseThings.size() > 0) {\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \t\t\t\tfor (Piece mag : phaseThings) \n\t \t\t\t\t\tmag.uncover();\n\t \t }\n\t \t });\n \t\t\t\t}\n\n\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"----------------------------------------------------------------\");\n\t\t\t\t\tSystem.out.println(\"attackingPieces.size(): \" + attackingPieces.size());\n\t\t\t\t\tSystem.out.println(\"attackingPieces.keySet(): \" + attackingPieces.keySet());\n\t\t\t\t\tIterator<String> keySetIte = battleGround.getContents().keySet().iterator();\n \t \twhile(keySetIte.hasNext()) {\n \t \t\tString key = keySetIte.next();\n\n \t\t\t\t\tSystem.out.println(\"key: \" + key);\n \t\t\t\t\tSystem.out.println(\"attackingPieces.get(key).size():\\n\" + attackingPieces.get(key).size());\n \t\t\t\t\tSystem.out.println(\"attackingPieces.get(key):\\n\" + attackingPieces.get(key));\n \t \t}\n\t\t\t\t\tSystem.out.println(\"----------------------------------------------------------------\");\n\t\t\t\t\t\n \t\t\t\t// Have user select a piece to attack with until there are no more magic pieces\n \t\t\t\twhile (phaseThings.size() > 0) {\n \t\t\t\t\t\n \t\t\t\t\t// Display message prompting user to select a magic piece\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", select a magic piece to attack with\");\n\t \t }\n\t \t });\n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t// Wait for user to select piece\n \t\t\t\tpieceClicked = null;\n \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t \t\t\t\t\n\t \t\t\t\t// hightlight piece that was selected, uncover the die to use, display message about rolling die\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tpieceClicked.highLight();\n\t \t \tDiceGUI.getInstance().uncover();\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n\t \t \t\t\t+ \", roll the die. You need a \" + ((Combatable)pieceClicked).getCombatValue() + \" or lower\");\n\t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\n\t \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n \t\t\t\t\tint attackStrength = -1;\n \t\t\t\t\twhile (attackStrength == -1) {\n \t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\tattackStrength = Dice.getFinalVal();\n \t\t\t\t\t}\n\t\t\t\t\t\t\n \t\t\t\t\t// If the roll was successful. Add to successfulThings Array, and change it image. prompt Failed attack\n \t\t\t\t\tif (attackStrength <= ((Combatable)pieceClicked).getCombatValue()) {\n \t\t\t\t\t\t\n \t\t\t\t\t\tsuccessAttacks.get(player.getName()).add(pieceClicked);\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t \t @Override\n \t \t public void run() {\n \t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(true);\n \t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n \t \t \tGUI.getHelpText().setText(\"Attack phase: Successful Attack!\");\n \t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\t\n \t\t\t\t\t} else { // else failed attack, update image, prompt Failed attack\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(false);\n\t\t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t\t \t \tGUI.getHelpText().setText(\"Attack phase: Failed Attack!\");\n\t\t \t }\n\t \t\t\t\t\t});\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Pause to a second for easy game play, remove the clicked piece from phaseThings\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\tphaseThings.remove(pieceClicked);\n \t\t\t\t}\n \t\t\t}\n\n\t\t\t\t// For each piece that had success, player who is being attacked must choose a piece\n \t\t\t// Gets tricky here. Will be tough for Networking :(\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Active player is set to the player who 'pl' is attack based on toAttack HashMap\n \t\t\t\tplayer = toAttacks.get(pl.getName()); // 'defender'\n \t\t\t\tfinal String plName = pl.getName();\n \t\t\t\t\n \t\t\t\t// For each piece of pl's that has a success (in successAttacks)\n \t\t\t\tint i = 0;\n \t\t\t\tfor (final Piece p : successAttacks.get(plName)) {\n\n \t\t\t\t\t// If there are more successful attacks then pieces to attack, break after using enough attacks\n \t\t\t\t\tif (i >= attackingPieces.get(player.getName()).size()) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Display message, cover other players pieces, uncover active players pieces\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", Select a Piece to take a hit from \" + plName + \"'s \" + p.getName());\n\t \t \tbattleGround.coverPieces();\n\t \t \tbattleGround.uncoverPieces(player.getName());\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\n\t \t\t\t\t// Cover pieces already choosen to be inflicted. Wait to make sure runLater covers pieces already selected\n\t \t\t\t\tfor (final Piece pi : toInflict.get(player.getName())) {\n\t \t\t\t\t\tif (!((pi instanceof Fort) && ((Fort)pi).getCombatValue() > 0)) {\n\t\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t\t \t\t\t\t\tpi.cover();\n\t\t\t \t }\n\t\t\t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t}//TODO here is where a pause might be needed\n\t \t\t\t\t\n\t \t\t\t\t// Wait for user to select piece\n \t\t\t\t\tpieceClicked = null;\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToGetHit\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToGetHit\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t\t \t\t\t\n \t\t\t\t\t// Add to arrayList in HashMap of player to mark for future inflict. Cover pieces\n \t\t\t\t\ttoInflict.get(player.getName()).add(pieceClicked);\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tbattleGround.coverPieces();\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ti++;\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\t\n \t\t\t\t}\n \t\t\t\t// Clear successful attacks for next phase\n \t\t\t\tsuccessAttacks.get(pl.getName()).clear();\n \t\t\t}\n \t\t\t\n \t\t\t// Remove little success and failure images, inflict if necessary\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Change piece image of success or failure to not visible\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) \n \t\t\t\t\t((Combatable)p).resetAttack();\n \t\t\t\t\n\t\t\t\t\t// inflict return true if the piece is dead, and removes it from attackingPieces if so\n \t\t\t\t// Inflict is also responsible for removing from the CreatureStack\n \t\t\t\tfor (Piece p : toInflict.get(pl.getName())) {\n\t\t\t\t\t\tif (((Combatable)p).inflict()) \n\t\t\t\t\t\t\tattackingPieces.get(pl.getName()).remove(p);\n\t\t\t\t\t\tif (attackingPieces.get(pl.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(pl.getName());\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Clear toInflict for next phase\n \t\t\t\ttoInflict.get(pl.getName()).clear();\n \t\t\t}\n\n\t\t\t\t// Update the InfoPanel gui for changed/removed pieces\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n \t\t\t\t\tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t\tbattleGround.coverPieces();\n\t }\n\t\t\t\t});\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n \t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \t\tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Ranged!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n//////////////////// Ranged phase\n\t\t\t\tfor (final Player pl : combatants) {\n \t\t\t\t\n \t\t\t\tplayer = pl;\n \t\t\t\t// Cover all pieces\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \t\tbattleGround.coverPieces();\n \t }\n \t });\n \t\t\t\t\n \t\t\t\t// For each piece, if its ranged. Add it to the phaseThings array\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) {\n \t\t\t\t\tif (p instanceof Combatable && ((Combatable)p).isRanged() && !(p instanceof Fort && ((Fort)p).getCombatValue() == 0)) \n \t\t\t\t\t\tphaseThings.add(p);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// uncover ranged pieces for clicking\n \t\t\t\tif (phaseThings.size() > 0) {\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \t\t\t\tfor (Piece ran : phaseThings) \n\t \t\t\t\t\tran.uncover();\n\t \t }\n\t \t });\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Have user select a piece to attack with until there are no more ranged pieces\n \t\t\t\twhile (phaseThings.size() > 0) {\n \t\t\t\t\t\n \t\t\t\t\t// Display message prompting user to select a ranged piece\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", select a ranged piece to attack with\");\n\t \t }\n\t \t });\n\n \t\t\t\t\t// Wait for user to select piece\n \t\t\t\tpieceClicked = null;\n \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t \t\t\t\t\n\t \t\t\t\t// hightlight piece that was selected, uncover the die to use, display message about rolling die\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tpieceClicked.highLight();\n\t \t \tDiceGUI.getInstance().uncover();\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName()\n\t \t + \", roll the die. You need a \" + ((Combatable)pieceClicked).getCombatValue() + \" or lower\");\n\t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\n\t \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n \t\t\t\t\tint attackStrength = -1;\n \t\t\t\t\twhile (attackStrength == -1) {\n \t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\tattackStrength = Dice.getFinalVal();\n \t\t\t\t\t}\n\t\t\t\t\t\t\n \t\t\t\t\t// If the roll was successful. Add to successfulThings Array, and change it image. prompt Failed attack\n \t\t\t\t\tif (attackStrength <= ((Combatable)pieceClicked).getCombatValue()) {\n \t\t\t\t\t\t\n \t\t\t\t\t\tsuccessAttacks.get(player.getName()).add(pieceClicked);\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t \t @Override\n \t \t public void run() {\n \t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(true);\n \t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n \t \t \tGUI.getHelpText().setText(\"Attack phase: Successful Attack!\");\n \t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\t\n \t\t\t\t\t} else { // else failed attack, update image, prompt Failed attack\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(false);\n\t\t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t\t \t \tGUI.getHelpText().setText(\"Attack phase: Failed Attack!\");\n\t\t \t }\n\t \t\t\t\t\t});\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Pause to a second for easy game play, remove the clicked piece from phaseThings\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\tphaseThings.remove(pieceClicked);\n \t\t\t\t}\n \t\t\t}\n\n\t\t\t\t// For each piece that had success, player who is being attacked must choose a piece\n \t\t\t// Gets tricky here. Will be tough for Networking :(\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Active player is set to the player who 'pl' is attack based on toAttack HashMap\n \t\t\t\tplayer = toAttacks.get(pl.getName());\n \t\t\t\tfinal String plName = pl.getName();\n \t\t\t\t\n \t\t\t\t// For each piece of pl's that has a success (in successAttacks)\n \t\t\t\tint i = 0;\n \t\t\t\tfor (final Piece p : successAttacks.get(plName)) {\n\n \t\t\t\t\t// If there are more successful attacks then pieces to attack, break after using enough attacks\n \t\t\t\t\tif (i >= attackingPieces.get(player.getName()).size()) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Display message, cover other players pieces, uncover active players pieces\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", Select a Piece to take a hit from \" + plName + \"'s \" + p.getName());\n\t \t \tbattleGround.coverPieces();\n\t \t \tbattleGround.uncoverPieces(player.getName());\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\t\n\t \t\t\t\t// Cover pieces already choosen to be inflicted. Wait to make sure runLater covers pieces already selected\n\t \t\t\t\tfor (final Piece pi : toInflict.get(player.getName())) {\n\t \t\t\t\t\tif (!((pi instanceof Fort) && ((Fort)pi).getCombatValue() > 0)) {\n\t\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t\t \t\t\t\t\tpi.cover();\n\t\t\t \t }\n\t\t\t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t}//TODO here is where a pause might be needed\n\t \t\t\t\t\n\t \t\t\t\t// Wait for user to select piece\n \t\t\t\t\tpieceClicked = null;\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToGetHit\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToGetHit\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n \t\t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t\t \t\t\t\n \t\t\t\t\t// Add to arrayList in HashMap of player to mark for future inflict. Cover pieces\n \t\t\t\t\ttoInflict.get(player.getName()).add(pieceClicked);\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tbattleGround.coverPieces();\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\ti++;\n \t\t\t\t}\n \t\t\t\t// Clear successful attacks for next phase\n \t\t\t\tsuccessAttacks.get(pl.getName()).clear();\n \t\t\t}\n \t\t\t\n \t\t\t// Remove little success and failure images, inflict if necessary\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Change piece image of success or failure to not visible\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) \n \t\t\t\t\t((Combatable)p).resetAttack();\n \t\t\t\t\n\t\t\t\t\t// inflict return true if the piece is dead, and removes it from attackingPieces if so\n \t\t\t\t// Inflict is also responsible for removing from the CreatureStack\n \t\t\t\tfor (Piece p : toInflict.get(pl.getName())) {\n\t\t\t\t\t\tif (((Combatable)p).inflict()) \n\t\t\t\t\t\t\tattackingPieces.get(pl.getName()).remove(p);\n\t\t\t\t\t\tif (attackingPieces.get(pl.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(pl.getName());\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Clear toInflict for next phase\n \t\t\t\ttoInflict.get(pl.getName()).clear();\n \t\t\t}\n\n\t\t\t\t// Update the InfoPanel gui for changed/removed pieces\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n \t\t\t\t\tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t\tbattleGround.coverPieces();\n\t }\n\t\t\t\t});\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n\t\t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \t\tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Melee!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t\n\n///////////////////////////// Melee phase\n\t\t\t\tfor (final Player pl : combatants) {\n \t\t\t\t\n \t\t\t\tplayer = pl;\n \t\t\t\t// Cover all pieces\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \t\tbattleGround.coverPieces();\n \t }\n \t });\n \t\t\t\t\n \t\t\t\t// For each piece, if its melee. Add it to the phaseThings array\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) {\n \t\t\t\t\tif (p instanceof Combatable && !(((Combatable)p).isRanged() || ((Combatable)p).isMagic()) && !(p instanceof Fort && ((Fort)p).getCombatValue() == 0)) \n \t\t\t\t\t\tphaseThings.add(p);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// uncover melee pieces for clicking\n \t\t\t\tif (phaseThings.size() > 0) {\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \t\t\t\tfor (Piece mel : phaseThings) \n\t \t\t\t\t\tmel.uncover();\n\t \t }\n\t \t });\n \t\t\t\t}\n \t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\n \t\t\t\t// Have user select a piece to attack with until there are no more melee pieces\n \t\t\t\twhile (phaseThings.size() > 0) {\n \t\t\t\t\t\n \t\t\t\t\t// Display message prompting user to select a melee piece\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", select a melee piece to attack with\");\n\t \t }\n\t \t });\n\n \t\t\t\t\t// Wait for user to select piece\n \t\t\t\tpieceClicked = null;\n \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t \t\t\t\t\n\t \t\t\t\t// Is it a charging piece?\n\t \t\t\t\tint charger;\n\t \t\t\t\tif (((Combatable)pieceClicked).isCharging()) {\n\t \t\t\t\t\tcharger = 2;\n\t \t\t\t\t} else\n\t \t\t\t\t\tcharger = 1;\n\t \t\t\t\t\n\t \t\t\t\t// do twice if piece is a charger\n\t \t\t\t\tfor (int i = 0; i < charger; i++) {\n\t \t\t\t\t\t\n\t\t \t\t\t\t// hightlight piece that was selected, uncover the die to use, display message about rolling die\n\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t \tpieceClicked.highLight();\n\t\t \t \tDiceGUI.getInstance().uncover();\n\t\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName()\n\t\t \t + \", roll the die. You need a \" + ((Combatable)pieceClicked).getCombatValue() + \" or lower\");\n\t\t \t }\n\t \t\t\t\t\t});\n\t \t\t\t\t\t\n\t\t \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n\t \t\t\t\t\tint attackStrength = -1;\n\t \t\t\t\t\twhile (attackStrength == -1) {\n\t \t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\t\t\tattackStrength = Dice.getFinalVal();\n\t \t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t \t\t\t\t\t// If the roll was successful. Add to successfulThings Array, and change it image. prompt Failed attack\n\t \t\t\t\t\tif (attackStrength <= ((Combatable)pieceClicked).getCombatValue()) {\n\t \t\t\t\t\t\t\n\t \t\t\t\t\t\tsuccessAttacks.get(player.getName()).add(pieceClicked);\n\t \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t \t @Override\n\t \t \t public void run() {\n\t \t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(true);\n\t \t \t\t\t\t\t\tpieceClicked.cover();\n\t \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t \t \t \tGUI.getHelpText().setText(\"Attack phase: Successful Attack!\");\n\t \t \t }\n\t \t\t\t\t\t});\n\t \t\t\t\t\t\t\n\t \t\t\t\t\t} else { // else failed attack, update image, prompt Failed attack\n\t \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(false);\n\t\t\t \t\t\t\t\t\tpieceClicked.cover();\n\t \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t\t\t \t \tGUI.getHelpText().setText(\"Attack phase: Failed Attack!\");\n\t\t\t \t }\n\t\t \t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t\t\n\t \t\t\t\t\t// If piece is charging, and it is its first attack, remove the cover again\n\t \t\t\t\t\tif (((Combatable)pieceClicked).isCharging() && i == 0) {\n\t \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t \t \tpieceClicked.uncover();\n\t\t\t \t }\n\t \t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t\t\n\t \t\t\t\t\t// Pause to a second for easy game play, remove the clicked piece from phaseThings\n\t \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n\t \t\t\t\t}\n\n \t\t\t\t\tphaseThings.remove(pieceClicked);\n \t\t\t\t}\n \t\t\t}\n\n\t\t\t\t// For each piece that had success, player who is being attacked must choose a piece\n \t\t\t// Gets tricky here. Will be tough for Networking :(\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Active player is set to the player who 'pl' is attack based on toAttack HashMap\n \t\t\t\tplayer = toAttacks.get(pl.getName());\n \t\t\t\tfinal String plName = pl.getName();\n \t\t\t\t\n \t\t\t\t// For each piece of pl's that has a success (in successAttacks)\n \t\t\t\tint i = 0;\n \t\t\t\tfor (final Piece p : successAttacks.get(plName)) {\n \t\t\t\t\t\n \t\t\t\t\t// If there are more successful attacks then pieces to attack, break after using enough attacks\n \t\t\t\t\tif (i >= attackingPieces.get(player.getName()).size()) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Display message, cover other players pieces, uncover active players pieces\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", Select a Piece to take a hit from \" + plName + \"'s \" + p.getName());\n\t \t \tbattleGround.coverPieces();\n\t \t \tbattleGround.uncoverPieces(player.getName());\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\t\n\t \t\t\t\t// Cover pieces already choosen to be inflicted. Wait to make sure runLater covers pieces already selected\n\t \t\t\t\tfor (final Piece pi : toInflict.get(player.getName())) {\n\t \t\t\t\t\tif (!((pi instanceof Fort) && ((Fort)pi).getCombatValue() > 0)) {\n\t\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t\t \t\t\t\t\tpi.cover();\n\t\t\t \t }\n\t\t\t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t}//TODO here is where a pause might be needed\n\t \t\t\t\t\n\t \t\t\t\t// Wait for user to select piece\n \t\t\t\t\tpieceClicked = null;\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToGetHit\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToGetHit\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n \t\t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t\t \t\t\t\n \t\t\t\t\t// Add to arrayList in HashMap of player to mark for future inflict. Cover pieces\n \t\t\t\t\ttoInflict.get(player.getName()).add(pieceClicked);\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tbattleGround.coverPieces();\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\ti++;\n \t\t\t\t}\n \t\t\t\t// Clear successful attacks for next phase\n \t\t\t\tsuccessAttacks.get(pl.getName()).clear();\n \t\t\t}\n \t\t\t\n \t\t\t// Remove little success and failure images, inflict if necessary\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Change piece image of success or failure to not visible\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) \n \t\t\t\t\t((Combatable)p).resetAttack();\n \t\t\t\t\n\t\t\t\t\t// inflict return true if the piece is dead, and removes it from attackingPieces if so\n \t\t\t\t// Inflict is also responsible for removing from the CreatureStack\n \t\t\t\tfor (Piece p : toInflict.get(pl.getName())) {\n\t\t\t\t\t\tif (((Combatable)p).inflict()) \n\t\t\t\t\t\t\tattackingPieces.get(pl.getName()).remove(p);\n\t\t\t\t\t\tif (attackingPieces.get(pl.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(pl.getName());\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Clear toInflict for next phase\n \t\t\t\ttoInflict.get(pl.getName()).clear();\n \t\t\t}\n\n\t\t\t\t// Update the InfoPanel gui for changed/removed pieces\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n \t\t\t\t\tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t\tbattleGround.coverPieces();\n\t }\n\t\t\t\t});\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n\t\t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \t\tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Retreat!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n \t\t\t\n \t\t\t\n//////////////////////// Retreat phase\n\t\t\t\t// Can only retreat to a Terrain that has been explored and has no ememies on it\n\t\t\t\t\n\t\t\t\t// Display message, activate done button\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tGUI.getHelpText().setText(\"Attack phase: Retreat some of your armies?\");\n\t\t GUI.getDoneButton().setDisable(false);\n\t }\n\t }); \t\t\t\t\n\t\t\t\t\n\t\t\t\t// For each combatant, ask if they would like to retreat\n\t\t for (Player pl : combatants) {\n\t\t \t\n\t\t \t// Make sure wildThings aren't trying to get away\n\t\t \tif (!pl.isWildThing()) {\n\t\t\t \tplayer = pl;\n\t \t InfoPanel.uncover(player.getName());\n\t\t\t\t ClickObserver.getInstance().setActivePlayer(player);\n\t\t\t\t ClickObserver.getInstance().setCreatureFlag(\"Combat: SelectRetreaters\");\n\t\t\t\t \n\t\t\t\t // Pause and wait for player to hit done button\n\t\t\t\t pause();\n\t\t\t Platform.runLater(new Runnable() {\n\t\t\t @Override\n\t\t\t public void run() {\n\t\t\t \tbattleGround.coverPieces();\n\t\t\t \tbattleGround.uncoverPieces(player.getName());\n\t\t\t \tbattleGround.coverFort();\n\t\t\t \t GUI.getHelpText().setText(\"Attack Phase: \" + player.getName() + \", You can retreat your armies\");\n\t\t\t }\n\t\t\t });\n\t\t\t\t while (isPaused && battleGround.getContents(player.getName()) != null) {\n\t\t\t \ttry { Thread.sleep(100); } catch( Exception e ){ return; } \n\t\t\t\t }\t \n\t\t\t\t ClickObserver.getInstance().setTerrainFlag(\"Disabled\");\n\t\t\t\t \n\t\t\t\t // TODO, maybe an if block here asking user if they would like to attack \n\t\t\t\t System.out.println(attackingPieces + \"---BEFORE CLEARING\");\n\t\t\t\t // Re-populate attackingPieces to check for changes\n\t\t\t\t attackingPieces.clear();\n\t\t\t\t Iterator<String> keySetIterator2 = battleGround.getContents().keySet().iterator();\n\t\t\t\t \twhile(keySetIterator2.hasNext()) {\n\t\t\t\t \t\tString key = keySetIterator2.next();\n System.out.println(key + \"=====key\");\n\t\t\t \t\t\tattackingPieces.put(battleGround.getContents().get(key).getOwner().getName(), (ArrayList<Piece>) battleGround.getContents().get(key).getStack().clone()); \n\t\t\t\t \t}\n // System.out.println(attackingPieces);\n\t\t\t\t \t// if the owner of the terrain has no pieces, just a fort or city/village\n System.out.println(\"===battleground\"+battleGround);\n System.out.println(\"===attackingPieces\"+attackingPieces);\n System.out.println(combatants.contains(battleGround.getOwner()) ? \"TRUE\" : \"FALSE\");\n\t\t\t\t\t\tif (combatants.contains(battleGround.getOwner()) && battleFort != null) {\n System.out.println(battleGround + \"===battleground\");\n\t\t\t\t\t\t\tattackingPieces.put(battleGround.getOwner().getName(), new ArrayList<Piece>());\n System.out.println(attackingPieces + \"===attacking pieces\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (battleFort != null) {\n System.out.println(battleFort.getName() + \"===battlefort\");\n System.out.println(battleFort.getOwner().getName() + \"===battlefort's owner\");\n \n\t\t\t\t\t\t\tattackingPieces.get(battleFort.getOwner().getName()).add(battleFort);\n System.out.println(attackingPieces.get(battleFort.getOwner().getName()));\n\t\t\t\t\t\t}\n\t//\t\t\t\t\tif (battleGround city/village)\n\t\t\t\t\t\t// TODO city/village\n\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t // Check if all the players pieces are now gone\n\t\t\t\t if (!attackingPieces.containsKey(player.getName())) {\n\t\t\t\t \t\n\t\t\t\t \t// Display message, and remove player from combatants\n\t\t\t\t \tPlatform.runLater(new Runnable() {\n\t\t\t\t @Override\n\t\t\t\t public void run() {\n\t\t\t\t \t GUI.getHelpText().setText(\"Attack Phase: \" + player.getName() + \" has retreated all of their pieces!\");\n\t\t\t\t }\n\t\t\t\t });\n\t\t\t\t \t\n\t\t\t\t \t// If there is only 1 player fighting for the hex, \n\t\t\t\t \tif (attackingPieces.size() == 1) \n\t\t\t\t \t\tbreak;\n\t\t\t\t \t\n\t\t\t\t \t// Pause because somebody just retreated\n\t\t\t\t \ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t }\n\t\t\t\t \n\n\t \t InfoPanel.cover(player.getName());\n\t\t\t\t \n\t\t\t }\n\t\t }\n\t\t \n\t\t // Done button no longer needed\n\t\t Platform.runLater(new Runnable() {\n\t\t @Override\n\t\t public void run() {\n\t\t GUI.getDoneButton().setDisable(true);\n\t\t }\n\t\t });\n\t\t ClickObserver.getInstance().setCreatureFlag(\"\");\n\t\t ClickObserver.getInstance().setFortFlag(\"\");\n\t\t \n\t\t // Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n \t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\n\t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n\t\t\t\t\n\t\t\t\t// Add wildthings back to combatants if they were removed\n\t\t\t\tif (battleGround.getContents().containsKey(wildThings.getName()) && !combatants.contains(wildThings))\n\t\t\t\t\tcombatants.add(wildThings);\n\t\t\t\t\n \t\t} // end while (combatants.size() > 1 || exploring)\n \t\tbattleGround.coverFort();\n \t\t\n////////////////// Post Combat\n \t\t\n \t\t// sets player as the winner of the combat\n \t\t// Can be null if battle takes place on a hex owned by nobody, and each player lost all pieces\n \t\tPlatform.runLater(new Runnable() {\n @Override\n public void run() {\n \tbattleGround.removeBattleHex();\n }\n \t\t});\n \t\t\n \t\tif (combatants.size() == 0)\n \t\t\tplayer = battleGround.getOwner();\n \t\telse if (combatants.size() == 1 && combatants.get(0).getName().equals(wildThings.getName()))\n \t\t\tplayer = null;\n \t\telse\n \t\t\tplayer = combatants.get(0);\n \t\t\n \t\tSystem.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n \t\tSystem.out.println(\"combatants: \" + combatants);\n \t\tfor (Player p : combatants) {\n \t\tSystem.out.println(\"p.getName(): \"+ p.getName());\n \t\t\t\n \t\t}\n \t\tSystem.out.println(\"owner: \" + owner);\n \t\tSystem.out.println(\"combatants.get(0): \" + combatants.get(0));\n \t\tSystem.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n \t\t\n \t\t\n \t\t// Change ownership of hex to winner\n \t\tboolean ownerChanged = false;\n \t\tif (owner != null && combatants.size() > 0 && !battleGround.getOwner().equals(combatants.get(0))) {\n \t\t\tbattleGround.getOwner().removeHex(battleGround);\n \t\t\tcombatants.get(0).addHexOwned(battleGround);\n \t\t\townerChanged = true;\n \t\t}\n\t\t\t\n \t\t// See if fort is kept or downgraded.\n \t\tif (battleFort != null) {\n if (battleFort.getName().equals(\"Citadel\")) {\n owner.setCitadel(false);\n player.setCitadel(true);\n battleFort.healFort();\n player.addHexOwned(battleGround);\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", you get to keep the fort!\");\n }\n });\n checkWinners();\n return;\n }\n \t\t\n\t\t\t\t// Get player to click dice to see if fort is kept\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tGUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", roll the die to see if the fort is kept or downgraded\");\n\t \tDiceGUI.getInstance().uncover();\n\t \tInfoPanel.showTileInfo(battleGround);\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n\t\t\t\tint oneOrSixGood = -1;\n\t\t\t\twhile (oneOrSixGood == -1) {\n\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t\t\t\t\toneOrSixGood = Dice.getFinalVal();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// if a 1 or 6, keep fort (Keep it.... not turn it into a keep)\n\t\t\t\tif (oneOrSixGood == 1 || oneOrSixGood == 6) {\n\t\t\t\t\tbattleFort.healFort();\n\t\t\t\t\tplayer.addHexOwned(battleGround);\n\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t @Override\n\t\t public void run() {\n\t\t \tGUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", you get to keep the fort!\");\n\t\t }\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tbattleFort.downgrade();Platform.runLater(new Runnable() {\n\t\t @Override\n\t\t public void run() {\n\t\t \tGUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", the fort was destroyed!\");\n\t\t }\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tInfoPanel.showTileInfo(battleGround);\n\t }\n\t });\n\t\t\t\t\n\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n\t\t\t\t\n\t\t\t\t\n \t\t}\n\n \t\tbattleGround.flipPiecesDown();\n\t\t\t// TODO city/village and special incomes if they are kept or lost/damaged \n \t\t\n \t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t}/// end Post combat\n\n \tPlatform.runLater(new Runnable() {\n @Override\n public void run() {\n//\t\t\t\tInfoPanel.showBattleStats();\n \tBoard.removeCovers();\n }\n\t\t});\n \t\n\t\tClickObserver.getInstance().setTerrainFlag(\"\");\n\t\tClickObserver.getInstance().setPlayerFlag(\"\");\n\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t\tbattleGrounds.clear();\n }", "@Override\n\tpublic void drawProjectile(final SpriteBatch spriteBatch) {\n\t}", "public void shootGun() {\n\t\tammo--;\n\t}", "public GameObject spawnBomber(LogicEngine in_logicEngine){\n\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/bomber.png\",((float)LogicEngine.SCREEN_WIDTH)+50,LogicEngine.SCREEN_HEIGHT-50,0);\r\n\t\tship.i_animationFrameSizeHeight = 58;\r\n\t\tship.i_animationFrameSizeWidth = 58;\r\n\t\t\r\n\t\t//fly back and forth\r\n\t\tLoopWaypointsStep s = new LoopWaypointsStep();\r\n\t\ts.waypoints.add(new Point2d(-30,LogicEngine.SCREEN_HEIGHT-50));\r\n\t\ts.waypoints.add(new Point2d(LogicEngine.SCREEN_WIDTH+50,LogicEngine.SCREEN_HEIGHT-50));\r\n\t\t\r\n\t\tship.b_mirrorImageHorizontal = true;\r\n\t\t\r\n\t\tship.stepHandlers.add(s);\r\n\t\tship.v.setMaxForce(5.0f);\r\n\t\tship.v.setMaxVel(5.0f);\r\n\t\tship.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\r\n\r\n\t\t//tadpole bullets\r\n\t\tGameObject go_tadpole = this.spawnTadpole(in_logicEngine);\r\n\t\tgo_tadpole.stepHandlers.clear();\r\n\t\tFlyStraightStep fly = new FlyStraightStep(new Vector2d(0,-0.5f));\r\n\t\tfly.setIsAccelleration(true);\r\n\t\t\r\n\t\t\r\n\t\tif(Difficulty.isHard())\r\n\t\t{\tgo_tadpole.v.setMaxVel(5);\r\n\t\t\tgo_tadpole.v.setMaxForce(5);\r\n\t\t}\r\n\t\telse\r\n\t\t{\tgo_tadpole.v.setMaxVel(10);\r\n\t\t\tgo_tadpole.v.setMaxForce(5);\r\n\t\t}\r\n\t\tgo_tadpole.stepHandlers.add(fly);\r\n\t\tgo_tadpole.v.setVel(new Vector2d(-2.5f,0f));\r\n\t\t\r\n\t\t\r\n\t\t//bounce on hard and medium\r\n\t\tif(Difficulty.isHard() || Difficulty.isMedium())\r\n\t\t{\r\n\t\t\tBounceOfScreenEdgesStep bounce = new BounceOfScreenEdgesStep();\r\n\t\t\tbounce.b_sidesOnly = true;\r\n\t\t\tgo_tadpole.stepHandlers.add(bounce);\r\n\t\t}\r\n\t\t\r\n\t\t//drop bombs\r\n\t\tLaunchShipsStep launch = new LaunchShipsStep(go_tadpole, 20, 5, 3, true);\r\n\t\tlaunch.b_addToBullets = true;\r\n\t\tlaunch.b_forceVelocityChangeBasedOnParentMirror = true;\r\n\t\t\r\n\t\tship.stepHandlers.add(launch);\r\n\t\tship.rotateToV=true;\r\n\t\t\r\n\t\t//give it some hp\r\n\t\tHitpointShipCollision c = new HitpointShipCollision(ship, 50, 50f);\r\n\t\tc.setSimpleExplosion();\r\n\t\tship.collisionHandler = c;\r\n\t\t\r\n\t\tin_logicEngine.objectsEnemies.add(ship);\r\n\t\t\r\n\t\treturn ship;\r\n\t\r\n\t}", "private boolean canMove() {\n\t\tif (System.currentTimeMillis() - lastTrunTime < 300) {// move time is\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 300ms before\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// last move\n\t\t\treturn false;\n\t\t}\n\t\tboolean status = false;\n\t\tif(stage == 1){\n\t\t\tmap = GameView.map;\n\t\t}else if(stage == 2){\n\t\t\tmap = GameViewStage2.map;\n\t\t}else {\n\t\t\tmap = GameViewStage3.map;\n\t\t}\n\t\tif (direction == UP) {// when tank moves up\n\t\t\tif (centerPoint.getY() - speed >= 0) {\n\t\t\t\tif (map[(centerPoint.getY() - speed) / UNIT][centerPoint\n\t\t\t\t\t\t.getX() / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() - speed) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + UNIT) / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() - speed) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + 2 * UNIT) / UNIT] == 0) {\n\t\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (direction == DOWN) {\n\t\t\tif (centerPoint.getY() + tankBmp.getHeight() + speed < screenHeight) {\n\t\t\t\tif (map[(centerPoint.getY() + 2 * UNIT + speed) / UNIT][centerPoint\n\t\t\t\t\t\t.getX() / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT][(centerPoint.getX() + UNIT) / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT][(centerPoint.getX() + 2 * UNIT) / UNIT] == 0) {\n\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (direction == LEFT) {\n\n\t\t\tif (centerPoint.getX() - speed >= 0) {\n\t\t\t\tif (map[centerPoint.getY() / UNIT][(centerPoint.getX() - speed)\n\t\t\t\t\t\t/ UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() - speed) / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() - speed) / UNIT] == 0) {\n\t\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (direction == RIGHT) {\n\t\t\tif (centerPoint.getX() + tankBmp.getWidth() + speed < screenWidth) {\n\t\t\t\tif (map[centerPoint.getY() / UNIT][(centerPoint.getX()\n\t\t\t\t\t\t+ 2 * UNIT + speed)\n\t\t\t\t\t\t/ UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT] == 0) {\n\t\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (status)\n\t\t\tlastTrunTime = System.currentTimeMillis();\n\t\treturn status;\n\t}", "public void performActions(){\n GameInformation gi = this.engine.getGameInformation();\n\n if(gi.getTeam() == 0)\n this.engine.performPlayerAction(\n new MoveAction(src, dst)\n );\n\n }", "public void sendPowerUpdate()\n\t{\n\t\tif (!this.worldObj.isRemote)\n\t\t{\n\t\t\tPacketHandler.sendPacketToClients(ResonantInduction.PACKET_TILE.getPacket(this, SimplePacketTypes.RUNNING.name, this, this.functioning), worldObj, new Vector3(this), 64);\n\t\t}\n\t}", "void alien_shoot_missile(Alien alien) {\n Missile missile = alien.shootMissile();\n ImageView alien_missile_image_view;\n switch(alien.missile_type) {\n case ALIEN1:\n alien_missile_image_view = new ImageView(alien1_missile_image);\n break;\n case ALIEN2:\n alien_missile_image_view = new ImageView(alien2_missile_image);\n break;\n default:\n alien_missile_image_view = new ImageView(alien3_missile_image);\n break;\n }\n alien_missile_image_view.setX(missile.x_position);\n alien_missile_image_view.setY(missile.y_position);\n alien_missile_image_view.setFitWidth(alien.missile_width);\n alien_missile_image_view.setFitHeight(alien.missile_height);\n alien_missile_image_views.add(alien_missile_image_view);\n game_pane.getChildren().add(alien_missile_image_view);\n }", "public void zoomPokemon(){\n }", "private void moveShipLeft()\r\n\t\t{\r\n\t\t\t\tboolean moved = true;\r\n \tint currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n\r\n //if firstPlayer move unit left\r\n if(currentPlayer == 1)\r\n {\r\n int currentPos = worldPanel.player1.units[currentUnit - 1].getPosition();\r\n if(currentPos == 0)\r\n {\r\n int mapTemp = mapPieces[0][mapWidth - 1];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(mapWidth - 1);\r\n }\r\n else\r\n {\r\n int temp1 = currentPos % mapWidth;\r\n if(temp1 == 0)\r\n {\r\n int mapTemp = mapPieces[0][currentPos + mapWidth - 1];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(currentPos + mapWidth - 1);\r\n }//end if\r\n else\r\n {\r\n int mapTemp = mapPieces[0][currentPos - 1];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(currentPos - 1);\r\n }//end else\r\n }//end else\r\n }//end if\r\n\r\n //if firstPlayer move unit left\r\n if(currentPlayer == 2)\r\n {\r\n int currentPos = worldPanel.player2.units[currentUnit - 1].getPosition();\r\n if(currentPos == 0)\r\n {\r\n int mapTemp = mapPieces[0][mapWidth - 1];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(mapWidth - 1);\r\n }\r\n else\r\n {\r\n int temp1 = currentPos % mapWidth;\r\n if(temp1 == 0)\r\n {\r\n int mapTemp = mapPieces[0][currentPos + mapWidth - 1];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(currentPos + mapWidth - 1);\r\n }//end if\r\n else\r\n {\r\n int mapTemp = mapPieces[0][currentPos - 1];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(currentPos - 1);\r\n }//end else\r\n }//end else\r\n }//end if\r\n\r\n //set up new player once unit has moved\r\n playerMoved(currentPlayer,currentUnit,moved);\r\n\r\n //set up new mapPosition if player moved\r\n if(moved == true)\r\n setMapPos();\r\n\t\t}", "public static void main(String[] args) {\n Tron.init();\n\n //We'll want to keep track of the turn number to make debugging easier.\n int turnNumber = 0;\n\n // Execute loop forever (or until game ends)\n while (true) {\n //Update turn number:\n turnNumber++;\n\n /* Get an integer map of the field. Each int\n * can either be Tron.Tile.EMPTY, Tron.Tile.ME,\n * Tron.Tile.OPPONENT, Tron.Tile.TAKEN_BY_ME,\n * Tron.Tile.TAKEN_BY_OPPONENT, or Tron.Tile.WALL */\n ArrayList<ArrayList<Tron.Tile>> mList = Tron.getMap();\n int[][] m = new int[mList.size()][mList.get(0).size()];\n for (int i = 0; i < mList.size(); i++) {\n for (int j = 0; j < mList.get(i).size(); j++) {\n m[i][j] = mList.get(i).get(j).ordinal();\n }\n }\n\n //Let's figure out where we are:\n int myLocX = 0, myLocY = 0;\n for(int y = 0; y < 16; y++) {\n for(int x = 0; x < 16; x++) {\n //I want to note that this is a little bit of a disgusting way of doing this comparison, and that you should change it later, but Java makes this uglier than C++\n if(Tron.Tile.values()[m[y][x]] == Tron.Tile.ME) {\n myLocX = x;\n myLocY = y;\n }\n }\n }\n\n //Let's find out which directions are safe to go in:\n boolean [] safe = emptyAdjacentSquares(m, myLocX, myLocY);\n\n //Let's look at the counts of empty squares around the possible squares to go to:\n int [] dirEmptyCount = new int[4];\n for(int a = 0; a < 4; a++) {\n if(safe[a]) {\n //Get the location we would be in if we went in a certain direction (specified by a).\n int[] possibleSquare = getLocation(myLocX, myLocY, a);\n //Make sure that square exists:\n if(possibleSquare[0] != -1 && possibleSquare[1] != -1) {\n //Find the squares around that square:\n boolean [] around = emptyAdjacentSquares(m, possibleSquare[0], possibleSquare[1]);\n //Count the number of empty squares around that square and set it in our array:\n dirEmptyCount[a] = 0;\n for(int b = 0; b < 4; b++) if(around[b]) dirEmptyCount[a]++;\n }\n }\n else dirEmptyCount[a] = 5; //Irrelevant, but we must ensure it's as large as possible because we don't want to go there.\n }\n\n //Log some basic information.\n Tron.log(\"-----------------------------------------------------\\nDebug for turn #\" + turnNumber + \":\\n\");\n for(int a = 0; a < 4; a++) Tron.log(\"Direction \" + stringFromDirection(a) + \" is \" + (safe[a] ? \"safe.\\n\" : \"not safe.\\n\"));\n\n /* Send your move. This can be Tron.Direction.NORTH,\n * Tron.Direction.SOUTH, Tron.Direction.EAST, or\n * Tron.Direction.WEST. */\n int minVal = 1000, minValLoc = 0;\n for(int a = 0; a < 4; a++) {\n if(dirEmptyCount[a] < minVal) {\n minVal = dirEmptyCount[a];\n minValLoc = a;\n }\n }\n Tron.sendMove(Tron.Direction.values()[minValLoc]);\n }\n }", "public void act()\r\n {\r\n if(worldTimer == 1)\r\n {\r\n if(wildPokemon)\r\n {\r\n textInfoBox.displayText(\"Wild \" + enemyPokemon.getName() + \" appeared!\", true, false);\r\n }\r\n else\r\n {\r\n textInfoBox.displayText(\"Enemy trainer sent out \" + enemyPokemon.getName() + \"!\", true, false);\r\n }\r\n textInfoBox.displayText(\"Go \" + playerPokemon.getName() + \"!\", true, false);\r\n textInfoBox.updateImage();\r\n\r\n worldTimer++;\r\n }\r\n else if(worldTimer == 0)\r\n {\r\n worldTimer++;\r\n }\r\n\r\n if(getObjects(Pokemon.class).size() < 2)\r\n {\r\n ArrayList<Pokemon> pokemon = (ArrayList<Pokemon>) getObjects(Pokemon.class);\r\n for(Pokemon pkmn : pokemon)\r\n {\r\n if(pkmn.getIsPlayers() == true)\r\n {\r\n textInfoBox.displayText(\"Enemy \" + enemyPokemonName.toUpperCase() + \" fainted!\", true, false);\r\n\r\n int expGain = StatCalculator.experienceGainCalc(playerPokemon.getName(), playerPokemon.getLevel());\r\n textInfoBox.displayText(playerPokemon.getName().toUpperCase() + \" gained \" + expGain + \"\\nEXP. Points!\", true, false);\r\n playerPokemon.addEXP(expGain);\r\n if(playerPokemon.getCurrentExperience() >= StatCalculator.experienceToNextLevel(playerPokemon.getLevel()))\r\n {\r\n int newEXP = playerPokemon.getCurrentExperience() - StatCalculator.experienceToNextLevel(playerPokemon.getLevel());\r\n playerPokemon.setEXP(newEXP);\r\n playerPokemon.levelUp();\r\n playerPokemon.newPokemonMoves();\r\n\r\n textInfoBox.displayText(playerPokemonName.toUpperCase() + \" grew to level \" + playerPokemon.getLevel() + \"!\", true, false);\r\n }\r\n savePokemonData(playerPokemon, currentPlayerPokemon);\r\n\r\n textInfoBox.updateImage();\r\n isPlayersTurn = true;\r\n battleOver();\r\n }\r\n else\r\n {\r\n textInfoBox.displayText(playerPokemonName.toUpperCase() + \" fainted!\", true, false);\r\n\r\n String playerName = Reader.readStringFromFile(\"gameInformation\", 0, 0);\r\n textInfoBox.displayText(playerName + \" blacked out!\", true, false);\r\n\r\n addObject(new Blackout(\"Fade\"), getWidth() / 2, getHeight() / 2);\r\n removeAllObjects();\r\n\r\n String newWorld = Reader.readStringFromFile(\"gameInformation\", 0, 4);\r\n int newX = Reader.readIntFromFile(\"gameInformation\", 0, 5);\r\n int newY = Reader.readIntFromFile(\"gameInformation\", 0, 6);\r\n\r\n GameWorld gameWorld = new GameWorld(newWorld, newX, newY, \"Down\");\r\n gameWorld.healPokemon();\r\n Greenfoot.setWorld(gameWorld);\r\n\r\n isPlayersTurn = true;\r\n battleOver();\r\n }\r\n }\r\n } \r\n\r\n if(isBattleOver)\r\n {\r\n isPlayersTurn = true;\r\n savePokemonData(playerPokemon, currentPlayerPokemon);\r\n newGameWorld();\r\n }\r\n }", "public void move()\n {\n daysSurvived+=1;\n\n energy -= energyLostPerDay;\n\n Random generator = new Random();\n\n //losowo okreslony ruch na podstawie genomu\n int turnIndex = generator.nextInt((int)Math.ceil(Genome.numberOfGenes));\n int turn = genome.getGenome().get(turnIndex);\n\n //wywolujemy metode obrotu - dodaje odpowiednio liczbe do aktualnego kierunku\n direction.turn(turn);\n\n //zmieniamy pozycje zwierzaka przez dodanie odpowiedniego wektora\n position = position.add(direction.move());\n //walidacja pozycji tak, by wychodzac za mape byc na mapie z drugiej strony\n position.validatePosition(map.getWidth(),map.getHeight());\n\n moveOnSimulation();\n\n //jesli po ruchu zwierzaczek nie ma juz energii na kolejny ruch\n if(energy < energyLostPerDay )\n {\n this.animalHungry = true;\n }\n }", "private void tankWillShoot(Graphics2D g2d, GameState state) {\n if (state.isMouseClicked() && tankObject.getNumOfCannonBullet() > 0 && state.getGunType() % 2 == 1) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfCannonBullet(tankObject.getNumOfCannonBullet() - 1);\n if (tankObject.getCannonLevel() == 1) {\n state.getMissiles().add(new Missile(state, 15));\n state.getMissiles().get(state.getMissiles().size() - 1).missileDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/heavygun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (tankObject.getCannonLevel() == 2) {\n state.getMissiles().add(new Missile(state, 30));\n state.getMissiles().get(state.getMissiles().size() - 1).missileDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/heavygun.wav\", 0);\n state.setMouseClicked(false);\n }\n } else if (state.isMouseClicked() && tankObject.getNumOfCannonBullet() == 0 && state.getGunType() % 2 == 1) {\n AudioPlayer emptyGunSFX = new AudioPlayer(\"sound effects/emptyGun.wav\", 0);\n state.setMouseClicked(false);\n }\n for (Missile missile : state.getMissiles()) {\n missile.paint(g2d, state);\n }\n if (state.isMousePressed() && tankObject.getNumOfMachineGunBullet() > 0 && state.getGunType() % 2 == 0) {\n if (numOfRenderBullet1 == 0 && tankObject.getMachineGunLevel() == 1) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfMachineGunBullet(tankObject.getNumOfMachineGunBullet() - 1);\n state.getBullets().add(new Bullet(state, 20));\n state.getBullets().get(state.getBullets().size() - 1).bulletDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/lightgun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (numOfRenderBullet2 == 0 && tankObject.getMachineGunLevel() == 2) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfMachineGunBullet(tankObject.getNumOfMachineGunBullet() - 1);\n state.getBullets().add(new Bullet(state, 30));\n state.getBullets().get(state.getBullets().size() - 1).bulletDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/lightgun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (numOfRenderBullet1 <= 7) {\n numOfRenderBullet1++;\n }\n if (numOfRenderBullet1 == 7) {\n numOfRenderBullet1 = 0;\n }\n if (numOfRenderBullet2 <= 3) {\n numOfRenderBullet2++;\n }\n if (numOfRenderBullet2 == 3) {\n numOfRenderBullet2 = 0;\n }\n }\n else if (state.isMousePressed() && tankObject.getNumOfMachineGunBullet() == 0 && state.getGunType() % 2 == 0) {\n AudioPlayer emptyGunSFX = new AudioPlayer(\"sound effects/emptyGun.wav\", 0);\n }\n for (Bullet bullet : state.getBullets()) {\n bullet.paint(g2d, state);\n }\n }", "@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)\n public void onProjectileHitEvent(@NotNull ProjectileHitEvent event) {\n\n if (event.getEntity() instanceof EnderPearl) {\n\n EnderPearl pearl = (EnderPearl) event.getEntity();\n if (pearl.getShooter() instanceof Entity) {\n Entity shooter = (Entity) pearl.getShooter();\n\n Block block = event.getHitBlock();\n if (block != null && block.getType() == Material.END_GATEWAY && event.getHitBlockFace() != null) {\n\n Teleportal teleportal = Teleportal.getFromStruct(block);\n if (teleportal != null) {\n if (shooter instanceof Player) {\n if (!shooter.hasPermission(\"teleportals.player.use\")) {\n sendMsg(shooter, \"no-perms-use\");\n return;\n }\n }\n boolean tryNonOccludedExit = getConfig().getBoolean(\"teleportal.try-non-occluded-exit\", true);\n boolean failOnFullyOccludedExit = getConfig().getBoolean(\"teleportal.fail-on-fully-occluded-exit\", false);\n\n if (!teleportal.teleport(shooter, event.getHitBlockFace(), tryNonOccludedExit, failOnFullyOccludedExit)) {\n\n if (shooter instanceof Player) {\n int damageAmount = getConfig().getInt(\"teleportal.usage-fail-damage\", 1);\n if (damageAmount > 0) {\n ((Player) shooter).damage(damageAmount);\n }\n }\n }\n }\n }\n }\n }\n }", "@Test\n public void isONGroundTestTrue(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{{0,0}},new byte[][]{{1,1},{1,1},{1,1},{1,1}}, tilepath);\n Rect cBox = new Rect(2,2,24,22);\n assertEquals(true, tileMap.isOnGround(cBox));\n }", "public static void render(Graphics g, Tile tile, Point pxCenterPoint, float value) {\n Point topLeft = new Point(pxCenterPoint.x - (tile.getImage().getWidth() / 2), pxCenterPoint.y - (tile.getImage().getHeight() / 2));\n if (value >= 0) {\n\n\n if (tile.getType() == \"Mountain\") {\n\n g.drawImage(GraphicAssets.col, topLeft.x, topLeft.y + 19 + 21, 60, tile.getImageHeight() / 2, null);\n g.drawImage(GraphicAssets.base, topLeft.x, topLeft.y + 19 + 19 + tile.getImageHeight() / 2, 60, 19, null);\n g.drawImage(tile.getImage(), topLeft.x, topLeft.y, tile.getImage().getWidth(), tile.getImage().getHeight(), null);\n\n } else if (tile.getType() == \"Water\" || tile.getType() == \"Grass\" || tile.getType() == \"Running\") {\n //\n //System.out.println(topLeft.y);\n g.drawImage(GraphicAssets.col, topLeft.x, topLeft.y + 10 + 19, 60, tile.getImageHeight() / 2, null);\n g.drawImage(GraphicAssets.base, topLeft.x, topLeft.y + 10 + 19 + tile.getImageHeight() / 2, 60, 19, null);\n g.drawImage(tile.getImage(), topLeft.x, topLeft.y + 10, tile.getImage().getWidth(), tile.getImage().getHeight(), null);\n } else {\n g.drawImage(GraphicAssets.col, topLeft.x, topLeft.y + 10 + 19, 60, tile.getImageHeight() / 2, null);\n g.drawImage(GraphicAssets.base, topLeft.x, topLeft.y + 10 + 19 + tile.getImageHeight() / 2, 60, 19, null);\n g.drawImage(tile.getImage(), topLeft.x, topLeft.y + 10, tile.getImage().getWidth(), tile.getImage().getHeight(), null);\n }\n if (tile.hasAreaEffect()) {\n areaEffectRenderer.render(g, tile.getAreaEffect(), topLeft);\n }\n\n if (tile.hasItem()) {\n for (Item item : tile.getItems()) {\n itemRenderer.render(g, item, topLeft);\n }\n }\n }\n }", "void doGun() {\r\n\t\tlong time = getTime()\r\n\t\t\t\t+ (int) Math\r\n\t\t\t\t\t\t.round((getRange(getX(), getY(), target.x, target.y) / (20 - (3 * firePower))));\r\n\t\tPoint2D.Double p = target.guessPosition(time);\r\n\r\n\t\t// offsets the gun by the angle to the next shot based on linear\r\n\t\t// targeting provided by the enemy class\r\n\t\tdouble gunOffset = getGunHeadingRadians()\r\n\t\t\t\t- (Math.PI / 2 - Math.atan2(p.y - getY(), p.x - getX()));\r\n\t\tsetTurnGunLeftRadians(normaliseBearing(gunOffset));\r\n\t}", "public Field.Fieldelements placeShotComputer() {\r\n int sizeX = this.fieldUser.getSizeX();\r\n int sizeY = this.fieldUser.getSizeY();\r\n \r\n // probability that a field contains a ship (not in percent, 1000 is best)\r\n double[][] probability = new double[sizeX][sizeY];\r\n double sumProbability = 0;\r\n \r\n for (int posX = 0; posX < sizeX; posX++) {\r\n for (int posY = 0; posY < sizeY; posY++) {\r\n // set probability for each field to 1\r\n probability[sizeX][sizeY] = 1.;\r\n \r\n // check neighbouring fields for hits and set probability to 1000\r\n if (Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX, posY - 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX, posY + 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX - 1, posY) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX + 1, posY)) {\r\n probability[posX][posY] = 1000;\r\n }\r\n \r\n // 0 points if all fields above and below are SUNK or SHOT\r\n if ((Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX, posY - 1) || Field.Fieldelements.WATER == fieldUser.getFieldStatus(posX, posY - 1)) &&\r\n (Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX, posY + 1) || Field.Fieldelements.WATER == fieldUser.getFieldStatus(posX, posY + 1)) &&\r\n (Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX - 1, posY) || Field.Fieldelements.WATER == fieldUser.getFieldStatus(posX - 1, posY)) &&\r\n (Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX + 1, posY) || Field.Fieldelements.WATER == fieldUser.getFieldStatus(posX + 1, posY))\r\n ) {\r\n probability[posX][posY] = 0;\r\n }\r\n \r\n // 0 points if a neighbouring field is SUNK\r\n if (Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX - 1, posY - 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX - 1, posY) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX - 1, posY + 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX, posY - 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX, posY + 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX + 1, posY - 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX + 1, posY) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX + 1, posY + 1)\r\n ) {\r\n probability[posX][posY] = 0;\r\n }\r\n \r\n // 0 points if top right, top left, bottom right or bottom left is HIT\r\n if (Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX - 1, posY - 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX - 1, posY + 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX + 1, posY - 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX + 1, posY + 1)\r\n ) {\r\n probability[posX][posY] = 0;\r\n }\r\n \r\n // 0 points if a shot has already been placed\r\n if (Field.Fieldelements.WATER != fieldUser.getFieldStatus(posX, posY) &&\r\n Field.Fieldelements.SHIP != fieldUser.getFieldStatus(posX, posY)) {\r\n probability[posX][posY] = 0;\r\n }\r\n }\r\n }\r\n \r\n // calculate sum of all points\r\n // TODO check if probability must be smaller numbers\r\n for (int posX = 0; posX < sizeX; sizeX++) {\r\n for (int posY = 0; posY < sizeY; posY++) {\r\n sumProbability += probability[posX][posY];\r\n }\r\n }\r\n \r\n // random element\r\n Random random = new Random();\r\n sumProbability = random.nextInt((int) --sumProbability);\r\n sumProbability++; // must at least be 1\r\n int posY = -1;\r\n int posX = -1;\r\n while (posY < sizeY - 1 && sumProbability >= 0) {\r\n posY++;\r\n posX = -1;\r\n while (posX < sizeX && sumProbability >= 0) {\r\n posX++;\r\n sumProbability = sumProbability - probability[posX][posY];\r\n }\r\n }\r\n return fieldUser.shoot(posX, posY);\r\n }", "public static List<MapTile> findPath(MovableObject mO, GameObject destination) {\n List<MapTile> openList = new LinkedList<>();\n List<MapTile> closedList = new LinkedList<>();\n List<MapTile> neighbours = new ArrayList<>();\n Point objectTileCoord = mO.getGridCoordinates();\n Point destinationTileCoord = destination.getGridCoordinates();\n MapTile currentTile;\n try {\n currentTile = mapGrid.mapGrid[objectTileCoord.x][objectTileCoord.y];\n } catch (ArrayIndexOutOfBoundsException e) {\n System.out.print(\"Error while getting current tile for pathfinding. Trying to adapt coords.\");\n if (mO.getX() >= MapManager.getWorldWidth()) {\n objectTileCoord.x -= 1;\n }\n if (mO.getY() >= MapManager.getWorldHeight()) {\n objectTileCoord.y -= 1;\n }\n if (mO.getY() >= MapManager.getWorldHeight() && mO.getX() >= MapManager.getWorldWidth()) {\n objectTileCoord.x -= 1;\n objectTileCoord.y -= 1;\n }\n currentTile = mapGrid.mapGrid[objectTileCoord.x][objectTileCoord.y];\n }\n\n currentTile.setParentMapTile(null);\n currentTile.totalMovementCost = 0;\n openList.add(currentTile);\n\n boolean notDone = true;\n\n while (notDone) {\n neighbours.clear();\n currentTile = getLowestCostTileFromOpenList(openList, currentTile);\n closedList.add(currentTile);\n openList.remove(currentTile);\n\n //ReachedGoal?\n if ((currentTile.xTileCoord == destinationTileCoord.x) && (currentTile.yTileCoord == destinationTileCoord.y)) {\n try {\n return getResultListOfMapTiles(currentTile);\n } catch (Exception e) {\n System.out.println(\"closed list size: \" + closedList.size());\n throw e;\n }\n }\n\n neighbours.addAll(currentTile.getNeighbourTiles());\n neighbours.removeAll(closedList);\n\n for (MapTile mapTile : neighbours) {\n if (openList.contains(mapTile)) {\n // compare total movement costs.\n if (mapTile.totalMovementCost > currentTile.getMovementCostToTile(mapTile) + currentTile.totalMovementCost) {\n mapTile.setParentMapTile(currentTile);\n mapTile.totalMovementCost = currentTile.getMovementCostToTile(mapTile) + currentTile.totalMovementCost;\n }\n } else {\n mapTile.setParentMapTile(currentTile);\n mapTile.totalMovementCost = currentTile.totalMovementCost + currentTile.getMovementCostToTile(mapTile);\n openList.add(mapTile);\n }\n }\n }\n return null;\n }", "protected boolean selectTile(String player, int coordinate, String area, MBproduction.buildingType build){\n String culture = null;\n boolean AIflag = false;\n boolean placeFlag = false;\n MBproduction.terrainTypeEnum selected;\n String normalizeSelected;\n /*******************************/\n player=player.toLowerCase();\n switch(player.toLowerCase()){\n case\"human\":\n culture = playBoard.humanCulture();\n break;\n case\"ai1\":\n culture = playBoard.AICulture1();\n break;\n case\"ai2\":\n culture = playBoard.AICulture2();\n break;\n default:\n break;\n }\n selected = playBoard.getIndiTerrain(coordinate);\n normalizeSelected = \n selected.toString().substring(0, selected.toString().length()-1);\n switch(culture.toLowerCase()){\n //norse\n case\"norse\":\n switch(area.toLowerCase()){\n case\"production\":\n for (int i = 0; i < norseProduction.size(); i ++){\n if (norseProduction.get(i).getName().equalsIgnoreCase(normalizeSelected)){\n norseProduction.get(i).setIcon(new javax.swing.ImageIcon(\n getClass().getResource(selected.getPath())));\n norseProduction.remove(i);\n playBoard.updateProductionResourceCube(player, selected);\n playBoard.exileTerrain(selected); \n tileSelection.get(coordinate).setEnabled(false);\n stackAI.remove(stackAI.indexOf(coordinate));\n placeFlag = true;AIflag = true;\n break;\n }\n }\n break;\n //!!!!!!!!WARNNING!!!!!!!! NEED TO MODIFY FOR ITERATION II\n case\"city\":\n for (int i = 0; i < norseCity.size(); i ++){\n if (norseCity.get(i).getIcon() == null){\n norseCity.get(i).setIcon(new javax.swing.ImageIcon(\n getClass().getResource(build.getPath())));\n placeFlag = true;\n break;\n }\n }\n break;\n default:\n break;\n }\n break;\n //greek \n case\"greek\":\n switch(area.toLowerCase()){\n case\"production\":\n for (int i = 0; i < greekProduction.size(); i ++){\n if (greekProduction.get(i).getName().equalsIgnoreCase(normalizeSelected)){\n greekProduction.get(i).setIcon(new javax.swing.ImageIcon(\n getClass().getResource(selected.getPath())));\n greekProduction.remove(i);\n playBoard.updateProductionResourceCube(player, selected);\n playBoard.exileTerrain(selected); \n tileSelection.get(coordinate).setEnabled(false);\n stackAI.remove(stackAI.indexOf(coordinate));\n placeFlag = true;AIflag = true;\n break;\n }\n }\n break;\n //!!!!!!!!WARNNING!!!!!!!! NEED TO MODIFY FOR ITERATION II\n case\"city\":\n for (int i = 0; i < greekCity.size(); i ++){\n if (greekCity.get(i).getIcon() == null){\n greekCity.get(i).setIcon(new javax.swing.ImageIcon(\n getClass().getResource(build.getPath())));\n placeFlag = true;\n break;\n } \n }\n break;\n default:\n break;\n }\n break;\n //egypt\n case\"egypt\":\n switch(area.toLowerCase()){\n case\"production\":\n for (int i = 0; i < egyptProduction.size(); i ++){\n if (egyptProduction.get(i).getName().equalsIgnoreCase(normalizeSelected)){\n egyptProduction.get(i).setIcon(new javax.swing.ImageIcon(\n getClass().getResource(selected.getPath())));\n playBoard.updateProductionResourceCube(player, selected);\n playBoard.exileTerrain(selected);\n egyptProduction.remove(i);\n tileSelection.get(coordinate).setEnabled(false);\n stackAI.remove(stackAI.indexOf(coordinate));\n placeFlag = true;AIflag = true;\n break; \n }\n }\n break;\n //!!!!!!!!WARNNING!!!!!!!! NEED TO MODIFY FOR ITERATION II\n case\"city\":\n for (int i = 0; i < egyptCity.size(); i ++){\n if (egyptCity.get(i).getIcon() == null){\n egyptCity.get(i).setIcon(new javax.swing.ImageIcon(\n getClass().getResource(build.getPath())));\n placeFlag = true;\n break;\n } \n }\n break;\n default:\n break;\n }\n break;\n default:\n break;\n }\n if ((!placeFlag)&&(player.equalsIgnoreCase(\"human\"))){\n JOptionPane.showMessageDialog(\n null, \"No suitable tile for \" + player , \"Information\",\n JOptionPane.WARNING_MESSAGE);\n }\n return AIflag; \n }", "public BuildByPermitTile map(BuildByPermitTileDTO selectedActionDTO);", "void smallgunHandler() {\n for (Sprite smb: smBullets) {\n \n smb.display();\n if(usingCoil){\n smb.forward(120);\n }else{\n smb.forward(40);\n }\n\n }\n}", "public void Attack(){\n float randomx = (float)(Math.random()-0.5)*attackRange*GameView.instance.cameraSize/10;\n float randomy = (float)(Math.random()-0.5)*attackRange*GameView.instance.cameraSize/5;\n Vector2 target = GameView.instance.player.aimFor();\n float dx = target.x-creationPoint.x;\n float dy =target.y-creationPoint.y;\n float l= (float)Math.sqrt(dx*dx+dy*dy);\n dx = dx/l-((float)Math.random()-0.5f)/2;\n dy = dy/l-(float)(Math.random())/10;\n ProjectilePool.instance.shootArrow(creationPoint.x, creationPoint.y, 1, dx, dy, 3);\n }", "public CopyOfPlayer(){ //Loads and scales the images\n for (int i = 0; i < robotImages.length; i++){\n for (int j = 0; j < black.length; j++){\n robotImages[i][j].scale(300, 300);\n }\n }\n costume = PrefLoader.getCostume(); //Sets costume according to file\n setImage(robotImages[costume][2]);\n }", "public void shoot() {\n\r\n switch (shootstate) {\r\n case down:\r\n tempbutton = Components.shootsinglespeed;\r\n templimit = islimitshooterup();\r\n\r\n if (Components.shootsinglespeed && islimitshooterup() && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(singlespeed);\r\n Components.shootermotorleft2.setX(singlespeed);\r\n Components.shootermotorright.setX(-singlespeed);\r\n Components.shootermotorright2.setX(-singlespeed);\r\n\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n\r\n }\r\n shootpothigh = shootsinglepot;\r\n shootstate = movingup;\r\n } else if (Components.trusshp == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(trusshpspeed);\r\n Components.shootermotorleft2.setX(trusshpspeed);\r\n Components.shootermotorright.setX(-trusshpspeed);\r\n Components.shootermotorright2.setX(-trusshpspeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n shootpothigh = trusshppothigh;\r\n shootstate = movingup;\r\n }else if (Components.truss == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(trussspeed);\r\n Components.shootermotorleft2.setX(trussspeed);\r\n Components.shootermotorright.setX(-trussspeed);\r\n Components.shootermotorright2.setX(-trussspeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n shootpothigh = trusspothigh;\r\n shootstate = movingup;\r\n } else if (Components.pass == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(passspeed);\r\n Components.shootermotorleft2.setX(passspeed);\r\n Components.shootermotorright.setX(-passspeed);\r\n Components.shootermotorright2.setX(-passspeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n shootpothigh = passpot;\r\n shootstate = movingup;\r\n } else if (Components.longdistanceshoot == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(longdistancespeed);\r\n Components.shootermotorleft2.setX(longdistancespeed);\r\n Components.shootermotorright.setX(-longdistancespeed);\r\n Components.shootermotorright2.setX(-longdistancespeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n shootpothigh = longdistancepot;\r\n shootstate = movingup;\r\n }\r\n else if (Components.shoot == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(shooterspeed);\r\n Components.shootermotorleft2.setX(shooterspeed);\r\n Components.shootermotorright.setX(-shooterspeed);\r\n Components.shootermotorright2.setX(-shooterspeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n shootpothigh = shootpot;\r\n shootstate = movingup;\r\n }else if (Components.slowmovingshoot == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(slowmovingspeed);\r\n Components.shootermotorleft2.setX(slowmovingspeed);\r\n Components.shootermotorright.setX(-slowmovingspeed);\r\n Components.shootermotorright2.setX(-slowmovingspeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n slowmovingpot = shootpot;\r\n shootstate = movingup;\r\n }\r\n else if (Components.fastmovingshoot == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(fastmovingspeed);\r\n Components.shootermotorleft2.setX(fastmovingspeed);\r\n Components.shootermotorright.setX(-fastmovingspeed);\r\n Components.shootermotorright2.setX(-fastmovingspeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n fastmovingpot = shootpot;\r\n\r\n }\r\n case movingup:\r\n if (islimitshooterup() == false || Components.potvalue >= shootpothigh) {\r\n shootstate = stopped;\r\n oldTime = DS.getMatchTime();\r\n try {\r\n Components.shootermotorleft.setX(0);\r\n Components.shootermotorleft2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n try {\r\n Components.shootermotorright.setX(0);\r\n Components.shootermotorright2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n break;\r\n\r\n case stopped:\r\n try {\r\n if (/*Components.shooterdown && */time - oldTime > .2 && islimitshooterdown() == true && Components.DownPickupLimit.get()) {\r\n\r\n Components.shootermotorleft.setX(shootdownspeed);\r\n Components.shootermotorleft2.setX(shootdownspeed);\r\n\r\n Components.shootermotorright.setX(-shootdownspeed);\r\n Components.shootermotorright2.setX(-shootdownspeed);\r\n\r\n shootstate = movingdown;\r\n }\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n break;\r\n\r\n case movingdown:\r\n if ((islimitshooterdown() == false) || (Components.potvalue < shootpotdown)) {\r\n\r\n try {\r\n Components.shootermotorleft.setX(0);\r\n Components.shootermotorleft2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n try {\r\n Components.shootermotorright.setX(0);\r\n Components.shootermotorright2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n shootstate = down;\r\n }\r\n }\r\n }" ]
[ "0.6608921", "0.63150215", "0.61262697", "0.6124799", "0.60752755", "0.6018834", "0.58947796", "0.5840385", "0.58204925", "0.58009106", "0.5791019", "0.5775926", "0.5747179", "0.5740108", "0.57328564", "0.57173073", "0.57150775", "0.5695423", "0.5690826", "0.5688857", "0.56642276", "0.565976", "0.5659395", "0.56465715", "0.56465715", "0.564626", "0.5640427", "0.5639456", "0.5613064", "0.5603188", "0.5588608", "0.557465", "0.55676734", "0.55664515", "0.5561353", "0.5558265", "0.5546129", "0.5537052", "0.55362374", "0.5520433", "0.55177885", "0.5511525", "0.5492591", "0.548789", "0.54857147", "0.54649675", "0.54599243", "0.54455334", "0.54404414", "0.54382926", "0.54368746", "0.54252774", "0.5424803", "0.5422838", "0.54202676", "0.5419401", "0.541658", "0.54122436", "0.54105806", "0.54101044", "0.54062366", "0.5404247", "0.5401324", "0.5398962", "0.5396176", "0.53880984", "0.5383983", "0.5380574", "0.5379593", "0.53762734", "0.537618", "0.53749037", "0.534139", "0.53302234", "0.5326794", "0.53266513", "0.53211004", "0.5313338", "0.5311746", "0.5310617", "0.5310376", "0.53063136", "0.53056914", "0.5305663", "0.530463", "0.53017026", "0.52968425", "0.52964294", "0.52938", "0.5289708", "0.5286371", "0.52859706", "0.52853334", "0.52819437", "0.52780366", "0.5270107", "0.52684635", "0.52630836", "0.5259105", "0.5254684", "0.52537704" ]
0.0
-1
Busca un perfil por medio de su identificador.
Perfil findByIdPerfil(Long idPerfil);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPerfilId( Long id );", "public Perfil findByName(PerfilName perfilName);", "public Part getFotoPerfil(){\n return fotoPerfil;\n }", "public void setPerfil(int perfil){\n this.perfil = perfil;\n }", "public void setIdperfil(int pIdperfil){\n this.idperfil = pIdperfil;\n }", "public void setFotoPerfil(Part foto){\n if(foto == null){\n throw new IllegalArgumentException(\"Foto de perfil de usuario igual a null\");\n }\n fotoPerfil = foto;\n }", "public void setPerfilSesion(Perfil perfilSesion){\n this.perfilSesion = perfilSesion;\n\n }", "public String getPerfilDescripcion();", "public Perfil getPerfilSesion(){\n return this.perfilSesion;\n }", "public PerfilVO buscarPerfil(long idCandidato) throws SQLException {\n\t\tlogger.debug(\"Inicia metodo - buscarPerfil\");\n\t\tCONSULTA_PERFIL_CANDIDATO = \"BUSCAR_PERFIL\";\n\t\tLong[] parametros = { idCandidato };\n\t\tCachedRowSet cachedRowSet = executeQuery(parametros);\n\n\t\tPerfilVO perfil = null;\n\t\ttry {\n\t\t\tif (cachedRowSet.next()) {\n\t\t\t\tperfil = new PerfilVO();\n\t\t\t\tperfil.setIdCandidato(idCandidato);\n\t\t\t\tint i = 0;\n\t\t\t\tperfil.setIdUsuario(cachedRowSet.getLong(++i));\n\t\t\t\tperfil.setIdOficina(cachedRowSet.getLong(++i));\n\t\t\t\tperfil.setCurp(cachedRowSet.getString(++i));\n\t\t\t\tperfil.setNombre(cachedRowSet.getString(++i));\n\t\t\t\tperfil.setApellido1(cachedRowSet.getString(++i));\n\t\t\t\tperfil.setApellido2(cachedRowSet.getString(++i));\n\t\t\t\tperfil.setIdGenero(cachedRowSet.getInt(++i));\n\t\t\t\tperfil.setFechaNacimiento(cachedRowSet.getDate(++i));\n\t\t\t\tperfil.setEdad(obtenEdad(perfil.getFechaNacimiento()));\t// Calcula edad con el campo fechaNacimiento\n\t\t\t\tperfil.setIdEntidadNacimiento(cachedRowSet.getLong(++i));\n\t\t\t\tperfil.setEntidadNacimiento(cachedRowSet.getString(++i));\n\t\t\t\tperfil.setIdEstadoCivil(cachedRowSet.getLong(++i));\n\t\t\t\tperfil.setIdTipoDiscapacidad(cachedRowSet.getLong(++i));\n\t\t\t\tperfil.setConfidencialidad(cachedRowSet.getInt(++i));\n\t\t\t\tperfil.setContactoCorreo(cachedRowSet.getInt(++i));\n\t\t\t\tperfil.setContactoTelefono(cachedRowSet.getInt(++i));\n\t\t\t\tperfil.setHoraContactoIni(cachedRowSet.getLong(++i));\n\t\t\t\tperfil.setHoraContactoFin(cachedRowSet.getLong(++i));\n\t\t\t\tperfil.setIdRecibeOferta(cachedRowSet.getInt(++i));\n\t\t\t\t\n\t\t\t\tperfil.setIdTrabaja(Utils.validarCandidatoEmpleadoActualmente(cachedRowSet.getInt(++i)));\n\t\t\t\tperfil.setIdRazonBusqueda(Utils.validarCandidatoRazonBusqueda(perfil.getIdTrabaja(), cachedRowSet.getLong(++i)));\n\t\t\t\tperfil.setDescripcionOtroMotivoBusq(cachedRowSet.getString(++i));\n\t\t\t\tperfil.setInicioBusqueda(cachedRowSet.getDate(++i));\n\t\t\t\tperfil.setCorreoElectronico(cachedRowSet.getString(++i));\n\t\t\t\tperfil.setEstiloCV(cachedRowSet.getInt(++i));\n\t\t\t\tperfil.setIdMedioPortal(cachedRowSet.getLong(++i));\n\t\t\t\tperfil.setIdEstatusPPC(cachedRowSet.getInt(++i));\n\t\t\t\tperfil.setApoyoProspera(cachedRowSet.getInt(++i));\n\t\t\t\tperfil.setDiscapacidades(cachedRowSet.getString(++i));\n\t\t\t\tperfil.setIdLicencia(cachedRowSet.getInt(++i));\n\t\t\t\tperfil.setFolioProspera(cachedRowSet.getString(++i));\n\t\t\t\tperfil.setFolioIntegranteProspera(cachedRowSet.getString(++i));\n\t\t\t\tperfil.setDisponibilidadRadicarPais(cachedRowSet.getInt(++i));\n\t\t\t\tperfil.setUltimaActualizacion(cachedRowSet.getString(\"fUltAct\"));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tlogger.error(e);\n\t\t\tthrow new SQLException(e);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlogger.error(e);\n\t\t}\n\t\treturn perfil;\n\t}", "public void seleccionarFotoPerfil(View v) {\n //Crea un Intent\n Intent intent = new Intent();\n //con intent.setType(\"image/*\") indicamos que en la nueva actividad solo se mostraran imagenes\n intent.setType(\"image/*\");\n //Muestra contenido que el usuario puede escoger, y que devolvera una URI resultante\n intent.setAction(Intent.ACTION_GET_CONTENT);\n //Inicia una nueva actividad que mostrara el seleccionador de imagenes\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), PICK_IMAGE_REQUEST);\n }", "public PerfilVO buscarPerfilUsuario(long idUsuario) throws SQLException {\n\t\tlogger.debug(\"Inicia metodo - buscarPerfilUsuario\");\n\t\tCONSULTA_PERFIL_CANDIDATO = \"BUSCAR_PERFIL_USUARIO\";\n\t\tLong[] parametros = { idUsuario };\n\t\tCachedRowSet cachedRowSet = executeQuery(parametros);\n\n\t\tPerfilVO perfil = null;\n\t\ttry {\n\t\t\tif (cachedRowSet.next()) {\n\t\t\t\tperfil = new PerfilVO();\n\t\t\t\tperfil.setIdCandidato(cachedRowSet.getLong(1));\n\t\t\t\tperfil.setIdUsuario(idUsuario);\n\t\t\t\tperfil.setIdOficina(cachedRowSet.getLong(2));\n\t\t\t\tperfil.setCurp(cachedRowSet.getString(3));\n\t\t\t\tperfil.setNombre(cachedRowSet.getString(4));\n\t\t\t\tperfil.setApellido1(cachedRowSet.getString(5));\n\t\t\t\tperfil.setApellido2(cachedRowSet.getString(6));\n\t\t\t\tperfil.setIdGenero(cachedRowSet.getInt(7));\n\t\t\t\tperfil.setFechaNacimiento(cachedRowSet.getDate(8));\n\t\t\t\tperfil.setEdad(obtenEdad(cachedRowSet.getDate(8)));\n\t\t\t\tperfil.setIdEntidadNacimiento(cachedRowSet.getLong(9));\n\t\t\t\tperfil.setEntidadNacimiento(cachedRowSet.getString(10));\n\t\t\t\tperfil.setIdEstadoCivil(cachedRowSet.getLong(11));\n\t\t\t\tperfil.setIdTipoDiscapacidad(cachedRowSet.getLong(12));\n\t\t\t\tperfil.setConfidencialidad(cachedRowSet.getInt(13));\n\t\t\t\tperfil.setContactoCorreo(cachedRowSet.getInt(14));\n\t\t\t\tperfil.setContactoTelefono(cachedRowSet.getInt(15));\n\t\t\t\tperfil.setHoraContactoIni(cachedRowSet.getLong(16));\n\t\t\t\tperfil.setHoraContactoFin(cachedRowSet.getLong(17));\n\t\t\t\tperfil.setIdRecibeOferta(cachedRowSet.getInt(18));\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tperfil.setIdTrabaja(Utils.validarCandidatoEmpleadoActualmente(cachedRowSet.getInt(19)));\n\t\t\t\tperfil.setIdRazonBusqueda(Utils.validarCandidatoRazonBusqueda(perfil.getIdTrabaja(), cachedRowSet.getLong(20)));\n\t\t\t\tperfil.setInicioBusqueda(cachedRowSet.getDate(21));\n\t\t\t\tperfil.setCorreoElectronico(cachedRowSet.getString(22));\n\t\t\t\tperfil.setEstiloCV(cachedRowSet.getInt(23));\n\t\t\t\tperfil.setIdMedioPortal(cachedRowSet.getLong(24));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tlogger.error(e);\n\t\t\tthrow new SQLException(e);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlogger.error(e);\n\t\t}\n\t\treturn perfil;\n\t}", "public UsuarioMovil getPerfil(String nombreUsuario) throws Exception {\n\t\t\n\t\treturn toUsuarioAndrac(getUsuarioFromDB(nombreUsuario));\n\n\t}", "public int getPerfil(){\n return this.perfil;\n }", "public List<Perfil> perfilListar() {\r\n\r\n try {\r\n ControladorPerfil ctrlperfil = new ControladorPerfil();\r\n return ctrlperfil.getListaPerfil();\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n return new ArrayList<>();\r\n }\r\n }", "public PerfilVO buscarPerfilCandidato(long idCandidato) throws SQLException {\n\t\tlogger.debug(\"Inicia metodo - buscarPerfilCandidato\");\n\t\tCONSULTA_PERFIL_CANDIDATO = \"BUSCAR_PERFIL_CANDIDATO\";\n\t\tLong[] parametros = { idCandidato };\n\t\tCachedRowSet cachedRowSet = executeQuery(parametros);\n\n\t\tPerfilVO perfil = null;\n\t\ttry {\n\t\t\tif (cachedRowSet.next()) {\n\t\t\t\tperfil = new PerfilVO();\n\t\t\t\tperfil.setIdCandidato(idCandidato);\n\t\t\t\tperfil.setDisponibilidadViajar(cachedRowSet.getInt(1));\n\t\t\t\tperfil.setDisponibilidadRadicar(cachedRowSet.getInt(2));\n\t\t\t\tperfil.setIdExperienciaTotal(cachedRowSet.getLong(3));\n\t\t\t\tperfil.setIdSectorMayorExpr(cachedRowSet.getLong(4));\n\t\t\t\tperfil.setPuestoMayorExpr(cachedRowSet.getString(5));\n\t\t\t\tperfil.setIdAreaLaboralMayorExpr(cachedRowSet.getLong(6));\n\t\t\t\tperfil.setIdOcupacionMayorExpr(cachedRowSet.getLong(7));\n\t\t\t\tperfil.setComputacionBasica(cachedRowSet.getInt(8));\n\t\t\t\tperfil.setIdExperienciaCompu(cachedRowSet.getLong(9));\n\t\t\t\tperfil.setIdDominioCompu(cachedRowSet.getLong(10));\n\t\t\t\tperfil.setIdExperienciaOffice(cachedRowSet.getLong(11));\n\t\t\t\tperfil.setIdDominioOffice(cachedRowSet.getLong(12));\n\t\t\t\tperfil.setIdExperienciaInternet(cachedRowSet.getLong(13));\n\t\t\t\tperfil.setIdDominioInternet(cachedRowSet.getLong(14));\n\t\t\t\tperfil.setComputacionAvanzada(cachedRowSet.getInt(15));\n\t\t\t\tperfil.setSinEstudios(cachedRowSet.getInt(16));\n\t\t\t\tperfil.setSinExperiencia(cachedRowSet.getInt(17));\n\t\t\t\tperfil.setExperiencia(cachedRowSet.getString(18));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tlogger.error(e);\n\t\t\tthrow new SQLException(e);\n\t\t}\n\t\treturn perfil;\n\t}", "public PanelPerfil getPerfil(){\n return perfil;\n }", "@Override\n\tpublic ImagenOArchivo findImagenOarchivoByPerfilId(int perfilId) {\n\t\tString queryString1 = \"from ImagenOArchivo where perfil.perfilID = ? \";\n\t\tObject[] params1 = new Object[1];\n\t\tparams1[0] = perfilId;\n\t\t\n\t\tList<ImagenOArchivo> listImagenOArchivo = super.find(queryString1,params1);\n\t\tif (listImagenOArchivo != null && listImagenOArchivo.size()!=0) {\n\t\t\treturn listImagenOArchivo.get(0);\n\t\t}\n\t\treturn null;\n\t}", "public List getPerfilMusical(String idSessao) throws SessaoInexistenteException, SessaoInvalidaException {\r\n\t\tString login = gerenciaSessao.getLoginUser(idSessao);\r\n\t\treturn gerenciaUsuario.getPerfilMusical(login);\r\n\t}", "private void cargarRegistroMedicamentos() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"admision_seleccionada\", admision_seleccionada);\r\n\t\tparametros.put(\"rol_medico\", \"S\");\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\"/pages/registro_medicamentos.zul\", \"REGISTRO DE MEDICAMENTOS\",\r\n\t\t\t\tparametros);\r\n\t}", "public void setAnoFilmagem(String anoFilmagem);", "public void ValidandoPerfil()\r\n\t{\n\t\t\r\n\t}", "public Optional<Usuario> visualizarPerfil (String nome){\n\t\tOptional<Usuario> usuarioExistente = repository.findByNome(nome);\n\t\t\n\t\tif(usuarioExistente.isPresent()) {\n\t\t\treturn usuarioExistente;\n\t\t}else {\n\t\t\treturn Optional.empty();\n\t\t}\n\t}", "public void setIdPerfil(Integer idPerfil) {\n this.idPerfil = idPerfil;\n }", "@Override\n\tpublic List<Contacto> listaPerfilMatch(Perfil perfil) {\n\t\tList<Contacto>lista=perfilDAOImp.listaPerfilMatch(perfil);\n\t\treturn lista;\n\t}", "public Guardia buscarMedico(int dpi){\r\n Guardia med = new Guardia();\r\n\t\tfor (int i = 0;i<medicosenfermeras.size();i++) {\r\n med = medicosenfermeras.get(i);\r\n if((dpi == med.getDpi())&&(med instanceof Medico)){\r\n\t\t\treturn med; \r\n }\r\n\t\t}\r\n return med; \r\n\t}", "public String getAnoFilmagem();", "@RequestMapping(value=\"/perfil/{codigo}\", method = RequestMethod.GET, produces=MediaType.APPLICATION_JSON_UTF8_VALUE)\n\tpublic @ResponseBody PerfilModel buscar(@PathVariable(\"codigo\") Integer codigo){\n\t\treturn this.perfilRepository.findOne(codigo);\n\t}", "public void creaRutaImgPerfil(){\n servletContext=(ServletContext) contexto.getExternalContext().getContext();\n String ruta=\"\";\n //Ruta real hasta la carpeta de uploads\n ruta=servletContext.getRealPath(\"/upload/\");\n \n //Concatenamiento de directorios internos\n ruta+=File.separatorChar+\"img\"+File.separatorChar+\"users\"+File.separatorChar;\n \n //Asignacion de la ruta creada\n this.rutaImgPerfil=ruta;\n }", "public mx.com.actinver.negocio.bursanet.practicasventa.ws.carterasModelo.PerfilTO getPerfilTO() {\n return perfilTO;\n }", "public Perfil getPerfil() {\r\n\t\tif(perfil == null){\r\n\t\t\tperfil = new Perfil();\r\n\t\t}\r\n\t\treturn perfil;\r\n\t}", "public Integer getIdPerfil() {\n return idPerfil;\n }", "private void controladorPerfil(Controlador controlador){\n this.contUserDisplayCollective = controlador.getUserDisplayCollective();\n perfil.setControlCollective((ListSelectionListener)contUserDisplayCollective);\n inicioUser.setControlCollective((ListSelectionListener)contUserDisplayCollective);\n\n this.contUserDisplayProject = controlador.getUserDisplayProject();\n perfil.setControlProject((ListSelectionListener)contUserDisplayProject);\n inicioUser.setControlProject((ListSelectionListener)contUserDisplayProject);\n inicioAdmin.setControlProject((ListSelectionListener)contUserDisplayProject);\n \n }", "List<Perfil> findAll();", "public void setPerfilDescripcion(String descripcion);", "public void llenadoDeCombos() {\n PerfilDAO asignaciondao = new PerfilDAO();\n List<Perfil> asignacion = asignaciondao.listar();\n cbox_perfiles.addItem(\"\");\n for (int i = 0; i < asignacion.size(); i++) {\n cbox_perfiles.addItem(Integer.toString(asignacion.get(i).getPk_id_perfil()));\n }\n \n }", "public PerfilTO guardarOActualizar(PerfilTO perfil);", "public static void cargarMedicos() {\n medicos = new LinkedList<>();\n try {\n File f = new File(\"medicos.txt\");\n Scanner s = new Scanner(f);\n while (s.hasNextLine()) {\n String line = s.nextLine();\n String[] texto = line.split(\",\");\n Medico m = new Medico(texto[0], texto[1], texto[2], Integer.parseInt(texto[3]));\n int idPuesto = Integer.valueOf(texto[4].trim());\n if (idPuesto!=0) {\n Puesto pt = puestoPorId(idPuesto);\n if(pt == null){\n pt = new Puesto();\n puestos.add(pt);\n }\n m.setPuesto(pt);\n pt.setMedico(m);\n }\n else{\n m.setPuesto(null);\n }\n medicos.add(m);\n }\n } catch (FileNotFoundException e) {\n System.out.println(\"El archivo no existe...\");\n }\n }", "public void setPerfilTO(mx.com.actinver.negocio.bursanet.practicasventa.ws.carterasModelo.PerfilTO perfilTO) {\n this.perfilTO = perfilTO;\n }", "Filmes(String nome,String genero){\n\t\tthis.nome = nome;\n\t\tthis.genero = genero;\n\t}", "public ProfesorImpl buscarPorID(int ID, String ruta)\n\t{\n\t\tFile fichero = null;\n\t\tFileReader reader = null;\n\t\tBufferedReader br = null;\n\t\tProfesorImpl profesor = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tfichero = new File(ruta);\n\t\t\treader = new FileReader(fichero);\n\t\t\tbr = new BufferedReader(reader);\n\t\t\t\n\t\t\t//int IDLeidoStr = reader.read();\n\t\t\t//String registro = br.readLine(); //Lee el primer registro\n\t\t\t\n\t\t\tString linea = br.readLine();\t//Leer la primera línea\n\t\t\tString IDLeido = null;\n\t\t\tString[] array = null;\n\t\t\t\n\t\t\tif(linea != null)\t//Si el registro no está vacio\n\t\t\t{\n\t\t\t\tarray = linea.split(\",\");\t\t\t//guardar los campos\n\t\t\t\tIDLeido = array[0];\t\t\t\t\t//El primer ID\n\t\t\t}\n\t\t\twhile(linea != null && Integer.parseInt(IDLeido) != ID)\t\t//Si el registro no está vacío ni coincide con la ID a buscar.\n\t\t\t{\n\t\t\t\tlinea = br.readLine();\t\t//leer otra línea\n\t\t\t\tif(linea != null)\n\t\t\t\t{\n\t\t\t\t\tarray = linea.split(\",\");\n\t\t\t\t\tIDLeido = array[0]; \t//El ID del siguiente\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(linea != null)\t\t\t//Si ha encontrado el ID\n\t\t\t{\n\t\t\t\tString nombre = array[1];\n\t\t\t\tString sexoStr = array[2];\n\t\t\t\tString edadStr = array[3];\n\t\t\t\t\n\t\t\t\t//System.out.println(\"\" + IDLeido + nombre + sexoStr + edadStr);\n\t\t\t\t\n\t\t\t\tchar sexo = sexoStr.charAt(0);\n\t\t\t\tint edad = Integer.parseInt(edadStr);\n\t\t\t\t\n\t\t\t\tprofesor = new ProfesorImpl(ID, nombre, sexo, edad);\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\treader.close();\n\t\t\t\t//entradaFichero.close();\n\t\t\t}\n\t\t\tcatch(IOException e)\n\t\t\t{\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn profesor;\n\t}", "public List<FilmeAtor> buscarFilmesAtoresPeloNomeFilmeOuNomeAtor(String nomeFilmeOuAtor) {\n EntityManager gerenciador = JPAUtil.getGerenciador();\r\n\r\n //Criando a consulta ao BD\r\n TypedQuery<FilmeAtor> consulta = gerenciador.createQuery(\r\n \"SELECT new dados.dto.FilmeAtor(f, a) FROM Filme f JOIN f.atores a WHERE f.nome like :nomeFilme or a.nome like :nomeAtor\",\r\n FilmeAtor.class);\r\n\r\n consulta.setParameter(\"nomeFilme\", nomeFilmeOuAtor + \"%\");\r\n consulta.setParameter(\"nomeAtor\", nomeFilmeOuAtor + \"%\");\r\n \r\n return consulta.getResultList();\r\n\r\n }", "public static String getBiblioImagenUsuario() {\n\t\treturn \"imagenUsuario\";\n\t}", "public List<PerfilTO> buscarTodos();", "public ModificarPerfilBean() {\r\n }", "public void CargarDatosUsuario(String nickname, String mail, String nombre, String pass, DataDireccion direccion, String apellido, Date fechaNacimiento, String rutaImagen);", "@Override\n\tpublic List<PersonalisationMediaModel> getImageByID(final String imageID)\n\t{\n\t\tfinal String query1 = \"Select {pk} from {PersonalisationMedia} Where {code}=?imageId and {user}=?user\";\n\t\t/**\n\t\t * select distinct {val:pk} from {PersonalisationMediaModel as val join MediaModel as media on\n\t\t * {media:PK}={val.image} join User as user on {user:pk}={val:user} and {media:code}=?imageId and {user:pk}=?user}\n\t\t */\n\t\tfinal UserModel user = getUserService().getCurrentUser();\n\t\tfinal FlexibleSearchQuery fQuery = new FlexibleSearchQuery(query1);\n\t\tfinal Map<String, Object> params = new HashMap<>();\n\t\tparams.put(\"imageId\", imageID);\n\t\tparams.put(\"user\", user);\n\t\tfQuery.addQueryParameters(params);\n\t\tLOG.info(\"getImageByID\" + fQuery);\n\t\tfinal SearchResult<PersonalisationMediaModel> searchResult = flexibleSearchService.search(fQuery);\n\t\treturn searchResult.getResult();\n\t}", "@Override\n\tpublic List<Perfil> listaPerfilDescarte(Perfil perfil) {\n\t\tList<Perfil> lista = perfilDAOImp.listaPerfilDescarte(perfil);\n\t\treturn lista;\n\t}", "public List<Perfil> listaPerfilContacto(Perfil perfil) {\n\t\tList<Perfil> lista = perfilDAOImp.listaPerfilContacto(perfil);\n\t\treturn lista;\n\t}", "public void setFoto(java.lang.String foto) {\n this.foto = foto;\n }", "public List<Personagem> findByMembroId(String id);", "public java.lang.String getCod_perfil() {\n\t\treturn dataCacheEntry.getCod_perfil();\n\t}", "private void filterPerName(EntityManager em) {\n System.out.println(\"Please enter the name: \");\n Scanner sc = new Scanner(System.in);\n //Debug : String name = \"Sel\";\n\n String name = sc.nextLine();\n\n TypedQuery<Permesso> query = em.createQuery(\"select p from com.hamid.entity.Permesso p where p.nome like '%\"+ name\n + \"%'\" , Permesso.class);\n\n List<Permesso> perList = query.getResultList();\n\n for (Permesso p : perList) {\n System.out.println(p.getNome());\n }\n }", "private void calculateMediem(){\r\n int mediemNum = accountInTotal/2;\r\n Account mediemAccount = theAccounts.get(mediemNum);\r\n System.out.println(mediemAccount.toString());\r\n }", "private void guardarFoto() {\n if (foto != null && is != null) {\n\n Image foto_Nueva;\n foto_Nueva = foto.getScaledInstance(frmPersona.getLblFoto().getWidth(), frmPersona.getLblFoto().getHeight(), Image.SCALE_SMOOTH);\n frmPersona.getLblFoto().setIcon(new ImageIcon(foto_Nueva));\n cancelarFoto();\n ctrFrmPersona.pasarFoto(is);\n } else {\n JOptionPane.showMessageDialog(vtnWebCam, \"Aun no se a tomado una foto.\");\n }\n\n }", "public CPerfil selectByPrimaryKey(String idPerfil) throws SQLException {\r\n\t\tCPerfil key = new CPerfil();\r\n\t\tkey.setIdPerfil(idPerfil);\r\n\t\tCPerfil record = (CPerfil) sqlMapClient.queryForObject(\r\n\t\t\t\t\"C_PERFIL.ibatorgenerated_selectByPrimaryKey\", key);\r\n\t\treturn record;\r\n\t}", "public String[] ListarDPIMedicos(){\r\n int cantidad=0;\r\n Guardia s;\r\n for (int i = 0; i < medicosenfermeras.size(); i++) {\r\n s= medicosenfermeras.get(i);\r\n if (s instanceof Medico) {\r\n cantidad++;\r\n }\r\n }\r\n \r\n String[] DPIMedicos= new String[cantidad];\r\n Guardia t;\r\n int m=0;\r\n for (int i = 0; i < medicosenfermeras.size(); i++) {\r\n t=medicosenfermeras.get(i);\r\n if (t instanceof Medico) {\r\n DPIMedicos[m]=t.getNit();\r\n m++;\r\n }\r\n }\r\n \r\n return DPIMedicos;\r\n }", "public List<ImageFile> getUserImage(int userID) {\n List<ImageFile> listOfImages = null;\n Session session = sessionFactory.openSession();\n // Try to return the user by the given nickname\n try {\n session.beginTransaction();\n \n // if mode equals MINE then get just users ID\n Criteria criteria = session.createCriteria(ImageFile.class);\n criteria.add(Restrictions.eq(\"ownerUser.userID\", userID));\n listOfImages = (List<ImageFile>) criteria.list();\n \n session.getTransaction().commit();\n session.flush();\n } \n catch (HibernateException e) { e.printStackTrace(); return null;} \n finally { session.close(); }\n // Return userID if seted\n return listOfImages;\n }", "public boolean buscarMedico2(int dpi){\r\n Guardia med = new Guardia();\r\n boolean esta = false;\r\n\t\tfor (int i = 0;i<medicosenfermeras.size();i++) {\r\n med = medicosenfermeras.get(i);\r\n if((dpi == med.getDpi())&&(med instanceof Medico)){\r\n\t\t\testa = true;\r\n return esta;\r\n \t }\r\n\t\t}\r\n return esta;\r\n\t}", "private void cargarPreescripcionMedica() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\tparametros.put(\"nro_ingreso\", admision_seleccionada.getNro_ingreso());\r\n\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\tparametros.put(\"tipo_hc\", \"\");\r\n\t\tparametros.put(\"ocultaValor\", \"\");\r\n\t\tparametros.put(\"admision\", admision_seleccionada);\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false, \"/pages/receta_rips.zul\",\r\n\t\t\t\t\"PRESCRIPCION MEDICA\", parametros);\r\n\t}", "String getAvatar();", "public void cargarMedicamento() {\n if (medicamentoSeleccionadoTabla == null) {\r\n imprimirMensaje(\"Error\", \"No se ha seleccionado ningún medicamento de la tabla\", FacesMessage.SEVERITY_ERROR);\r\n return;\r\n }\r\n limpiarFormularioMedicamentos();\r\n medicamentoSeleccionado = medicamentoFacade.find(medicamentoSeleccionadoTabla.getIdMedicamento());\r\n codigoMedicamento = medicamentoSeleccionado.getCodigoMedicamento();\r\n codigoCums = medicamentoSeleccionado.getCodigoCums();\r\n codigoCups = medicamentoSeleccionado.getCodigoCups();\r\n nombreMedicamento = medicamentoSeleccionado.getNombreMedicamento();\r\n nombreGenerico = medicamentoSeleccionado.getNombreGenerico();\r\n nombreComercial = medicamentoSeleccionado.getNombreComercial();\r\n formaMedicamento = medicamentoSeleccionado.getFormaMedicamento();\r\n pos = medicamentoSeleccionado.getPos();\r\n concentracion = medicamentoSeleccionado.getConcentracion();\r\n unidadMedida = medicamentoSeleccionado.getUnidadMedida();\r\n controlMedico = medicamentoSeleccionado.getControlMedico();\r\n registroSanitario = medicamentoSeleccionado.getRegistroSanitario();\r\n modAdmin = medicamentoSeleccionado.getModAdmin();\r\n if (medicamentoSeleccionado.getValor() != null) {\r\n valor = medicamentoSeleccionado.getValor();\r\n }\r\n tituloTabMedicamentos = \"Datos Medicamento: \" + nombreMedicamento;\r\n RequestContext.getCurrentInstance().execute(\"PF('dialogoBuscarMedicamentos').hide();\");\r\n }", "public IPermissionOwner getPermissionOwner(String fname);", "ConsultaDto<ProdutorVO> obterByNomeApelido(String nomeApelido, Integer idInstituicao, int pagina, int tamanhoPagina, Boolean filtrarCategoriaAtiva) throws BancoobException;", "public QuerySet<Perfil> getPerfilSet() {\n QuerySet<Perfil> perfilList = new QuerySet<Perfil>();\n Perfil perfil = null;\n for (Privilegio privilegio : getPrivilegioSet()) {\n perfil = Perfil.objects.<Perfil>get(\"id\", privilegio.getPerfil().getId());\n perfil.getPermissoes();\n perfilList.add(perfil);\n }\n return perfilList;\n }", "public void recuperarDatosMedidor(String codigo){\n\t\ttry{\n\t\t\tList<Medidor> listaMedidor = new ArrayList<Medidor>();\n\t\t\tlistaMedidor = medidorDao.getRecuperaMedidor(codigo);\n\t\t\tfor(int i = 0 ; i < listaMedidor.size() ; i ++) {\n\t\t\t\ttxtIdMedidor.setText(String.valueOf(listaMedidor.get(i).getIdMedidor()));\n\t\t\t\ttxtCodigo.setText(listaMedidor.get(i).getCodigo());\n\t\t\t\tcboEstadoMed.setValue(listaMedidor.get(i).getEstadoMedidor());\n\t\t\t\ttxtMarca.setText(listaMedidor.get(i).getMarca());\n\t\t\t\ttxtModelo.setText(listaMedidor.get(i).getModelo());\n\t\t\t\ttxtPrecio.setText(String.valueOf(listaMedidor.get(i).getPrecio()));\n\t\t\t\t\n\t\t\t\tmedidorSeleccionado = listaMedidor.get(i);\n\t\t\t}\n\t\t\tif (listaMedidor.size() == 0)\n\t\t\t\tmedidorSeleccionado = new Medidor();\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@GET\n @Path(\"/mostrarOrdenadasFS\")\n @Produces({\"application/json\"})\n public List<Fotografia> fotoUsuarioOrdenadaFS(){\n int idUser = 1;\n return fotografiaEJB.FotoUsuarioOrdenadasFS(idUser);\n }", "private void listarProfesores(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n Connection con = null;//Objeto para la conexion\r\n Statement sentencia = null;//Objeto para definir y ejecutar las consultas sql\r\n ResultSet resultado = null;//Objeto para obtener los resultados de las consultas sql\r\n String sql = \"\";\r\n try {\r\n con = conBD.getCConexion();\r\n //Definición de Sentencia SQL\r\n //sql = \"SELECT semail,sclave,nestado,snombre,sapellido,stelefono,sgenero,nidPerfil FROM usuarios\";\r\n sql = \"SELECT semail,sclave,nestado,usuarios.snombre,sapellido,stelefono,sgenero,nidPerfil,\"\r\n + \"(case WHEN nestado=0 THEN 'Inactivo' ELSE 'Activo' END) AS sestado,\"\r\n + \"(case WHEN sgenero=0 THEN 'Femenino' ELSE 'Masculino' END) AS desgenero,\"\r\n + \"perfiles.snombre \"\r\n + \"FROM usuarios,perfiles \"\r\n + \"where usuarios.nidPerfil=perfiles.idPerfil and usuarios.nidPerfil=3 \"\r\n + \"order by usuarios.snombre\";\r\n\r\n //Ejecutar sentencia\r\n sentencia = con.createStatement();\r\n resultado = sentencia.executeQuery(sql);\r\n\r\n //arreglo donde se gurdaran los usuarios encontrados en la BD\r\n ArrayList Usuarios = new ArrayList();\r\n while (resultado.next()) //si el resultado tiene datos empezar a guardarlos.\r\n {\r\n Usuario e = new Usuario(resultado.getString(1), resultado.getString(2),\r\n resultado.getString(4), resultado.getString(5), resultado.getString(6), resultado.getString(7),\r\n resultado.getInt(8), resultado.getInt(3));\r\n //agregamos las descripciones al objeto.\r\n e.setDescripcionEstado(resultado.getString(9));\r\n e.setDescripcionGenero(resultado.getString(10));\r\n e.setDescripcionPerfil(resultado.getString(11));\r\n //Agregamos el profesor al arrelo\r\n Usuarios.add(e);\r\n }\r\n // Agregar el arreglo de profesores a la solicitud\r\n request.setAttribute(\"Profesores\", Usuarios);\r\n //redirigir la solicitu a la página JSP\r\n request.getRequestDispatcher(\"/EscribirMensaje.jsp\").include(request, response);\r\n //cerrar la conexion\r\n //con.close();\r\n } catch (SQLException ex) {\r\n System.out.println(\"No se ha podido establecer la conexión, o el SQL esta mal formado \" + sql);\r\n request.getRequestDispatcher(\"/Error.jsp\").forward(request, response);\r\n }\r\n }", "public String salirEdPerfil() {\n\t\tofer_id = null;\n\t\tofer_valor_oferta = null;\n\t\tofer_fecha_oferta = null;\n\t\titem = null;\n\t\tpostulante = null;\n\t\titem_nombre = \"\";\n\t\titem_caracteristicas = \"\";\n\t\titem_imagen = \"\";\n\t\tpos_nombre = \"\";\n\t\tpos_apellido = \"\";\n\t\tpos_direccion = \"\";\n\t\tpos_correo = \"\";\n\t\tpos_telefono = \"\";\n\t\tpos_password = \"\";\n\t\tpos_celular = \"\";\n\t\tpos_institucion = \"\";\n\t\tpos_gerencia = \"\";\n\t\tpos_area = \"\";\n\t\tgetListaItems().clear();\n\t\tgetListaItems().addAll(managergest.findAllItems());\n\t\treturn \"home?faces-redirect=true\";\n\t}", "public int getFileno() {\n return internalFileno;\n }", "EhrPersonFile selectByPrimaryKey(Long id);", "public ProfilePicVO selectProfilePic(String memberId) {\r\n\t\tProfilePicVO pvo = memberDAO.selectProfilePic(memberId);\r\n\t\tSystem.out.println(\"service에서 pvo:\" + pvo);\r\n\t\treturn pvo;\r\n\t}", "public Profesional buscarMedicoNombre(String n) {\n for (int i = 0; i < medicos.length; i++) {\n if (medicos[i] != null) {\n if (medicos[i].getNombre().equals(n)) {\n return medicos[i];\n }\n }\n\n }\n return null;\n }", "private void putPersonalInformation() throws SQLException, FileNotFoundException, IOException {\n AdUserPersonalData personal;\n try {\n personal = PersonalDataController.getInstance().getPersonalData(username);\n staff_name = personal.getGbStaffName();\n staff_surname = personal.getGbStaffSurname();\n id_type = \"\"+personal.getGbIdType();\n id_number = personal.getGbIdNumber();\n putProfPic(personal.getGbPhoto());\n phone_number = personal.getGbPhoneNumber();\n mobile_number = personal.getGbMobileNumber();\n email = personal.getGbEmail();\n birthdate = personal.getGbBirthdate();\n gender = \"\"+personal.getGbGender();\n } catch (GB_Exception ex) {\n LOG.error(ex);\n GBMessage.putException(ex);\n }\n }", "int getAvatar();", "private void seePerso() {\n\t\tfor (int i = 0; i < persoList.size(); i++) {\n\t\t\tPersonnage perso = persoList.get(i);\n\t\t\tSystem.out.println(\"id : \" + i);\n\t\t\tSystem.out.println(perso);\n\t\t}\n\n\t\tSystem.out.println(\"souhaitez vous modifier un personnage ? o/n\");\n\t\tif (sc.nextLine().toLowerCase().contentEquals(\"o\")) {\n\t\t\tSystem.out.println(\"Lequel ? id\");\n\t\t\tint id = sc.nextInt();\n\t\t\tsc.nextLine();\n\t\t\tchangePerso(id);\n\t\t}\n\t}", "@Override\r\n public void adicionarFilme(Filme filme) {\r\n listaFilme.add(filme);\r\n }", "private void modificarProfesor(){\n \n System.out.println(\"-->> MODIFICAR PROFESOR\");\n int opcion;\n String nif=IO_ES.leerCadena(\"Inserte el nif del profesor\");\n if(ValidarCadenas.validarNIF(nif)){\n Profesor profesor=(Profesor) getPersona(LProfesorado, nif);\n if(profesor!=null){\n do{\n System.out.println(profesor);\n System.out.println(\"\\n1. Nombre\");\n System.out.println(\"2. Dirección\");\n System.out.println(\"3. Código Postal\");\n System.out.println(\"4. Teléfono\");\n System.out.println(\"5. Módulo\");\n System.out.println(\"0. Volver\");\n opcion=IO_ES.leerInteger(\"Inserte una opción: \", 0, 5);\n \n \n switch(opcion){\n \n case 1:\n actualizarNombre(profesor);\n break;\n case 2:\n actualizarDireccion(profesor);\n break;\n case 3:\n actualizarCodigoPostal(profesor);\n break;\n case 4:\n actualizarTelefono(profesor);\n break;\n case 5:\n actualizarModulo(profesor);\n break;\n \n \n }\n \n }while(opcion!=0);\n }\n else{\n System.out.println(\"El profesor no existe\");\n }\n \n }\n else {\n System.out.println(\"El nif no es válido\");\n }\n \n }", "public static String savePicture(HttpSession session, MultipartFile file, long id) throws IOException {\n String path = session.getServletContext().getRealPath(destination);\n File savedFile = new File(path + \"\\\\\" + id + \".jpg\");\n FileUtils.writeByteArrayToFile(savedFile, file.getBytes());\n File[] testFileSave = findFile(session, id);\n \n if (testFileSave.length == 1) { // return waarde van profilePicture-attribuut van User\n return destination + id + \".jpg\";\n } else {\n return null;\n }\n \n }", "public Perfil create(Perfil perfil);", "public static String obtenerListaProfesores () {\n StringBuilder sb;\n Statement stmt;\n String query;\n ResultSet result;\n try {\n iniciarConexion();\n sb = new StringBuilder();\n stmt = connection.createStatement();\n query = \"SELECT * FROM usuarios WHERE Matricula LIKE 'l%';\";\n result = stmt.executeQuery(query);\n while (result.next()) {\n sb.append(result.getString(2));\n sb.append(\" \");\n sb.append(result.getString(3));\n sb.append(\",\");\n }\n return sb.toString();\n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n return \"\";\n }\n }", "public Object getMyidForPassword(Object obj) {\n\t\tMemberVO requestMemberVO = (MemberVO)obj;\r\n\t\tString id = requestMemberVO.getId();\r\n\r\n\t\tMemberVO memberVO = new MemberVO();\r\n\t\ttry {\r\n\t\t\tbr = new BufferedReader(new FileReader(\"member.txt\"));\r\n\t\t\tString[] tempStringArray; \r\n\t\t\tString[] temp2StringArray; \r\n\t\t\tArrayList<String> favoriteList = new ArrayList<String>();\r\n\r\n\t\t\tString line = \"\";\r\n\t\t\twhile((line = br.readLine()) != null) {\r\n\t\t\t\ttempStringArray = line.split(\"§§\");\r\n\t\t\t\tmemberVO.setUserNumber(Integer.parseInt(tempStringArray[0]));\r\n\t\t\t\tmemberVO.setId(tempStringArray[1]);\r\n\t\t\t\tmemberVO.setBirth(tempStringArray[2]);\r\n\t\t\t\tmemberVO.setPhoneNumber(tempStringArray[3]);\r\n\t\t\t\tmemberVO.setEmail(tempStringArray[4]);\r\n\t\t\t\tmemberVO.setPassword(tempStringArray[5]);\r\n\t\t\t\tmemberVO.setName(tempStringArray[6]);\r\n\t\t\t\tmemberVO.setGender(tempStringArray[7]);\r\n\t\t\t\tmemberVO.setAddress(tempStringArray[8]);\r\n\t\t\t\tmemberVO.setPoint(Integer.parseInt(tempStringArray[9]));\r\n\t\t\t\ttemp2StringArray = tempStringArray[10].split(\",\");\r\n\t\t\t\tfor(String favorite : temp2StringArray) {\r\n\t\t\t\t\tfavoriteList.add(favorite);\r\n\t\t\t\t}\r\n\t\t\t\tmemberVO.setFavorite(favoriteList);\r\n\t\t\t\tmemberVO.setProfilePhotoPath(tempStringArray[11]);\r\n\r\n\t\t\t\tif(id.equals(memberVO.getId())) {\r\n\t\t\t\t\tSystem.out.println(\"아이디 찾기 완료 : \" + memberVO.toString());\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tfavoriteList.clear();\r\n\t\t\t}\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif(br != null) {\r\n\t\t\t\t\tbr.close();\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"아이디 찾기 실패\");\r\n\t\treturn false;\r\n\t}", "@Override\n\tpublic List<Medicina> listarPorIdPaciente(Integer idPaciente) {\n\t\treturn dao.findMedicinaByPaciente(idPaciente);\n\t}", "public static Profesor buscaProfesor(String codigo){\n\t\tProfesor profesor = null;\n\t\tResultSet resultadoConsulta;\n\t\tPreparedStatement comando;\n\t\tString query = \"SELECT \"\n\t\t\t\t+ \"id,\"\n\t\t\t\t+ \"nombre,\"\n\t\t\t\t+ \"apellido_paterno,\"\n\t\t\t\t+ \"apellido_materno,\"\n\t\t\t\t+ \"codigo \"\n\t\t\t\t+ \"FROM \"\n\t\t\t\t+ \"profesor \"\n\t\t\t\t+ \"WHERE \"\n\t\t\t\t+ \"codigo = ?\";\n\t\ttry {\n\t\t\tcomando = conexion.prepareStatement(query);\n\t\t\tcomando.setString(1,codigo);\n\t\t\tresultadoConsulta = comando.executeQuery();\n\t\t\t\n\t\t\twhile(resultadoConsulta.next()){\n\t\t\t\tprofesor= new Profesor(resultadoConsulta.getString(\"nombre\"),\n\t\t\t\t\t\tresultadoConsulta.getString(\"apellido_paterno\"),\n\t\t\t\t\t\tresultadoConsulta.getString(\"apellido_materno\"),\n\t\t\t\t\t\tresultadoConsulta.getString(\"codigo\"),\n\t\t\t\t\t\tresultadoConsulta.getInt(\"id\"));\n\t\t\t}\n\t\t\treturn profesor;\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn profesor;\n\t}", "public Principal(String caminhoArquivoRecebido) {\n this.caminhoArquivo = caminhoArquivoRecebido;\n }", "void updateProfilePhoto(int userId, String filename);", "private BufferedImage sacaFoto(String fo){\n File input = null;\n BufferedImage image = null;\n try{\n input = new File(fo);\n image = ImageIO.read(input);\n }catch(IOException ioe){\n System.out.println(\"Hubo un error en la lectura de la imagen\");\n System.exit(1);\n }\n return image;\n }", "public List<Filme> buscarPeloNome(String nome) {\n EntityManager gerenciador = JPAUtil.getGerenciador();\r\n\r\n //Criando a consulta ao BD\r\n TypedQuery<Filme> consulta = gerenciador.createQuery(\r\n \"Select f from Filme f where f.nome like :nome\",\r\n Filme.class);\r\n\r\n //Substituindo o parametro :nome pelo valor da variavel n\r\n consulta.setParameter(\"nome\", nome + \"%\");\r\n\r\n //Retornar os dados\r\n return consulta.getResultList();\r\n\r\n }", "public void CargarDatosUsuario(String nickname, String mail, String nombre, String pass, DataDireccion direccion, String[] rutaImagen) throws Exception;", "public FrmListaCamaras(SipManager manager,FrmPrincipal parent){\r\n\t\tsuper();\r\n\t\tsetParent(parent);\r\n\t\tsipManager = manager;\r\n\t\t\r\n\t\t//instancio un objeto directorio\r\n\t\tFile directorio = new File( System.getProperty(\"user.dir\") + File.separator + sipManager.getUserName() );\r\n\t\t\r\n\t\t//lo creo fisicamente en el filesystem\r\n\t\tif(!directorio.exists()){\r\n\t\t\tdirectorio.mkdir();\r\n\t\t}\t\r\n\t\tFile fileCamaras = new File( System.getProperty(\"user.dir\") + File.separator + sipManager.getUserName()+ File.separator +\"listaCamaras.xml\");\r\n\t\t\r\n\t\tif(!fileCamaras.exists())\r\n\t\t\ttry {\r\n\t\t\t\tfileCamaras.createNewFile();\r\n\t\t\t}catch (IOException ioException){ \r\n\t\t\t\tLoguer.showMessageError(\"Error al crear archivo con la lista de camaras disponibles \\n \" +\r\n\t\t\t\t\t\t\t\t\t \"El error devuelto es: \" + ioException.getMessage());\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\tSystem.exit(1);\r\n\t\t\t}\r\n\t\t\r\n\t\tfileXmlCamaras = System.getProperty(\"user.dir\") + File.separator + sipManager.getUserName() + File.separator + \"listaCamaras.xml\";\r\n\t}", "public void uploadPhotoProfile(FileEntryEvent ev){\n\tArrayList<Photo> listePhotos=new ArrayList<Photo>();\r\n\tlistePhotos=mbb.getMembre().getListePhotos();\r\n\tint idPhotoProfile=0;\r\n\t\r\n\tfor(Photo photo : listePhotos)\r\n\t{\r\n\t\tif(photo.getIsProfil())\r\n\t\t\tidPhotoProfile=photo.getId();\r\n\t}\r\n\t\r\n\tint photoProfileSupprime=PhotoManager.deletePhoto(idPhotoProfile);\r\n\tSystem.out.println(photoProfileSupprime);\r\n\tif(photoProfileSupprime>0)\r\n\t{\r\n\t\t\r\n\t//mettre la main sur le fileEntry\r\n\tFileEntry fiE = (FileEntry)ev.getSource();\r\n\t//récupérer ses results\r\n\tFileEntryResults fr = fiE.getResults();\r\n\t\r\n\t// Create an instance of SimpleDateFormat used for formatting \r\n\t\t\t// the string representation of date (month/day/year)\r\n\t\t\tDateFormat df = new SimpleDateFormat(\"ddMMyyyyHHmmss\");\r\n\r\n\t\t\t// Get the date today using Calendar object.\r\n\t\t\tDate today = Calendar.getInstance().getTime(); \r\n\t\t\t// Using DateFormat format method we can create a string \r\n\t\t\t// representation of a date with the defined format.\r\n\t\t\tString reportDate = df.format(today);\r\n\t\t\t\r\n\t\r\n\t//boucler sur les FileInfo\r\n\tfor(FileEntryResults.FileInfo fi: fr.getFiles()){\r\n\t\t//s'assurer que le fichier est enregistrer\r\n\t\tif(fi.isSaved()){\r\n\t\t\tSystem.out.println(\"le nom ========= \"+reportDate+fi.getFileName());\r\n\t\t\t//recu le fichier\r\n\t\t\tFile f = fi.getFile();\r\n\t\t\t\r\n\t\t\t//TODO verifier que c'est le bon type de fichier\r\n\t\t\t//renommer\r\n\t\t\ttry {\r\n\t\t\t\tString cheminApp=FacesContext.getCurrentInstance().getExternalContext().getRealPath(\"/\");\r\n\t\t\t\tString newch=cheminApp;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tboolean ren=f.renameTo(new File(newch+\"photos/\"+reportDate+fi.getFileName()));\r\n\t\t\t\t\r\n\t\t\t\tif (ren) {\r\n\t\t\t\t\tthis.chemin=\"photos/\"+reportDate+fi.getFileName();\r\n\t\t\t\t\tSystem.out.println(newch);\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(\"pas possible. \"+newch);\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//ajouter un message \r\n\t\t\tFacesContext.getCurrentInstance().addMessage(fiE.getClientId(),new FacesMessage(\"le fichier a été uploadé\"));\r\n\t\t\r\n\t\t\tPhoto photo= new Photo();\r\n\t\t\tphoto.setMemberID(mbb.getMembre().getMembreId());\r\n\t\t\tphoto.setChemin(chemin);\r\n\t\t\tphoto.setIsProfil(true);\r\n\r\n\t\t\tint ajoute=PhotoManager.addPhoto(photo);\r\n\t\t\tSystem.out.println(\"photo profile ajoute\");\r\n\t\t\tif(ajoute>0){\r\n\t\t\t\tmbb.getMembre().setListePhotos(PhotoManager.getPhotosByMemberId(mbb.getMembre().getMembreId()));//maj liste photos\r\n\t\t\t\tArrayList<Photo> photos=new ArrayList<Photo>();\r\n\t\t\t\tphotos=PhotoManager.getProfilPhotosByMemberId(mbb.getMembre().getMembreId());\r\n\t\t\t\tmbb.getMembre().setProfilImagePath(photos.get(0).getChemin()); //maj chemin photo profil\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}\t\r\n\t}", "public void skrivInn(String filnavn) throws Exception{\r\n Scanner filScan = new Scanner(new File(filnavn));\r\n Person person;\r\n String next = filScan.nextLine().toLowerCase();\r\n\r\n //forst registrerer jeg personene\r\n while(!next.equals(\"-\"))\r\n {\r\n\r\n if(!personListe.containsKey(next)) {\r\n personListe.put(next , new Person(next));\r\n }\r\n next = filScan.nextLine().toLowerCase();\r\n }\r\n person = personListe.get(filScan.nextLine().toLowerCase());\r\n\r\n //og saa legger jeg til dvdene til de personene som ble registrert\r\n while (filScan.hasNextLine()) {\r\n\r\n if(filScan.hasNextLine()) {\r\n next = filScan.nextLine().toLowerCase();\r\n }\r\n\r\n if (next.startsWith(\"-\") && filScan.hasNextLine()) {\r\n person = personListe.get(filScan.nextLine().toLowerCase());\r\n }\r\n\r\n else if(next.startsWith(\"*\")) {\r\n String tittel = next.substring(1).toLowerCase();\r\n\r\n if(!dvdListe.containsKey(tittel)) {\r\n DVD dvd = new DVD(tittel, person);\r\n String laner = filScan.nextLine().toLowerCase();\r\n Person laaner = personListe.get(laner);\r\n\r\n if(personListe.containsKey(laner)) {\r\n dvdListe.put(tittel,dvd);\r\n person.leggTilutlaant(dvd);\r\n laaner.leggTilLaaner(dvd);\r\n }\r\n\r\n }\r\n }\r\n\r\n else {\r\n if(!dvdListe.containsKey(next) && !next.equals(\"-\")) {\r\n DVD dvd = new DVD(next, person);\r\n person.leggTilDVD(dvd);\r\n dvdListe.put(next, dvd);\r\n }\r\n }\r\n }\r\n }", "public interface IPerfilService {\n\n /**\n * Metodo para guardar un nuevo perfil en la base de datos por medio de\n * un perfil recibido como parametro\n * @param perfil perfil a ser creado\n * @return perfil ya creado\n */\n public Perfil create(Perfil perfil);\n /**\n * Metodo que devuelve un perfil dado un nombre de perfil\n * @param perfilName\n * @return\n */\n public Perfil findByName(PerfilName perfilName);\n}", "public Persona personasolicitudByDNI(String per_id) throws Exception {\r\n\t\tPersona f = null;\r\n\t\tResultSet consulta = conDao\r\n\t\t\t\t.consultaSQL(\"SELECT p.per_id as dni , p.per_nombres as nombres, \"\r\n\t\t\t\t\t\t+ \" p.per_apellidos as apellidos, p.per_correo as correo, \"\r\n\t\t\t\t\t\t+ \" f.fun_cargo as cargo, f.fun_jefe_inmediato as jefe, f.fun_gerencia as gerencia, f.fun_direccion as direccion, \"\r\n\t\t\t\t\t\t+ \" (select pe.per_nombres||' '||pe.per_apellidos \"\r\n\t\t\t\t\t\t+ \" from gen_persona pe where pe.per_id=f.fun_jefe_inmediato) as nombreJefe, \"\r\n\t\t\t\t\t\t+ \" (select pe.per_correo from gen_persona pe where pe.per_id=f.fun_jefe_inmediato) as correojefeinmediato\"\r\n\t\t\t\t\t\t+ \" FROM gen_persona p INNER JOIN gen_usuario u ON p.per_id = u.per_id \"\r\n\t\t\t\t\t\t+ \" INNER JOIN gen_funcionario f on f.per_id = u.per_id \"\r\n\t\t\t\t\t\t+ \" WHERE p.per_id = '\" + per_id + \"'\");\r\n\t\tif (consulta != null) {\r\n\t\t\tconsulta.next();\r\n\t\t\tf = new Persona();\r\n\t\t\tf.setPerDNI(consulta.getString(\"dni\"));\r\n\t\t\tf.setPerNombres(consulta.getString(\"nombres\"));\r\n\t\t\tf.setPerApellidos(consulta.getString(\"apellidos\"));\r\n\t\t\tf.setPerCorreo(consulta.getString(\"correo\"));\r\n\t\t\tf.setCargo(consulta.getString(\"cargo\"));\r\n\t\t\tf.setJefeInmediato(consulta.getString(\"jefe\"));\r\n\t\t\tf.setPerGerencia(consulta.getString(\"gerencia\"));\r\n\t\t\tf.setPerDireccion(consulta.getString(\"direccion\"));\r\n\t\t\tf.setCorreoJefeInmediato(consulta.getString(\"correojefeinmediato\"));\r\n\t\t}\r\n\t\treturn f;\r\n\t}", "@Override\n\tpublic List<Perfil> listaPerfilDesconocidoGenero(Perfil perfil) {\n\t\tList<Perfil> lista = perfilDAOImp.listaPerfilDesconocidoGenero(perfil);\n\t\treturn lista;\n\t}", "@RequestMapping(value = \"/profile_buscar\")\r\n public String verPerfil(BusquedaFiltro busquedaFiltro, HttpSession session, Model model) {\n PersonaDTO personaDTO = (PersonaDTO) session.getAttribute(\"personaDTO\");\r\n //session.setAttribute(\"ciclito\", busquedaFiltro.getCiclo());\r\n //System.out.println(\"holaaaaaaaaaaaaa naaaaaada\" + personaDTO.getCodigo() );\r\n AlumnoDTO p = alumnoDAO.get(personaDTO.getCodigo());\r\n\r\n List<HistorialDTO> his = alumnoDAO.gethis(p.getCodigo());\r\n\r\n model.addAttribute(\"historial\", his);\r\n model.addAttribute(\"busquedaFiltro\", busquedaFiltro);\r\n if (busquedaFiltro.getCiclo() == \"\") {\r\n return \"redirect:/alumno/profile\";\r\n } else {\r\n\r\n BusquedaFiltro nuevoFiltro = new BusquedaFiltro();\r\n\r\n model.addAttribute(\"nuevoFiltro\", nuevoFiltro);\r\n //session.setAttribute(\"cursito\",nuevoFiltro.getIdCurso());\r\n model.addAttribute(\"persona\", p);\r\n model.addAttribute(\"ListaCursos\", alumnoDAO.listarCursos(personaDTO.getIdPersona(), busquedaFiltro.getCiclo()));\r\n //System.out.println(busquedaFiltro.getCiclo() + \" naaaaaada\");\r\n model.addAttribute(\"ListaCiclos\", alumnoDAO.listarCiclos(personaDTO.getIdPersona()));\r\n\r\n return \"alumno/alumnoprofile\";\r\n }\r\n }", "ConsultaDto<ProdutorVO> obterByNomeApelido(String nomeApelido, Integer idInstituicao, int pagina, int tamanhoPagina) throws BancoobException;", "private UserFormData loadUserIdByLogin(final UserFormData formData) {\n\t\tif (LOG.isDebugEnabled()) {\n\t\t\tLOG.debug(\"Searching userId with login : \" + formData.getLogin().getValue());\n\t\t}\n\n\t\tif (NOTIFICATION_USER.equals(formData.getLogin().getValue())) {\n\t\t\t// default notification user dosen't exist, because it don't need\n\t\t\t// specific permissions.\n\t\t\treturn formData; // early Break\n\t\t}\n\n\t\tSQL.selectInto(SQLs.USER_SELECT_ID_ONLY + SQLs.USER_SELECT_FILTER_LOGIN + SQLs.USER_SELECT_INTO_ID_ONLY,\n\t\t\t\tformData);\n\t\tif (null == formData.getUserId().getValue()) {\n\t\t\tLOG.warn(\"No User ID for user with login : \" + formData.getLogin().getValue());\n\t\t}\n\t\treturn formData;\n\t}", "@Override\n\tpublic void setDiretorDoFilme(int idFilme, IPessoa diretor) throws SQLException {\n\t\tIFilme filme = this.buscarFilmePorId(idFilme);\n\t\tif(filme!=null)\n\t\t\tfilme.setDiretor(diretor);\n\t}", "public void recuperandoDadosUsuarioescolhido(){\n Bundle bundle = getIntent().getExtras();\n if (bundle != null){\n if (bundle.containsKey(\"usuarioSelecionado\")){\n dadosDoUsuario = (Usuario) bundle.getSerializable(\"usuarioSelecionado\");\n }\n }\n\n // Configurando Toolbar\n\n toolbar.setTitle(dadosDoUsuario.getNome());\n setSupportActionBar(toolbar);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n\n // Configurando Imagem\n if (dadosDoUsuario.getFoto() != null){\n if (!dadosDoUsuario.getFoto().isEmpty()){\n Uri url = Uri.parse(dadosDoUsuario.getFoto());\n Glide.with(getApplicationContext()).load(url).into(civFotoPerfil);\n }\n }\n\n // Configurando Seguidores Postagens e Seguindo\n\n //stPublicacao = String.valueOf(dadosDoUsuario.getPublicacoes());\n stSeguidores = String.valueOf(dadosDoUsuario.getSeguidores());\n stSeguindo = String.valueOf(dadosDoUsuario.getSeguindo());\n\n tvSeguindo.setText(stSeguindo);\n tvSeguidores.setText(stSeguidores);\n //tvPublicacao.setText(stPublicacao);\n\n // Configurando Referencia postagens Usuario Escolhido\n postagensUsuarioRef = ConfiguracaoFirebase.getFirebaseDatabase()\n .child(\"postagens\")\n .child(dadosDoUsuario.getId());\n\n // Inicializa o Universal Image Loader\n inicializarImageLoader();\n // Recupera as Postagens do nosso Banco de Dados\n carregarFotosPostagem();\n }" ]
[ "0.5954785", "0.58953327", "0.58812606", "0.5871988", "0.5819803", "0.5786127", "0.5770665", "0.5742604", "0.57054144", "0.56949854", "0.56375426", "0.5553184", "0.54576266", "0.54243076", "0.540588", "0.5379802", "0.53665024", "0.5352772", "0.5342181", "0.5328545", "0.5319929", "0.53170186", "0.5301883", "0.52407134", "0.5206125", "0.5183081", "0.51524836", "0.51333773", "0.51320857", "0.51182514", "0.5095572", "0.5082322", "0.50723064", "0.50542456", "0.50461155", "0.5028438", "0.49962565", "0.49463233", "0.4938529", "0.4938311", "0.49109071", "0.48987204", "0.48978397", "0.4833065", "0.48213187", "0.48173493", "0.48146424", "0.48117766", "0.48077857", "0.48037267", "0.4803699", "0.48031375", "0.47974533", "0.4788422", "0.47844544", "0.47666228", "0.4764255", "0.4763755", "0.47525933", "0.4747749", "0.47408894", "0.47228548", "0.47063312", "0.47039515", "0.47033894", "0.46959886", "0.46798697", "0.46691436", "0.4664312", "0.46622297", "0.46602893", "0.46471772", "0.46464542", "0.46455356", "0.4628273", "0.462127", "0.4620215", "0.46116358", "0.46065712", "0.46049654", "0.460019", "0.45975208", "0.45920742", "0.45806018", "0.4558513", "0.45550495", "0.4545073", "0.4544786", "0.45428717", "0.45397815", "0.4533427", "0.45228228", "0.4521697", "0.45190957", "0.45178196", "0.451587", "0.45154533", "0.4509544", "0.45077774", "0.4494118" ]
0.61128986
0
Busca todos los perfiles disponibles.
List<Perfil> findAll();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void getPeerFiles(){\n\t\t\n\t\tFile[] files = new File(path).listFiles();\n\t\tfor (File file : files) {\n\t\t\tfileNames.add(file.getName());\n\t\t}\n\t\tSystem.out.println(\"Number of Files Registerd to the server - \"+fileNames.size());\n\t\tSystem.out.println(\"To search for file give command: get <Filename>\");\n\t\tSystem.out.println(\"To refresh type command: refresh\");\n\t\tSystem.out.println(\"To disconnect type command: disconnect\");\n\t}", "public void llenadoDeCombos() {\n PerfilDAO asignaciondao = new PerfilDAO();\n List<Perfil> asignacion = asignaciondao.listar();\n cbox_perfiles.addItem(\"\");\n for (int i = 0; i < asignacion.size(); i++) {\n cbox_perfiles.addItem(Integer.toString(asignacion.get(i).getPk_id_perfil()));\n }\n \n }", "public void Listar()\n {\n File diretorio = new File(dir_arq_download);\n File[] arquivos = diretorio.listFiles();\n if(arquivos != null)\n {\n int length = arquivos.length;\n for(int i = 0; i < length; ++i)\n {\n File f = arquivos[i];\n if (f.isFile())\n {\n Arquivos.add(f.getName());\n }\n }\n\n ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>\n (this,android.R.layout.simple_dropdown_item_1line, Arquivos);\n SpnListarArquivos.setAdapter(arrayAdapter);\n }\n }", "public void listMyFiles(){\n\t\tpeer.removeFiles();\n\t\tint count = localModel.getRowCount();\n\t\tif (count > 0){\n\t\t\tfor (int i = count-1; i >= 0; i--){\n\t\t\t\tlocalModel.removeRow(i);\n\t\t\t}\n\t\t}\n\t\tFile folder = fileChooser.getSelectedFile();\n\t\tpeer.setFolder(folder.getAbsolutePath());\n shareFolder = folder.getAbsolutePath();\n\t\tconsole(\"\\\"\" + folder.getAbsolutePath() + \"\\\" set as Shared Directory.\");\n\t\tmyFiles = folder.listFiles();\n\t\tfor(File file : myFiles){\n\t\t\tlocalModel.addRow(new Object[]{file.getName(),file.length()});\n\t\t\ttry {\n\t\t\t\tpeer.addFile(file.getName(),file.length());\n\t\t\t} catch (UnknownHostException e1) {e1.printStackTrace();}\n\t\t}\n\t}", "public void getListaArchivos() {\n\n File rutaAudio = new File(Environment.getExternalStorageDirectory() + \"/RecordedAudio/\");\n File[] archivosAudio = rutaAudio.listFiles();\n\n for (int i = 0; i < archivosAudio.length; i++) {\n File file = archivosAudio[i];\n listadoArchivos.add(new Archivo(file.getName()));\n }\n\n File rutaVideos = new File(Environment.getExternalStorageDirectory() + \"/RecordedVideo/\");\n File[] archivosVideo = rutaVideos.listFiles();\n\n for (int i = 0; i < archivosVideo.length; i++) {\n File file = archivosVideo[i];\n listadoArchivos.add(new Archivo(file.getName()));\n }\n }", "protected void createFileList()\n {\n // get a sorted array of files\n File f = new File(appManagementDir);\n String[] files = f.list(new FileFilter(AppSettings.getFilter()));\n \n // get the adapter for this file list\n ArrayAdapter<String> a = (ArrayAdapter<String>)fileList.getAdapter();\n a.clear();\n \n // clear the check boxes\n fileList.clearChoices();\n \n if (files != null && files.length > 0)\n {\n Arrays.sort(files, 0, files.length, new Comparator<Object>() {\n \n @Override\n public int compare(Object object1, Object object2)\n {\n int comp = 0;\n if (object1 instanceof String \n && object2 instanceof String)\n {\n String str1 = (String)object1;\n String str2 = (String)object2;\n \n comp = str1.compareToIgnoreCase(str2);\n }\n \n return comp;\n }});\n \n \n // add all the files\n for (String fileName : files)\n {\n a.add(fileName);\n }\n \n fileList.invalidate();\n }\n }", "public void searchAllFiles() {\n\t\t/**\n\t\t * Realizamos un pequeño algoritmo de recorrido de árboles en preorden para listar todos los\n\t\t * ebooks con un coste de 2n+1 donde n es el número de nodos.\n\t\t */\n\t\tArrayList<Entry> booksEntry = null;\n\t\ttry {\n\t\t\tString auxPath;\n\t\t\tbooksEntry = new ArrayList<DropboxAPI.Entry>();\n\t\t\tLinkedList<Entry> fifo = new LinkedList<DropboxAPI.Entry>();\n\t\t\tEntry nodo = _mApi.metadata(\"/\", 0, null, true, null);\n\t\t\tfifo.addAll(nodo.contents);\n\t\t\twhile (!fifo.isEmpty()) {\n\t\t\t\tSystem.out.println(fifo);\n\t\t\t\tnodo = fifo.getFirst();\n\t\t\t\tfifo.removeFirst();\n\t\t\t\tauxPath = nodo.path;\n\t\t\t\tif (nodo.isDir) {\n\t\t\t\t\tfifo.addAll(_mApi.metadata(auxPath, 0, null, true, null).contents);\n\t\t\t\t} else {\n\t\t\t\t\tif (isEbook(nodo))\n\t\t\t\t\t\tbooksEntry.add(nodo);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"parar\");\n\t\t} catch (DropboxUnlinkedException e) {\n\t\t\t// The AuthSession wasn't properly authenticated or user unlinked.\n\t\t} catch (DropboxPartialFileException e) {\n\t\t\t// We canceled the operation\n\t\t\t_mErrorMsg = \"Download canceled\";\n\t\t} catch (DropboxServerException e) {\n\t\t\t// Server-side exception. These are examples of what could happen,\n\t\t\t// but we don't do anything special with them here.\n\t\t\tif (e.error == DropboxServerException._304_NOT_MODIFIED) {\n\t\t\t\t// won't happen since we don't pass in revision with metadata\n\t\t\t} else if (e.error == DropboxServerException._401_UNAUTHORIZED) {\n\t\t\t\t// Unauthorized, so we should unlink them. You may want to\n\t\t\t\t// automatically log the user out in this case.\n\t\t\t} else if (e.error == DropboxServerException._403_FORBIDDEN) {\n\t\t\t\t// Not allowed to access this\n\t\t\t} else if (e.error == DropboxServerException._404_NOT_FOUND) {\n\t\t\t\t// path not found (or if it was the thumbnail, can't be\n\t\t\t\t// thumbnailed)\n\t\t\t} else if (e.error == DropboxServerException._406_NOT_ACCEPTABLE) {\n\t\t\t\t// too many entries to return\n\t\t\t} else if (e.error == DropboxServerException._415_UNSUPPORTED_MEDIA) {\n\t\t\t\t// can't be thumbnailed\n\t\t\t} else if (e.error == DropboxServerException._507_INSUFFICIENT_STORAGE) {\n\t\t\t\t// user is over quota\n\t\t\t} else {\n\t\t\t\t// Something else\n\t\t\t}\n\t\t\t// This gets the Dropbox error, translated into the user's language\n\t\t\t_mErrorMsg = e.body.userError;\n\t\t\tif (_mErrorMsg == null) {\n\t\t\t\t_mErrorMsg = e.body.error;\n\t\t\t}\n\t\t} catch (DropboxIOException e) {\n\t\t\t// Happens all the time, probably want to retry automatically.\n\t\t\t_mErrorMsg = \"Network error. Try again.\";\n\t\t} catch (DropboxParseException e) {\n\t\t\t// Probably due to Dropbox server restarting, should retry\n\t\t\t_mErrorMsg = \"Dropbox error. Try again.\";\n\t\t} catch (DropboxException e) {\n\t\t\t// Unknown error\n\t\t\t_mErrorMsg = \"Unknown error. Try again.\";\n\t\t}\n\t\t_booksListEntry = booksEntry;\n\t\tcreateListBooks();\n\t}", "public void getFiles()\n\t{\n\t\tif(fileList.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"There is no file or file not found\");\n\t\t}\n\t\tfor(int i = 0; i < fileList.size(); i++)\n\t\t{\n\t\t\tSystem.out.println(\"File is at: \" + fileList.get(i));\n\t\t}\n\t}", "private void initializeFileArrays(){\n File downloadedFilesFolder = new File(MainActivity.DB_PATH);\n File[] files = downloadedFilesFolder.listFiles();\n System.out.println(\"*** \" + files.length + \" ***\");\n if(files != null){\n System.out.println(\"*** \" + files.length + \" ***\");\n for(File f : files){\n if(f != null){\n System.out.println(\"***\\n FILE FOUND - \" + f.getAbsolutePath()+\"\\nSIZE - \" +\n f.length() + \" BYTES \\n***\");\n fileNames.add(f.getName());\n fileSizes.add(f.length()+\"\");\n this.files.add(f);\n }\n }\n }\n }", "public void listarCarpetas() {\n\t\tFile ruta = new File(\"C:\" + File.separator + \"Users\" + File.separator + \"ram\" + File.separator + \"Desktop\" + File.separator+\"leyendo_creando\");\n\t\t\n\t\t\n\t\tSystem.out.println(ruta.getAbsolutePath());\n\t\t\n\t\tString[] nombre_archivos = ruta.list();\n\t\t\n\t\tfor (int i=0; i<nombre_archivos.length;i++) {\n\t\t\t\n\t\t\tSystem.out.println(nombre_archivos[i]);\n\t\t\t\n\t\t\tFile f = new File (ruta.getAbsoluteFile(), nombre_archivos[i]);//SE ALMACENA LA RUTA ABSOLUTA DE LOS ARCHIVOS QUE HAY DENTRO DE LA CARPTEA\n\t\t\t\n\t\t\tif(f.isDirectory()) {\n\t\t\t\tString[] archivos_subcarpeta = f.list();\n\t\t\t\tfor (int j=0; j<archivos_subcarpeta.length;j++) {\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(archivos_subcarpeta[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "public void armarPreguntas(){\n preguntas = file.listaPreguntas(\"Preguntas.txt\");\n }", "private void getFilenames() {\n\t\tString[] filenames = getApplicationContext().fileList();\n\t\tList<String> list = new ArrayList<String>();\n\t\tfor(int i = 0; i<filenames.length; i++){\n\t\t\t//Log.d(\"Filename\", filenames[i]);\n\t\t\tlist.add(filenames[i]);\n\t\t}\n\t\tArrayAdapter<String> filenameAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, list);\n\t\tspinner.setAdapter(filenameAdapter);\n\t}", "public List<Perfil> perfilListar() {\r\n\r\n try {\r\n ControladorPerfil ctrlperfil = new ControladorPerfil();\r\n return ctrlperfil.getListaPerfil();\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n return new ArrayList<>();\r\n }\r\n }", "public void llenarListaArchivos(int op) {\n String[] archivosPermitidos = {\".HA\", \".HE\"};\n if (op == 1) {\n archivos_directorio.removeAllItems();\n } else {\n archivos_directorio2.removeAllItems();\n }\n File directorio = new File(\"./\");\n File[] archivos = null;\n if (directorio.exists()) {\n archivos = directorio.listFiles();\n }\n int i;\n\n for (i = 0; i < archivos.length; i++) {\n if (op == 1 && (\"\" + archivos[i]).contains(\".txt\")) {\n archivos_directorio.addItem(\"\" + archivos[i]);\n } else {\n int j;\n for (j = 0; j < archivosPermitidos.length; j++) {\n if ((\"\" + archivos[i]).contains(archivosPermitidos[j])) {\n archivos_directorio2.addItem(\"\" + archivos[i]);\n break;\n }\n }\n }\n }\n\n }", "public static void getListOfAllFileVarianta2() {\n\t\tPath pathToSrc = Paths.get(\"D:\\\\TorrentsMd\");\r\n\t\ttry {\r\n\t\t\t//cu method references\r\n//\t\t\tFiles.walk(pathToSrc)\r\n//\t\t\t\t.map(Path::toFile)\r\n//\t\t\t\t.filter(File::isFile)\r\n//\t\t\t\t.map(File::getName)\r\n//\t\t\t\t.sorted()\r\n//\t\t\t\t.forEach(System.out::println);\r\n\t\t\t\r\n\t\t\t//cu lambda, dar dpdv semantic sunt identice\r\n\t\t\tFiles.walk(pathToSrc)\r\n\t\t\t\t .map(path -> path.toFile()) //trasnform fiecare Path din stream intr-un File\r\n\t\t\t\t .filter(file -> file.isFile()) //filtrez doar fisierele\r\n\t\t\t\t .map(file -> file.getName())//transform fiecare File din stream intr-un String, care e numele sau\r\n\t\t\t\t .sorted()\r\n\t\t\t\t .forEach(file -> System.out.println(file));\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public File[] CreateListFiles() {\n\t\tif (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {\n\t\t\tToast.makeText(this, \"Error! No SDCARD Found!\", Toast.LENGTH_LONG).show();\n\t\t} else {\n\t\t\tfile = new File(Environment.getExternalStorageDirectory(), File.separator + \"/MelanomaPics/\" + File.separator + MelanomaActivity.pacientSelected);\n\t\t\tfile.mkdirs();\n\t\t}\n\t\t// pega todas as imagens do diretorio MelanomaPics e coloca dentro de\n\t\t// uma lista\n\t\tif (file.isDirectory()) {\n\t\t\tlistFile = file.listFiles();\n\t\t}\n\t\treturn listFile;\n\t}", "public abstract List<LocalFile> getAllFiles();", "@Override\n\tpublic String[] query() {\n\t\t// Return an array of (decoded) filenames\n\t\tif (!serviceDir.exists()) {\n\t\t\treturn new String[0];\n\t\t}\n\t\tFile[] files = serviceDir.listFiles();\n\t\tString[] addrs = new String[files.length];\n\t\tfor (int i = 0; i < addrs.length; ++i) {\n\t\t\taddrs[i] = decode(files[i].getName());\n\t\t}\n\t\treturn addrs;\n\t}", "public void loadFileList() {\n\n if (mCredential.getSelectedAccountName() == null) {\n chooseAccount();\n } else {\n new MakeRequestTask(mCredential,MakeRequestTask.TASK_TYPE_FILELIST).execute();\n\n }\n }", "public abstract List<File> listFiles() throws AccessException;", "public List<String> getFiles();", "java.util.List<entities.Torrent.FileInfo>\n getFilesList();", "private void scanForIcons() {\n\t\t\ttry {\n\t\t\t\tFile graphicDir = new File(helpIconBase + File.separator);\n\t\t\t\tlist = filter(graphicDir.listFiles(), \"tip\", \".png\");\n\t\t\t} catch (NullPointerException npe) {\n\t\t\t\tSystem.err.println(npe);\n\t\t\t\tlist = null;\n\t\t\t}\n\t\t}", "protected void listUsedFiles(List<String> list){\r\n // By default do nothing\r\n }", "@FXML\n private void displayFilesFromDisc() {\n ReadOnlyObjectProperty<String> userModel = activeUsers.getSelectionModel().selectedItemProperty();\n String user = userModel.getValue();\n if (user == null) {\n return;\n }\n ObservableList<String> files = observableArrayList();\n files.addAll(Tools.GetAllFilesInDirectory(basePath + activeDisc + \"\\\\\" + user + \"\\\\\"));\n userFiles.setItems(files);\n System.out.println(basePath + activeDisc + \"\\\\\" + user + \"\\\\\");\n }", "public List<File> getFiles();", "private List<String> returnFiles(int selection) {\n\t\tString path = System.getProperty(\"user.dir\");\n\t\tList<String> allImages = new ArrayList<String>();\n\t\tpath += this.setFolderPath(selection);\n\t\tFile[] files = new File(path).listFiles();\n\n\t\tfor (File file : files) {\n\t\t\tif (file.isFile() && isCorrectFile(file)) {\n\t\t\t\tallImages.add(file.getAbsolutePath());\n\t\t\t}\n\t\t}\n\t\treturn allImages;\n\t}", "public abstract List<String> getFiles( );", "private void query() {\n if (mDriveServiceHelper != null) {\n Log.d(\"error\", \"Querying for files.\");\n\n mDriveServiceHelper.queryFiles()\n .addOnSuccessListener(fileList -> {\n StringBuilder builder = new StringBuilder();\n for (File file : fileList.getFiles()) {\n builder.append(file.getName()).append(\"\\n\");\n }\n String fileNames = builder.toString();\n\n// mFileTitleEditText.setText(\"File List\");\n// mDocContentEditText.setText(fileNames);\n\n setReadOnlyMode();\n })\n .addOnFailureListener(exception -> Log.e(\"error\", \"Unable to query files.\", exception));\n }\n }", "private static void retrieveFiles(File fileDir) {\n List<String> files = Arrays.asList(fileDir.list());\n if (files.isEmpty()) {\n System.out.println(\"There are no files under current directory.\");\n return;\n }\n Collections.sort(files);\n int numOfFiles = files.size();\n System.out.println(\"There are \" + numOfFiles + \" files under current directory.\");\n for (int i = 1; i <= numOfFiles; i++) {\n System.out.println(i + \" - \" + files.get(i - 1));\n }\n }", "private void getDirectoryContents() {\n\t File directory = Utilities.prepareDirectory(\"Filtering\");\n\t if(directory.exists()) {\n\t FilenameFilter filter = new FilenameFilter() {\n\t public boolean accept(File dir, String filename) {\n\t return filename.contains(\".pcm\") || filename.contains(\".wav\");\n\t }\n\t };\n\t fileList = directory.list(filter);\n\t }\n\t else {\n\t fileList = new String[0];\n\t }\n\t}", "@PostFilter(\"hasPermission(filterObject, 'read') or hasPermission(filterObject, 'write') or hasPermission(filterObject, 'administration') or hasPermission(filterObject, 'delete')\")\n public List<File> getAll() {\n return fileRepository.findAll();\n }", "List<File> getSystemDescriptionFiles();", "private List<String> getDataFromApi() throws IOException {\n // Get a list of up to 10 files.\n List<String> fileInfo = new ArrayList<String>();\n FileList result = mService.files().list()\n .setMaxResults(10)\n .execute();\n List<File> files = result.getItems();\n if (files != null) {\n for (File file : files) {\n fileInfo.add(String.format(\"%s (%s)\\n\",\n file.getTitle(), file.getId()));\n }\n }\n return fileInfo;\n }", "private File[] getFiles() {\n\n if (mPPTFilePath == null) {\n mPPTFilePath = getArguments().getString(PPTPathString);\n }\n\n String Path = mPPTFilePath;\n File mFile = new File(Path);\n if (mFile.exists() && mFile.isDirectory() && mFile.listFiles()!=null) {\n\n return mFile.listFiles();\n } else {\n Log.d(TAG, \"File==null\");\n return null;\n }\n }", "protected void handleLs() {\r\n\t\tSystem.out.printf(\"Listing available files.%n\");\r\n\r\n\t\tFile[] availableFiles = new File(fileBase).listFiles();\r\n\r\n\t\tif (availableFiles == null) {\r\n\t\t\tSystem.err.printf(\"%s is not a directory.%n\", fileBase);\r\n\t\t\tsendMessage(String.valueOf(ERROR));\r\n\t\t} else {\r\n\t\t\tsendMessage(String.valueOf(availableFiles.length));\r\n\r\n\t\t\t/* send each file name */\r\n\t\t\tfor (File file : availableFiles) {\r\n\t\t\t\tsendMessage(file.getName());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public List<String> checkFiles() {\n List<String> instances = new ArrayList<String>();\n if (StringUtils.isBlank(getPathOffset())) return instances;\n File[] directories = listFiles(new File(getPathOffset()), \"gcm_\");\n for (File dir : directories) {\n File[] files = listFiles(new File(dir.toString() + \"\\\\logs\"), \"GcmWebServices\");\n for (File file : files)\n instances.add(file.toString());\n }\n return instances;\n }", "public void processaArquivos() throws Exception\n\t{\n\t\t/* Busca o nome do diretorio no arquivo de propriedades */\n\t\tString nomeDiretorio = getPropriedade(\"ordemVoucher.dirArquivos\");\n\t\tFile dirArquivos = new File(nomeDiretorio);\n\t\tif (!dirArquivos.isDirectory())\n\t\t\tthrow new IOException(\"Diretorio invalido... \"+nomeDiretorio);\n\n\t\t/* Busca os arquivos das ordems (arquivos com informacoes de caixa) */\n\t\tFileFilter filtro = new OrdemVoucherFileFilter(getPropriedade(\"ordemVoucher.patternArquivos\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t getPropriedade(\"ordemVoucher.extensaoArquivos\"));\n\t\tFile arquivosOrdem[] = dirArquivos.listFiles(filtro);\n\t\t\n\t\t/* Faz a varredura dos arquivos de ordem de voucher encontrados */\n\t\tfor (int i=0; i < arquivosOrdem.length; i++)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Processando ordem:\"+arquivosOrdem[i].getName());\n\t\t\t\tif (existeArquivos(arquivosOrdem[i]))\n\t\t\t\t{\n\t\t\t\t\t// Realiza a concatenacao dos arquivos da ordem agrupando-as por item\n\t\t\t\t\t// e entao processa-os para a criptografia e compactacao antes de \n\t\t\t\t\t// envia-los ao GPP\n\t\t\t\t\tString arqAProcessar[] = concatenaArquivos(arquivosOrdem[i]);\n\t\t\t\t\t\n\t\t\t\t\t// Para cada arquivo encontrado de ordem de criacao de voucher\n\t\t\t\t\t// faz se a criptografia dos arquivos de caixa correspondentes\n\t\t\t\t\t// para entao compacta-los em um unico arquivo para posteriormente\n\t\t\t\t\t// ser enviado ao GPP juntamente com este arquivo de capa\n\t\t\t\t\t// da ordem de criacao do voucher\n\t\t\t\t\tString arquivoCompactado = criptografaECompactaOrdem(arquivosOrdem[i],arqAProcessar);\n\t\t\t\t\t\n\t\t\t\t\t// Caso ao criar os arquivos criptografados e compacta-los aconteca algum\n\t\t\t\t\t// erro entao o retorno do metodo e um nome de arquivo nulo. Se este nome\n\t\t\t\t\t// for nulo, entao nada e executado com esta ordem passando entao para a\n\t\t\t\t\t// proxima\n\t\t\t\t\tif (arquivoCompactado != null)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Envia o arquivo do cabecalho da ordem \n\t\t\t\t\t\t// e em seguida envia o arquivo compactado\n\t\t\t\t\t\tenviaArquivoParaGPP(arquivosOrdem[i]);\n\t\t\t\t\t\tenviaArquivoParaGPP(new File(arquivoCompactado));\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Remove os arquivos criptografados e compactados que foram enviados\n\t\t\t\t\t\t// para o GPP\n\t\t\t\t\t\tremoveArquivos(arquivosOrdem[i],arqAProcessar);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Move os arquivos de origem das informacoes de voucher para um diretorio\n\t\t\t\t\t\t// historico desses arquivos\n\t\t\t\t\t\t// Obs: Os arquivos concatenados foram removidos do diretorio\n\t\t\t\t\t\tmoveArquivos(arquivosOrdem[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Erro ao processar ordem:\"+arquivosOrdem[i].getName()+\" Erro:\"+e);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public Iterable<File> list(File storageDirectory, FilenameFilter filter) {\n\treturn null;\n }", "private void get_file_List() {\n\tString file_name=null;\r\n\tfor (int i = 0; i < listOfFiles.length; i++) \r\n\t {\r\n\t \r\n\t if (listOfFiles[i].isFile()) \r\n\t {\r\n\t\t file_name = listOfFiles[i].getName();\r\n\t if (file_name.endsWith(\".xml\") || file_name.endsWith(\".XML\"))\r\n\t {\r\n\t file_list.add(file_name) ;\r\n\t }\r\n\t }\r\n\t }\r\n\t\r\n}", "public ArrayList<File> findRelevantFiles (int reimburseID);", "private List<org.jajuk.base.File> getFiles() {\n List<org.jajuk.base.File> files;\n if (Mode.DJ.equals(data.get(Variable.MODE))) {\n files = UtilPrepareParty.getDJFiles((String) data.get(Variable.ITEM));\n } else if (Mode.Ambience.equals(data.get(Variable.MODE))) {\n files = UtilPrepareParty.getAmbienceFiles((String) data.get(Variable.ITEM));\n } else if (Mode.Playlist.equals(data.get(Variable.MODE))\n || Mode.ProvidedPlaylist.equals(data.get(Variable.MODE))) {\n try {\n Playlist tempPlaylist = (Playlist) data.get(Variable.TEMP_PLAYLIST);\n files = UtilPrepareParty.getPlaylistFiles((String) data.get(Variable.ITEM), tempPlaylist);\n } catch (JajukException e1) {\n Log.error(e1);\n return null;\n }\n } else if (Mode.Shuffle.equals(data.get(Variable.MODE))) {\n files = UtilPrepareParty.getShuffleFiles();\n } else if (Mode.BestOf.equals(data.get(Variable.MODE))) {\n try {\n files = UtilPrepareParty.getBestOfFiles();\n } catch (JajukException e1) {\n Log.error(e1);\n return null;\n }\n } else if (Mode.Queue.equals(data.get(Variable.MODE))) {\n try {\n files = UtilPrepareParty.getQueueFiles();\n } catch (JajukException e1) {\n Log.error(e1);\n return null;\n }\n } else if (Mode.Bookmarks.equals(data.get(Variable.MODE))) {\n try {\n files = UtilPrepareParty.getBookmarkFiles();\n } catch (JajukException e1) {\n Log.error(e1);\n return null;\n }\n } else if (Mode.Novelties.equals(data.get(Variable.MODE))) {\n try {\n files = UtilPrepareParty.getNoveltiesFiles();\n } catch (JajukException e1) {\n Log.error(e1);\n return null;\n }\n } else {\n throw new IllegalArgumentException(\"Unknown mode in PreparePartyWizard: \"\n + data.get(Variable.MODE));\n }\n // filter by media first\n if (isTrue(Variable.ONE_MEDIA_ENABLED) && !isTrue(Variable.CONVERT_MEDIA)) {\n files = UtilPrepareParty.filterMedia(files, (String) data.get(Variable.ONE_MEDIA));\n }\n // then filter out by rating\n if (data.containsKey(Variable.RATING_LEVEL)) {\n files = UtilPrepareParty.filterRating(files, (Integer) data.get(Variable.RATING_LEVEL));\n }\n // filter max length\n if (isTrue(Variable.MAXLENGTH_ENABLED)) {\n files = UtilPrepareParty.filterMaxLength(files, (Integer) data.get(Variable.MAXLENGTH));\n }\n // filter max size\n if (isTrue(Variable.MAXSIZE_ENABLED)) {\n files = UtilPrepareParty.filterMaxSize(files, (Integer) data.get(Variable.MAXSIZE));\n }\n // filter max tracks\n if (isTrue(Variable.MAXTRACKS_ENABLED)) {\n files = UtilPrepareParty.filterMaxTracks(files, (Integer) data.get(Variable.MAXTRACKS));\n }\n return files;\n }", "public void criaListaArqLocal(String diretorio) {\r\n\t\tFile arquivo = new File(diretorio);\r\n\t\tFile[] aux = null;\r\n\t\taux = arquivo.listFiles();\r\n\t\tif ((this.aFilesNaPasta.size() == 0) && (this.aPastas.size() == 0)) {\r\n\t\t\tfor (int i = 0; i < aux.length; i++) {\r\n\t\t\t\tif (aux[i].isFile()) {\r\n\t\t\t\t\tthis.aFilesNaPasta.add(aux[i].getName());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.aPastas.add(aux[i].getName());\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthis.aFilesRemPasta.clear();\r\n\t\t\tthis.aPastasRemovidas.clear();\r\n\t\t} else {\r\n\t\t\taFilesRemPasta.addAll(aFilesNaPasta);\r\n\t\t\taFilesNaPasta.clear();\r\n\t\t\taPastasRemovidas.addAll(aPastas);\r\n\t\t\taPastas.clear();\r\n\t\t\tfor (int i = 0; i < aux.length; i++) {\r\n\t\t\t\tif (aux[i].isFile()) {\r\n\t\t\t\t\tthis.aFilesNaPasta.add(aux[i].getName());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.aPastas.add(aux[i].getName());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void loadFiles() {\n User user = ConnectionManager.getInstance().getUser();\n List<NoteFile> files = DatabaseManager.getInstance().getSharedFiles(user);\n ObservableList<GuiFile> guiFiles = FXCollections.observableArrayList();\n\n for (NoteFile file : files)\n guiFiles.add(new GuiFile(file));\n\n tableFiles.setItems(guiFiles);\n GUIUtils.autoResizeColumns(tableFiles);\n }", "private void saveExternalFilesList() {\n List<String> extFiles = new ArrayList<>();\n journalFiles.forEach(file -> {\n if (!file.isBuiltInListProperty().get()) {\n file.getAbsolutePath().ifPresent(path -> extFiles.add(path.toAbsolutePath().toString()));\n }\n });\n abbreviationsPreferences.setExternalJournalLists(extFiles);\n }", "public void getImagesFromFolder() {\n File file = new File(Environment.getExternalStorageDirectory().toString() + \"/saveclick\");\n if (file.isDirectory()) {\n fileList = file.listFiles();\n for (int i = 0; i < fileList.length; i++) {\n files.add(fileList[i].getAbsolutePath());\n Log.i(\"listVideos\", \"file\" + fileList[0]);\n }\n }\n }", "public ArrayList<FileDesc> getAllFiles() {\n\n\t\tArrayList<FileDesc> result = new ArrayList<FileDesc>();\n\n\t\ttry {\n\t\t\tjava.sql.PreparedStatement ps = ((org.inria.jdbc.Connection) db).prepareStatement(TCell_QEP_IDs.QEP.EP_getAllFiles);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\t\n\t\t\tString query = \"SELECT FILEGID, TYPE, DESCRIPTION FROM FILE\";\n\t\t\tSystem.out.println(\"Executing query : \" + query);\t\t\t\n\n\t\t\t\n\t\t\twhile (rs.next() == true) {\n\t\t\t\tString fileGID = rs.getString(1);\n\t\t\t\tString type = rs.getString(2);\n\t\t\t\tString Description = rs.getString(3);\n\t\t\t\tresult.add(new FileDesc(fileGID, \"\", \"\", \"\", type, Description));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t// Uncomment when the close function will be implemented\n\t\t\t// attemptToClose(ps);\n\t\t\t\n\t\t}\n\n\t\treturn result;\n\t}", "private static String files()\n\t{\n\t\tString path = dirpath + \"\\\\Server\\\\\";\n\t\tFile folder = new File(path);\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tString msg1 = \"\";\n\n\t\tfor (int i = 0; i < listOfFiles.length; i++)\n\t\t{\n\t\t\tif (listOfFiles[i].isFile())\n\t\t\t{\n\t\t\t\tmsg1 = msg1 + \"&\" + listOfFiles[i].getName();\n\t\t\t}\n\t\t}\n\t\tmsg1 = msg1 + \"#\" + path + \"\\\\\";\n\t\treturn msg1;\n\t}", "public void trancribirPistas() {\r\n\t\t\r\n\t\tfor (int x = 0; x<manejadorArchivos.getPistas().size();x++) {\r\n\t\t\t\r\n\t\t\tpistas.add(manejadorArchivos.getPistas().get(x));\t\r\n\t\t}\r\n\t}", "private void refreshList() {\n setTitle(this.path.get(this.path.size() - 1));\n\n // Read all files sorted into the values-array\n values.clear();\n File dir = new File(this.path.get(this.path.size() - 1));\n if (!dir.canRead()) {\n setTitle(getTitle() + \" (inaccessible)\");\n }\n String[] list = dir.list();\n if (list != null) {\n for (String file : list) {\n if (!file.startsWith(\".\")) {\n values.add(file);\n }\n }\n }\n Collections.sort(values);\n }", "public List<File> getListing(){\n\t return getFileList(new File(defaultPath));\n }", "private void downloadPrayers() {\n final ProgressBar loading;\n loading = new ProgressBar(this);\n loading.setMax(1000);\n\n adhanLoader.getPrayers(new AdhanLoader.AdhanListener<ArrayList<Prayer>>() {\n @Override\n public void onPrayerDownloaded(ArrayList<Prayer> result) {\n prayerList = result;\n\n Log.d(\"MainActivity\", \"downloadPrayers : result \"+result.size());\n Log.d(\"MainActivity\", \"downloadPrayers : result \"+result.toString());\n // Setting the list to the adapter.\n // This will cause the list to be presented in the layout!\n prayerRecyclerAdapter.setPrayerList(result);\n }\n\n @Override\n public void onErrorDownloading(String errorMessage) {\n Log.d(\"tag\", errorMessage);\n }\n });\n\n }", "public void listPictures()\r\n {\r\n int index = 0;\r\n while(index >=0 && index < pictures.size()) \r\n {\r\n String filename = pictures.get(index);\r\n System.out.println(index + \": \"+ filename);\r\n index++;\r\n }\r\n }", "private void cargarNotasEnfermeria() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"admision_seleccionada\", admision_seleccionada);\r\n\t\tparametros.put(\"rol_medico\", \"S\");\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\"/pages/notas_enfermeria.zul\", \"NOTAS DE ENFERMERIA\",\r\n\t\t\t\tparametros);\r\n\t}", "private void choixRepertoire(int format){\n\t\tString path = \"\"; //Chemin a parcourir\n\t\tJFileChooser chooser = null;\n\t\tif(SauvegardeRepertoire.getPaths().isEmpty()){//Si la liste des repertoires est vide\n\t\t\tchooser = new JFileChooser();\n\t\t}\n\t\telse{//si elle n'est pas vide\n\t\t\tIterator<String> it = SauvegardeRepertoire.getPaths().iterator();\n\t\t\twhile (it.hasNext() && path.equals(\"\")) {\n\t\t\t\tString str = (String) it.next();\n\t\t\t\tFile file = new File(str);\n\n\t\t\t\tif (file.exists()) //on recupere le premier repertoire possible\t\n\t\t\t\t\tpath = file.getAbsolutePath();\n\t\t\t}\n\n\t\t\tif(path.equals(\"\"))//si on a pas trouvé de chemin coherent\n\t\t\t\tchooser = new JFileChooser();\n\t\t\telse\n\t\t\t\tchooser = new JFileChooser(path);\n\t\t}\n\t\tFileNameExtensionFilter filter=null;\n\t\tswitch(format)\n\t\t{\n\t\t\tcase PDFFile:\n\t\t\t\tfilter = new FileNameExtensionFilter(\"PDF\",\"pdf\");\n\t\t\t\tbreak;\n\t\t\tcase ARFFFile:\n\t\t\t\tchooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n\t\t\t\tchooser.setAcceptAllFileFilterUsed(false);\n\t\t\t\tbreak;\n\t\t}\n\n\t\tchooser.setFileFilter(filter);\n\t\tchooser.setMultiSelectionEnabled(false);\n\t\tint returnVal = chooser.showOpenDialog(null);\n\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tSauvegardeRepertoire.ajoutPath(chooser);//permet de sauvegarder les repertoires\n\t\t\tif(filter!=null && filter.getExtensions()[0].equals(\"pdf\")) {\n\t\t\t\tgestionFichier(chooser);\n\t\t\t\tunlockButton();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgestionFichierDataSet(chooser);\n\t\t\t\tbDataTraining.setEnabled(true);\n\t\t\t}\n\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic\r\n\tSet<String> getProcessedFiles(String uid) {\r\n \t//if(!initted) throw new RuntimeException(\"Grao Com service Client is not initialized...\");\r\n\t\ttry {\r\n\t\t return (Set<String>)Requester.request(configName)\r\n\t\t\t\t\t\t .path(GraoContextParams.getSubPath(GraoContextParams.GRAO_PATH.PROCESSED_FILES_NAMES, \"/\"+ uid))\r\n\t\t\t\t\t\t .get(MEDIA_TYPE.JSON).getResponseAsObject(Set.class);\r\n\t\t} catch (Exception e) {\r\n\t\t e.printStackTrace();\r\n\t\t throw new RuntimeException(e);\r\n\t\t}\r\n }", "public void buscarModificadosDespues(String fecha,File donde) throws ParseException\r\n\t{\n\t\tthis.donde=donde;\r\n\t\tFile f;\r\n\t\tif(!this.donde.isDirectory())\r\n\t\t\treturn;\r\n\t\tFile[]lista=this.donde.listFiles();\r\n\t\tfor(int i=0;i<lista.length;i++)\r\n\t\t{\r\n\t\t\tif(lista[i].isDirectory())\r\n\t\t\t{\r\n\t\t\t\tf=new File(lista[i].getAbsolutePath());\r\n\t\t\t\tbuscarModificadosDespues(fecha,f);\r\n\t\t\t}\r\n\t\t\tlong l;\r\n\t\t\tSimpleDateFormat formato = new SimpleDateFormat(\"dd-MM-yyyy\");\r\n\t\t\tDate d=formato.parse(fecha);\r\n\t\t\tl=d.getTime();\r\n\t\t\tif(lista[i].lastModified()>=l)\r\n\t\t\t{\r\n\t\t\t\tencontrados.add(lista[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private static void showFiles(File[] files) {\n\t\t for (File file : files) {\r\n\t\t if (file.isDirectory()) {\r\n\t\t // System.out.println(\"Directory: \" + file.getName());\r\n\t\t showFiles(file.listFiles()); // Calls same method again.\r\n\t\t } else {\r\n\t\t // System.out.println(\"File: \" + file.getName());\r\n\t\t }\r\n\t\t }\r\n\t\t\r\n\t}", "private void listarItems() {\r\n // Cabecera\r\n System.out.println(\"Listado de Items\");\r\n System.out.println(\"================\");\r\n\r\n // Criterio de Ordenación/Filtrado\r\n System.out.printf(\"Criterio de Ordenación .: %S%n\", criOrd.getNombre());\r\n System.out.printf(\"Criterio de Filtrado ...: %S%n\", criFil.getNombre());\r\n\r\n // Separados\r\n System.out.println(\"---\");\r\n\r\n // Filtrado > Selección Colección\r\n List<Item> lista = criFil.equals(Criterio.NINGUNO) ? CARRITO : FILTRO;\r\n\r\n // Recorrido Colección\r\n for (Item item : lista) {\r\n System.out.println(item.toString());\r\n }\r\n\r\n // Pausai\r\n UtilesEntrada.hacerPausa();\r\n }", "@Override\n public int getItemCount() {\n return filenames.size();\n }", "java.util.List<entities.Torrent.FileInfo>\n getFileInfoList();", "@Override\r\n\tpublic List<Map<String, Object>> fileSelectList(int no) {\n\t\treturn sqlSession.selectList(namespace + \"fileSelectList\", no);\r\n\t}", "public ArrayList<String> getPendingFiles() {\n\n\t\tif (m_db == null) {\n\t\t\t//\n\t\t\t// database not yet initialized\n\t\t\t//\n\t\t\treturn null;\n\t\t}\n\n\t\tCursor cursor = m_db.query(PENDING_FILE_TABLE_NAME,\n\t\t\t\tnew String[] { PENDING_FIELD_PATH }, null, null, null, null,\n\t\t\t\tPENDING_FIELD_PATH + \" DESC\");\n\n\t\t//\n\t\t// construct array list\n\t\t//\n\t\tArrayList<String> list = new ArrayList<String>();\n\n\t\t//\n\t\t// collect result set\n\t\t//\n\t\tcollectResultSet(cursor, list);\n\n\t\t//\n\t\t// close cursor\n\t\t//\n\t\tcursor.close();\n\n\t\t//\n\t\t// done\n\t\t//\n\t\treturn list;\n\n\t}", "public void printFileNames() {\n DirectoryResource dr = new DirectoryResource();\n for (File f : dr.selectedFiles()) {\n System.out.println(f);\n }\n }", "public static List getAllImgs() {\n List polovniautomobili = new ArrayList<>();\n try {\n CONNECTION = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n String query = \"SELECT imgUrl FROM polovni\";\n try (PreparedStatement ps = CONNECTION.prepareStatement(query)) {\n ResultSet result = ps.executeQuery();\n while (result.next()) {\n String imgUrl = result.getString(\"imgUrl\");\n polovniautomobili.add(imgUrl);\n }\n\n ps.close();\n CONNECTION.close();\n }\n CONNECTION.close();\n } catch (SQLException ex) {\n Logger.getLogger(Register.class.getName()).log(Level.SEVERE, null, ex);\n }\n return polovniautomobili;\n }", "private List<File> getContents(String whichFiles) {\n List<File> result = new ArrayList<File>();\n Files f1 = mService.files();\n Files.List request = null;\n\n do {\n try { \n request = f1.list();\n // get the language folders from drive\n request.setQ(whichFiles);\n FileList fileList = request.execute();\n \n result.addAll(fileList.getItems());\n request.setPageToken(fileList.getNextPageToken());\n } catch (UserRecoverableAuthIOException e) {\n startActivityForResult(e.getIntent(), REQUEST_AUTHORIZATION);\n } catch (IOException e) {\n e.printStackTrace();\n if (request != null) \n request.setPageToken(null);\n }\n } while ((request.getPageToken() != null) \n && (request.getPageToken().length() > 0));\n \n return result;\n }", "public void getFile(JPanel panel) {\n listOfFile= new ArrayList();\n for(int x=0; x<listOfFiles.length;x++) {\n listOfFile.add(listOfFiles[x]);\n }\n if(FileManaging.isMac()) {\n if(listOfFile.contains(Mac_DS_Store))\n listOfFile.remove(Mac_DS_Store);\n if(listOfFile.contains(Mac_Option))\n listOfFile.remove(Mac_Option);\n //if(listOfFile.contains(Mac_Log))\n // listOfFile.remove(Mac_Log);\n }\n if(panel!=null)\n for(int x=0; x<listOfFile.size();x++) {\n buttons.put(x, new JButton(listOfFile.get(x).getName()));\n buttons.get(x).setVisible(true);\n buttons.get(x).setActionCommand(x+\"\");\n buttons.get(x).addActionListener(this);\n buttons.get(x).setBackground(Color.green);\n panel.add(buttons.get(x));\n }\n }", "public String[] getFilesOnServer() {\n Log.i(\"getFilesFor\", \"Getting all files on server available to \"\n + new KeyGenerator(context).getPublicKeyAsString());\n Cursor resultSet = database.rawQuery(\n \"SELECT DISTINCT File FROM FileKeys WHERE UserPublicKey = \" +\n \"'\" + new KeyGenerator(context).getPublicKeyAsString() + \"'\", null);\n String[] fileNames = new String[resultSet.getCount()];\n resultSet.moveToFirst();\n int i = 0;\n while (!resultSet.isAfterLast()) {\n Log.i(\"getFilesFor\", \"File namme: \" + resultSet.getString(0));\n fileNames[i++] = resultSet.getString(0);\n resultSet.moveToNext();\n }\n resultSet.close();\n return fileNames;\n }", "List getFileUploads(HttpServletRequest request, File finalDir) throws ValidationException;", "public List getFiles(HasMetricsFilter filter) {\n if (fileLookup == null) {\n buildFileLookupMap();\n }\n List<BaseFileInfo> result = newArrayList();\n for (BaseFileInfo fileInfo : fileLookup.values()) {\n if (filter.accept(fileInfo)) {\n result.add(fileInfo);\n }\n }\n return result;\n }", "private static void listarDirectorio(String directorio) {\n\t\tFile f = new File(directorio);\n\t\tFile[] ficheros = f.listFiles();\n\t\tSystem.out.printf(\"CURRENT DIRECTORY: %s%n\", directorio);\n\t\tfor (int i = 0; i < ficheros.length; i++) {\n\t\t\t// es fichero\n\t\t\tif (ficheros[i].isFile()) {\n\t\t\t\tSystem.out.printf(\"-- FILE %s%n\", \n\t\t\t\t\t\tficheros[i].getName());\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < ficheros.length; i++) {\n\t\t\t// es directorio\n\t\t\tif (ficheros[i].isDirectory()) {\n\t\t\t\tSystem.out.printf(\"-- DIR %s%n\", \n\t\t\t\t\t\tficheros[i].getName());\n\t\t\t}\n\t\t}\n\t}", "private void readFileList(String mediaType){\n Log.v(TAG,\"Context = \" + mContext);\n Uri uri = null;\n if(mediaType.equals(IMAGE)) {\n uri = android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI;\n }\n else if(mediaType.equals(VIDEO)){\n uri = android.provider.MediaStore.Video.Media.EXTERNAL_CONTENT_URI;\n }\n\n if(uri == null){\n Log.v(TAG, \"ERROR: Media type error\");\n return;\n }\n else {\n String[] projection = {MediaStore.MediaColumns._ID, MediaStore.MediaColumns.DATA\n , MediaStore.MediaColumns.DISPLAY_NAME, MediaStore.MediaColumns.SIZE};\n\n Cursor cursor = mContext.getContentResolver().query(uri, projection, null, null, null);\n while (cursor != null && cursor.moveToNext()) {\n int column_index_data = cursor.getColumnIndexOrThrow(MediaStore.MediaColumns.DATA);\n String data = cursor.getString(column_index_data);\n int column_index_id = cursor.getColumnIndexOrThrow(MediaStore.MediaColumns._ID);\n int fileId = cursor.getInt(column_index_id);\n String displayName = cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.MediaColumns.DISPLAY_NAME));\n long fileSize = cursor.getLong(cursor.getColumnIndexOrThrow(MediaStore.MediaColumns.SIZE));\n\n //Get information of files in friendsCameraSample folder\n if (data.contains(\"friendsCameraSample\")) {\n HashMap<String, String> info = new HashMap<>();\n info.put(OSCParameterNameMapper.FileInfo.NAME, displayName);\n info.put(OSCParameterNameMapper.FileInfo.URL, data);\n info.put(OSCParameterNameMapper.FileInfo.SIZE, String.valueOf(fileSize));\n adapter.addItem(info, fileId);\n adapter.notifyDataSetChanged();\n }\n }\n }\n }", "private void listFiles(JSONArray parameter) {\n String response = \"Files and Directorys to list: \";\n if (parameter.size() == 1) {\n File file = new File((String) parameter.get(0));\n for (String s : file.list()) {\n response = response + \"\\n\" + s;\n }\n clientResponse(response);\n } else {\n failedClientResponse(\"Wrong Parameters! -400\");\n }\n }", "@GetMapping(\"/all\")\r\n\tpublic List<FileModel> getListFiles() {\r\n\t\treturn fileRepository.findAll();\r\n\t}", "private void cargarProvincias() {\n ArrayList<Provincia> provincias = new ArrayList<>();\n try {\n provincias = new Provincia().listarProvincias();\n if (!provincias.isEmpty()) {\n for (int i = 0; i < provincias.size(); i++) {\n ProvinciasjComboBox.addItem(provincias.get(i).getNombreProvincia());\n }\n } else {\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al cargar las provincias\");\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "public void scanZipFile() {\r\n\t\tnew SwingWorker<Void, String>() {\r\n\t\t\tprotected Void doInBackground() throws Exception {\r\n\t\t\t\tZipInputStream zin = new ZipInputStream(new FileInputStream(\r\n\t\t\t\t\t\tzipname));\r\n\t\t\t\tZipEntry entry;\r\n\t\t\t\twhile ((entry = zin.getNextEntry()) != null) {\r\n\t\t\t\t\tpublish(entry.getName());\r\n\t\t\t\t\tzin.closeEntry();\r\n\t\t\t\t}\r\n\t\t\t\tzin.close();\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\tprotected void process(List<String> names) {\r\n\t\t\t\tfor (String name : names)\r\n\t\t\t\t\tfileCombo.addItem(name);\r\n\r\n\t\t\t}\r\n\t\t}.execute();\r\n\t}", "public static void processOneFileSelecction()\n {\n int answer = JSoundsMainWindowViewController.jfcOneFile.showOpenDialog(JSoundsMainWindowViewController.jSoundsMainWindow);\n \n if (answer == JFileChooser.APPROVE_OPTION)\n {\n File actualDirectory = JSoundsMainWindowViewController.jfcOneFile.getCurrentDirectory();\n String directory = actualDirectory.getAbsolutePath() + \"/\" + JSoundsMainWindowViewController.jfcOneFile.getSelectedFile().getName();\n UtilFunctions.listOneFile(JSoundsMainWindowViewController.jfcOneFile.getSelectedFile());\n JSoundsMainWindowViewController.orderBy(true, false, false); \n }\n }", "void doShowFiles()\n\t{\n\t\ttry\n\t\t{\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tIterator itr = m_fileInfo.getAllFiles();\n\n\t\t\twhile(itr.hasNext())\n\t\t\t{\n\t\t\t\tSourceFile m = (SourceFile) ((Map.Entry)itr.next()).getValue();\n\n\t\t\t\tString name = m.getName();\n\t\t\t\tint id = m.getId();\n\t\t\t\tString path = m.getFullPath();\n\n\t\t\t\tsb.append(id);\n\t\t\t\tsb.append(' ');\n\t\t\t\tsb.append(path);\n\t\t\t\tsb.append(\", \"); //$NON-NLS-1$\n\t\t\t\tsb.append(name);\n\t\t\t\tsb.append(m_newline);\n\t\t\t}\n\t\t\tout( sb.toString() );\n\t\t}\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noSourceFilesFound\")); //$NON-NLS-1$\n\t\t}\n\t}", "public static List<String> getAllFileNames() {\n List<String> fileNames = new ArrayList();\n\n String sql = \"SELECT fileName FROM files;\";\n\n try (Connection conn = DatabaseOperations.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n while (rs.next()) {\n fileNames.add(rs.getString(\"fileName\"));\n }\n return fileNames;\n } catch (SQLException e) {\n System.out.println(\"getAllFileIDs: \" + e.getMessage());\n }\n return null;\n }", "public String[] getFilesFor(String userPublicKey) {\n Log.i(\"getFilesFor\", \"Getting files for \" + userPublicKey);\n Cursor resultSet = database.rawQuery(\"SELECT DISTINCT File FROM FileKeys \" +\n \"WHERE UserPublicKey = '\" + userPublicKey + \"' AND isOwner = 1\", null);\n String[] fileNames = new String[resultSet.getCount()];\n resultSet.moveToFirst();\n int i = 0;\n while (!resultSet.isAfterLast()) {\n Log.i(\"getFilesFor\", \"File namme: \" + resultSet.getString(0));\n fileNames[i++] = resultSet.getString(0);\n resultSet.moveToNext();\n }\n resultSet.close();\n return fileNames;\n }", "@GetMapping(\"/files\")\n public ResponseEntity<List<FileInfo>> getListFiles() {\n List<FileInfo> fileInfos = storageService.loadAll().map(path -> {\n String filename = path.getFileName().toString();\n String url = MvcUriComponentsBuilder\n .fromMethodName(FilesController.class, \"getFile\", path.getFileName().toString()).build().toString();\n\n return new FileInfo(filename, url);\n }).collect(Collectors.toList());\n\n return ResponseEntity.status(HttpStatus.OK).body(fileInfos);\n }", "private void helperDisplayProjectFiles ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tString[] fileNameList = DataController.scenarioGetFileNames();\r\n\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentComboboxFileName().removeAllItems();\r\n\r\n\t\t\tfor (int i = 0; i < fileNameList.length; i++)\r\n\t\t\t{\r\n\t\t\t\tmainFormLink.getComponentPanelLeft().getComponentComboboxFileName().addItem(fileNameList[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}", "public static void getAllFiles()\n\t{\n\t\t//Getting the File Name\n\n\t\tList<String> fileNames = FileManager.getAllFiles(folderpath);\n\t\n\t\tfor(String f:fileNames)\n\t\tSystem.out.println(f);\n\t\n\t}", "public List<AttachFile> getFiles(int no) {\n\t\treturn sqlSession.selectList(\"org.zerock.mapper.agentMapper.viewFiles\", no);\n\t}", "public final List<File> mo14817d() {\n ArrayList arrayList = new ArrayList();\n try {\n if (mo14820g().exists()) {\n if (mo14820g().listFiles() != null) {\n for (File file : mo14820g().listFiles()) {\n if (!file.getCanonicalPath().equals(mo14819f().getCanonicalPath())) {\n arrayList.add(file);\n }\n }\n return arrayList;\n }\n }\n return arrayList;\n } catch (IOException e) {\n f6563c.mo14884b(6, \"Could not process directory while scanning installed packs. %s\", new Object[]{e});\n }\n }", "public List<String> nomsFactures() {\n File folder = new File(\"factures/\");\n File[] listOfFiles = folder.listFiles();\n List<String> noms = new ArrayList<String>();\n\n for (int i = 0; i < listOfFiles.length; i++) {\n if (listOfFiles[i].isFile()) {\n noms.add(listOfFiles[i].getName());\n }\n }\n return noms;\n }", "@Override\n\tpublic List<File> getListing(File directory, FileFilter filter) {\n\t\tfileIconMap = new HashMap<>();\n\n\t\tif (directory == null) {\n\t\t\treturn List.of();\n\t\t}\n\t\tFile[] files = directory.listFiles(filter);\n\t\treturn (files == null) ? List.of() : List.of(files);\n\t}", "private void performFileSearch() {\n Intent intent = new Intent();\n intent.setType(\"*/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), PICK_IMAGE_REQUEST);\n\n }", "@Override\n\tpublic List<File> getAll() {\n\t\t return getSession().\n\t createQuery(\"from File f\", File.class).\n\t getResultList();\n\t}", "public List listFiles(String path);", "private void updateListView() {\n fileList.getItems().setAll(files.readList());\n //System.out.println(System.currentTimeMillis() - start + \" мс\");\n }", "private void getBaseImageDockerfiles(){\n ArrayList<String> baseList = new ArrayList<String>();\n InputStream inputStream = brokenJavaNaming(\"base.list\");\n if(inputStream == null){\n System.out.println(\"No base.list file found.\");\n }else{\n InputStreamReader streamReader = new InputStreamReader(inputStream, StandardCharsets.UTF_8);\n BufferedReader reader = new BufferedReader(streamReader);\n try{\n for (String line; (line = reader.readLine()) != null;) {\n baseList.add(line);\n } \n }catch(IOException ex){\n System.out.println(ex);\n }\n }\n\n // Get list of valid base dockerfiles\n File dockerfileBasesPath = new File(labtainerPath + File.separator +\"scripts\"+ File.separator+\"designer\"+File.separator+\"base_dockerfiles\");\n File[] baseFiles = dockerfileBasesPath.listFiles(new FilenameFilter(){\n public boolean accept(File dockerfileBasesPath, String filename)\n {return filename.startsWith(\"Dockerfile.labtainer.\"); }\n } );\n \n for(int i = 0;i<baseFiles.length;i++){\n String base = baseFiles[i].getName().split(\"Dockerfile.labtainer.\")[1];\n if(!baseList.contains(base)){\n baseList.add(base);\n }\n }\n \n //Set the base image combobox options for making new labs and adding containers\n for(String baseImage : baseList){\n NewLabBaseImageComboBox.addItem(baseImage);\n ContainerAddDialogBaseImageCombobox.addItem(baseImage);\n }\n }", "public List<PerfilTO> buscarTodos();", "public static void showFiles(File[] files) {\n\t\tfor (File file : files) {\n\t\t\tif (file.isDirectory()) {\n\t\t\t\tfoldersWithoutReceipt.add(file.getAbsolutePath());\n\t\t\t\t// System.out.println(\"Directory: \" + file.getAbsolutePath());\n\t\t\t\tshowFiles(file.listFiles());\n\n\t\t\t} else {\n\t\t\t\t// System.out.println(\"File: \" + file.getParent());\n\t\t\t\tinvestigatedFolder = file.getParent();\n\t\t\t\tif (file.getName().startsWith(\"receip\")) {\n\t\t\t\t\tfoldersWithoutReceipt.remove(investigatedFolder);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static List<File> listChildFiles(File dir) throws IOException {\n\t\t List<File> allFiles = new ArrayList<File>();\n\t\t \n\t\t File[] childFiles = dir.listFiles();\n\t\t for (File file : childFiles) {\n\t\t if (file.isFile()) {\n\t\t allFiles.add(file);\n\t\t } else {\n\t\t List<File> files = listChildFiles(file);\n\t\t allFiles.addAll(files);\n\t\t }\n\t\t }\n\t\t return allFiles;\n\t\t }", "public List getAll() throws FileNotFoundException, IOException;", "List<Path> getFiles();", "List getFileUploads(HttpServletRequest request) throws ValidationException;", "private void recalculateFilesAvailable() {\n Collection<Folder> folders = getController().getFolderRepository()\n .getFolders();\n long count = 0;\n for (Folder folder : folders) {\n count += folder.getStatistic().getIncomingFilesCount();\n if (isFiner()) {\n logFiner(\"Folder: \" + folder.getName() + \", incoming: \"\n + folder.getStatistic().getIncomingFilesCount());\n }\n }\n filesAvailableLine.setValue(count);\n }", "public List<AudioInformation> getAudioInformationFunction(String path){\n File folder = new File(path);\n File[] listOfFiles = folder.listFiles((FileFilter) null);// get all files in folder\n if(listOfFiles!=null){\n int size = listOfFiles.length;\n numberOfFilesToProcess = numberOfFilesToProcess + size;\n if(progressBar!=null) {\n progressBar.setFilesToProcess(numberOfFilesToProcess);\n }\n\n for (int count = 0; count < size; count++) {\n File file = listOfFiles[count];\n boolean read=false;\n if (!(file.getName().charAt(0) == exclude)) { // if starts with exclude charcter ignore\n if (file.isFile()) {\n boolean isAudioFile = utilities.isAudioFile(file); // check if file is audio file\n if (isAudioFile == true) {\n AudioInformation information=extractAudioInformation.extractAudioInformationFromFile(file);\n if(onCD==true) {\n information.setWriteFieldsToFile(false);\n }\n\n informationList.add(information);\n\n }\n else if(utilities.getExtensionOfFile(file).equalsIgnoreCase(\"cue\")){\n try {\n CueSheet cueSheet=extractAudioInformation.getCueSheet(file);\n List<AudioInformation> tracks=cueSheet.getTracks();\n informationList.addAll(tracks);\n } catch (CueSheetExeception cueSheetExeception) {\n cueSheetExeception.printStackTrace();\n errorMessages.add(cueSheetExeception.getMessage());\n }\n }\n numberOfFilesProcessed++;\n if(progressBar!=null) {\n progressBar.setFilesProcessed(numberOfFilesProcessed);\n }\n } else if (file.isDirectory()) {\n numberOfFilesProcessed++;\n if(progressBar!=null) {\n\n progressBar.setFilesProcessed(numberOfFilesProcessed);\n }\n\n getAudioInformationFunction(listOfFiles[count].getPath());\n }\n if(updateLabel!=null) {\n updateLabel.setText(numberOfFilesToProcess + \" of \" + numberOfFilesToProcess + \"Files Processed\");\n }\n\n }\n }\n }\n return informationList;\n }", "private static void listarDirectorio2(String directorio) {\n\t\tFile f = new File(directorio);\n\t\tFile[] ficheros = f.listFiles();\n\t\tSystem.out.printf(\"DIRECTORY: %s%n\", directorio);\n\t\tfor (int i = 0; i < ficheros.length; i++) {\n\t\t\t// es fichero\n\t\t\tif (ficheros[i].isFile()) {\n\t\t\t\tSystem.out.printf(\"-- FILE %s%n\", \n\t\t\t\t\t\tficheros[i].getName());\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < ficheros.length; i++) {\n\t\t\t// es directorio\n\t\t\tif (ficheros[i].isDirectory()) {\n\t\t\t\tSystem.out.printf(\"-- DIR %s%n\", \n\t\t\t\t\t\tficheros[i].getName());\n\t\t\t\t//System.out.println(\"\");\n\t\t\t\t//listarDirectorio2(ficheros[i].getPath());\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < ficheros.length; i++) {\n\t\t\t// explora nuevos directorios\n\t\t\tif (ficheros[i].isDirectory()) {\t\t\t\t\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\tlistarDirectorio2(ficheros[i].getPath());\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.64314234", "0.6389123", "0.6245546", "0.61953855", "0.6192845", "0.6147282", "0.61142075", "0.60407495", "0.6024838", "0.6020577", "0.59978527", "0.5987504", "0.59773415", "0.59589607", "0.594805", "0.5938527", "0.5926203", "0.5855994", "0.58556896", "0.58176595", "0.5801654", "0.5800008", "0.57641864", "0.576129", "0.57394797", "0.57330745", "0.57290554", "0.5696599", "0.56811553", "0.5655422", "0.56359434", "0.5624187", "0.56021714", "0.55859804", "0.5568449", "0.55677456", "0.55667776", "0.55539685", "0.5551109", "0.5525245", "0.55216897", "0.55216014", "0.5513256", "0.5510298", "0.5495518", "0.5471248", "0.54709035", "0.5468875", "0.54622495", "0.5462181", "0.545347", "0.544898", "0.54482657", "0.54479164", "0.54473966", "0.5428838", "0.54113877", "0.540786", "0.53886294", "0.5384084", "0.5377352", "0.5374242", "0.5371114", "0.53675735", "0.5364168", "0.5358004", "0.53513193", "0.5348327", "0.5345476", "0.534479", "0.5343953", "0.534229", "0.5331478", "0.5326478", "0.5322409", "0.5319418", "0.53167534", "0.5311217", "0.5306049", "0.5305488", "0.52955407", "0.52895886", "0.52841824", "0.5274304", "0.52719235", "0.526837", "0.52586144", "0.52575666", "0.52531695", "0.524608", "0.5245154", "0.52428794", "0.52310294", "0.5229854", "0.52250504", "0.5224186", "0.522342", "0.52200985", "0.52122957", "0.5211815", "0.52101314" ]
0.0
-1
TODO Autogenerated method stub
public void doLogin(String user, String pass) { refgservice.checkUserPassword(user, pass, new LoginCallback()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public void fetchByName(String name) { refgservice.fetchNodesByName(name, new SearchByNameCallback()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public void onFailure(Throwable caught) { GWT.log("error in search",caught); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public void onSuccess(Object result) { refgview.getNavPanel().getSearchPanelView().displayNameSearchResult(result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public void onFailure(Throwable caught) { callStack.remove("target"); GWT.log("error in search",caught); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public void onSuccess(Object result) { System.err.println("showing results..."); callStack.remove("target"); refgview.getNavPanel().getBrowseView().displayTargets((NodeDTO[])result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public void onFailure(Throwable caught) { GWT.log("error in search",caught); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public void onSuccess(Object result) { System.err.println("showing results..."); //refgview.getNavPanel().getBrowseView().displayTargets((NodeDTO[])result); refgview.getSearchPanel().displaySearchTargets((NodeDTO[])result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public void onSuccess(Object result) { Boolean response = (Boolean) result; boolean val = response.booleanValue(); if (val) { refgview.getLoginPanel().enableLogin(); refgview.getNavPanel().addCurationBar(); } else { refgview.getLoginPanel().denyLogin(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public void onFailure(Throwable throwable) { GWT.log("error getting target ids",throwable); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public void onSuccess(Object result) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public void onFailure(Throwable caught) { GWT.log("Error fetching taxonids", caught); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public void onSuccess(Object result) { refgview.getSearchPanel().fillTaxonNodes(result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public void onFailure(Throwable caught) { GWT.log("Error uploading file", caught); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub TODO signal to user somehow
public void onSuccess(Object result) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n public void onCancelled(CancelledException arg0) {\n }", "@Override\n public void onCancelled(CancelledException arg0) {\n }", "public void mo38117a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "protected void aktualisieren() {\r\n\r\n\t}", "@Override\n\tpublic void getStatus() {\n\t\t\n\t}", "private void getStatus() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tpublic void voar() {\n\t\t\r\n\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n public void onCancelled(CancelledException arg0) {\n\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\n\tpublic void stateChanged() {\n\t\t\n\t}", "@Override\n\t\tprotected void onPreExecute() \n\t\t{\n\t\t}", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "private stendhal() {\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void moverse() {\n\t\t\n\t}", "@Override\r\n\t\t\tprotected void saveContext() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void type() {\n\t\t\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n protected void end() {\n \n }", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "protected void mo6255a() {\n }", "public void mo55254a() {\n }", "@Override\r\n\tpublic void laught() {\n\r\n\t}", "@Override\n\tprotected void postRun() {\n\n\t}", "@Override\r\n protected void end() {\r\n\r\n }", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "void berechneFlaeche() {\n\t}", "@Override\n public void onCancelled(CancelledException arg0) {\n\n }", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "private void m50366E() {\n }", "@Override\n\tpublic void e() {\n\n\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\r\n\tpublic void manage() {\n\t\t\r\n\t}", "@Override\n\tpublic void processing() {\n\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "protected boolean func_70041_e_() { return false; }", "@Override\n protected void initialize() {\n\n \n }" ]
[ "0.7088431", "0.7024936", "0.6946334", "0.67174315", "0.668822", "0.66351414", "0.66351414", "0.66253555", "0.659423", "0.6586248", "0.655709", "0.6554351", "0.6537873", "0.65243083", "0.6521226", "0.6491175", "0.64450383", "0.6413022", "0.63974935", "0.63974935", "0.639312", "0.63930434", "0.6392227", "0.6382925", "0.6382925", "0.63827205", "0.6375291", "0.63373137", "0.6324984", "0.6290955", "0.6289941", "0.6280747", "0.626274", "0.6212849", "0.62005305", "0.61937207", "0.6190509", "0.6159115", "0.61586434", "0.6129687", "0.60797906", "0.60797906", "0.60787106", "0.60714173", "0.6065994", "0.6063978", "0.6025671", "0.6013546", "0.6012318", "0.60025907", "0.59953594", "0.5989468", "0.5987952", "0.5987852", "0.59860235", "0.5974965", "0.5974965", "0.5974965", "0.5974965", "0.5974965", "0.5974965", "0.5974965", "0.5974207", "0.59741235", "0.5973632", "0.5966324", "0.59629494", "0.5950478", "0.59402883", "0.5938583", "0.5914773", "0.5907019", "0.59057677", "0.58981425", "0.5897418", "0.58953273", "0.5892673", "0.5889054", "0.5888768", "0.5887488", "0.588069", "0.588069", "0.58753186", "0.5858875", "0.5858148", "0.58569086", "0.5851374", "0.5849055", "0.5847993", "0.58461994", "0.58426005", "0.58412576", "0.5836313", "0.583063", "0.583063", "0.583063", "0.5827752", "0.5823004", "0.5819347", "0.5818019", "0.5817901" ]
0.0
-1
TODO Autogenerated method stub
public void onFailure(Throwable caught) { GWT.log("Error changing status", caught); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub TODO signal to user somehow
public void onSuccess(Object result) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n public void onCancelled(CancelledException arg0) {\n }", "@Override\n public void onCancelled(CancelledException arg0) {\n }", "public void mo38117a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "protected void aktualisieren() {\r\n\r\n\t}", "@Override\n\tpublic void getStatus() {\n\t\t\n\t}", "private void getStatus() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tpublic void voar() {\n\t\t\r\n\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n public void onCancelled(CancelledException arg0) {\n\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\n\tpublic void stateChanged() {\n\t\t\n\t}", "@Override\n\t\tprotected void onPreExecute() \n\t\t{\n\t\t}", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "private stendhal() {\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void moverse() {\n\t\t\n\t}", "@Override\r\n\t\t\tprotected void saveContext() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void type() {\n\t\t\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n protected void end() {\n \n }", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "protected void mo6255a() {\n }", "public void mo55254a() {\n }", "@Override\r\n\tpublic void laught() {\n\r\n\t}", "@Override\n\tprotected void postRun() {\n\n\t}", "@Override\r\n protected void end() {\r\n\r\n }", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "void berechneFlaeche() {\n\t}", "@Override\n public void onCancelled(CancelledException arg0) {\n\n }", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "private void m50366E() {\n }", "@Override\n\tpublic void e() {\n\n\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\r\n\tpublic void manage() {\n\t\t\r\n\t}", "@Override\n\tpublic void processing() {\n\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "protected boolean func_70041_e_() { return false; }", "@Override\n protected void initialize() {\n\n \n }" ]
[ "0.7088431", "0.7024936", "0.6946334", "0.67174315", "0.668822", "0.66351414", "0.66351414", "0.66253555", "0.659423", "0.6586248", "0.655709", "0.6554351", "0.6537873", "0.65243083", "0.6521226", "0.6491175", "0.64450383", "0.6413022", "0.63974935", "0.63974935", "0.639312", "0.63930434", "0.6392227", "0.6382925", "0.6382925", "0.63827205", "0.6375291", "0.63373137", "0.6324984", "0.6290955", "0.6289941", "0.6280747", "0.626274", "0.6212849", "0.62005305", "0.61937207", "0.6190509", "0.6159115", "0.61586434", "0.6129687", "0.60797906", "0.60797906", "0.60787106", "0.60714173", "0.6065994", "0.6063978", "0.6025671", "0.6013546", "0.6012318", "0.60025907", "0.59953594", "0.5989468", "0.5987952", "0.5987852", "0.59860235", "0.5974965", "0.5974965", "0.5974965", "0.5974965", "0.5974965", "0.5974965", "0.5974965", "0.5974207", "0.59741235", "0.5973632", "0.5966324", "0.59629494", "0.5950478", "0.59402883", "0.5938583", "0.5914773", "0.5907019", "0.59057677", "0.58981425", "0.5897418", "0.58953273", "0.5892673", "0.5889054", "0.5888768", "0.5887488", "0.588069", "0.588069", "0.58753186", "0.5858875", "0.5858148", "0.58569086", "0.5851374", "0.5849055", "0.5847993", "0.58461994", "0.58426005", "0.58412576", "0.5836313", "0.583063", "0.583063", "0.583063", "0.5827752", "0.5823004", "0.5819347", "0.5818019", "0.5817901" ]
0.0
-1
Update performance based on page navigation only.
private void updatePerformanceBasedOnNavigation() { if (DataPool.LmCurrentCard >= 0 && DataPool.LmCurrentCard < DataPool.getPoolSize()) { WordConnection wc = DataPool.getWordConnection(DataPool.LmCurrentCard); Performance perf = DataPool.getPerformance(wc.connectionId); if (perf == null) { MyQuickToast.showShort(act, "No performance data: " + wc.connectionId); return; } if (DataPool.LmType == Learning_Type_Review) { perf.performance = "good"; } perf.tempVersion = perf.version + 1; perf.save(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void incPagesCrawled() {\n pagesCrawled++;\n }", "public void update() {\r\n\t\t\r\n\t\tif (page == 0 && updates - updates0 > 480) {\r\n\t\t\tpage++;\r\n\t\t}\r\n\t\tif (page == 7 && updates - updates1 > 300) {\r\n\t\t\tpage++;\r\n\t\t}\r\n\t}", "private void pageCacheChanged() {\n // Ok to have a race here, see the field javadoc.\n if (!pageCacheChanged)\n pageCacheChanged = true;\n }", "@Override\n public void updateStats() {\n if (entering || isLogoutStarted()) {\n return;\n }\n\n refreshOverloaded();\n refreshExpertisePenalty();\n super.updateStats();\n }", "protected void speedRefresh() {\r\n\t\t\ttStartTime = System.currentTimeMillis();\r\n\t\t\ttDownloaded = 0;\r\n\t\t}", "private void update(boolean update)\n {\n ScoreboardPage page = pages.get(index);\n Objective obj = board.getObjective(slot);\n\n if (!page.hasCache()) {\n Player player = (listeners.isEmpty())\n ? null : listeners.get(listeners.keySet().iterator().next());\n\n page.createCache(library, player);\n\n if (page.shouldResetLastPage()) {\n for (String item : obj.getScoreboard().getEntries()) {\n obj.getScoreboard().resetScores(item);\n }\n }\n }\n\n if (page.getTitle() != null) {\n obj.setDisplayName(page.getTitle().next());\n }\n\n for (int i : page.getEntries().keySet()) {\n String text = page.getEntries().get(i).next();\n\n if (occupiedEntries.containsKey(i) && !occupiedEntries.get(i).equals(text)) {\n board.resetScores(occupiedEntries.get(i));\n occupiedEntries.remove(i);\n }\n\n if (text == null) {\n continue;\n }\n\n team.addEntry(text);\n obj.getScore(text).setScore(i);\n\n occupiedEntries.put(i, text);\n }\n\n if (update) {\n extra = page.getExtraDelay();\n ticks = delay + extra;\n\n page.clearCache();\n }\n }", "@Override\n public int getTraversalRate() {\n return load;\n }", "@Test(priority = 28)\r\n\tpublic void pageRefresh() {\r\n\tmainPage.pageRefresh();\r\n\t}", "@Override\n\t\tpublic void onLoadMore() {\n\t\t\tpageIndex++;\n\t\t\tloadInfo(pageIndex, 1);\n\t\t\tif (DzqcStu.isDebug) {\n\t\t\t\tLog.i(\"pageIndex------\", pageIndex+\"\");\n\t\t\t}\n\t\t}", "public synchronized void updateNavigation(){\t\r\n\t\tthis.updateSensors();\r\n\t\tthis.calculateLocation();\r\n\t\tif (this.parkingSlotDetectionIsOn)\r\n\t\t\t\tthis.detectParkingSlot();\r\n\t\t\r\n\t\t// MONITOR (example)\r\n//\t\tmonitor.writeNavigationComment(\"Navigation\");\r\n\t}", "public void updateTravelledAndVisited() {\n Storage storage = Main.getStorage();\n routeStatsCalculator.updateLeastTravelledRoute(storage.getHistory());\n routeStatsCalculator.updateMostTravelledRoute(storage.getHistory());\n airportStatsCalculator.updateMostVisitedSrcAirports(storage.getHistorySrcAirports());\n airportStatsCalculator.updateLeastVisitedSrcAirports(storage.getHistorySrcAirports());\n airportStatsCalculator.updateMostVisitedDestAirports(storage.getHistoryDestAirports());\n airportStatsCalculator.updateLeastVisitedDestAirports(storage.getHistoryDestAirports());\n }", "public static void give() {\r\n\t\t\r\n\t\tif (ths.page == 6) {\r\n\t\t\tths.page++;\r\n\t\t\tths.updates1 = updates;\r\n\t\t}\r\n\t}", "public void updateProgress( int pagesPrinted );", "private void recalculate()\n {\n this.totalPages = this.contents.size() > 54 ? this.contents.size() / 45 : 1;\n }", "private void optimizeForWebPerformance() {\n if (usesDeploymentConfig()) {\n getFrameworkSettings().setSerializer(new DeflatedJavaSerializer(getApplicationKey()));\n } else {\n getResourceSettings().setCachingStrategy(new NoOpResourceCachingStrategy());\n }\n\n getRequestCycleSettings().setRenderStrategy(IRequestCycleSettings.RenderStrategy.ONE_PASS_RENDER);\n }", "public void performance() {\n\t\tPositionVo s = currentPerformed.getFirst();\n\t\t@SuppressWarnings(\"unused\")\n\t\tPositionVo e = currentPerformed.getLast();\n//\t\tint timeCost = (int) (e.getTime() - s.getTime());\n//\t\tint span = (int) Math.abs(e.getHead().getX() - s.getHead().getX());\n\t\t// TODO according to the moving rate decide how many nodes fill the gap\n\n\t\tint size = currentPerformed.size();\n\n\t\tfor (int i = 1; i < size * 4 - 4; i += 4) {\n\t\t\tPositionVo s1 = currentPerformed.get(i - 1);\n\t\t\tPositionVo s2 = currentPerformed.get(i);\n\n\t\t\tPoint[] delta_Head = sim_dda(s1.getHead(), s2.getHead(), 4);\n\t\t\tPoint[] delta_left_hand = sim_dda(s1.getLeftHand(), s2.getRightHand(), 4);\n\t\t\tPoint[] delta_right_hand = sim_dda(s1.getRightHand(), s2.getRightHand(), 4);\n\n\t\t\tfor (int j = 0; j < 3; j++)\n\t\t\t\tcurrentPerformed.add(i + j, new PositionVo(delta_Head[j], delta_left_hand[j], delta_right_hand[j]));\n\t\t}\n\n\t\tnCount = currentPerformed.size();\n\t\tcursor = 0;\n\n\t\t/* (*)absolute point = initial point - current point */\n\t\treferX -= s.getHead().getX();\n\t\treferY += s.getHead().getY();\n\t\tcurrReferX = referX;\n\t\tcurrReferY = referY;\n\n\t\t/* update gui */\n\t\tmanager.proceBar.setMinimum(0);\n\t\tmanager.proceBar.setMaximum(nCount);\n\t\t/* end */\n\n\t\tstartTimer((int) (ANIMATE_FPS * speedRate));\n\t}", "void updateLoad(){\n\t\tdouble aloadFactor = elements/Table.length;\r\n\t\tif(aloadFactor==1){\r\n\t\t\tRehash();\r\n\t\t}\r\n\t\tloadFactor = ((double)elements)/Table.length;\r\n\t}", "public Object updatePerformance()\r\n/* */ {\r\n\t\t\t\tlogger.info(count++ + \" About to updatePerformance : \" + \"Agent\");\r\n/* 261 */ return this;\r\n/* */ }", "public void testPerformance() {\n \t}", "private void learn() {\n\t\tupdateValues();\n\t\tif(CFG.isUpdatedPerformanceHistory()){\n\t\t\tupdateHistory();\n\t\t}\n\t\tif(CFG.isEvaluated()) evaluate();\n\t}", "@SuppressWarnings(\"deprecation\")\n private void updateResourceCounters() {\n updateHeapUsageCounter();\n\n // Updating resources specified in ResourceCalculatorProcessTree\n if (pTree == null) {\n return;\n }\n pTree.updateProcessTree();\n long cpuTime = pTree.getCumulativeCpuTime();\n long pMem = pTree.getCumulativeRssmem();\n long vMem = pTree.getCumulativeVmem();\n // Remove the CPU time consumed previously by JVM reuse\n cpuTime -= initCpuCumulativeTime;\n PSAgentContext.get().getMetrics().put(AngelCounter.CPU_MILLISECONDS, Long.toString(cpuTime));\n PSAgentContext.get().getMetrics().put(AngelCounter.PHYSICAL_MEMORY_BYTES, Long.toString(pMem));\n PSAgentContext.get().getMetrics().put(AngelCounter.VIRTUAL_MEMORY_BYTES, Long.toString(vMem));\n }", "public void updateAfterAddition(List<Integer> pageList) {\n int pageNum = Collections.min(pageList);\n mDocPagesModified = true;\n int pageCount;\n boolean shouldUnlockRead = false;\n try {\n mPdfViewCtrl.docLockRead();\n shouldUnlockRead = true;\n final PDFDoc doc = mPdfViewCtrl.getDoc();\n if (doc == null) {\n return;\n }\n pageCount = doc.getPageCount();\n } catch (Exception ex) {\n AnalyticsHandlerAdapter.getInstance().sendException(ex);\n return;\n } finally {\n if (shouldUnlockRead) {\n mPdfViewCtrl.docUnlockRead();\n }\n }\n\n try {\n mDataList.clear();\n for (int p = 1; p <= pageCount; p++) {\n Map<String, Object> itemMap = new HashMap<>();\n itemMap.put(ThumbnailsViewAdapter.PAGE_NUMBER_SRC, p);\n itemMap.put(ThumbnailsViewAdapter.THUMB_IMAGE, null);\n add(itemMap);\n }\n } catch (Exception ignored) {\n }\n\n Utils.safeNotifyDataSetChanged(this);\n safeScrollToPosition(pageNum - 1);\n }", "public static void addPageHit(long time) {\r\n _count++;\r\n _time += time;\r\n if (_serverStarted == -1)\r\n _serverStarted = System.currentTimeMillis();\r\n }", "private void updatePage(List<HashMap<String, Object>> cheeseCounts)\n\t{\n populateUserView();\n\t\trefreshFriendsListview(cheeseCounts, true, null);\n\t\tpopulateHistoryListView();\n\t}", "void update(String page, Collection<String> paths, Collection<String> refreshPaths);", "private void optimiseEVProfile()\n\t{\n\t}", "private void updateTotalPageNumbers() {\n totalPageNumbers = rows.size() / NUM_ROWS_PER_PAGE;\n }", "private void updatePage() {\n\t\ttry {\n\t\t\tList<ParseUser> friendUsers = ParseUser.getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t.fromLocalDatastore()\n\t\t\t\t\t\t\t\t\t\t\t\t\t.whereNotEqualTo(\"facebookId\", currentUser.getString(\"facebookId\"))\n\t\t\t\t\t\t\t\t\t\t\t\t\t.find();\n\t\t\t\n\t\t\tpopulateViews(friendUsers);\n\t\t\n\t\t} catch (ParseException e) {\n\t\t\tLog.e(StealTheCheeseApplication.LOG_TAG, \"Fetch friends from localstore failed with message: \" + e);\n\t\t}\n\t}", "@Override\n public void adDisplayed(Ad ad) {\n numberOfPageSelected = 0;\n// pageThresHold *= 2;\n }", "public PageVisits() {\n LOG.info(\"=========================================\");\n LOG.info(\"Page Visit Counter is being created\");\n LOG.info(\"=========================================\");\n }", "public void updatePopularity(int increase){\n //@todo implement method\n }", "public static void performanceCountDisable() { }", "public void calcPerfMeasure(View view) {\n \tPerfMeasure.Calculate();\n \talertbox(\"HTTP Download Performance\",PerfMeasure.toString());\n }", "public void fullRenderRefresh() {\n gameChanged = true;\n visionChanged = true;\n backgroundChanged = true;\n selectionChanged = true;\n movementChanged = true;\n }", "@Override\n public void onPageChanged(int page, int pageCount) {\n }", "@Override\n\tpublic void increaseSpeed() {\n\t\tSystem.out.println(\"increaseSpeed\");\n\t\t\n\t}", "public void dfs(Webpage currentPage) {\n if (currentPage != null) {\n //System.out.println(currentPage.toString());\n linkDatabase.add(currentPage.getUrl());\n webpageDatabase.add(currentPage);\n\n for (String link : currentPage.getLinks()) {\n if (!linkDatabase.contains(link)) {\n dfs(webpageScraper.fetchWebpage(link));\n }\n }\n }\n }", "@Override\r\n\tpublic void beforeNavigateRefresh(WebDriver arg0) {\n\t\t\r\n\t}", "private final void updateStatistics(){\r\n\t\tstatisticsText_.setLength(0); \t//reset\r\n\t\t\r\n\t\tRegion[][] regions = Map.getInstance().getRegions();\r\n\t\tVehicle[] vehicles;\r\n\t\tVehicle vehicle;\r\n\t\tint i, j, k;\r\n\t\tint activeVehicles = 0;\r\n\t\tint travelledVehicles = 0;\r\n\t\tint wifiVehicles = 0;\r\n\t\tlong messagesCreated = 0;\r\n\t\tlong IDsChanged = 0;\r\n\t\tdouble messageForwardFailed = 0;\r\n\t\tdouble travelDistance = 0;\r\n\t\tdouble travelTime = 0;\r\n\t\tdouble speed = 0;\r\n\t\tdouble knownVehicles = 0;\r\n\t\tfor(i = 0; i < regions.length; ++i){\r\n\t\t\tfor(j = 0; j < regions[i].length; ++j){\r\n\t\t\t\tvehicles = regions[i][j].getVehicleArray();\r\n\t\t\t\tfor(k = 0; k < vehicles.length; ++k){\r\n\t\t\t\t\tvehicle = vehicles[k];\r\n\t\t\t\t\tif(vehicle.getTotalTravelTime() > 0){\r\n\t\t\t\t\t\t++travelledVehicles;\r\n\t\t\t\t\t\ttravelDistance += vehicle.getTotalTravelDistance();\r\n\t\t\t\t\t\ttravelTime += vehicle.getTotalTravelTime();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(vehicle.isActive()){\r\n\t\t\t\t\t\t++activeVehicles;\r\n\t\t\t\t\t\tspeed += vehicle.getCurSpeed();\r\n\t\t\t\t\t\tif(vehicle.isWiFiEnabled()){\r\n\t\t\t\t\t\t\t++wifiVehicles;\r\n\t\t\t\t\t\t\tmessageForwardFailed += vehicle.getKnownMessages().getFailedForwardCount();\r\n\t\t\t\t\t\t\tknownVehicles += vehicle.getKnownVehiclesList().getSize();\r\n\t\t\t\t\t\t\tIDsChanged += vehicle.getIDsChanged();\r\n\t\t\t\t\t\t\tmessagesCreated += vehicle.getMessagesCreated();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.currentTime\")); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(INTEGER_FORMAT.format(Renderer.getInstance().getTimePassed()));\r\n\t\tstatisticsText_.append(\"\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.activeVehicles\")); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(INTEGER_FORMAT.format(activeVehicles));\r\n\t\tstatisticsText_.append(\"\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.averageSpeed\")); //$NON-NLS-1$\r\n\t\tif(activeVehicles > 0) statisticsText_.append(INTEGER_FORMAT_FRACTION.format(speed/activeVehicles/100000*3600));\r\n\t\telse statisticsText_.append(\"0\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(\" km/h\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.averageTravelDistance\")); //$NON-NLS-1$\r\n\t\tif(travelledVehicles > 0) statisticsText_.append(INTEGER_FORMAT_FRACTION.format(travelDistance/travelledVehicles/100));\r\n\t\telse statisticsText_.append(\"0\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(\" m\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.averageTravelTime\")); //$NON-NLS-1$\r\n\t\tif(travelledVehicles > 0) statisticsText_.append(INTEGER_FORMAT_FRACTION.format(travelTime/travelledVehicles/1000));\r\n\t\telse statisticsText_.append(\"0\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(\" s\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.wifiVehicles\")); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(INTEGER_FORMAT.format(wifiVehicles));\r\n\t\tstatisticsText_.append(\"\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.averageKnownVehicles\")); //$NON-NLS-1$\r\n\t\tif(wifiVehicles > 0) statisticsText_.append(INTEGER_FORMAT_FRACTION.format(knownVehicles/wifiVehicles));\r\n\t\telse statisticsText_.append(\"0\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(\"\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.uniqueMessages\")); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(INTEGER_FORMAT.format(messagesCreated));\r\n\t\tstatisticsText_.append(\"\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.failedMessages\")); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(INTEGER_FORMAT.format(messageForwardFailed));\r\n\t\tstatisticsText_.append(\"\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.totalIDchanges\")); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(INTEGER_FORMAT.format(IDsChanged));\r\n\t\tstatisticsText_.append(\"\\n\"); //$NON-NLS-1$\r\n\t\t\r\n\t\tstatisticsTextArea_.setText(statisticsText_.toString());\r\n\t}", "public void addPerformance (String methodName, long startTime) {\n if (!isPerformance) {\n return;\n }\n theBrowserMgr.addPerformance(methodName, startTime);\n }", "public static void performanceCountReset() { }", "public void render() {\r\n\t\t\r\n\t\tif (page >= 0 && page < pages.length) {\r\n\t\t\tTextures.renderQuad(pages[page][(updates / 90) % pages[page].length], 32, 32, 1024, 512);\r\n\t\t}\r\n\t}", "@Override\n\tpublic void onRefresh() {\n\t\tpage = 1;\n\t\tSystem.out.println(\"onRefresh1\");\n\t\tmyList.clear();\n\t\tSystem.out.println(\"onRefresh2\");\n\t\tgetData();\n\t}", "abstract public void setPerformanceInfo() throws Exception;", "@Override\r\n\tpublic void visit(Page page) {\r\n\t\t// Some business logic I won't expose here\r\n\t\t// My boss won't be happy ;-)\r\n\t}", "@Override\n\tpublic void beforeNavigateRefresh(WebDriver arg0) {\n\n\t}", "protected void updateDecisions(Page page, LinearLayout decisionsLayout) {\n\t\tdecisionsLayout.removeAllViews();\n\t\t\n\t\t//For each decision in the page, add it to decisionsLayout\n\t\tArrayList<Decision> decisions = page.getDecisions();\n\t\tfor (int i = 0; i < decisions.size(); i++) {\n\t\t\taddDecision(i, decisions.get(i), decisionsLayout);\n\t\t\t\n\t\t\t\n\t\t}\n\t}", "@Override\n\t\tprotected void onResume() {\n\t\t\tsuper.onResume();\n\t\t\t//SDK已经禁用了基于Activity 的页面统计,所以需要再次重新统计页面\n\t\t\tMobclickAgent.onPageStart(mPageName);\n\t\t\tMobclickAgent.onResume(this);\n\t\t}", "private void paginate() {\n List<ItemModel> old = adapter.getItems();\n List<ItemModel> New = new ArrayList<>(addList());\n CardStackCallback callback = new CardStackCallback(old, New);\n DiffUtil.DiffResult result = DiffUtil.calculateDiff(callback);\n adapter.setItems(New);\n result.dispatchUpdatesTo(adapter);\n }", "public void performUpdateReset() {\n switchToPage(NavDrawerAdapter.FLUFF_ID);\n\t}", "@Override\n public void PageFistLoad() {\n }", "public void beforeNavigateRefresh(WebDriver driver) {\n\t\t\n\t}", "void incUsage() {\n incUsage(1);\n }", "private void updateUi() {\n int index = mCurrentPage.getIndex();\n int pageCount = mPdfRenderer.getPageCount();\n mButtonPrevious.setEnabled(0 != index);\n mButtonNext.setEnabled(index + 1 < pageCount);\n getActivity().setTitle(getString(R.string.app_name_with_index, index + 1, pageCount));\n }", "private void updateManualVisit() {\n // scroll to expandable RecyclerView\n onView(withId(R.id.expanding_rv_manual_visits))\n .perform(scrollTo());\n\n // scroll to visit group and click to expand\n onView(withId(R.id.expanding_rv_manual_visits))\n .perform(RecyclerViewActions.scrollToPosition(POS_VISIT_GROUP))\n .perform(click());\n\n // click the visit that was added to update it\n onView(withId(R.id.expanding_rv_manual_visits))\n .perform(RecyclerViewActions.actionOnItemAtPosition(POS_NEW_VISIT, click()));\n\n // pick updated date\n onView(withId(R.id.date_picker)).perform(PickerActions.setDate(\n UPDATED_YEAR, UPDATED_MONTH, UPDATED_DAY));\n\n // scroll to time picker\n onView(withId(R.id.time_picker))\n .perform(scrollTo());\n\n // pick updated time\n onView(withId(R.id.time_picker)).perform(PickerActions.setTime(UPDATED_HOUR, UPDATED_MINUTE));\n\n // scroll to set button\n onView(withId(R.id.btn_date_time_set))\n .perform(scrollTo());\n\n // click to set updated date and time\n onView(withId(R.id.btn_date_time_set)).perform(click());\n }", "public void beforeNavigateRefresh(WebDriver driver) {\n\t\t\r\n\t}", "public void beforeNavigateRefresh(WebDriver driver) {\n\t\t\r\n\t}", "@Override\n public void process(Page page) {\n PageStore.prePage = page.getHtml().toString();\n }", "public static void performanceCountEnable(int event) { }", "private void updateNetworkSpeed() {\n Message obtain = Message.obtain();\n obtain.what = 200000;\n long j = 0;\n if (isDemoOrDrive() || this.mDisabled || !this.mIsNetworkConnected) {\n obtain.arg1 = 0;\n this.mHandler.removeMessages(200000);\n this.mHandler.sendMessage(obtain);\n this.mLastTime = 0;\n this.mTotalBytes = 0;\n return;\n }\n long currentTimeMillis = System.currentTimeMillis();\n long totalByte = getTotalByte();\n if (totalByte == 0) {\n this.mLastTime = 0;\n this.mTotalBytes = 0;\n totalByte = getTotalByte();\n }\n long j2 = this.mLastTime;\n if (j2 != 0 && currentTimeMillis > j2) {\n long j3 = this.mTotalBytes;\n if (!(j3 == 0 || totalByte == 0 || totalByte <= j3)) {\n j = ((totalByte - j3) * 1000) / (currentTimeMillis - j2);\n }\n }\n obtain.arg1 = 1;\n obtain.obj = Long.valueOf(j);\n this.mHandler.removeMessages(200000);\n this.mHandler.sendMessage(obtain);\n this.mLastTime = currentTimeMillis;\n this.mTotalBytes = totalByte;\n postUpdateNetworkSpeedDelay((long) this.mNetworkUpdateInterval);\n }", "protected abstract void trace_pre_updates();", "private void updateBathCount() {\n // Create thread for database fetch\n new Thread(new Runnable() {\n @Override\n public void run() {\n sitesCount = database.bathingSiteDao().getTotalBathingSites();\n // Update on UI thread\n activity.runOnUiThread(new Runnable(){\n @Override\n public void run() {\n displaySitesCount();\n }\n });\n }\n }).start();\n }", "@Override\n public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {\n loadMoreRecyclerViewData(hal[0]);\n hal[0]++;\n }", "public void nextPage() {\n\t\tthis.skipEntries += NUM_PER_PAGE;\n\t\tloadEntries();\n\t}", "public void incrementPages(String page)\r\n {\r\n // Check if page already Indexed.\r\n\tif(checkAlreadyFound(page))\r\n\t return;\r\n pageNames.addElement(page);\r\n\t\r\n\t// provide feedback to the user.\r\n\tstatusArea.setText(\"Search Page: \"+pageNames.size());\r\n }", "private float getRefreshRate() {\n return 1;\n }", "void updatePage(String name, String park);", "public void updatePageAccessibilityActions() {\n int itemCount;\n ViewPager2 viewPager2 = ViewPager2.this;\n int i = 16908360;\n ViewCompat.removeAccessibilityAction(viewPager2, 16908360);\n ViewCompat.removeAccessibilityAction(viewPager2, 16908361);\n ViewCompat.removeAccessibilityAction(viewPager2, 16908358);\n ViewCompat.removeAccessibilityAction(viewPager2, 16908359);\n if (ViewPager2.this.getAdapter() != null && (itemCount = ViewPager2.this.getAdapter().getItemCount()) != 0 && ViewPager2.this.isUserInputEnabled()) {\n if (ViewPager2.this.getOrientation() == 0) {\n boolean isRtl = ViewPager2.this.isRtl();\n int i2 = isRtl ? 16908360 : 16908361;\n if (isRtl) {\n i = 16908361;\n }\n if (ViewPager2.this.mCurrentItem < itemCount - 1) {\n ViewCompat.replaceAccessibilityAction(viewPager2, new AccessibilityNodeInfoCompat.AccessibilityActionCompat(i2, (CharSequence) null), (CharSequence) null, this.mActionPageForward);\n }\n if (ViewPager2.this.mCurrentItem > 0) {\n ViewCompat.replaceAccessibilityAction(viewPager2, new AccessibilityNodeInfoCompat.AccessibilityActionCompat(i, (CharSequence) null), (CharSequence) null, this.mActionPageBackward);\n return;\n }\n return;\n }\n if (ViewPager2.this.mCurrentItem < itemCount - 1) {\n ViewCompat.replaceAccessibilityAction(viewPager2, new AccessibilityNodeInfoCompat.AccessibilityActionCompat(16908359, (CharSequence) null), (CharSequence) null, this.mActionPageForward);\n }\n if (ViewPager2.this.mCurrentItem > 0) {\n ViewCompat.replaceAccessibilityAction(viewPager2, new AccessibilityNodeInfoCompat.AccessibilityActionCompat(16908358, (CharSequence) null), (CharSequence) null, this.mActionPageBackward);\n }\n }\n }", "private void update(int frameNo)\n {\n //This function is to be used for LRU and MRU\n }", "@Override\r\n public void beforeNavigateRefresh(final WebDriver driver) {\n\r\n }", "private void updateCpuStats() {\n\t\tmNumStatsUpdated = 0;\n\t\tList<String> stats = ShellHelper.getProc(CPU_STAT_PROC);\n\t\tif (stats == null || stats.isEmpty()) return;\n\t\t\n\t\tString[] parts = null;\n\t\tString line = null;\n\t\tfor (int i = 0; i < stats.size(); ++i) {\n\t\t\tline = stats.get(i);\n\t\t\tif (line.startsWith(\"cpu\")) { //TODO if 0% usage the cpu is omitted\n\t\t\t\tparts = line.split(\"\\\\s+\");\t\t\t\t\n\t\t\t\tif (parts[0].endsWith(String.valueOf(i - 1))) {\n\t\t\t\t\tif (mLogicalCpus.size() >= i &&\n\t\t\t\t\t\t\tmLogicalCpus.get(i - 1).getCpuStat().update(parts)) {\t\t\t\t\t\n\t\t\t\t\t\t++mNumStatsUpdated;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (mCpuStat.update(parts)) {\n\t\t\t\t\t++mNumStatsUpdated;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void onLoadMore() {\n\t\tpage++;\n\t\texecutorService.submit(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\ttry {\n\t\t\t\t\tgetResultByKeyword(page);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public void simulation() {\n\t\t//clock period\n\t\tThread clockThread = new ClockThread(pageLists){\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile(true){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.currentThread().sleep(50);\n\t\t\t\t\t\tfor(int i = 0; i < 5; i++)\n\t\t\t\t\t\t\tpageList.get(i).modifyCounter();\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t};\n\t\tclockThread.start();\n\t\t\n\t\t//simulation access a page\n\t\tint[] indexs = {0,0,3,0,1,0,4,2,3,1,\n\t\t\t\t\t\t0,0,4,0,3,2,2,0,3,4,\n\t\t\t\t\t\t0,3,0,3,1,0,2,3,0,1,\n\t\t\t\t\t\t4,0,0,0,1,0,2,3,0,3,\n\t\t\t\t\t\t0,0,3,0,1,0,2,0,0,0,\n\t\t};\n\t\tfor(int i = 0; i < indexs.length; i++) {\n\t\t\taccessPageItem(indexs[i]);\n\t\t}\n\t\t\n\t\t//page fault\n\t\tPage weedOutPage = getWeedOutPage();\n\t\tSystem.out.println(\"The weed out page is \" + weedOutPage + \"\");\n\t\tfor(int i = 0; i < 5; i++)\n\t\t\tSystem.err.println(pageLists.get(i) + \" the counter is \" + pageLists.get(i).getCounter());\n\t\t\n\t\tclockThread.yield();\n\t\t\n\t}", "protected abstract void onRequestPage(boolean isRequestNext,int fromIndex,int toIndex,float x,float y);", "@SuppressWarnings( \"unchecked\" )\n private void reinstate( PageState pageState, AjaxRequestTarget target ) {\n // Expand what's expanded in page state but not in current expansions\n List<Long> expandSet =\n (List<Long>) CollectionUtils.subtract( pageState.getExpansions(), expansions );\n // Collapse what's in expansions but not in page state\n List<Long> collapseSet =\n (List<Long>) CollectionUtils.subtract( expansions, pageState.getExpansions() );\n for ( Long id : expandSet ) {\n try {\n ModelObject toExpand = getQueryService().find( ModelObject.class, id );\n expand( toExpand );\n } catch ( NotFoundException e ) {\n expand( new Change( Change.Type.Expanded, id ) );\n }\n }\n for ( Long id : collapseSet ) {\n try {\n ModelObject toCollapse = getQueryService().find( ModelObject.class, id );\n collapse( toCollapse );\n } catch ( NotFoundException e ) {\n collapse( new Change( Change.Type.Collapsed, id ) );\n }\n }\n // Reset aspects\n aspects = new HashMap<Long, List<String>>();\n for ( Long id : pageState.getAspects().keySet() ) {\n try {\n ModelObject viewedObject = getQueryService().find( ModelObject.class, id );\n for ( String previousAspect : pageState.getAspects().get( id ) ) {\n viewAspect( viewedObject, previousAspect );\n }\n } catch ( NotFoundException e ) {\n // Do nothing\n }\n }\n try {\n Segment previousSegment =\n getQueryService().find( Segment.class, pageState.getSegmentId() );\n if ( !getSegment().equals( previousSegment ) ) {\n setSegment( previousSegment );\n }\n Part previousPart = (Part) getSegment().getNode( pageState.getPartId() );\n if ( !getPart().equals( previousPart ) ) {\n setPart( previousPart );\n }\n } catch ( NotFoundException e ) {\n // Do nothing\n }\n refreshAll( target );\n }", "private void calculateAndDisplayFps() {\n if (fpsTimer.secondHasPassed()) {\n fpsTimer.getElapsedTimeAndUpdate();\n if (window.optionIsTurnedOn(Window.Options.DISPLAY_FPS)) {\n window.setTitle(gameTitle + \" - \" + fps + \" FPS\");\n }\n fps = 0;\n }\n fps++;\n }", "public void update(Page currentPage) throws RQLException ;", "private void loadData() {\n\n if (mIsLoading) {\n return;\n }\n\n String url = mSiteData.getUrl();\n\n if (!mIsRefreshMode) {\n //if (mMaxPage > 0 && mCurrentPage > mMaxPage) {\n // return;\n //}\n //Log.e(mTag, \"mMaxPage: \" + mMaxPage);\n\n if (mCurrentPage > 1) {\n switch (mSiteData.getId()) {\n case Config.BLOG_ID_AKB48_TEAM8:\n url = url + \"?p=\" + mCurrentPage;\n break;\n case Config.BLOG_ID_NGT48_MANAGER:\n url = url + \"lite/?p=\" + mCurrentPage;\n break;\n case Config.BLOG_ID_SKE48_SELECTED:\n case Config.BLOG_ID_NMB48_OFFICIAL:\n url = url + \"page-\" + mCurrentPage + \".html\";\n break;\n }\n //showToolbarProgressBar();\n }\n }\n\n String userAgent = Config.USER_AGENT_WEB;\n switch (mSiteData.getId()) {\n case Config.BLOG_ID_SKE48_SELECTED:\n case Config.BLOG_ID_NMB48_OFFICIAL:\n case Config.BLOG_ID_NGT48_MANAGER:\n case Config.BLOG_ID_NGT48_PHOTOLOG:\n userAgent = Config.USER_AGENT_MOBILE;\n break;\n }\n\n mIsLoading = true;\n\n if (!mIsFirst && !mIsRefreshMode) {\n mLoLoadingMore.setVisibility(View.VISIBLE);\n }\n\n //Log.e(mTag, url);\n requestData(url, userAgent);\n }", "public void updateAfterMove(int fromPageNum, int toPageNum) {\n try {\n int start = Math.min(fromPageNum - 1, toPageNum - 1);\n int end = Math.max(fromPageNum - 1, toPageNum - 1);\n if (start >= 0 && end < getItemCount() && start != end) {\n // Adjust logical page numbers and thumbnails between original and new positions\n if (fromPageNum > toPageNum) {\n Map<String, Object> itemMap = getItem(end);\n if (itemMap != null) {\n mDataLock.lock();\n Bitmap lastBitmap = (Bitmap) itemMap.get(THUMB_IMAGE);\n boolean currentPageUpdated = false;\n for (int i = start; i <= end; ++i) {\n itemMap = getItem(i);\n if (itemMap == null) {\n break;\n }\n int oldPageNum = (Integer) itemMap.get(PAGE_NUMBER_SRC);\n Bitmap tempBitmap = (Bitmap) itemMap.get(THUMB_IMAGE);\n if (!currentPageUpdated && oldPageNum == mCurrentPage) {\n // Update current page\n mCurrentPage = i + 1;\n currentPageUpdated = true;\n }\n itemMap.put(PAGE_NUMBER_SRC, i + 1);\n itemMap.put(THUMB_IMAGE, lastBitmap);\n lastBitmap = tempBitmap;\n }\n mDataLock.unlock();\n }\n } else {\n Map<String, Object> itemMap = getItem(start);\n if (itemMap != null) {\n mDataLock.lock();\n Bitmap lastBitmap = (Bitmap) itemMap.get(THUMB_IMAGE);\n boolean currentPageUpdated = false;\n for (int i = end; i >= start; --i) {\n itemMap = getItem(i);\n if (itemMap == null) {\n break;\n }\n int oldPageNum = (Integer) itemMap.get(PAGE_NUMBER_SRC);\n Bitmap tempBitmap = (Bitmap) itemMap.get(THUMB_IMAGE);\n if (!currentPageUpdated && oldPageNum == mCurrentPage) {\n // Update current page\n mCurrentPage = i + 1;\n currentPageUpdated = true;\n }\n itemMap.put(PAGE_NUMBER_SRC, i + 1);\n itemMap.put(THUMB_IMAGE, lastBitmap);\n lastBitmap = tempBitmap;\n }\n mDataLock.unlock();\n }\n }\n\n Utils.safeNotifyDataSetChanged(this);\n safeScrollToPosition(toPageNum - 1);\n }\n } catch (Exception e) {\n AnalyticsHandlerAdapter.getInstance().sendException(e);\n }\n }", "public void startOver() {\n this.pagesRead = 0;\n }", "@Override\r\n\t\t\tpublic void onRefresh() {\n\t\t\t\tgetLichHoc();\r\n\t\t\t}", "public void previousPage() {\n\t\tthis.skipEntries -= NUM_PER_PAGE;\n\t\tif (this.skipEntries < 1) {\n\t\t\tskipEntries = 1;\n\t\t}\n\t\tloadEntries();\n\t}", "@Override\n public void onLoadMore() {\n MyApplacation.getmHandler().postDelayed(new Runnable() {\n @Override\n public void run() {\n pageNo++;\n getDataForService();\n }\n }, 1000);\n\n }", "public void transitionToStatsPage() throws RemoteException{\n removeAll();\n statsPanel = new StatsPanel(contr);\n add(statsPanel, \"span 1\");\n }", "@Override\n\tpublic void process(Page page) {\n\t\tDocument doc = Jsoup.parse(page.getHtml().getFirstSourceText());\n\n\t\tif (isFirst) {\n\t\t\tSystem.out.println(\"添加所有列表链接\");\n\t\t\tArrayList<String> urls = new ArrayList<String>();\n\t\t\t// 33\n\t\t\tfor (int i = 2; i < 30; i++) {\n\t\t\t\turls.add(\"http://zyjy.jiangmen.gov.cn//szqjszbgg/index_\" + i + \".htm\");\n\t\t\t}\n\t\t\tpage.addTargetRequests(urls);\n\t\t\tSystem.out.println(\"这一页一共有 \" + urls.size() + \" 条数据\");\n\n\t\t\tisFirst = false;\n\t\t}\n\n\t\tif (page.getUrl().regex(URL_LIST).match() || page.getUrl().toString().trim().equals(url)) {\n\t\t\tSystem.out.println(\"获取列表数据\");\n\n\t\t\tElements uls = doc.getElementsByAttributeValue(\"class\", \"c1-bline\");\n\t\t\tfor (Element ul : uls) {\n\t\t\t\tString url = ul.getElementsByAttributeValue(\"class\", \"f-left\").get(0).select(\"a\").attr(\"href\").trim();\n\t\t\t\tString title = ul.getElementsByAttributeValue(\"class\", \"f-left\").get(0).text();\n\t\t\t\tString data = ul.getElementsByAttributeValue(\"class\", \"f-right\").get(0).text();\n\t\t\t\tCacheHashMap.cache.put(url, title + \"###\" + data);\n\t\t\t\tMyUtils.addRequestToPage(page, url);\n\t\t\t\tSystem.out.println(url + \" \" + CacheHashMap.cache.get(url));\n\t\t\t}\n\n\t\t}\n\t\tif (page.getUrl().regex(URL_DETAILS).match()) {\n\n\t\t\tProject project = new Project();\n\t\t\tStringBuffer project_article = new StringBuffer();\n\n\t\t\tString urldetails = CacheHashMap.cache.get(page.getUrl().toString().trim());\n\t\t\tSystem.out.println(\"url\" + page.getUrl().toString().trim());\n\t\t\tSystem.out.println(\"urldetails \" + urldetails);\n\n\t\t\tString[] value = urldetails.split(\"###\");\n\t\t\tif (value != null && value.length > 1) {\n\t\t\t\tproject.setProjectName(value[0]);\n\t\t\t\tproject.setPublicStart(value[1]);\n\t\t\t}\n\n\t\t\tElements divs = doc.getElementsByAttributeValue(\"class\", \"contlist minheight\");\n\t\t\tfor (Element div : divs.get(0).children()) {\n\t\t\t\tif (div.nodeName().equals(\"table\")) {\n\t\t\t\t\tElements trs = divs.select(\"tbody\").select(\"tr\");\n\t\t\t\t\tfor (Element tr : trs) {\n\t\t\t\t\t\tproject_article.append(tr.text()).append(\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tproject_article.append(div.text()).append(\"\\n\");\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tproject.setUrl(page.getUrl().toString().trim());\n\t\t\tproject.setState(0);\n\t\t\tproject.setWebsiteType(\"江门市\");\n\t\t\tproject.setTime(MyUtils.getcurentTime());\n\t\t\tproject.setRawHtml(divs.toString());\n\n\t\t\tproject.setArticle(project_article.toString());\n\t\t\tSystem.out.println(project);\n\n\t\t\tHibernateUtil.save2Hibernate(project);\n\n\t\t}\n\n\t}", "public void faster()\n {\n if(speed < 9){\n speed += 1;\n }\n }", "private void updateAccessPoints() {\n // Safeguard from some delayed event handling\n if (getActivity() == null) return;\n\n final int wifiState = mWifiManager.getWifiState();\n\n switch (wifiState) {\n case WifiManager.WIFI_STATE_ENABLED:\n // AccessPoints are automatically sorted with TreeSet.\n final Collection<AccessPoint> accessPoints = constructAccessPoints();\n getPreferenceScreen().removeAll();\n for (AccessPoint accessPoint : accessPoints) {\n getPreferenceScreen().addPreference(accessPoint);\n }\n break;\n case WifiManager.WIFI_STATE_ENABLING:\n getPreferenceScreen().removeAll();\n break;\n }\n }", "@Override\n\tpublic void onRefresh(PullToRefreshBase<GridView> refreshView) {\n\t\t String label = DateUtils.formatDateTime(getActivity(), System.currentTimeMillis(), \n DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_ABBREV_ALL); \n refreshView.getLoadingLayoutProxy().setLastUpdatedLabel(label); \n\t\t\n page++;\n loadGoodsList(typeID, quyuID, PriceID);\n\t}", "public void refer(int page){\n\n if(!hashSet.contains(page)){\n\n if(deque.size() == Cache_Size){\n int last = deque.removeLast();\n hashSet.remove(last);\n }\n }\n else{\n /* The found page may not be always the last element, even if it's an\n intermediate element that needs to be removed and added to the start\n of the Queue */\n deque.remove(page);\n }\n deque.push(page);\n hashSet.add(page);\n }", "protected void updateLoadTime() {\r\n\t\tthis.loadTime = new Timestamp(System.currentTimeMillis());\r\n\t}", "@Override\n\tprotected void load() {\n\t\tisPageLoaded = true;\n\t}", "void updateDashboard() {\n\t}", "private void updateMetrics(CPUMetrics.CPU_STATE state, String instruction)\n {\n CPUMetrics metrics = new CPUMetrics(cpuNum);\n metrics.setTotalInstructionsNumber(jobCounter);\n metrics.setProgramCounter(programCounter);\n metrics.setCurrentJobNumber(currentJobNumber());\n metrics.setCurrentState(state);\n metrics.setCurrentInstruction(instruction);\n Driver.updateCpuMetric(metrics);\n }", "public void updateAfterRotation(List<Integer> pageList) {\n if (pageList == null || pageList.size() == 0) {\n return;\n }\n\n mDocPagesModified = true;\n\n Collections.sort(pageList); // since we will use binary search\n\n // Update page numbers\n ListIterator<Map<String, Object>> it = mDataList.listIterator();\n Integer pageNum = 1;\n while (it.hasNext()) {\n Map<String, Object> item = it.next();\n pageNum = (Integer) item.get(PAGE_NUMBER_SRC);\n try {\n if (Collections.binarySearch(pageList, pageNum) >= 0) {\n mDataLock.lock();\n item.put(THUMB_IMAGE, null);\n mDataLock.unlock();\n // Update cached page list\n removeCachedPage(pageNum);\n }\n } catch (Exception ignored) {\n }\n }\n\n Utils.safeNotifyDataSetChanged(this);\n safeScrollToPosition(pageNum - 1);\n }", "@Override\n\tpublic void OnUpdateNavigation( ) {\n\t\t\n\t\tCalendar calendar1 = Calendar.getInstance();\n\t\tcalendar1.set(Calendar.HOUR_OF_DAY, 0);\n\t\tcalendar1.set(Calendar.MINUTE, 0);\n\t\tcalendar1.set(Calendar.SECOND, 0);\n\t\tcalendar1.set(Calendar.MILLISECOND, 0);\n\t\tthis.selectedDate = calendar1.getTimeInMillis();\n\t\t\n\t\toverviewFragment = new OverviewFragment();\n\t\tBundle bundle = new Bundle();\n\t\tbundle.putLong(\"selectedDate\", this.selectedDate);\n\t\toverviewFragment.setArguments(bundle);\n\n\t\tFragmentTransaction fragmentTransaction1 = this.getSupportFragmentManager().beginTransaction();\n\t\tfragmentTransaction1.replace(R.id.content_frame,\n\t\t\t\toverviewFragment);\n\t\tfragmentTransaction1.commit();\n\t\t\n\t\toverViewNavigationListAdapter.setChoosed(0);\n\t\toverViewNavigationListAdapter.setSubTitle(turnToDate(this.selectedDate));\n\t\toverViewNavigationListAdapter.notifyDataSetChanged();\n\t\t\n\t}", "public void updateStatisticsData() {\r\n\t\tif (this.statisticsTabItem != null && !this.statisticsTabItem.isDisposed()) {\r\n\t\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\t\tthis.statisticsTabItem.updateStatisticsData(true);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tDataExplorer.this.statisticsTabItem.updateStatisticsData(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void addDataForListView() {\n \t\n \tif(loadable)\n \t{\t\n \tloadable = false;\n \tdirection = BACKWARD;\n \tstrUrl = Url.composeHotPageUrl(type_id, class_id, last_id);\n \trequestData();\n \t}\n\t}", "public void updateStats() {\n ObservableList<Node> children = gpLocations.getChildren();\n for (int i = 0; i < gpLocations.getChildren().size() / 2; i++)\n for (Node n : children)\n if (gpLocations.getRowIndex(n) == i + 1 && gpLocations.getColumnIndex(n) == 1) {\n Text t = (Text) n;\n t.setText(String.format(\n \"\\t\\t%.1f\", activeCar.getCurrentLocation().getDistanceToLocation(locations.get(i))));\n }\n\n children = gpCars.getChildren();\n for (int j = 0; j < gpCars.getChildren().size() / 2; j++)\n for (Node m : children)\n if (gpCars.getRowIndex(m) == j + 1 && gpCars.getColumnIndex(m) == 1) {\n Text tmpM = (Text) m;\n tmpM.setText(String.format(\"\\t\\t%.1f\", cars.get(j).getTime()));\n }\n\n children = gridPane.getChildren();\n for (Node o : children)\n if (gridPane.getRowIndex(o) == 5 && gpCars.getColumnIndex(o) == 0) {\n Text tmpO = (Text) o;\n tmpO.setText(\"Active Car\\t\" + activeCar.getIdentifier() + \" \" + activeCar.getEnd().getName());\n }\n }", "private static void updateHitrate(String s) {\n long _missCountSum = getCounterResult(\"missCount\");\n long _opCountSum = getCounterResult(\"opCount\");\n if (_opCountSum == 0L) {\n return;\n }\n double _hitRate = 100.0 - _missCountSum * 100.0 / _opCountSum;\n System.err.println(Thread.currentThread() + \" \" + s + \", opSum=\" + _opCountSum + \", missSum=\" + _missCountSum + \", hitRate=\" + _hitRate);\n setResult(\"hitrate\", _hitRate, \"percent\", AggregationPolicy.AVG);\n }", "private void pagination()\n {\n if (value==0)\n {\n aBoolean=true;\n setAdapter(postModels);\n value=1;\n count=count+10;\n }\n else if (value==1)\n {\n if (count<page_count)\n {\n aBoolean=true;\n count=count+10;\n temp_list.addAll(postModels);\n adapter.notifyDataSetChanged();\n }\n }\n }" ]
[ "0.61742413", "0.6094318", "0.6005162", "0.562013", "0.5518691", "0.54953426", "0.53079474", "0.5299186", "0.5295946", "0.5282681", "0.52569294", "0.52300996", "0.5226468", "0.5225992", "0.52257156", "0.52151805", "0.51755637", "0.51612395", "0.51345336", "0.51100224", "0.5081979", "0.50676835", "0.5060154", "0.50391555", "0.5035767", "0.5002639", "0.4998281", "0.49939054", "0.4981349", "0.4953845", "0.49509", "0.49434555", "0.49346527", "0.4924233", "0.4922719", "0.49118006", "0.4910874", "0.4907657", "0.48950866", "0.4885177", "0.48634323", "0.48598105", "0.4858864", "0.48547465", "0.48416975", "0.48325214", "0.48285797", "0.48160344", "0.48154998", "0.4791387", "0.47622767", "0.47566086", "0.47540164", "0.4751808", "0.475095", "0.4750285", "0.4750285", "0.4746412", "0.47434694", "0.4742534", "0.4741015", "0.47405457", "0.47334534", "0.47268087", "0.47245294", "0.47234654", "0.47122487", "0.46962985", "0.46781668", "0.4665264", "0.46588516", "0.46586722", "0.46567017", "0.46561134", "0.46554992", "0.46527648", "0.46402675", "0.46368092", "0.46355662", "0.4634327", "0.46322507", "0.46221945", "0.4621826", "0.46209002", "0.46192303", "0.46190682", "0.46172783", "0.46172518", "0.4616791", "0.46147862", "0.46134302", "0.46103245", "0.46101654", "0.46093515", "0.46029106", "0.45955154", "0.45937487", "0.4593232", "0.4589329", "0.4587658" ]
0.7753537
0
Creates a scheduler with specified name
public ActivityScheduler(String name) { this(name, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Scheduler(String scheduler_name) {\n super();\n this.scheduler_name = scheduler_name;\n this.task_set = null;\n }", "public void setSchedulerName(String schedulerName)\r\n/* 20: */ {\r\n/* 21: 58 */ this.schedulerName = schedulerName;\r\n/* 22: */ }", "Schedule createSchedule();", "@HTTP(\n method = \"PUT\",\n path = \"/apis/config.openshift.io/v1/schedulers/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/json\",\n \"Accept: */*\"\n })\n KubernetesCall<Scheduler> replaceScheduler(\n @Path(\"name\") String name, \n @Body Scheduler body);", "public static ScheduledExecutorService createNewScheduler() {\n return Executors.newScheduledThreadPool(Runtime.getRuntime().availableProcessors() * 2);\n }", "public void schedule(String name, long period) {\n\t\tschedule(name, period, period, TimeUnit.MILLISECONDS);\n\t}", "public ActivityScheduler(String name, ActivityListener listener) {\n\t\tthis.name = name;\n\t\tTrackerConfig config = DefaultConfigFactory.getInstance().getConfig(name);\n\t\tif (listener != null) config.setActivityListener(listener);\n\t\tthis.logger = TrackingLogger.getInstance(config.build());\n\t\tthis.logger.setKeepThreadContext(false);\n\t}", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/schedulers/{name}\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Scheduler> readScheduler(\n @Path(\"name\") String name);", "@JsonCreator\n public static ScheduleType fromString(String name) {\n return fromString(name, ScheduleType.class);\n }", "public void setSchedName(String schedName) {\n this.schedName = schedName;\n }", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/schedulers/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Scheduler> patchScheduler(\n @Path(\"name\") String name, \n @Body Scheduler body);", "public static ThreadPoolTaskScheduler createThreadPoolTaskScheduler(\r\n\t\t\tint poolSize, \r\n\t\t\tFrequency frequency, String name){\r\n\t\treturn new ThreadPoolTaskScheduler(poolSize, frequency, name, null);\r\n\t}", "public Scheduler()\n {\n this.id = \"\"+ hashCode();\n register();\n }", "public Task(String name) {\n\t\tthis.name=name;\n\t}", "@HTTP(\n method = \"PUT\",\n path = \"/apis/config.openshift.io/v1/schedulers/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/json\",\n \"Accept: */*\"\n })\n KubernetesCall<Scheduler> replaceScheduler(\n @Path(\"name\") String name, \n @Body Scheduler body, \n @QueryMap ReplaceScheduler queryParameters);", "public Factory(String name) {\n\t\tlines = new ArrayList<AssemblyLine>();\n\t\tthis.name = name;\n\t\t\n\t\tTimer timer = new Timer();\n\t\ttimer.scheduleAtFixedRate(new TimerTask() {\n\t\t\tpublic void run() {\n\t\t\t\twork();\n\t\t\t}\n\t\t}, 0l, 3000l);\n\t}", "TimerSchedule createTimerSchedule();", "public String getSchedulerName() {\n return schedulerName;\n }", "SwSchedulableResource createSwSchedulableResource();", "public static ThreadPoolTaskScheduler createThreadPoolTaskScheduler(\r\n\t\t\tExecutorService executorService, \r\n\t\t\tFrequency frequency, String name, TimeZone timezone){\r\n\t\treturn new ThreadPoolTaskScheduler(executorService, frequency, name, timezone);\r\n\t}", "public String getSchedulerName() {\r\n return this.schedulerName;\r\n }", "public IGenScheduleHandler create() throws CreateException, RemoteException;", "public final String get_name() {\n return scheduler_name;\n }", "public static void start(String name) {\n if (timers.containsKey(name)) {\n timers.get(name).start();\n } else {\n timers.put(name, new Timer());\n }\n }", "SchedulersFactory getSchedulersFactory();", "public Task(DateTime deadline, String name, int priority) {\r\n\t\tthis.deadline = deadline;\r\n\t\tthis.name = name;\r\n\t\tthis.priority = priority;\r\n\t\tstart = new DateTime();\r\n\t}", "Task(String name) {\n this.name = name;\n }", "public Schedule create() {\n\n\t\tSchedule result;\n\n\t\tresult = new Schedule();\n\n\t\treturn result;\n\t}", "public void schedule(String name, long period, TimeUnit tunit) {\n\t\tschedule(name, period, period, TimeUnit.MILLISECONDS);\n\t}", "@HTTP(\n method = \"PUT\",\n path = \"/apis/config.openshift.io/v1/schedulers/{name}/status\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/json\",\n \"Accept: */*\"\n })\n KubernetesCall<Scheduler> replaceSchedulerStatus(\n @Path(\"name\") String name, \n @Body Scheduler body);", "public synchronized Task setScheduler(Scheduler s)\n/* */ {\n/* 102 */ this.scheduler = s;\n/* 103 */ return this;\n/* */ }", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/schedulers/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Scheduler> patchScheduler(\n @Path(\"name\") String name, \n @Body Scheduler body, \n @QueryMap PatchScheduler queryParameters);", "public void createFCFSQueue(String name) {\n queues.putIfAbsent(name, new FCFSQueue(name));\n }", "public Agent createAgent(String name) {\n return this.gamygdala.createAgent(name);\n }", "public static ThreadPoolTaskScheduler createThreadPoolTaskScheduler(\r\n\t\t\tint poolSize, \r\n\t\t\tFrequency frequency, String name, TimeZone timezone){\r\n\t\treturn new ThreadPoolTaskScheduler(poolSize, frequency, name, timezone);\r\n\t}", "public static org.jfree.data.gantt.Task createTask(String name, int start, int end) {\r\n\t\treturn new org.jfree.data.gantt.Task(name, SchedulerUtils.dateTime(start), SchedulerUtils.dateTime(end));\r\n\t}", "public RunStmnt(String name) {\r\n\t\tsuper();\r\n\t\tsetName(new Name(name));\r\n\t}", "public String create(Schedule arg0) {\n\t\treturn null;\n\t}", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/schedulers/{name}/status\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Scheduler> patchSchedulerStatus(\n @Path(\"name\") String name, \n @Body Scheduler body);", "public void generateSchedule(){\n\t\t\n\t}", "public PriorityScheduler() {\n }", "public void setScheduler(Scheduler scheduler)\r\n/* 25: */ {\r\n/* 26: 65 */ this.scheduler = scheduler;\r\n/* 27: */ }", "public void setTaskName(String name) {\n\r\n\t}", "@Override\n\t\t\tpublic void setTaskName(String name) {\n\t\t\t\t\n\t\t\t}", "public PriorityScheduler() {\n\t}", "public interface SchedulerProvider {\n\n Scheduler io();\n\n Scheduler ui();\n}", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/schedulers/{name}/status\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Scheduler> readSchedulerStatus(\n @Path(\"name\") String name);", "public Scheduler(double speed) {\r\n\t\tsuper(\"Scheduler\");\r\n\t\t\r\n\t\t// Set game speed\r\n\t\tthis.setSpeed(speed);\r\n\t\t\r\n\t\t// Set state\r\n\t\tthis.state = GameState.CREATED;\r\n\t\t\r\n\t\tif (logger.isDebugEnabled())\r\n\t\t\tlogger.debug(\"Scheduler started.\");\r\n\t}", "public static SchedulerFactory schedulerFactory() {\r\n if (schedulerFactory == null) {\r\n \r\n Properties props = new Properties();\r\n for (String key : GrouperClientConfig.retrieveConfig().propertyNames()) {\r\n if (key.startsWith(\"org.quartz.\")) {\r\n String value = GrouperClientConfig.retrieveConfig().propertyValueString(key);\r\n if (value == null) {\r\n value = \"\";\r\n }\r\n props.put(key, value);\r\n }\r\n }\r\n \r\n try {\r\n schedulerFactory = new StdSchedulerFactory(props);\r\n } catch (SchedulerException se) {\r\n throw new RuntimeException(se);\r\n }\r\n }\r\n return schedulerFactory;\r\n }", "Task createTask();", "Task createTask();", "Task createTask();", "public schedulerJob() {\n }", "public static NamingScheduledTaskContext createNamingScheduledTaskContext(){\r\n\t\treturn new NamingScheduledTaskContext();\r\n\t}", "@Test\n public void createScheduledPlanTest() throws ApiException {\n ScheduledPlan body = null;\n ScheduledPlan response = api.createScheduledPlan(body);\n\n // TODO: test validations\n }", "public ServerScheduledEventBuilder setName(String name) {\n delegate.setName(name);\n return this;\n }", "public Task(String name) {\r\n this(name, false);\r\n }", "public void schedule(String name, long initialDelay, long period, TimeUnit tunit) {\n\t\tschedule(name, period, period, tunit, opLevel);\n\t}", "public abstract ServiceLocator create(String name);", "public interface SchedulerProvider {\r\n\r\n Scheduler computation();\r\n\r\n Scheduler io();\r\n\r\n Scheduler ui();\r\n}", "public static CronTrigger createCronTrigger(String cronExp,\n\t\t\tString triggerName, String jobName,String groupName) throws SchedulerException,\n\t\t\tParseException {\n\t\tlog.info(\"------- create Scheduling cronTrigger ----------------\");\n\t\tCronTrigger cronTrigger = new CronTrigger(triggerName, groupName, jobName, groupName, cronExp);\n\t\treturn cronTrigger;\n\t}", "public interface Scheduler {\n\n void schedule();\n\n}", "@HTTP(\n method = \"PUT\",\n path = \"/apis/config.openshift.io/v1/schedulers/{name}/status\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/json\",\n \"Accept: */*\"\n })\n KubernetesCall<Scheduler> replaceSchedulerStatus(\n @Path(\"name\") String name, \n @Body Scheduler body, \n @QueryMap ReplaceSchedulerStatus queryParameters);", "protected Scheduler findScheduler(String schedulerName)\r\n/* 54: */ throws SchedulerException\r\n/* 55: */ {\r\n/* 56: 95 */ if ((this.beanFactory instanceof ListableBeanFactory))\r\n/* 57: */ {\r\n/* 58: 96 */ ListableBeanFactory lbf = (ListableBeanFactory)this.beanFactory;\r\n/* 59: 97 */ String[] beanNames = lbf.getBeanNamesForType(Scheduler.class);\r\n/* 60: 98 */ for (int i = 0; i < beanNames.length; i++)\r\n/* 61: */ {\r\n/* 62: 99 */ Scheduler schedulerBean = (Scheduler)lbf.getBean(beanNames[i]);\r\n/* 63:100 */ if (schedulerName.equals(schedulerBean.getSchedulerName())) {\r\n/* 64:101 */ return schedulerBean;\r\n/* 65: */ }\r\n/* 66: */ }\r\n/* 67: */ }\r\n/* 68:105 */ Scheduler schedulerInRepo = SchedulerRepository.getInstance().lookup(schedulerName);\r\n/* 69:106 */ if (schedulerInRepo == null) {\r\n/* 70:107 */ throw new IllegalStateException(\"No Scheduler named '\" + schedulerName + \"' found\");\r\n/* 71: */ }\r\n/* 72:109 */ return schedulerInRepo;\r\n/* 73: */ }", "private List<Schedule> getSchedules(String traverserName, int delay) {\n List<ScheduleTimeInterval> intervals =\n new ArrayList<ScheduleTimeInterval>();\n intervals.add(new ScheduleTimeInterval(\n new ScheduleTime(0),\n new ScheduleTime(0)));\n \n List<Schedule> schedules = new ArrayList<Schedule>();\n Schedule schedule = new Schedule(traverserName, false, 60, delay, intervals);\n schedules.add(schedule);\n return schedules;\n }", "public Task(String name) {\n this.name = name;\n this.isDone = false;\n }", "public void scheduleJobs();", "@Override\r\n\tpublic void setTaskName(String name) {\n\r\n\t}", "public interface SchedulerProvider {\n Scheduler background();\n Scheduler ui();\n}", "public static QualifiedName create(final String namespace, final String name) {\n\t\treturn create(namespace + name);\n\t}", "public Schedule() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "public interface SchedulerProvider {\n\n Scheduler ui();\n\n Scheduler computation();\n\n Scheduler io();\n\n}", "protected abstract void scheduler_init();", "void setSchedule(java.lang.String schedule);", "public Task(String name, int number) {\r\n this.name = name;\r\n this.id = number;\r\n this.timer = new Timer();\r\n }", "void schedule(ScheduledJob job);", "private Task createTaskFromGivenArgs(Name name, TaskDate taskStartDate, TaskDate taskEndDate, Status taskStatus) {\n\t if (isEventTask(taskStartDate, taskEndDate)) {\n\t return new EventTask(name, taskStartDate, taskEndDate, taskStatus);\n\t }\n\t if (isDeadline(taskEndDate)) {\n\t return new DeadlineTask(name, taskEndDate, taskStatus);\n\t }\n\t return new Task(name, taskStatus);\n\t}", "public void schedule(String name, long initialDelay, long period, TimeUnit tunit, OpLevel severity) {\n\t\tif (future == null || future.isCancelled()) {\n\t\t\tactivityTask = newActivityTask(logger, name, severity);\n\t\t\tfuture = scheduler.scheduleAtFixedRate(activityTask, initialDelay, period, tunit);\n\t\t} else {\n\t\t\tthrow new IllegalStateException(\"Already scheduled\");\n\t\t}\n\t}", "public synchronized void schedule(SchedulerTask schedulerTask, SchedulerTaskState initialState)\n {\n ScheduleIterator iterator = schedulerTask.iterator();\n if (timer == null)\n\t\t\tthrow new IllegalStateException(\"Scheduler '\" + getId() + \"' has already been canceled\");\n \n if (this.scheduledTimerTasks.containsKey(schedulerTask.getKey()))\n throw new IllegalStateException(\"Task '\" + schedulerTask.getKey() + \"' has already been scheduled by scheduler '\" + getId() + \"'\");\n \n // register task to be scheduled\n schedulerTask.schedule(this, initialState);\n\n // determine the next execution time\n Date nextExecution = getNextExecution(iterator);\n if (nextExecution == null)\n {\n // no execution desired -> cancel\n schedulerTask.setState(SchedulerTaskState.CANCELED);\n return;\n }\n \n // register for HSQL\n if (schedulerTask.isVisible())\n {\n IDataAccessor accessor = AdminApplicationProvider.newDataAccessor();\n IDataTransaction transaction = accessor.newTransaction();\n try\n {\n // ensure to create an entry in dapplication because of relation constraint\n // Note: Currently this is only needed for ReportRollOutTask since there might\n // exist scheduled reports related to undeployed applications!\n //\n String applName = schedulerTask.getApplicationName();\n Version applVersion = schedulerTask.getApplicationVersion();\n if (applName != null)\n DeployManager.ensureTransientApplication(accessor, transaction, applName);\n else\n {\n // assign tasks with no specific application to the admin application\n //\n applName = DeployManager.ADMIN_APPLICATION_NAME;\n applVersion = Version.ADMIN;\n }\n \n IDataTable table = accessor.getTable(Enginetask.NAME);\n IDataTableRecord record = table.newRecord(transaction);\n record.setValue(transaction, Enginetask.schedulerid, getId());\n record.setValue(transaction, Enginetask.taskid, schedulerTask.getKey());\n // because of long task names (e.g. R\n record.setStringValueWithTruncation(transaction, Enginetask.name, schedulerTask.getName());\n if (schedulerTask.getScope() != null)\n record.setValue(transaction, Enginetask.scope, schedulerTask.getScope().toString());\n record.setStringValueWithTruncation(transaction, Enginetask.taskdetails, schedulerTask.getTaskDetails());\n record.setValue(transaction, Enginetask.ownerid, schedulerTask.getTaskOwner());\n record.setValue(transaction, Enginetask.applicationname, applName);\n record.setValue(transaction, Enginetask.applicationversion, applVersion);\n record.setValue(transaction, Enginetask.taskstatus, schedulerTask.getState().getName());\n record.setValue(transaction, Enginetask.nextexecution, nextExecution);\n transaction.commit();\n } \n catch (Exception ex)\n {\n // just release a warning since the task itself has been registered for the timer\n if (logger.isWarnEnabled())\n\t\t\t\t{\n\t\t\t\t\tlogger.warn(\"Could not register task in DB: \" + schedulerTask, ex);\n\t\t\t\t}\n }\n finally\n {\n transaction.close();\n }\n }\n \n // Schedule the new task the first time\n //\n SchedulerTimerTask timerTask = new SchedulerTimerTask(schedulerTask, iterator);\n scheduledTimerTasks.put(schedulerTask.getKey(), timerTask);\n timer.schedule(timerTask, nextExecution);\n }", "public Schedule generateSchedule(Student student, Assignment assignment, DateTime availability){\n DateTime startTime = availability;\n DateTime endTime = availability.plusHours((int)Math.ceil(assignment.getHoursPerDay()));\n return new Schedule(student.getId(), assignment.getId(), assignment.getCourseID(),\n startTime, endTime,\n assignment.getPointsPossible() / assignment.getNumDays(), assignment.getName());\n }", "public void setScheduler(RunnerScheduler scheduler) {\n this.scheduler = scheduler;\n }", "public final String toString() {\n return scheduler_name;\n }", "@Test\n public void testTask() throws InterruptedException {\n\n SchedulingRunnable task1 = new SchedulingRunnable(\"demoTask\", \"taskWithParams\", \"aaa\",\"111\");\n cronTaskRegistrar.addCronTask(task1, \"0/15 * * * * ?\");\n Thread.sleep(10000);\n\n SchedulingRunnable task2 = new SchedulingRunnable(\"demoTask\", \"taskWithParams\", \"aaa\",\"111\");\n cronTaskRegistrar.addCronTask(task2, \"0/8 * * * * ?\");\n // 便于观察\n\n Thread.sleep(3000000);\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/schedulers/{name}\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Scheduler> readScheduler(\n @Path(\"name\") String name, \n @QueryMap ReadScheduler queryParameters);", "public CreateServiceRequest withSchedulingStrategy(String schedulingStrategy) {\n setSchedulingStrategy(schedulingStrategy);\n return this;\n }", "Run createRun();", "public CronTimer(String name, int min) {\n this.name = name;\n cronExpression = \"*\" + \" \" + \"0/\" + min + \" \" + \"* * * ?\";\n }", "public Workflow(int workFlowId, String name, int arrivalTime, double makespan, int deadline)\n\t{\n\t\tthis.workflowId = workFlowId;\n\t\tthis.workflowName = name;\n\t\tthis.arrivalTime = arrivalTime;\n\t\tthis.makespan = makespan;\n\t\tthis.deadline = deadline;\n\t\t\n\t\tthis.taskList = new ArrayList<WTask>(); \n\t\tthis.startedFlag = false;\n\t\tthis.finishTime = -1;\n\t\tthis.successfulOrNot = false;\n\t}", "public void scheduleGamesInLeagues(String leagueName) {\n // Click this button after you have all the teams in league, Automatic scheduling\n // League league = get from DB by leagueName\n // league.scheduledGames();\n }", "public StaticScript name(String name) {\n this.name = name;\n return this;\n }", "public boolean\r\n scheduleEmployee(int gasStationID, int employeeId, Date date, int shift){\r\n Schedule schedule = new Schedule(gasStationID, employeeId, date, shift);\r\n schedule.create();\r\n return true;\r\n }", "public void scheduleJob(JobInfo t) {\n Log.d(TAG, \"Scheduling job\");\n try {\n JobScheduler tm = (JobScheduler) appContext.getSystemService(appContext.JOB_SCHEDULER_SERVICE);\n tm.schedule(t);\n int i = 0;\n } catch (Exception e) {\n e.printStackTrace();\n int i = 0;\n }\n }", "public CreateServiceRequest withSchedulingStrategy(SchedulingStrategy schedulingStrategy) {\n this.schedulingStrategy = schedulingStrategy.toString();\n return this;\n }", "Schedule getSchedule(String departure, String arrival, int depYear, int depMonth);", "@Override\n protected Scheduler scheduler() {\n return Scheduler.newFixedRateSchedule(0, 1, TimeUnit.SECONDS);\n }", "public Creator(String score_name) {\n this.score_name = score_name;\n\n this.bukkitScoreboard = Bukkit.getScoreboardManager().getNewScoreboard();\n this.obj = this.bukkitScoreboard.registerNewObjective(randomString(), \"dummy\", \"test\");\n\n this.obj.setDisplaySlot(DisplaySlot.SIDEBAR);\n this.obj.setDisplayName(color(score_name));\n }", "public static void main(String[] args) {\n\t\tMyTaskA a=new MyTaskA();\n\t\tMyTask task=new MyTask();\n\t\tCalendar ca=Calendar.getInstance();\n\t\tca.add(Calendar.SECOND, 10);\n\t\tCalendar ca1=Calendar.getInstance();\n\t\tca1.add(Calendar.SECOND, 11);\n\t\tSystem.out.println(\"计划执行时间为:\"+ca.getTime());\n\t\tSystem.out.println(\"计划执行时间为:\"+ca1.getTime());\n\t\tTimer t=new Timer();\n\t\tt.schedule(a, ca.getTime());\n\t\tt.schedule(task, ca1.getTime(),4000);\n\t\t\n\t}", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/schedulers/{name}/status\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Scheduler> patchSchedulerStatus(\n @Path(\"name\") String name, \n @Body Scheduler body, \n @QueryMap PatchSchedulerStatus queryParameters);", "Observable<Task2> scheduleTask(String name, String groupKey, int executionOrder, Map<String, String> parameters,\n Trigger trigger);", "@Override\n public void initialize(String name, final Scheduler scheduler) throws SchedulerException {\n\n logger.info(\"Initializing AnnotationJobTriggerPlugin Plug-in.\");\n\n this.scheduler = scheduler;\n }" ]
[ "0.70948845", "0.63461244", "0.6330334", "0.5955169", "0.58427423", "0.5815208", "0.5768989", "0.57565033", "0.57056296", "0.5673951", "0.56715757", "0.5668684", "0.56245804", "0.5595043", "0.5560399", "0.554705", "0.55349183", "0.55203927", "0.55196136", "0.5488875", "0.54730713", "0.5467304", "0.5458643", "0.54453886", "0.5436596", "0.54262674", "0.54195404", "0.54106116", "0.54053384", "0.5396879", "0.5393934", "0.53747785", "0.5361238", "0.5351728", "0.53197306", "0.53181463", "0.52241915", "0.5214308", "0.51730233", "0.516392", "0.5163732", "0.5146991", "0.51332694", "0.51256794", "0.50997376", "0.5094892", "0.50786614", "0.5066803", "0.5065946", "0.505854", "0.505854", "0.505854", "0.50375473", "0.5036461", "0.5036256", "0.50345504", "0.50281256", "0.5027417", "0.5027291", "0.50169224", "0.5012222", "0.4999318", "0.4979048", "0.49739906", "0.49733052", "0.49661735", "0.49562424", "0.49543744", "0.49386886", "0.49311003", "0.4928369", "0.4928045", "0.49280056", "0.491398", "0.4895809", "0.48949924", "0.48930642", "0.4890106", "0.48899388", "0.48790374", "0.48769096", "0.48764583", "0.48763973", "0.48742864", "0.4874189", "0.4855144", "0.48413458", "0.48403937", "0.48368084", "0.48349524", "0.4833654", "0.48289144", "0.4814241", "0.481034", "0.4805104", "0.47960782", "0.4787263", "0.4786374", "0.47859344", "0.4783189" ]
0.695119
1
Creates a scheduler with specified name
public ActivityScheduler(String name, ActivityListener listener) { this.name = name; TrackerConfig config = DefaultConfigFactory.getInstance().getConfig(name); if (listener != null) config.setActivityListener(listener); this.logger = TrackingLogger.getInstance(config.build()); this.logger.setKeepThreadContext(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Scheduler(String scheduler_name) {\n super();\n this.scheduler_name = scheduler_name;\n this.task_set = null;\n }", "public ActivityScheduler(String name) {\n\t\tthis(name, null);\n\t}", "public void setSchedulerName(String schedulerName)\r\n/* 20: */ {\r\n/* 21: 58 */ this.schedulerName = schedulerName;\r\n/* 22: */ }", "Schedule createSchedule();", "@HTTP(\n method = \"PUT\",\n path = \"/apis/config.openshift.io/v1/schedulers/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/json\",\n \"Accept: */*\"\n })\n KubernetesCall<Scheduler> replaceScheduler(\n @Path(\"name\") String name, \n @Body Scheduler body);", "public static ScheduledExecutorService createNewScheduler() {\n return Executors.newScheduledThreadPool(Runtime.getRuntime().availableProcessors() * 2);\n }", "public void schedule(String name, long period) {\n\t\tschedule(name, period, period, TimeUnit.MILLISECONDS);\n\t}", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/schedulers/{name}\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Scheduler> readScheduler(\n @Path(\"name\") String name);", "@JsonCreator\n public static ScheduleType fromString(String name) {\n return fromString(name, ScheduleType.class);\n }", "public void setSchedName(String schedName) {\n this.schedName = schedName;\n }", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/schedulers/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Scheduler> patchScheduler(\n @Path(\"name\") String name, \n @Body Scheduler body);", "public static ThreadPoolTaskScheduler createThreadPoolTaskScheduler(\r\n\t\t\tint poolSize, \r\n\t\t\tFrequency frequency, String name){\r\n\t\treturn new ThreadPoolTaskScheduler(poolSize, frequency, name, null);\r\n\t}", "public Scheduler()\n {\n this.id = \"\"+ hashCode();\n register();\n }", "public Task(String name) {\n\t\tthis.name=name;\n\t}", "@HTTP(\n method = \"PUT\",\n path = \"/apis/config.openshift.io/v1/schedulers/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/json\",\n \"Accept: */*\"\n })\n KubernetesCall<Scheduler> replaceScheduler(\n @Path(\"name\") String name, \n @Body Scheduler body, \n @QueryMap ReplaceScheduler queryParameters);", "public Factory(String name) {\n\t\tlines = new ArrayList<AssemblyLine>();\n\t\tthis.name = name;\n\t\t\n\t\tTimer timer = new Timer();\n\t\ttimer.scheduleAtFixedRate(new TimerTask() {\n\t\t\tpublic void run() {\n\t\t\t\twork();\n\t\t\t}\n\t\t}, 0l, 3000l);\n\t}", "TimerSchedule createTimerSchedule();", "public String getSchedulerName() {\n return schedulerName;\n }", "SwSchedulableResource createSwSchedulableResource();", "public static ThreadPoolTaskScheduler createThreadPoolTaskScheduler(\r\n\t\t\tExecutorService executorService, \r\n\t\t\tFrequency frequency, String name, TimeZone timezone){\r\n\t\treturn new ThreadPoolTaskScheduler(executorService, frequency, name, timezone);\r\n\t}", "public String getSchedulerName() {\r\n return this.schedulerName;\r\n }", "public IGenScheduleHandler create() throws CreateException, RemoteException;", "public final String get_name() {\n return scheduler_name;\n }", "public static void start(String name) {\n if (timers.containsKey(name)) {\n timers.get(name).start();\n } else {\n timers.put(name, new Timer());\n }\n }", "SchedulersFactory getSchedulersFactory();", "public Task(DateTime deadline, String name, int priority) {\r\n\t\tthis.deadline = deadline;\r\n\t\tthis.name = name;\r\n\t\tthis.priority = priority;\r\n\t\tstart = new DateTime();\r\n\t}", "Task(String name) {\n this.name = name;\n }", "public Schedule create() {\n\n\t\tSchedule result;\n\n\t\tresult = new Schedule();\n\n\t\treturn result;\n\t}", "public void schedule(String name, long period, TimeUnit tunit) {\n\t\tschedule(name, period, period, TimeUnit.MILLISECONDS);\n\t}", "@HTTP(\n method = \"PUT\",\n path = \"/apis/config.openshift.io/v1/schedulers/{name}/status\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/json\",\n \"Accept: */*\"\n })\n KubernetesCall<Scheduler> replaceSchedulerStatus(\n @Path(\"name\") String name, \n @Body Scheduler body);", "public synchronized Task setScheduler(Scheduler s)\n/* */ {\n/* 102 */ this.scheduler = s;\n/* 103 */ return this;\n/* */ }", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/schedulers/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Scheduler> patchScheduler(\n @Path(\"name\") String name, \n @Body Scheduler body, \n @QueryMap PatchScheduler queryParameters);", "public void createFCFSQueue(String name) {\n queues.putIfAbsent(name, new FCFSQueue(name));\n }", "public Agent createAgent(String name) {\n return this.gamygdala.createAgent(name);\n }", "public static ThreadPoolTaskScheduler createThreadPoolTaskScheduler(\r\n\t\t\tint poolSize, \r\n\t\t\tFrequency frequency, String name, TimeZone timezone){\r\n\t\treturn new ThreadPoolTaskScheduler(poolSize, frequency, name, timezone);\r\n\t}", "public static org.jfree.data.gantt.Task createTask(String name, int start, int end) {\r\n\t\treturn new org.jfree.data.gantt.Task(name, SchedulerUtils.dateTime(start), SchedulerUtils.dateTime(end));\r\n\t}", "public RunStmnt(String name) {\r\n\t\tsuper();\r\n\t\tsetName(new Name(name));\r\n\t}", "public String create(Schedule arg0) {\n\t\treturn null;\n\t}", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/schedulers/{name}/status\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Scheduler> patchSchedulerStatus(\n @Path(\"name\") String name, \n @Body Scheduler body);", "public void generateSchedule(){\n\t\t\n\t}", "public PriorityScheduler() {\n }", "public void setScheduler(Scheduler scheduler)\r\n/* 25: */ {\r\n/* 26: 65 */ this.scheduler = scheduler;\r\n/* 27: */ }", "public void setTaskName(String name) {\n\r\n\t}", "@Override\n\t\t\tpublic void setTaskName(String name) {\n\t\t\t\t\n\t\t\t}", "public PriorityScheduler() {\n\t}", "public interface SchedulerProvider {\n\n Scheduler io();\n\n Scheduler ui();\n}", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/schedulers/{name}/status\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Scheduler> readSchedulerStatus(\n @Path(\"name\") String name);", "public Scheduler(double speed) {\r\n\t\tsuper(\"Scheduler\");\r\n\t\t\r\n\t\t// Set game speed\r\n\t\tthis.setSpeed(speed);\r\n\t\t\r\n\t\t// Set state\r\n\t\tthis.state = GameState.CREATED;\r\n\t\t\r\n\t\tif (logger.isDebugEnabled())\r\n\t\t\tlogger.debug(\"Scheduler started.\");\r\n\t}", "public static SchedulerFactory schedulerFactory() {\r\n if (schedulerFactory == null) {\r\n \r\n Properties props = new Properties();\r\n for (String key : GrouperClientConfig.retrieveConfig().propertyNames()) {\r\n if (key.startsWith(\"org.quartz.\")) {\r\n String value = GrouperClientConfig.retrieveConfig().propertyValueString(key);\r\n if (value == null) {\r\n value = \"\";\r\n }\r\n props.put(key, value);\r\n }\r\n }\r\n \r\n try {\r\n schedulerFactory = new StdSchedulerFactory(props);\r\n } catch (SchedulerException se) {\r\n throw new RuntimeException(se);\r\n }\r\n }\r\n return schedulerFactory;\r\n }", "Task createTask();", "Task createTask();", "Task createTask();", "public schedulerJob() {\n }", "public static NamingScheduledTaskContext createNamingScheduledTaskContext(){\r\n\t\treturn new NamingScheduledTaskContext();\r\n\t}", "@Test\n public void createScheduledPlanTest() throws ApiException {\n ScheduledPlan body = null;\n ScheduledPlan response = api.createScheduledPlan(body);\n\n // TODO: test validations\n }", "public ServerScheduledEventBuilder setName(String name) {\n delegate.setName(name);\n return this;\n }", "public Task(String name) {\r\n this(name, false);\r\n }", "public void schedule(String name, long initialDelay, long period, TimeUnit tunit) {\n\t\tschedule(name, period, period, tunit, opLevel);\n\t}", "public abstract ServiceLocator create(String name);", "public interface SchedulerProvider {\r\n\r\n Scheduler computation();\r\n\r\n Scheduler io();\r\n\r\n Scheduler ui();\r\n}", "public static CronTrigger createCronTrigger(String cronExp,\n\t\t\tString triggerName, String jobName,String groupName) throws SchedulerException,\n\t\t\tParseException {\n\t\tlog.info(\"------- create Scheduling cronTrigger ----------------\");\n\t\tCronTrigger cronTrigger = new CronTrigger(triggerName, groupName, jobName, groupName, cronExp);\n\t\treturn cronTrigger;\n\t}", "public interface Scheduler {\n\n void schedule();\n\n}", "@HTTP(\n method = \"PUT\",\n path = \"/apis/config.openshift.io/v1/schedulers/{name}/status\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/json\",\n \"Accept: */*\"\n })\n KubernetesCall<Scheduler> replaceSchedulerStatus(\n @Path(\"name\") String name, \n @Body Scheduler body, \n @QueryMap ReplaceSchedulerStatus queryParameters);", "protected Scheduler findScheduler(String schedulerName)\r\n/* 54: */ throws SchedulerException\r\n/* 55: */ {\r\n/* 56: 95 */ if ((this.beanFactory instanceof ListableBeanFactory))\r\n/* 57: */ {\r\n/* 58: 96 */ ListableBeanFactory lbf = (ListableBeanFactory)this.beanFactory;\r\n/* 59: 97 */ String[] beanNames = lbf.getBeanNamesForType(Scheduler.class);\r\n/* 60: 98 */ for (int i = 0; i < beanNames.length; i++)\r\n/* 61: */ {\r\n/* 62: 99 */ Scheduler schedulerBean = (Scheduler)lbf.getBean(beanNames[i]);\r\n/* 63:100 */ if (schedulerName.equals(schedulerBean.getSchedulerName())) {\r\n/* 64:101 */ return schedulerBean;\r\n/* 65: */ }\r\n/* 66: */ }\r\n/* 67: */ }\r\n/* 68:105 */ Scheduler schedulerInRepo = SchedulerRepository.getInstance().lookup(schedulerName);\r\n/* 69:106 */ if (schedulerInRepo == null) {\r\n/* 70:107 */ throw new IllegalStateException(\"No Scheduler named '\" + schedulerName + \"' found\");\r\n/* 71: */ }\r\n/* 72:109 */ return schedulerInRepo;\r\n/* 73: */ }", "private List<Schedule> getSchedules(String traverserName, int delay) {\n List<ScheduleTimeInterval> intervals =\n new ArrayList<ScheduleTimeInterval>();\n intervals.add(new ScheduleTimeInterval(\n new ScheduleTime(0),\n new ScheduleTime(0)));\n \n List<Schedule> schedules = new ArrayList<Schedule>();\n Schedule schedule = new Schedule(traverserName, false, 60, delay, intervals);\n schedules.add(schedule);\n return schedules;\n }", "public Task(String name) {\n this.name = name;\n this.isDone = false;\n }", "public void scheduleJobs();", "@Override\r\n\tpublic void setTaskName(String name) {\n\r\n\t}", "public interface SchedulerProvider {\n Scheduler background();\n Scheduler ui();\n}", "public static QualifiedName create(final String namespace, final String name) {\n\t\treturn create(namespace + name);\n\t}", "public Schedule() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "public interface SchedulerProvider {\n\n Scheduler ui();\n\n Scheduler computation();\n\n Scheduler io();\n\n}", "protected abstract void scheduler_init();", "void setSchedule(java.lang.String schedule);", "public Task(String name, int number) {\r\n this.name = name;\r\n this.id = number;\r\n this.timer = new Timer();\r\n }", "void schedule(ScheduledJob job);", "private Task createTaskFromGivenArgs(Name name, TaskDate taskStartDate, TaskDate taskEndDate, Status taskStatus) {\n\t if (isEventTask(taskStartDate, taskEndDate)) {\n\t return new EventTask(name, taskStartDate, taskEndDate, taskStatus);\n\t }\n\t if (isDeadline(taskEndDate)) {\n\t return new DeadlineTask(name, taskEndDate, taskStatus);\n\t }\n\t return new Task(name, taskStatus);\n\t}", "public void schedule(String name, long initialDelay, long period, TimeUnit tunit, OpLevel severity) {\n\t\tif (future == null || future.isCancelled()) {\n\t\t\tactivityTask = newActivityTask(logger, name, severity);\n\t\t\tfuture = scheduler.scheduleAtFixedRate(activityTask, initialDelay, period, tunit);\n\t\t} else {\n\t\t\tthrow new IllegalStateException(\"Already scheduled\");\n\t\t}\n\t}", "public synchronized void schedule(SchedulerTask schedulerTask, SchedulerTaskState initialState)\n {\n ScheduleIterator iterator = schedulerTask.iterator();\n if (timer == null)\n\t\t\tthrow new IllegalStateException(\"Scheduler '\" + getId() + \"' has already been canceled\");\n \n if (this.scheduledTimerTasks.containsKey(schedulerTask.getKey()))\n throw new IllegalStateException(\"Task '\" + schedulerTask.getKey() + \"' has already been scheduled by scheduler '\" + getId() + \"'\");\n \n // register task to be scheduled\n schedulerTask.schedule(this, initialState);\n\n // determine the next execution time\n Date nextExecution = getNextExecution(iterator);\n if (nextExecution == null)\n {\n // no execution desired -> cancel\n schedulerTask.setState(SchedulerTaskState.CANCELED);\n return;\n }\n \n // register for HSQL\n if (schedulerTask.isVisible())\n {\n IDataAccessor accessor = AdminApplicationProvider.newDataAccessor();\n IDataTransaction transaction = accessor.newTransaction();\n try\n {\n // ensure to create an entry in dapplication because of relation constraint\n // Note: Currently this is only needed for ReportRollOutTask since there might\n // exist scheduled reports related to undeployed applications!\n //\n String applName = schedulerTask.getApplicationName();\n Version applVersion = schedulerTask.getApplicationVersion();\n if (applName != null)\n DeployManager.ensureTransientApplication(accessor, transaction, applName);\n else\n {\n // assign tasks with no specific application to the admin application\n //\n applName = DeployManager.ADMIN_APPLICATION_NAME;\n applVersion = Version.ADMIN;\n }\n \n IDataTable table = accessor.getTable(Enginetask.NAME);\n IDataTableRecord record = table.newRecord(transaction);\n record.setValue(transaction, Enginetask.schedulerid, getId());\n record.setValue(transaction, Enginetask.taskid, schedulerTask.getKey());\n // because of long task names (e.g. R\n record.setStringValueWithTruncation(transaction, Enginetask.name, schedulerTask.getName());\n if (schedulerTask.getScope() != null)\n record.setValue(transaction, Enginetask.scope, schedulerTask.getScope().toString());\n record.setStringValueWithTruncation(transaction, Enginetask.taskdetails, schedulerTask.getTaskDetails());\n record.setValue(transaction, Enginetask.ownerid, schedulerTask.getTaskOwner());\n record.setValue(transaction, Enginetask.applicationname, applName);\n record.setValue(transaction, Enginetask.applicationversion, applVersion);\n record.setValue(transaction, Enginetask.taskstatus, schedulerTask.getState().getName());\n record.setValue(transaction, Enginetask.nextexecution, nextExecution);\n transaction.commit();\n } \n catch (Exception ex)\n {\n // just release a warning since the task itself has been registered for the timer\n if (logger.isWarnEnabled())\n\t\t\t\t{\n\t\t\t\t\tlogger.warn(\"Could not register task in DB: \" + schedulerTask, ex);\n\t\t\t\t}\n }\n finally\n {\n transaction.close();\n }\n }\n \n // Schedule the new task the first time\n //\n SchedulerTimerTask timerTask = new SchedulerTimerTask(schedulerTask, iterator);\n scheduledTimerTasks.put(schedulerTask.getKey(), timerTask);\n timer.schedule(timerTask, nextExecution);\n }", "public Schedule generateSchedule(Student student, Assignment assignment, DateTime availability){\n DateTime startTime = availability;\n DateTime endTime = availability.plusHours((int)Math.ceil(assignment.getHoursPerDay()));\n return new Schedule(student.getId(), assignment.getId(), assignment.getCourseID(),\n startTime, endTime,\n assignment.getPointsPossible() / assignment.getNumDays(), assignment.getName());\n }", "public void setScheduler(RunnerScheduler scheduler) {\n this.scheduler = scheduler;\n }", "public final String toString() {\n return scheduler_name;\n }", "@Test\n public void testTask() throws InterruptedException {\n\n SchedulingRunnable task1 = new SchedulingRunnable(\"demoTask\", \"taskWithParams\", \"aaa\",\"111\");\n cronTaskRegistrar.addCronTask(task1, \"0/15 * * * * ?\");\n Thread.sleep(10000);\n\n SchedulingRunnable task2 = new SchedulingRunnable(\"demoTask\", \"taskWithParams\", \"aaa\",\"111\");\n cronTaskRegistrar.addCronTask(task2, \"0/8 * * * * ?\");\n // 便于观察\n\n Thread.sleep(3000000);\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/schedulers/{name}\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Scheduler> readScheduler(\n @Path(\"name\") String name, \n @QueryMap ReadScheduler queryParameters);", "public CreateServiceRequest withSchedulingStrategy(String schedulingStrategy) {\n setSchedulingStrategy(schedulingStrategy);\n return this;\n }", "Run createRun();", "public CronTimer(String name, int min) {\n this.name = name;\n cronExpression = \"*\" + \" \" + \"0/\" + min + \" \" + \"* * * ?\";\n }", "public Workflow(int workFlowId, String name, int arrivalTime, double makespan, int deadline)\n\t{\n\t\tthis.workflowId = workFlowId;\n\t\tthis.workflowName = name;\n\t\tthis.arrivalTime = arrivalTime;\n\t\tthis.makespan = makespan;\n\t\tthis.deadline = deadline;\n\t\t\n\t\tthis.taskList = new ArrayList<WTask>(); \n\t\tthis.startedFlag = false;\n\t\tthis.finishTime = -1;\n\t\tthis.successfulOrNot = false;\n\t}", "public void scheduleGamesInLeagues(String leagueName) {\n // Click this button after you have all the teams in league, Automatic scheduling\n // League league = get from DB by leagueName\n // league.scheduledGames();\n }", "public StaticScript name(String name) {\n this.name = name;\n return this;\n }", "public boolean\r\n scheduleEmployee(int gasStationID, int employeeId, Date date, int shift){\r\n Schedule schedule = new Schedule(gasStationID, employeeId, date, shift);\r\n schedule.create();\r\n return true;\r\n }", "public void scheduleJob(JobInfo t) {\n Log.d(TAG, \"Scheduling job\");\n try {\n JobScheduler tm = (JobScheduler) appContext.getSystemService(appContext.JOB_SCHEDULER_SERVICE);\n tm.schedule(t);\n int i = 0;\n } catch (Exception e) {\n e.printStackTrace();\n int i = 0;\n }\n }", "public CreateServiceRequest withSchedulingStrategy(SchedulingStrategy schedulingStrategy) {\n this.schedulingStrategy = schedulingStrategy.toString();\n return this;\n }", "Schedule getSchedule(String departure, String arrival, int depYear, int depMonth);", "@Override\n protected Scheduler scheduler() {\n return Scheduler.newFixedRateSchedule(0, 1, TimeUnit.SECONDS);\n }", "public Creator(String score_name) {\n this.score_name = score_name;\n\n this.bukkitScoreboard = Bukkit.getScoreboardManager().getNewScoreboard();\n this.obj = this.bukkitScoreboard.registerNewObjective(randomString(), \"dummy\", \"test\");\n\n this.obj.setDisplaySlot(DisplaySlot.SIDEBAR);\n this.obj.setDisplayName(color(score_name));\n }", "public static void main(String[] args) {\n\t\tMyTaskA a=new MyTaskA();\n\t\tMyTask task=new MyTask();\n\t\tCalendar ca=Calendar.getInstance();\n\t\tca.add(Calendar.SECOND, 10);\n\t\tCalendar ca1=Calendar.getInstance();\n\t\tca1.add(Calendar.SECOND, 11);\n\t\tSystem.out.println(\"计划执行时间为:\"+ca.getTime());\n\t\tSystem.out.println(\"计划执行时间为:\"+ca1.getTime());\n\t\tTimer t=new Timer();\n\t\tt.schedule(a, ca.getTime());\n\t\tt.schedule(task, ca1.getTime(),4000);\n\t\t\n\t}", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/schedulers/{name}/status\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Scheduler> patchSchedulerStatus(\n @Path(\"name\") String name, \n @Body Scheduler body, \n @QueryMap PatchSchedulerStatus queryParameters);", "Observable<Task2> scheduleTask(String name, String groupKey, int executionOrder, Map<String, String> parameters,\n Trigger trigger);", "@Override\n public void initialize(String name, final Scheduler scheduler) throws SchedulerException {\n\n logger.info(\"Initializing AnnotationJobTriggerPlugin Plug-in.\");\n\n this.scheduler = scheduler;\n }" ]
[ "0.70948845", "0.695119", "0.63461244", "0.6330334", "0.5955169", "0.58427423", "0.5815208", "0.57565033", "0.57056296", "0.5673951", "0.56715757", "0.5668684", "0.56245804", "0.5595043", "0.5560399", "0.554705", "0.55349183", "0.55203927", "0.55196136", "0.5488875", "0.54730713", "0.5467304", "0.5458643", "0.54453886", "0.5436596", "0.54262674", "0.54195404", "0.54106116", "0.54053384", "0.5396879", "0.5393934", "0.53747785", "0.5361238", "0.5351728", "0.53197306", "0.53181463", "0.52241915", "0.5214308", "0.51730233", "0.516392", "0.5163732", "0.5146991", "0.51332694", "0.51256794", "0.50997376", "0.5094892", "0.50786614", "0.5066803", "0.5065946", "0.505854", "0.505854", "0.505854", "0.50375473", "0.5036461", "0.5036256", "0.50345504", "0.50281256", "0.5027417", "0.5027291", "0.50169224", "0.5012222", "0.4999318", "0.4979048", "0.49739906", "0.49733052", "0.49661735", "0.49562424", "0.49543744", "0.49386886", "0.49311003", "0.4928369", "0.4928045", "0.49280056", "0.491398", "0.4895809", "0.48949924", "0.48930642", "0.4890106", "0.48899388", "0.48790374", "0.48769096", "0.48764583", "0.48763973", "0.48742864", "0.4874189", "0.4855144", "0.48413458", "0.48403937", "0.48368084", "0.48349524", "0.4833654", "0.48289144", "0.4814241", "0.481034", "0.4805104", "0.47960782", "0.4787263", "0.4786374", "0.47859344", "0.4783189" ]
0.5768989
7
Assign a default severity level to all scheduled activity events
public void setOpLevel(OpLevel severity) { opLevel = severity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onSeveritySelected(TriggerSeverity severity);", "public void setSeverity(java.lang.String value) {\n this.severity = value;\n }", "public void setSeverity(int severity) {\n this.severity = severity;\n }", "public final void setSeverity(twogapplicationinsights.proxies.SeverityLevel severity)\n\t{\n\t\tsetSeverity(getContext(), severity);\n\t}", "public final void setSeverity(com.mendix.systemwideinterfaces.core.IContext context, twogapplicationinsights.proxies.SeverityLevel severity)\n\t{\n\t\tif (severity != null)\n\t\t\tgetMendixObject().setValue(context, MemberNames.Severity.toString(), severity.toString());\n\t\telse\n\t\t\tgetMendixObject().setValue(context, MemberNames.Severity.toString(), null);\n\t}", "int getSeverityValue();", "public Type getSeverity() {\n return severity;\n }", "public void setSeverity(TriggerSeverity severity) {\n\t\tmSeverityListPagerAdapter.setCurrentPosition(severity.getPosition());\n\t}", "public int getSeverity() {\n return severity;\n }", "public int getSeverity() {\n return severity;\n }", "public DefaultLoggerBridge(int severity) {\n\t\tthis.severity = severity;\n\t}", "String getSeverity();", "public SeverityEnum getSeverity() {\n return severity;\n }", "@Override\n\tpublic void afterPropertiesSet() throws Exception {\n\t\tscoreToSeverity.put(0, Severity.Low);\n\t\tscoreToSeverity.put(medium, Severity.Medium);\n\t\tscoreToSeverity.put(high, Severity.High);\n\t\tscoreToSeverity.put(critical, Severity.Critical);\n\t}", "@Override\n public void rawActivityLevel(int value, int timestamp) {\n }", "public Builder setSeverityValue(int value) {\n severity_ = value;\n onChanged();\n return this;\n }", "@Override\n public void setRunLevel(int level) {\n\n }", "public void setPriority (int level)\n\t{\n\tthis.level = level;\n\n\tif (level == 1)\n\tpriority = \"Critical\";\n\tif (level == 2)\n\tpriority = \"Very Important\";\n\tif (level == 3)\n\tpriority = \"Normal\";\n\tif (level == 4)\n\tpriority = \"Low\";\n\tif (level == 5)\n\tpriority = \"Not Important\";\n\t}", "@Test\n public void testMaybeScheduleStartAlarmLocked_SmallRollingQuota_DefaultValues() {\n // Use the default values\n runTestMaybeScheduleStartAlarmLocked_SmallRollingQuota_AllowedTimeCheck();\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE).clear();\n runTestMaybeScheduleStartAlarmLocked_SmallRollingQuota_MaxTimeCheck();\n }", "public int getSeverityValue() {\n return severity_;\n }", "public void sub() {\n\t\tlog.severe(\"severe level\");// <= (1)\n\t\tlog.warning(\"warning level\");// <= (2)\n\t\tlog.info(\"info level\");// <= (3)\n\t\tlog.config(\"config level\");// <= (4)\n\t\tlog.fine(\"fine level\");// <= (5)\n\t\tlog.finer(\"finer level\");// <= (6)\n\t\tlog.finest(\"finest level\");// <= (7)\n\n\t}", "public java.lang.String getSeverity() {\n return severity;\n }", "public int getSeverityValue() {\n return severity_;\n }", "public void schedule(String name, long initialDelay, long period, TimeUnit tunit, OpLevel severity) {\n\t\tif (future == null || future.isCancelled()) {\n\t\t\tactivityTask = newActivityTask(logger, name, severity);\n\t\t\tfuture = scheduler.scheduleAtFixedRate(activityTask, initialDelay, period, tunit);\n\t\t} else {\n\t\t\tthrow new IllegalStateException(\"Already scheduled\");\n\t\t}\n\t}", "public java.lang.String getSeverity() {\n return severity;\n }", "private void scanForNewTypes(int defaultPriority) {\n\t\ttry {\n\t\t\tString[] alltypes = new TypeFilter().getTypes();\n\t\t\tfor (String t : alltypes) {\n\t\t\t\tacceptedEventTypes.put(t, defaultPriority);\n\t\t\t}\n\t\t} catch (URISyntaxException urise) {\n\t\t\turise.printStackTrace();\n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\t}", "public static synchronized void setAuditLevel(String newAuditLevel) {\n\n if (overrideLogbackLevel) {\n if (\"OFF\".equalsIgnoreCase(newAuditLevel)) {\n PolicyLogger.auditLevel = Level.OFF;\n auditLogger.setLevel(auditLevel);\n } else {\n // --- set default value\n auditLogger.setLevel(Level.INFO);\n PolicyLogger.auditLevel = Level.INFO;\n }\n }\n }", "private void initializePriorities()\n {\n try\n {\n this.resourcePriorityAvailable =\n Integer.parseInt(parentProvider.getAccountID()\n .getAccountPropertyString(\n ProtocolProviderFactory.RESOURCE_PRIORITY));\n }\n catch(NumberFormatException ex)\n {\n logger.error(\"Wrong value for resource priority\", ex);\n }\n\n addDefaultValue(JabberStatusEnum.AWAY, -5);\n addDefaultValue(JabberStatusEnum.EXTENDED_AWAY, -10);\n addDefaultValue(JabberStatusEnum.ON_THE_PHONE, -15);\n addDefaultValue(JabberStatusEnum.IN_A_MEETING, -16);\n addDefaultValue(JabberStatusEnum.DO_NOT_DISTURB, -20);\n addDefaultValue(JabberStatusEnum.FREE_FOR_CHAT, +5);\n }", "public LogLevel getSeverity() {\r\n\t\treturn level;\r\n\t}", "public void setPriorityCollect()\n\t{\n\t\tsetCollect(_Prefix + HardZone.PRIORITY.toString(), \"\");\n\t}", "public AlertSeverity severity() {\n return this.innerProperties() == null ? null : this.innerProperties().severity();\n }", "private void setDefaultScores() {\n\t\tif (readPreference(GlobalModel.BESTSCORE_EASY) == 0.0) {\n\t\t\tsavePreference(Double.MAX_VALUE, GlobalModel.BESTSCORE_EASY);\n\t\t}\n\t\t\n\t\tif (readPreference(GlobalModel.BESTSCORE_MEDIUM) == 0.0) {\n\t\t\tsavePreference(Double.MAX_VALUE, GlobalModel.BESTSCORE_MEDIUM);\n\t\t}\n\t\t\n\t\tif (readPreference(GlobalModel.BESTSCORE_HARD) == 0.0) {\n\t\t\tsavePreference(Double.MAX_VALUE, GlobalModel.BESTSCORE_HARD);\n\t\t}\n\t\t\n\t\tif (readPreference(GlobalModel.BESTSCORE_CUSTOM) == 0.0) {\n\t\t\tsavePreference(Double.MAX_VALUE, GlobalModel.BESTSCORE_CUSTOM);\n\t\t}\n\t}", "public void setAlertLevel(int inAlertLevel) {\r\n\t\tif (inAlertLevel == ALERT_ALERT) {\r\n\t\t\tthis.alertLevel = ALERT_ALERT;\r\n\t\t} else {\r\n\t\t\tif (inAlertLevel == ALERT_TASK) {\r\n\t\t\t\tthis.alertLevel = ALERT_TASK;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void setLevel(final org.apache.log4j.Level level) {\r\n if (log.isWarnEnabled()) {\r\n log.warn(\"LogUtil : level changed to : \" + level.toString());\r\n }\r\n\r\n for (final Log l : this.logs.values()) {\r\n setLevel(l, level);\r\n }\r\n }", "public task ()\n\t{\n\tthis.msg = msg;\n\tthis.level = level;\n\n\tif (level == 1)\n\tpriority = \"Critical\";\n\tif (level == 2)\n\tpriority = \"Very Important\";\n\tif (level == 3)\n\tpriority = \"Normal\";\n\tif (level == 4)\n\tpriority = \"Low\";\n\tif (level == 5)\n\tpriority = \"Not Important\";\n\t}", "public static void log(int severity, String message)\n {\n log(severity, message, null);\n }", "@Override\n public RfLintRule configure(final RfLintViolationSeverity severity) {\n return super.configure(severity == null ? RfLintViolationSeverity.ERROR : severity);\n }", "@Fix(IssueCodes.DEFAULT_SEVERITY_NOT_IN_RANGE)\n public void fixIllegalDefaultSeverity(final Issue issue, final IssueResolutionAcceptor acceptor) {\n if (issue.getData() != null) {\n for (final String severityProposal : issue.getData()) {\n final String label = NLS.bind(Messages.CheckQuickfixProvider_DEFAULT_SEVERITY_FIX_LABEL, severityProposal);\n final String descn = NLS.bind(Messages.CheckQuickfixProvider_DEFAULT_SEVERITY_FIX_DESCN, severityProposal);\n\n acceptor.accept(issue, label, descn, NO_IMAGE, new IModification() {\n public void apply(final IModificationContext context) throws BadLocationException {\n IXtextDocument xtextDocument = context.getXtextDocument();\n xtextDocument.replace(issue.getOffset(), issue.getLength(), severityProposal);\n }\n });\n }\n }\n }", "public static int getDefaultEventType(){\n\t\treturn prefs.getInt(DEFAULT_EVENT_TYPE, 0);\n\t}", "public static void setLevel(int level){\n\tlogLevel = level;\n }", "private void changeLogLevel(String level){\n\n }", "public void setIncidentSeverity(int incidentSeverity) {\n\t\t\tthis.incidentSeverity = incidentSeverity;\r\n\t\t}", "public Constraint setSeverity(ConstraintSeverityEnum theValue) {\n\t\tgetSeverityElement().setValueAsEnum(theValue);\n\t\treturn this;\n\t}", "public void set_log_level(int level) {\r\n logLevel = Math.max(0,level);\r\n }", "public void setImportance(ArrayList<DefaultActivity> scheduleList) {\n for (DefaultActivity i : scheduleList) {\n getKeyWords(i);\n i.setUrgencyFactor(getUrgencyRating(i));\n i.setEnjoymentFactor(getEnjoymentFactor(i));\n if (!i.getTypeSwitch()) {\n i.setSubjectValue(getSubjectValue(i));\n }\n }\n for (DefaultActivity i : scheduleList) {\n i.setProficiencyFactor(getProficiency(i));\n i.setImportanceValue(getImportance(i));\n }\n }", "static public void setLogLevel(final Logger.LEVEL desiredLevel) {\n ThreadPoolWorkQueue.execute(new Runnable() {\n @Override\n public void run() {\n setLevelSync(desiredLevel);\n // we do this mostly to enable unit tests to logger.wait(100) instead of\n // Thread.sleep(100) -- it's faster, more stable, and more deterministic that way\n synchronized (WAIT_LOCK) {\n WAIT_LOCK.notifyAll();\n }\n }\n });\n }", "private static void seTimeStamps() {\n MDC.put(MDC_INSTANCE_UUID, \"\");\n MDC.put(MDC_ALERT_SEVERITY, \"\");\n\n var startTime = Instant.now();\n var endTime = Instant.now();\n\n seTimeStamps(startTime, endTime);\n\n MDC.put(PARTNER_NAME, \"N/A\");\n\n MDC.put(STATUS_CODE, COMPLETE_STATUS);\n MDC.put(RESPONSE_CODE, \"N/A\");\n MDC.put(RESPONSE_DESCRIPTION, \"N/A\");\n\n }", "void addHasInjurySeverity(Integer newHasInjurySeverity);", "public int getAlertPriority()\n {\n return this.alert_priority;\n }", "@Override\n public void setNotification() {\n if (getTense() == Tense.FUTURE) {\n //Context ctx = SHiTApplication.getContext();\n //SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(ctx);\n\n int leadTimeEventMinutes = SHiTApplication.getPreferenceInt(Constants.Setting.ALERT_LEAD_TIME_EVENT, LEAD_TIME_MISSING);\n\n if (leadTimeEventMinutes != LEAD_TIME_MISSING) {\n if (travelTime > 0) {\n leadTimeEventMinutes += travelTime;\n }\n\n setNotification(Constants.Setting.ALERT_LEAD_TIME_EVENT\n , leadTimeEventMinutes\n , R.string.alert_msg_event\n , getNotificationClickAction()\n , null);\n }\n }\n }", "@Test\n public void testCustomLoggingLevels() {\n LogTestLogger customLogger = new LogTestLogger();\n Database.log.setCustom(customLogger);\n\n for(int i = 5; i >= 1; i--) {\n customLogger.getLines().clear();\n customLogger.setLevel(LogLevel.values()[i]);\n Log.v(LogDomain.DATABASE, \"TEST VERBOSE\");\n Log.i(LogDomain.DATABASE, \"TEST INFO\");\n Log.w(LogDomain.DATABASE, \"TEST WARNING\");\n Log.e(LogDomain.DATABASE, \"TEST ERROR\");\n assertEquals(5 - i, customLogger.getLines().size());\n }\n }", "private void raisePriority() {\n Thread cThr = Thread.currentThread();\n _priority = (byte)((cThr instanceof H2O.FJWThr) ? ((H2O.FJWThr)cThr)._priority+1 : super.priority());\n }", "@Override\r\n\tpublic void setThresholds(int itemthreshold, int timethreshold) {\n\t\t\r\n\t}", "public static synchronized void setMetricsLevel(String newMetricsLevel) {\n\n if (overrideLogbackLevel) {\n if (\"OFF\".equalsIgnoreCase(newMetricsLevel)) {\n PolicyLogger.metricsLevel = Level.OFF;\n metricsLogger.setLevel(metricsLevel);\n } else {\n // --- set default value\n metricsLogger.setLevel(Level.INFO);\n PolicyLogger.metricsLevel = Level.INFO;\n }\n }\n\n }", "protected abstract void startMonitoring(fr.inria.phoenix.diasuite.framework.datatype.dailyactivityname.DailyActivityName activity) throws Exception;", "public void defaultOpeningStatus(String day){\r\n openingHoursList = new HashMap<String, String>();\r\n restaurantProperties.setNewDay(day.concat(\": \").concat(\"Closed\"));\r\n openingHoursList.put(\"status\", restaurantProperties.getNewDay());\r\n openingHoursArrayList.add(openingHoursList);\r\n\r\n }", "@Override\n public void reportScheduler() {\n }", "public Builder clearSeverity() {\n \n severity_ = 0;\n onChanged();\n return this;\n }", "public String getSeverity() {\n return severity.toString().toLowerCase(Locale.US);\n }", "@POST(\"/setAlertLevel\")\n\tint setAlertLevel(@Body AlertLevelParams params);", "public void setBTHighScoreAny(int s)\n\t{\n\t\tbattletowerHighscoreAnyLvl = s;\n\t}", "private void projectWeekAnxiety() {\n increaseStat(Stat.ANXIETY, 10);\n }", "void resetExcStatuses()\n\t\t{\n\t\t}", "public static void setLogLevel(int level){\n\t\tswitch(level){\n\t\t\tcase ONE: \n\t\t\t\tLogger.getRootLogger().setLevel(Level.ALL); \n\t\t\t\tLOGGER.info(\"Logging Level set to LEVEL.ALL\"); \n\t\t\t\tbreak;\n\t\t\tcase TWO: \n\t\t\t\tLogger.getRootLogger().setLevel(Level.DEBUG); \n\t\t\t\tLOGGER.info(\"Logging Level set to LEVEL.DEBUG\"); \n\t\t\t\tbreak;\n\t\t\tcase THREE:\n\t\t\t\tLogger.getRootLogger().setLevel(Level.ERROR);\n\t\t\t\tLOGGER.info(\"Logging Level set to LEVEL.ERROR\");\n\t\t\t\tbreak;\n\t\t\tcase FOUR:\n\t\t\t\tLogger.getRootLogger().setLevel(Level.FATAL);\n\t\t\t\tLOGGER.info(\"Logging Level set to LEVEL.FATAL\");\n\t\t\t\tbreak;\n\t\t\tcase FIVE:\n\t\t\t\tLogger.getRootLogger().setLevel(Level.INFO);\n\t\t\t\tLOGGER.info(\"Logging Level set to LEVEL.INFO\");\n\t\t\t\tbreak;\n\t\t\tcase SIX:\n\t\t\t\tLogger.getRootLogger().setLevel(Level.OFF); \n\t\t\t\tLOGGER.info(\"Logging Level set to LEVEL.OFF\");\n\t\t\t\tbreak;\n\t\t\tcase SEVEN:\n\t\t\t\tLogger.getRootLogger().setLevel(Level.WARN);\n\t\t\t\tLOGGER.info(\"Logging Level set to LEVEL.WARN\");\n\t\t\t\tbreak;\n\t\t\tcase EIGHT:\n\t\t\t\tLogger.getRootLogger().setLevel(Level.TRACE);\n\t\t\t\tLOGGER.info(\"Logging Level set to LEVEL.WARN\");\n\t\t\t\tbreak;\n\t\t\tdefault: \n\t\t\t\tLogger.getRootLogger().setLevel(Level.ALL);\n\t\t\t\tLOGGER.info(\"Logging Level defaulted to LEVEL.ALL Please add parameter to properties file for custom logging.\");\n\t\t\t\tbreak;\n\t\t}\n\t}", "private void storeMaxSeverityLevel(String modelName, EValidationResultSeverity nextSeverity) {\n int currentMaxStatus = this.currentValidationStatus.get(modelName).toInt();\n if (currentMaxStatus < nextSeverity.toInt()) {\n this.currentValidationStatus.put(modelName, nextSeverity);\n }\n }", "org.apache.calcite.avatica.proto.Common.Severity getSeverity();", "public Builder setSeverity(org.apache.calcite.avatica.proto.Common.Severity value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n severity_ = value.getNumber();\n onChanged();\n return this;\n }", "private void addStressTestStatusTriggers() {\n addTrigger(STRESS_TEST_STATUS, CONTROL_CHANNEL, SERVER_TO_CLIENT);\n addTrigger(STRESS_TEST_STATUS, CONTROL_CHANNEL, CLIENT_TO_SERVER);\n }", "public Constraint setSeverity(BoundCodeDt<ConstraintSeverityEnum> theValue) {\n\t\tmySeverity = theValue;\n\t\treturn this;\n\t}", "@Override\n public void logStandard(String message) {\n Log.i(_projectName, message);\n }", "public void setAlarm (int alarm) { this.alarm = alarm; }", "private void setPriority(final Integer priority) {\n Story story = (Story) getTableRow().getItem();\n if (priority != null) {\n try {\n getModel().changeStoryPriority(story, priority);\n }\n catch (CustomException e) {\n addFormError(textField, \"{NanError}\");\n }\n }\n else {\n changeStoryStateToNone(story, () -> {\n try {\n getModel().changeStoryPriority(story, null);\n } catch (CustomException e) {\n ErrorReporter.get().reportError(e, \"Failed to set priority\");\n }\n });\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<Severity> getAllSeverities() {\n\t\ttry{\r\n\t\t\tList<Severity> severityList = getSessionFactory().getCurrentSession().createCriteria(Severity.class).list();\r\n\t\t\treturn severityList;\r\n\t\t}catch(HibernateException ex){\r\n\t\t\tex.printStackTrace();// logger.error(ex.getMessage(),ex);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "default int getPriority() {\n return 0;\n }", "public org.apache.calcite.avatica.proto.Common.Severity getSeverity() {\n @SuppressWarnings(\"deprecation\")\n org.apache.calcite.avatica.proto.Common.Severity result = org.apache.calcite.avatica.proto.Common.Severity.valueOf(severity_);\n return result == null ? org.apache.calcite.avatica.proto.Common.Severity.UNRECOGNIZED : result;\n }", "public void setMinimumLevel(ErrorLevel el);", "public void printPeriodicity(int type)\r\n\t{\r\n\t\tswitch (type)\r\n\t\t{\r\n\t\tcase TOP_OF_MINUTE:\r\n\t\t\tLogLog.debug(\"Appender [\" + name + \"] to be rolled every minute.\");\r\n\t\t\tbreak;\r\n\t\tcase TOP_OF_HOUR:\r\n\t\t\tLogLog.debug(\"Appender [\" + name + \"] to be rolled on top of every hour.\");\r\n\t\t\tbreak;\r\n\t\tcase HALF_DAY:\r\n\t\t\tLogLog.debug(\"Appender [\" + name + \"] to be rolled at midday and midnight.\");\r\n\t\t\tbreak;\r\n\t\tcase TOP_OF_DAY:\r\n\t\t\tLogLog.debug(\"Appender [\" + name + \"] to be rolled at midnight.\");\r\n\t\t\tbreak;\r\n\t\tcase TOP_OF_WEEK:\r\n\t\t\tLogLog.debug(\"Appender [\" + name + \"] to be rolled at start of week.\");\r\n\t\t\tbreak;\r\n\t\tcase TOP_OF_MONTH:\r\n\t\t\tLogLog.debug(\"Appender [\" + name + \"] to be rolled at start of every month.\");\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tLogLog.warn(\"Unknown periodicity for appender [\" + name + \"].\");\r\n\t\t}\r\n\t}", "public org.apache.calcite.avatica.proto.Common.Severity getSeverity() {\n @SuppressWarnings(\"deprecation\")\n org.apache.calcite.avatica.proto.Common.Severity result = org.apache.calcite.avatica.proto.Common.Severity.valueOf(severity_);\n return result == null ? org.apache.calcite.avatica.proto.Common.Severity.UNRECOGNIZED : result;\n }", "protected void firePreAgentScheduling() {\n\t\tJaakEnvironmentListener[] list;\n\t\tsynchronized (this.listeners) {\n\t\t\tlist = new JaakEnvironmentListener[this.listeners.size()];\n\t\t\tthis.listeners.toArray(list);\n\t\t}\n\t\tfor (JaakEnvironmentListener listener : list) {\n\t\t\tlistener.preAgentScheduling();\n\t\t}\n\t}", "public void alarmOnMissingSetting(String settingName);", "@Override\r\n\tpublic void doInitialSchedules() {\n\t}", "public void setBTStreakAny(int s)\n\t{\n\t\tbattletowerCurrentStreakAnyLvl = s;\n\t}", "public void onLogEvent(String date, String source, String level, String msg);", "public void setLoggerLevel(TraceLevel level) {\n\t\t//Topology.STREAMS_LOGGER.setLevel(level);\t\t\n\t\t//Topology.TOPOLOGY_LOGGER.setLevel(level); \n\t\tgetConfig().put(ContextProperties.TRACING_LEVEL, java.util.logging.Level.FINE);\t\t\n\t\tSystem.out.println(\"Streams topology logger level: \" + Topology.TOPOLOGY_LOGGER.getLevel());\n\t\t\n\t}", "public static void log(int severity, String message, Throwable e)\n {\n ILog log = plugin != null? plugin.getLog() : Platform.getLog(FrameworkUtil.getBundle(PluginConsistencyActivator.class));\n log = log != null? log : IDEWorkbenchPlugin.getDefault().getLog();\n\n log.log(new Status(severity, PLUGIN_ID, message, e));\n }", "public int getSeverity() {\n\t\treturn adaptee.getSeverity();\n\t}", "private void addDefaultValue(String statusName, int availableShift)\n {\n String resourcePriority = getAccountPriorityForStatus(statusName);\n if(resourcePriority != null)\n {\n try\n {\n addPresenceToPriorityMapping(\n statusName,\n Integer.parseInt(resourcePriority));\n }\n catch(NumberFormatException ex)\n {\n logger.error(\n \"Wrong value for resource priority for status: \"\n + statusName, ex);\n }\n }\n else\n {\n // if priority is less than zero, use the available priority\n int priority = resourcePriorityAvailable + availableShift;\n if(priority <= 0)\n priority = resourcePriorityAvailable;\n\n addPresenceToPriorityMapping(statusName, priority);\n }\n }", "public void changeHighest()\n {\n hourCounts[18] = 100;\n }", "public int getSeverity() {\n return current.getSeverity();\n }", "public final void loadEvents() {\n\n if (selectedUser == null || selectedUser.equals(\"All\")) {\n for (Absence a : AbsenceService.getAllUnacknowledged()) {\n\n AbsenceEvent e = new AbsenceEvent(a.getUser().getUsername() + \" \" + a.getAbsenceType(), TimeConverterService.convertLocalDateTimeToDate(a.getStartTime()), TimeConverterService.convertLocalDateTimeToDate(a.getEndTime()), a);\n\n switch (e.getAbsence().getAbsenceType()) {\n\n case MEDICAL_LEAVE:\n e.setStyleClass(\"medical_leave\");\n break;\n case HOLIDAY:\n e.setStyleClass(\"holiday\");\n e.setAllDay(true);\n break;\n case TIME_COMPENSATION:\n e.setStyleClass(\"time_compensation\");\n break;\n case BUSINESSRELATED_ABSENCE:\n e.setStyleClass(\"business-related_absence\");\n break;\n default:\n }\n\n this.addEvent(e);\n }\n } else {\n for (Absence a : AbsenceService.getAbsenceByUserAndUnacknowledged(BenutzerverwaltungService.getUser(selectedUser))) {\n\n AbsenceEvent e = new AbsenceEvent(a.getUser().getUsername() + \" \" + a.getAbsenceType() + \" \" + a.getReason(), TimeConverterService.convertLocalDateTimeToDate(a.getStartTime()), TimeConverterService.convertLocalDateTimeToDate(a.getEndTime()), a);\n\n switch (e.getAbsence().getAbsenceType()) {\n\n case MEDICAL_LEAVE:\n e.setStyleClass(\"medical_leave\");\n break;\n case HOLIDAY:\n e.setStyleClass(\"holiday\");\n e.setAllDay(true);\n break;\n case TIME_COMPENSATION:\n e.setStyleClass(\"time_compensation\");\n break;\n case BUSINESSRELATED_ABSENCE:\n e.setStyleClass(\"business-related_absence\");\n break;\n default:\n }\n\n this.addEvent(e);\n }\n }\n\n DefaultScheduleEvent holidayevent;\n\n for (Holiday h : HolidayService.getList()) {\n holidayevent = new DefaultScheduleEvent(h.getHolidayComment(), TimeConverterService.convertLocalDateToDate(h.getHolidayDate()), TimeConverterService.convertLocalDateToDate(h.getHolidayDate()));\n holidayevent.setAllDay(true);\n holidayevent.setStyleClass(\"feiertag\");\n\n this.addEvent(holidayevent);\n }\n }", "public void logIfLevel(Marker min, Marker max, String... messages);", "protected void updateAlertDefinitions() {\n LOG.info(\"Updating alert definitions.\");\n AmbariManagementController ambariManagementController = injector.getInstance(AmbariManagementController.class);\n AlertDefinitionDAO alertDefinitionDAO = injector.getInstance(AlertDefinitionDAO.class);\n Clusters clusters = ambariManagementController.getClusters();\n\n Map<String, Cluster> clusterMap = getCheckedClusterMap(clusters);\n for (final Cluster cluster : clusterMap.values()) {\n long clusterID = cluster.getClusterId();\n\n final AlertDefinitionEntity journalNodeProcessAlertDefinitionEntity = alertDefinitionDAO.findByName(\n clusterID, \"journalnode_process\");\n final AlertDefinitionEntity hostDiskUsageAlertDefinitionEntity = alertDefinitionDAO.findByName(\n clusterID, \"ambari_agent_disk_usage\");\n\n if (journalNodeProcessAlertDefinitionEntity != null) {\n String source = journalNodeProcessAlertDefinitionEntity.getSource();\n\n journalNodeProcessAlertDefinitionEntity.setSource(modifyJournalnodeProcessAlertSource(source));\n journalNodeProcessAlertDefinitionEntity.setSourceType(SourceType.WEB);\n journalNodeProcessAlertDefinitionEntity.setHash(UUID.randomUUID().toString());\n\n alertDefinitionDAO.merge(journalNodeProcessAlertDefinitionEntity);\n LOG.info(\"journalnode_process alert definition was updated.\");\n }\n\n if (hostDiskUsageAlertDefinitionEntity != null) {\n hostDiskUsageAlertDefinitionEntity.setDescription(\"This host-level alert is triggered if the amount of disk space \" +\n \"used goes above specific thresholds. The default threshold values are 50% for WARNING and 80% for CRITICAL.\");\n hostDiskUsageAlertDefinitionEntity.setLabel(\"Host Disk Usage\");\n\n alertDefinitionDAO.merge(hostDiskUsageAlertDefinitionEntity);\n LOG.info(\"ambari_agent_disk_usage alert definition was updated.\");\n }\n\n }\n }", "private void configureLogLevels()\r\n { \r\n String level = properties.getProperty(\"LogLevel\");\r\n \r\n switch(level)\r\n {\r\n case \"INFO\": INFO = Level.INFO; \r\n DEBUG = Level.FINE; \r\n WARNING = Level.FINE;\r\n break;\r\n case \"DEBUG\": INFO = Level.INFO;\r\n DEBUG = Level.INFO; \r\n WARNING = Level.INFO;\r\n break;\r\n case \"WARNING\": INFO = Level.FINE; \r\n DEBUG = Level.FINE; \r\n WARNING = Level.INFO; \r\n break;\r\n default: INFO = Level.INFO; \r\n DEBUG = Level.FINE; \r\n WARNING = Level.WARNING;\r\n break;\r\n }\r\n }", "@Override\n public int getRunLevel() {\n return 0;\n }", "private void defaultStatementsInCase() {\n GUI.writeTimeField();\n sleep();\n }", "@Test(priority=3)\n\tpublic void t1() {\n\t\tReporter.log(\"Running t1 Method\", true);\n\t}", "private void getDefaultAlarmStrategies() {\n String jsonString = WapiUtil.getDefaultAlarmStrategies();\n List<DBAlarmStrategyDefault> dbstrategylist = JSONStr2DBStrategyDefList(jsonString);\n if (dbstrategylist != null) {\n List<AlarmStrategy> strategyDefList = DBStratDefList2StrategyList(dbstrategylist);\n if (null != strategyDefList) {\n // StrategyDBHelper.getInstance().cleanDefaultAlarmStrategies();\n StrategyDBHelper.getInstance().updateDefaultAlarmStrategies(\n dbstrategylist);\n }\n }\n }", "public boolean isReportedDefault() {\n if (\"3\".equals(originalPriority.getId())) {\n return true;\n }\n\n return false;\n }", "public NrtAlertRule withSeverity(AlertSeverity severity) {\n if (this.innerProperties() == null) {\n this.innerProperties = new NrtAlertRuleProperties();\n }\n this.innerProperties().withSeverity(severity);\n return this;\n }", "public ActivityPaneLogLevelButtonGroup() {\n super();\n }" ]
[ "0.5829169", "0.5532766", "0.5506194", "0.5244802", "0.51899666", "0.51822805", "0.51370573", "0.51353335", "0.5060406", "0.5060406", "0.5056161", "0.5048624", "0.50188935", "0.49671665", "0.49298504", "0.4905753", "0.48955315", "0.48035362", "0.47890365", "0.47695455", "0.4748989", "0.47071105", "0.47011718", "0.46806368", "0.46775913", "0.46741307", "0.4662391", "0.46538806", "0.4633878", "0.46074057", "0.46020964", "0.46004573", "0.45997554", "0.45435986", "0.45435265", "0.4541605", "0.45382756", "0.45348522", "0.45330393", "0.45306087", "0.45074296", "0.45050275", "0.4502464", "0.44919887", "0.4486677", "0.44822717", "0.44777316", "0.44750217", "0.4474962", "0.4451965", "0.4444154", "0.44382462", "0.44368356", "0.4424598", "0.4423206", "0.44179022", "0.44151324", "0.44115695", "0.43914485", "0.43847117", "0.43841425", "0.43831944", "0.43813595", "0.4378177", "0.43713057", "0.436872", "0.4366249", "0.43438992", "0.4338071", "0.43179834", "0.43033305", "0.4298735", "0.42958218", "0.42872712", "0.42810512", "0.42805102", "0.42793703", "0.42777663", "0.4277148", "0.4275964", "0.42755663", "0.4273758", "0.42572063", "0.42513394", "0.42425767", "0.42396012", "0.42297152", "0.4222385", "0.4209518", "0.42035913", "0.42033035", "0.41931835", "0.4185344", "0.41761974", "0.41698393", "0.41684824", "0.4163659", "0.41625658", "0.41567114", "0.41524047" ]
0.48686734
17
Default severity level for all scheduled activity events
public OpLevel getOpLevel() { return opLevel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getSeverity();", "int getSeverityValue();", "public Type getSeverity() {\n return severity;\n }", "public int getSeverity() {\n return severity;\n }", "public int getSeverity() {\n return severity;\n }", "public SeverityEnum getSeverity() {\n return severity;\n }", "public void onSeveritySelected(TriggerSeverity severity);", "public void setSeverity(java.lang.String value) {\n this.severity = value;\n }", "public java.lang.String getSeverity() {\n return severity;\n }", "public java.lang.String getSeverity() {\n return severity;\n }", "public int getSeverityValue() {\n return severity_;\n }", "public LogLevel getSeverity() {\r\n\t\treturn level;\r\n\t}", "public void setSeverity(int severity) {\n this.severity = severity;\n }", "public String getSeverity() {\n return severity.toString().toLowerCase(Locale.US);\n }", "public int getSeverityValue() {\n return severity_;\n }", "public AlertSeverity severity() {\n return this.innerProperties() == null ? null : this.innerProperties().severity();\n }", "org.apache.calcite.avatica.proto.Common.Severity getSeverity();", "public org.apache.calcite.avatica.proto.Common.Severity getSeverity() {\n @SuppressWarnings(\"deprecation\")\n org.apache.calcite.avatica.proto.Common.Severity result = org.apache.calcite.avatica.proto.Common.Severity.valueOf(severity_);\n return result == null ? org.apache.calcite.avatica.proto.Common.Severity.UNRECOGNIZED : result;\n }", "public org.apache.calcite.avatica.proto.Common.Severity getSeverity() {\n @SuppressWarnings(\"deprecation\")\n org.apache.calcite.avatica.proto.Common.Severity result = org.apache.calcite.avatica.proto.Common.Severity.valueOf(severity_);\n return result == null ? org.apache.calcite.avatica.proto.Common.Severity.UNRECOGNIZED : result;\n }", "public String getSeverity() { \n\t\treturn getSeverityElement().getValue();\n\t}", "public int getSeverity() {\n return current.getSeverity();\n }", "public int getSeverity() {\n\t\treturn adaptee.getSeverity();\n\t}", "public int getAlertPriority()\n {\n return this.alert_priority;\n }", "@Override\n public void rawActivityLevel(int value, int timestamp) {\n }", "public final void setSeverity(com.mendix.systemwideinterfaces.core.IContext context, twogapplicationinsights.proxies.SeverityLevel severity)\n\t{\n\t\tif (severity != null)\n\t\t\tgetMendixObject().setValue(context, MemberNames.Severity.toString(), severity.toString());\n\t\telse\n\t\t\tgetMendixObject().setValue(context, MemberNames.Severity.toString(), null);\n\t}", "public void sub() {\n\t\tlog.severe(\"severe level\");// <= (1)\n\t\tlog.warning(\"warning level\");// <= (2)\n\t\tlog.info(\"info level\");// <= (3)\n\t\tlog.config(\"config level\");// <= (4)\n\t\tlog.fine(\"fine level\");// <= (5)\n\t\tlog.finer(\"finer level\");// <= (6)\n\t\tlog.finest(\"finest level\");// <= (7)\n\n\t}", "public void setOpLevel(OpLevel severity) {\n\t\topLevel = severity;\n\t}", "public DefaultLoggerBridge(int severity) {\n\t\tthis.severity = severity;\n\t}", "public final void setSeverity(twogapplicationinsights.proxies.SeverityLevel severity)\n\t{\n\t\tsetSeverity(getContext(), severity);\n\t}", "public Map<FacesMessage.Severity, String> getSeverityName() {\n return FxSharedUtils.getMappedFunction(new FxSharedUtils.ParameterMapper<FacesMessage.Severity, String>() {\n @Override\n public String get(Object key) {\n final FacesMessage.Severity severity = (FacesMessage.Severity) key;\n if (FacesMessage.SEVERITY_ERROR.equals(severity)) {\n return \"error\";\n } else if (FacesMessage.SEVERITY_FATAL.equals(severity)) {\n return \"fatal\";\n } else if (FacesMessage.SEVERITY_INFO.equals(severity)) {\n return \"info\";\n } else if (FacesMessage.SEVERITY_WARN.equals(severity)) {\n return \"warn\";\n } else {\n return \"\";\n }\n }\n });\n }", "public static int getDefaultEventType(){\n\t\treturn prefs.getInt(DEFAULT_EVENT_TYPE, 0);\n\t}", "public int failureLevel(){\n return RESULT_WARNING;\n }", "public Builder setSeverityValue(int value) {\n severity_ = value;\n onChanged();\n return this;\n }", "public boolean hasSeverity() {\n return fieldSetFlags()[2];\n }", "public int getAlertness() {\n return 0;\n }", "public void setSeverity(TriggerSeverity severity) {\n\t\tmSeverityListPagerAdapter.setCurrentPosition(severity.getPosition());\n\t}", "@Override\r\n\tpublic int getEventType() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic int getEventType() {\n\t\treturn 0;\r\n\t}", "public BoundCodeDt<ConstraintSeverityEnum> getSeverityElement() { \n\t\tif (mySeverity == null) {\n\t\t\tmySeverity = new BoundCodeDt<ConstraintSeverityEnum>(ConstraintSeverityEnum.VALUESET_BINDER);\n\t\t}\n\t\treturn mySeverity;\n\t}", "public Constraint setSeverity(ConstraintSeverityEnum theValue) {\n\t\tgetSeverityElement().setValueAsEnum(theValue);\n\t\treturn this;\n\t}", "@Override\n public void setRunLevel(int level) {\n\n }", "public final twogapplicationinsights.proxies.SeverityLevel getSeverity()\n\t{\n\t\treturn getSeverity(getContext());\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<Severity> getAllSeverities() {\n\t\ttry{\r\n\t\t\tList<Severity> severityList = getSessionFactory().getCurrentSession().createCriteria(Severity.class).list();\r\n\t\t\treturn severityList;\r\n\t\t}catch(HibernateException ex){\r\n\t\t\tex.printStackTrace();// logger.error(ex.getMessage(),ex);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\n public int getRunLevel() {\n return 0;\n }", "@Override\n public void logStandard(String message) {\n Log.i(_projectName, message);\n }", "public void setIncidentSeverity(int incidentSeverity) {\n\t\t\tthis.incidentSeverity = incidentSeverity;\r\n\t\t}", "public void setAlertLevel(int inAlertLevel) {\r\n\t\tif (inAlertLevel == ALERT_ALERT) {\r\n\t\t\tthis.alertLevel = ALERT_ALERT;\r\n\t\t} else {\r\n\t\t\tif (inAlertLevel == ALERT_TASK) {\r\n\t\t\t\tthis.alertLevel = ALERT_TASK;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void log(int severity, String message)\n {\n log(severity, message, null);\n }", "public CheckLevel getDefaultLevel() {\n return defaultLevel;\n }", "public String getStrSeverityCode() {\r\n return strSeverityCode;\r\n }", "public static int getLevel(){\n\treturn logLevel;\n }", "private static void seTimeStamps() {\n MDC.put(MDC_INSTANCE_UUID, \"\");\n MDC.put(MDC_ALERT_SEVERITY, \"\");\n\n var startTime = Instant.now();\n var endTime = Instant.now();\n\n seTimeStamps(startTime, endTime);\n\n MDC.put(PARTNER_NAME, \"N/A\");\n\n MDC.put(STATUS_CODE, COMPLETE_STATUS);\n MDC.put(RESPONSE_CODE, \"N/A\");\n MDC.put(RESPONSE_DESCRIPTION, \"N/A\");\n\n }", "public void setPriority (int level)\n\t{\n\tthis.level = level;\n\n\tif (level == 1)\n\tpriority = \"Critical\";\n\tif (level == 2)\n\tpriority = \"Very Important\";\n\tif (level == 3)\n\tpriority = \"Normal\";\n\tif (level == 4)\n\tpriority = \"Low\";\n\tif (level == 5)\n\tpriority = \"Not Important\";\n\t}", "public Constraint setSeverity(BoundCodeDt<ConstraintSeverityEnum> theValue) {\n\t\tmySeverity = theValue;\n\t\treturn this;\n\t}", "@Override\r\n protected Level getLevel() {\r\n return Level.FINEST;\r\n }", "@Override\n public String getEventType()\n {\n\t return null;\n }", "public void set_log_level(int level) {\r\n logLevel = Math.max(0,level);\r\n }", "public static synchronized void setAuditLevel(String newAuditLevel) {\n\n if (overrideLogbackLevel) {\n if (\"OFF\".equalsIgnoreCase(newAuditLevel)) {\n PolicyLogger.auditLevel = Level.OFF;\n auditLogger.setLevel(auditLevel);\n } else {\n // --- set default value\n auditLogger.setLevel(Level.INFO);\n PolicyLogger.auditLevel = Level.INFO;\n }\n }\n }", "@Override\n\tpublic void afterPropertiesSet() throws Exception {\n\t\tscoreToSeverity.put(0, Severity.Low);\n\t\tscoreToSeverity.put(medium, Severity.Medium);\n\t\tscoreToSeverity.put(high, Severity.High);\n\t\tscoreToSeverity.put(critical, Severity.Critical);\n\t}", "private Priority getPriority(final String severity) {\n\t\tif (SEVERITY_FATAL.equalsIgnoreCase(severity) || SEVERITY_ERROR.equalsIgnoreCase(severity)) {\n\t\t\treturn Priority.HIGH;\n\t\t}\n\t\tif (SEVERITY_WARNING.equalsIgnoreCase(severity) || SEVERITY_WARN.equalsIgnoreCase(severity)) {\n\t\t\treturn Priority.NORMAL;\n\t\t}\n\t\tif (SEVERITY_INFORMATIONAL.equalsIgnoreCase(severity) || SEVERITY_INFO.equalsIgnoreCase(severity)) {\n\t\t\treturn Priority.LOW;\n\t\t}\n\t\treturn Priority.NORMAL;\n\t}", "protected String getDefaultLogLevel()\n {\n return DEFAULT_LOGLEVEL;\n }", "int getDefenseStatStage();", "public task ()\n\t{\n\tthis.msg = msg;\n\tthis.level = level;\n\n\tif (level == 1)\n\tpriority = \"Critical\";\n\tif (level == 2)\n\tpriority = \"Very Important\";\n\tif (level == 3)\n\tpriority = \"Normal\";\n\tif (level == 4)\n\tpriority = \"Low\";\n\tif (level == 5)\n\tpriority = \"Not Important\";\n\t}", "default int getPriority() {\n return 0;\n }", "@SuppressWarnings(\"restriction\")\n\tpublic int getEventType() {\n\t\treturn invokeWithoutInvocationException(int.class, \"getEventType\");\n\t}", "public static void log(int severity, String message, Throwable e)\n {\n ILog log = plugin != null? plugin.getLog() : Platform.getLog(FrameworkUtil.getBundle(PluginConsistencyActivator.class));\n log = log != null? log : IDEWorkbenchPlugin.getDefault().getLog();\n\n log.log(new Status(severity, PLUGIN_ID, message, e));\n }", "private String getSeverityImage(Object severity)\n/* */ {\n/* 125 */ if (severity == null)\n/* */ {\n/* 127 */ return \"<img border=\\\"0\\\" src=\\\"/images/icon_unknown_status.gif\\\" alt=\\\"Unknown\\\" title=\\\"\" + FormatUtil.getString(\"am.webclient.hometab.monitorssnapshot.key.unknown\") + \"\\\" align=\\\"absmiddle\\\">\";\n/* */ }\n/* 129 */ if (severity.equals(\"1\"))\n/* */ {\n/* 131 */ return \"<img border=\\\"0\\\" src=\\\"/images/icon_critical.gif\\\" alt=\\\"Critical\\\" title=\\\"\" + FormatUtil.getString(\"am.webclient.hometab.monitorssnapshot.key.critical\") + \"\\\" align=\\\"absmiddle\\\">\";\n/* */ }\n/* 133 */ if (severity.equals(\"4\"))\n/* */ {\n/* 135 */ return \"<img border=\\\"0\\\" src=\\\"/images/icon_warning.gif\\\" alt=\\\"Warning\\\" title=\\\"\" + FormatUtil.getString(\"am.webclient.hometab.monitorssnapshot.key.warning\") + \"\\\" align=\\\"absmiddle\\\">\";\n/* */ }\n/* 137 */ if (severity.equals(\"5\"))\n/* */ {\n/* 139 */ return \"<img border=\\\"0\\\" src=\\\"/images/icon_clear.gif\\\" alt=\\\"Clear\\\" title=\\\"\" + FormatUtil.getString(\"am.webclient.hometab.monitorssnapshot.key.clear\") + \"\\\" align=\\\"absmiddle\\\" >\";\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 144 */ return \"<img border=\\\"0\\\" src=\\\"/images/icon_unknown_status.gif\\\" alt=\\\"Unknown\\\" title=\\\"Unknown\\\" align=\\\"absmiddle\\\">\";\n/* */ }", "@Override\n public RfLintRule configure(final RfLintViolationSeverity severity) {\n return super.configure(severity == null ? RfLintViolationSeverity.ERROR : severity);\n }", "public void onLogEvent(String date, String source, String level, String msg);", "public Builder clearSeverity() {\n \n severity_ = 0;\n onChanged();\n return this;\n }", "@Override\n public DateTime getMaxIngestedEventTime()\n {\n return getMaxTime();\n }", "private String getSeverityImage(Object severity)\n/* */ {\n/* 119 */ if (severity == null)\n/* */ {\n/* 121 */ return \"<img border=\\\"0\\\" src=\\\"/images/icon_unknown_status.gif\\\" alt=\\\"Unknown\\\" title=\\\"\" + FormatUtil.getString(\"am.webclient.hometab.monitorssnapshot.key.unknown\") + \"\\\" align=\\\"absmiddle\\\">\";\n/* */ }\n/* 123 */ if (severity.equals(\"1\"))\n/* */ {\n/* 125 */ return \"<img border=\\\"0\\\" src=\\\"/images/icon_critical.gif\\\" alt=\\\"Critical\\\" title=\\\"\" + FormatUtil.getString(\"am.webclient.hometab.monitorssnapshot.key.critical\") + \"\\\" align=\\\"absmiddle\\\">\";\n/* */ }\n/* 127 */ if (severity.equals(\"4\"))\n/* */ {\n/* 129 */ return \"<img border=\\\"0\\\" src=\\\"/images/icon_warning.gif\\\" alt=\\\"Warning\\\" title=\\\"\" + FormatUtil.getString(\"am.webclient.hometab.monitorssnapshot.key.warning\") + \"\\\" align=\\\"absmiddle\\\">\";\n/* */ }\n/* 131 */ if (severity.equals(\"5\"))\n/* */ {\n/* 133 */ return \"<img border=\\\"0\\\" src=\\\"/images/icon_clear.gif\\\" alt=\\\"Clear\\\" title=\\\"\" + FormatUtil.getString(\"am.webclient.hometab.monitorssnapshot.key.clear\") + \"\\\" align=\\\"absmiddle\\\" >\";\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 138 */ return \"<img border=\\\"0\\\" src=\\\"/images/icon_unknown_status.gif\\\" alt=\\\"Unknown\\\" title=\\\"Unknown\\\" align=\\\"absmiddle\\\">\";\n/* */ }", "private String getSeverityImage(Object severity)\n/* */ {\n/* 116 */ if (severity == null)\n/* */ {\n/* 118 */ return \"<img border=\\\"0\\\" src=\\\"/images/icon_unknown_status.gif\\\" alt=\\\"Unknown\\\" title=\\\"\" + FormatUtil.getString(\"am.webclient.hometab.monitorssnapshot.key.unknown\") + \"\\\" align=\\\"absmiddle\\\">\";\n/* */ }\n/* 120 */ if (severity.equals(\"1\"))\n/* */ {\n/* 122 */ return \"<img border=\\\"0\\\" src=\\\"/images/icon_critical.gif\\\" alt=\\\"Critical\\\" title=\\\"\" + FormatUtil.getString(\"am.webclient.hometab.monitorssnapshot.key.critical\") + \"\\\" align=\\\"absmiddle\\\">\";\n/* */ }\n/* 124 */ if (severity.equals(\"4\"))\n/* */ {\n/* 126 */ return \"<img border=\\\"0\\\" src=\\\"/images/icon_warning.gif\\\" alt=\\\"Warning\\\" title=\\\"\" + FormatUtil.getString(\"am.webclient.hometab.monitorssnapshot.key.warning\") + \"\\\" align=\\\"absmiddle\\\">\";\n/* */ }\n/* 128 */ if (severity.equals(\"5\"))\n/* */ {\n/* 130 */ return \"<img border=\\\"0\\\" src=\\\"/images/icon_clear.gif\\\" alt=\\\"Clear\\\" title=\\\"\" + FormatUtil.getString(\"am.webclient.hometab.monitorssnapshot.key.clear\") + \"\\\" align=\\\"absmiddle\\\" >\";\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 135 */ return \"<img border=\\\"0\\\" src=\\\"/images/icon_unknown_status.gif\\\" alt=\\\"Unknown\\\" title=\\\"Unknown\\\" align=\\\"absmiddle\\\">\";\n/* */ }", "public int defaultAnomaly(int total);", "@Test\n public void testMaybeScheduleStartAlarmLocked_SmallRollingQuota_DefaultValues() {\n // Use the default values\n runTestMaybeScheduleStartAlarmLocked_SmallRollingQuota_AllowedTimeCheck();\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE).clear();\n runTestMaybeScheduleStartAlarmLocked_SmallRollingQuota_MaxTimeCheck();\n }", "public Builder setSeverity(org.apache.calcite.avatica.proto.Common.Severity value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n severity_ = value.getNumber();\n onChanged();\n return this;\n }", "public static void setLevel(int level){\n\tlogLevel = level;\n }", "public java.lang.String getSystemlogaction () {\n\t\treturn systemlogaction;\n\t}", "public ActivityPaneLogLevelButtonGroup() {\n super();\n }", "@Test\n public void testCustomLoggingLevels() {\n LogTestLogger customLogger = new LogTestLogger();\n Database.log.setCustom(customLogger);\n\n for(int i = 5; i >= 1; i--) {\n customLogger.getLines().clear();\n customLogger.setLevel(LogLevel.values()[i]);\n Log.v(LogDomain.DATABASE, \"TEST VERBOSE\");\n Log.i(LogDomain.DATABASE, \"TEST INFO\");\n Log.w(LogDomain.DATABASE, \"TEST WARNING\");\n Log.e(LogDomain.DATABASE, \"TEST ERROR\");\n assertEquals(5 - i, customLogger.getLines().size());\n }\n }", "public void printPeriodicity(int type)\r\n\t{\r\n\t\tswitch (type)\r\n\t\t{\r\n\t\tcase TOP_OF_MINUTE:\r\n\t\t\tLogLog.debug(\"Appender [\" + name + \"] to be rolled every minute.\");\r\n\t\t\tbreak;\r\n\t\tcase TOP_OF_HOUR:\r\n\t\t\tLogLog.debug(\"Appender [\" + name + \"] to be rolled on top of every hour.\");\r\n\t\t\tbreak;\r\n\t\tcase HALF_DAY:\r\n\t\t\tLogLog.debug(\"Appender [\" + name + \"] to be rolled at midday and midnight.\");\r\n\t\t\tbreak;\r\n\t\tcase TOP_OF_DAY:\r\n\t\t\tLogLog.debug(\"Appender [\" + name + \"] to be rolled at midnight.\");\r\n\t\t\tbreak;\r\n\t\tcase TOP_OF_WEEK:\r\n\t\t\tLogLog.debug(\"Appender [\" + name + \"] to be rolled at start of week.\");\r\n\t\t\tbreak;\r\n\t\tcase TOP_OF_MONTH:\r\n\t\t\tLogLog.debug(\"Appender [\" + name + \"] to be rolled at start of every month.\");\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tLogLog.warn(\"Unknown periodicity for appender [\" + name + \"].\");\r\n\t\t}\r\n\t}", "@POST(\"/setAlertLevel\")\n\tint setAlertLevel(@Body AlertLevelParams params);", "@Override\n public Level getLevel() {\n return privateConfig.loggerConfigLevel;\n }", "private void changeLogLevel(String level){\n\n }", "public void setMinimumLevel(ErrorLevel el);", "@java.lang.Override\n public int getDefenseStatStage() {\n return defenseStatStage_;\n }", "@java.lang.Override\n public int getDefenseStatStage() {\n return defenseStatStage_;\n }", "String getEventType();", "public boolean isReportedDefault() {\n if (\"3\".equals(originalPriority.getId())) {\n return true;\n }\n\n return false;\n }", "public int getSeverity() {\n /*\n // Can't load method instructions: Load method exception: null in method: android.telephony.SmsCbCmasInfo.getSeverity():int, dex: in method: android.telephony.SmsCbCmasInfo.getSeverity():int, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.getSeverity():int\");\n }", "public default int getLevel(){ return 0; }", "SummaryStatusEnum getSummaryStatus();", "public static void logEvent(String eventType) {\n logEvent(eventType, null);\n }", "void resetExcStatuses()\n\t\t{\n\t\t}", "public void logIfLevel(Marker min, Marker max, String... messages);", "@Override\n public void reportScheduler() {\n }", "private int getActiveTime() {\n\t\treturn 15 + level;\n\t}", "@Override\r\n\tpublic int getPriority() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic int getPriority() {\n\t\treturn 0;\r\n\t}", "Collection<? extends Integer> getHasInjurySeverity();", "void addHasInjurySeverity(Integer newHasInjurySeverity);" ]
[ "0.62878287", "0.6210175", "0.6111471", "0.6075446", "0.6075446", "0.607486", "0.5968634", "0.5908908", "0.58608216", "0.58215755", "0.5757537", "0.5737779", "0.573445", "0.5714534", "0.5686744", "0.5671982", "0.5524561", "0.54484946", "0.54402864", "0.5380631", "0.53423893", "0.528347", "0.51428986", "0.51286036", "0.509322", "0.5065854", "0.5062536", "0.5043585", "0.5030677", "0.4972262", "0.49485335", "0.48992297", "0.48942405", "0.48882604", "0.48721212", "0.48691395", "0.48420322", "0.48420322", "0.48176557", "0.48014903", "0.47843504", "0.4771924", "0.47690475", "0.47442892", "0.47339714", "0.46950418", "0.46927905", "0.46755585", "0.4673156", "0.46575657", "0.46373603", "0.46165082", "0.46028852", "0.45943058", "0.45853782", "0.4582977", "0.45763877", "0.4571153", "0.45697162", "0.4568121", "0.45656535", "0.45616943", "0.45507184", "0.45487997", "0.45459953", "0.4543964", "0.45345747", "0.4527314", "0.45254135", "0.45242307", "0.44983473", "0.44970956", "0.44858268", "0.44836965", "0.44719982", "0.4468074", "0.4466047", "0.44623023", "0.44498354", "0.44445673", "0.4437874", "0.44364983", "0.44184107", "0.4414605", "0.44017765", "0.4398974", "0.439665", "0.43949193", "0.4389651", "0.4381377", "0.43794984", "0.43741778", "0.43619132", "0.4353802", "0.4345046", "0.4333595", "0.4323402", "0.4316675", "0.4316675", "0.4316502", "0.4316351" ]
0.0
-1
Name associated with this object
public String getName() { return name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic String getName() {\n\t\t\t\treturn name;\n\t\t\t}", "@Override\n\t\tfinal public String getName() {\n\t\t\treturn this.Name;\n\t\t}", "@Override\n public String getName() {\n return this.name();\n }", "@Override\n public String getName() {\n return name();\n }", "@Override\n public String name() {\n return this._name;\n }", "@Override\r\n\tpublic String Name() {\n\t\treturn Name;\r\n\t}", "@Override\r\n\tpublic String getName() {\n\t\treturn this.name;\r\n\t}", "public String getName() {\n\t\treturn this.toString();\n\t}", "@Override\r\n\tpublic String getName() {\n\t\treturn name;\r\n\t}", "@Override\r\n\tpublic String getName() \r\n\t{\r\n\t\treturn this._name;\r\n\t}", "public final String name() {\n\t\treturn name;\n\t}", "@Override\n\tpublic String getName() {\n\n\t\treturn name;\n\t}", "@Override\r\n\tpublic String getName() {\r\n\t\treturn name;\r\n\t}", "@Override\n\tpublic String name() {\n\n\t\treturn NAME;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn this.name;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn this.name;\n\t}", "public String name() {\r\n\t\treturn this.name;\r\n\t}", "public String name() {\n this.use();\n\n return name;\n }", "public String getName() {\r\n return this.name();\r\n }", "@Override\n public String name() {\n return this.name;\n }", "@Override\n public String getName() {\n return this.name;\n }", "@Override\n\tpublic String getName() {\n\t\treturn name;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn name;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn name;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn name;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn name;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn name;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn name;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn name;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn name;\n\t}", "@Override public String getName() {\n return name;\n }", "@Override\r\n\tprotected String getName() {\n\t\treturn NAME;\r\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn this.name;\n\t\t\n\t}", "protected String get_object_name() {\n\t\treturn this.name;\n\t}", "protected String get_object_name() {\n\t\treturn this.name;\n\t}", "@Override\n public String getName() {\n\n return name;\n }", "public String name() {\n\t\treturn this.name;\n\t}", "@Override\n public String getName() {\n return name;\n }", "public String getName (){\n\t\treturn name;\n\t}", "public String getName(){\r\n\t\treturn this.name;\r\n\t}", "public final String name() {\n return name;\n }", "public final String name ()\r\n {\r\n return _name;\r\n }", "public String getName() {\r\n\t\t\treturn Name;\r\n\t\t}", "@Override\n public String getName() {\n return this.name;\n }", "String getName() {\r\n\t\t\treturn this.name;\r\n\t\t}", "public String name() {\n return this.name;\n }", "public String name() {\n return this.name;\n }", "public String name() {\n return this.name;\n }", "public String name() {\n return this.name;\n }", "public String name() {\n return this.name;\n }", "public String name() {\n return this.name;\n }", "public String name() {\n return this.name;\n }", "public String name() {\n return this.name;\n }", "public String name() {\n return this.name;\n }", "public String name() {\n return this.name;\n }", "public String name() {\n return this.name;\n }", "public String name() {\n return this.name;\n }", "public String name() {\n return this.name;\n }", "public String name() {\n return this.name;\n }", "public String name() {\n return this.name;\n }", "public String name() {\n return this.name;\n }", "public String name() {\n return this.name;\n }", "public String name() {\n return this.name;\n }", "public String name() {\n return this.name;\n }", "public String getName() { return this.Name; }", "@Override\r\n public String getName() {\r\n return NAME;\r\n }", "public String getName() {\r\n return Name;\r\n }", "@Override\n public String getName() {\n return name();\n }", "public Object getName() {\n\t\treturn this.name;\n\t}", "public Object getName() {\n\t\treturn this.name;\n\t}", "public String getName() {\n\t\treturn Name;\n\t}", "@Override\n public final String getName() {\n return _name;\n }", "public String getName() { return this.name; }", "public String getName() { return this.name; }", "public String getName() { return this.name; }", "public java.lang.String getName();", "public String getName(){\r\n\t\treturn name;\r\n\t}", "public String getName(){\r\n\t\treturn name;\r\n\t}", "public String getName(){\r\n\t\treturn name;\r\n\t}", "public String getName(){\r\n\t\treturn name;\r\n\t}", "public String getName(){\n\t\treturn this.name;\n\t}", "public String getName(){\n\t\treturn this.name;\n\t}", "public String getName(){\n\t\treturn this.name;\n\t}", "public String getName(){\n\t\treturn this.name;\n\t}", "public String getName(){\n\t\treturn this.name;\n\t}", "@Override\n public String getName() {\n return name;\n }", "@Override\n public String getName() {\n return name;\n }", "@Override\n public String getName() {\n return name;\n }", "@Override\n public String getName() {\n return name;\n }", "@Override\n public String getName() {\n return name;\n }", "@Override\n public String getName() {\n return name;\n }", "@Override\n public String getName() {\n return name;\n }", "@Override\n public String getName() {\n return name;\n }", "public String getName(){\n \t\treturn this.name;\n \t}", "public String getName()\r\n\t{\r\n\t\treturn this._name;\r\n\t}", "public NSString name() {\n\t\treturn this.name;\n\n\t}", "public String getName() {\n return Name;\n }", "protected String getName() {\n\t\treturn name;\n\t}", "protected String getName() {\n\t\treturn name;\n\t}", "public String getName() {\n\t\treturn(name);\n\t}", "@Override\n public String getName()\n {\n return name;\n }" ]
[ "0.857418", "0.84585524", "0.8457051", "0.84316045", "0.8427215", "0.84210205", "0.8404054", "0.8385991", "0.8382646", "0.8379551", "0.8359368", "0.83473736", "0.83429766", "0.8337994", "0.83314323", "0.83314323", "0.8323547", "0.83232754", "0.8320155", "0.83018064", "0.82994145", "0.8291785", "0.8291785", "0.8291785", "0.8291785", "0.8291785", "0.8291785", "0.8291785", "0.8291785", "0.8291785", "0.8290111", "0.828844", "0.82786256", "0.8266408", "0.8266408", "0.8263083", "0.8255578", "0.8243849", "0.8238356", "0.82243353", "0.82110137", "0.8210987", "0.8207885", "0.8202479", "0.819367", "0.8189991", "0.8189991", "0.8189991", "0.8189991", "0.8189991", "0.8189991", "0.8189991", "0.8189991", "0.8189991", "0.8189991", "0.8189991", "0.8189991", "0.8189991", "0.8189991", "0.8189991", "0.8189991", "0.8189991", "0.8189991", "0.8189991", "0.8189985", "0.8189355", "0.81841606", "0.8182122", "0.8176401", "0.8176401", "0.81762433", "0.81760794", "0.817441", "0.817441", "0.817441", "0.81690603", "0.8154964", "0.8154964", "0.8154964", "0.8154964", "0.8151597", "0.8151597", "0.8151597", "0.8151597", "0.8151597", "0.8148844", "0.8148844", "0.8148844", "0.8148844", "0.8148844", "0.8148844", "0.8148844", "0.8148844", "0.814667", "0.81434596", "0.8138246", "0.813507", "0.81302845", "0.81302845", "0.81300575", "0.8129798" ]
0.0
-1
Assign an activity listener to be used when scheduled activity starts/stops
public ActivityScheduler setListener(ActivityListener listener) { logger.getConfiguration().setActivityListener(listener); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void InitListener()\n {\n Intent listener = new Intent(this, SmsListener.class);\n listener.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startService(listener);\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState){\n\t\tmStart.setOnClickListener(new OnClickListener(){\n\t\t\t@Override\n\t\t\tpublic void onClick(View v){\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (receiver==null) {\n\t\t\t\t\treceiver = new myReceiver();\n\t\t\t\t\tIntentFilter filter=new IntentFilter();\n\t\t\t\t\tfilter.addAction(\"com.chris.hadoop v\");\n\t\t\t\t\tmActivity.registerReceiver(receiver, filter);\n\t\t\t\t}\n\t\t\t\tIntent intent=new Intent(getActivity(),trafficMonitorService.class);\n\t\t\t\tmActivity.startService(intent);\n\t\t\t\tToast.makeText(mActivity,\" \",Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t});\n\t\tmStop.setOnClickListener(new OnClickListener(){\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v){\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (receiver!=null) {\n\t\t\t\t\tmActivity.unregisterReceiver(receiver);\n\t\t\t\t\treceiver=null;\n\t\t\t\t}\n\t\t\t\tIntent intent=new Intent(mActivity,trafficMonitorService.class);\n\t\t\t\tmActivity.stopService(intent);\n\t\t\t\tToast.makeText(mActivity, \"ֹͣ\",Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "public void activityListener(CalendarActivityEvent ae){\n CalendarActivity activity = ae.getCalendarActivity();\n \n if(activity != null){\n setActividadEditar((CalendarActivityClinica)activity);\n if(actividadEditar.getTimeType().equals(CalendarActivity.TimeType.ALLDAY)){\n setTodoElDiaEditar(true);\n }else{\n setTodoElDiaEditar(false);\n }\n setInicioEditar(actividadEditar.getStartDate(null));\n setFinEditar(actividadEditar.getEndDate(null));\n }else{\n System.out.println(\"No activity with event \" + ae.toString());\n }\n }", "@Override\n public void onActivityStarted(@NonNull final Activity activity) {\n sActivity.set(activity);\n\n if (isAccessToLocationAllowed() && mStartStopCounter.incrementAndGet() == 1)\n\n addTask(ActivityLifecycle.STARTED, new Runnable() {\n @Override\n public void run() {\n final LocationClient locationClient = getLocationClient();\n if (locationClient != null && mStartStopCounter.get() == 1) {\n\n CoreLogger.log(\"LocationClient.onStart()\");\n locationClient.onStart(activity);\n }\n }\n });\n }", "void onTaskStart();", "public void onScheduled(long scheduledTime);", "@Override\n public void onActivityCreated(Activity activity, Bundle savedInstanceState) {\n eventManager.fire(Event.ACTIVITY_ON_CREATE, activity);\n }", "public ActivityScheduler(String name, ActivityListener listener) {\n\t\tthis.name = name;\n\t\tTrackerConfig config = DefaultConfigFactory.getInstance().getConfig(name);\n\t\tif (listener != null) config.setActivityListener(listener);\n\t\tthis.logger = TrackingLogger.getInstance(config.build());\n\t\tthis.logger.setKeepThreadContext(false);\n\t}", "public void registerAppListener(Activity appActivity) {\n\t\tSmartAppListener smartAppListener = null;\n\t\tif (appActivity != null && this.mobiletManager != null) {\n\t\t\tif (appActivity instanceof SmartAppListener) {\n\t\t\t\tsmartAppListener = (SmartAppListener) appActivity;\n\t\t\t} else {\n\t\t\t\tthrow new MobiletException(ExceptionTypes.SMART_APP_LISTENER_NOT_FOUND_EXCEPTION);\n\t\t\t}\n\t\t\tthis.mobiletManager.registerAppListener(smartAppListener);\n\t\t}\n\t}", "@Override\n\tprotected void setListener() {\n\t\tsw_lv_searchschedule.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t\tif (BIntentObj.isGetClass == 1) {// 不能查看项目课表查询的数据\n\n\t\t\t\t} else {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tif (list.get(arg2 - 1).get(\"TYPE\").equals(\"2\")) {//\n\t\t\t\t\t\tIntent intent = new Intent();\n\t\t\t\t\t\tintent.putExtra(\"projectid\",\n\t\t\t\t\t\t\t\tlist.get(arg2 - 1).get(\"Id\"));\n\t\t\t\t\t\tintent.setClass(SearchScheduleActivity.this,\n\t\t\t\t\t\t\t\tSearchScheduleDetailActivity.class);\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\t}", "@Override\n public void onAttach(Activity activity)\n {\n super.onAttach(activity);\n mActivity = (PlayerActivity) activity;\n\n // Create and execute the background task.\n mTask = new PlayerBackgroundTask();\n mTask.execute();\n }", "protected void setListener(){\r\n main_list.setOnItemClickListener(new AdapterView.OnItemClickListener() {\r\n @Override\r\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\r\n activityStart(Constants.ACTIVITIES[position]);\r\n }\r\n });\r\n }", "@Override\n public void onActivityStopped(@NonNull final Activity activity) {\n if (isAccessToLocationAllowed() && mStartStopCounter.decrementAndGet() == 0)\n\n addTask(ActivityLifecycle.STOPPED, new Runnable() {\n @Override\n public void run() {\n final LocationClient locationClient = getLocationClient();\n if (locationClient != null && mStartStopCounter.get() == 0) {\n\n CoreLogger.log(\"LocationClient.onStop()\");\n locationClient.onStop(activity);\n }\n }\n });\n }", "public void setActivity(Activity activity) {\n if (activity != null) {\n service = (BleTrackerService) activity.getApplicationContext();\n }\n }", "void onActivityReady();", "@Override\n\tpublic void onAttach(Activity activity) {\n\t\tsuper.onAttach(activity);\n\t\tlistenr = (CheckStateListener) getActivity();\n\t}", "protected abstract void startListener();", "@Override\n public void onCreate() {\n super.onCreate();\n Log.d(TAG, \"onCreate\");\n cellListener = new CellListener(this);\n networkListener = new NetworkListener(this);\n cellListener.start();\n getApplicationContext().registerReceiver(\n new TimeBroadcastReceiver(this),\n new IntentFilter(\"android.intent.action.TIME_TICK\")\n );\n }", "void addListener( AvailabilityListener listener );", "public void onStartRunning();", "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {}", "@Override\n public void onReceive(Context context, Intent intent) {\n context.startService(new Intent(context, OnBootUpAlarmScheduler.class));\n }", "public void onActivityCreated(Activity activity) throws Exception {\n\t\tLogger.info(\"onActivityCreated\");\n\t}", "protected abstract void startMonitoring(fr.inria.phoenix.diasuite.framework.datatype.dailyactivityname.DailyActivityName activity) throws Exception;", "@Override\n public void onCreate() {\n super.onCreate();\n timer = new Timer();\n timer.schedule(timerTask, 0, 60000);\n }", "@Override\n public void onStart(Intent intent, int startId) {\n Log.d(TAG, \" onStart\");\n super.onStart(intent, startId);\n\n if (taskQueue == null) {\n taskQueue = new TaskQueueThread();\n taskQueue.start();\n }\n\n cellListener.start();\n }", "@Override\n public void onCreate()\n {\n Log.d(\"Service\", \"onCreate\");\n n = 1;\n myPreferences = getSharedPreferences(\"setting\", Activity.MODE_PRIVATE);\n editor = myPreferences.edit();\n load = new UpLoad(getBaseContext());\n mRequestQueue = Volley.newRequestQueue(getBaseContext());\n timer = new Timer();\n timer.schedule(new Work(),0, 4000);\n// new BroadCastUdp().start();\n super.onCreate();\n }", "private void initListener()\n {\n listenerTimer = new Timer();\n listenerTimer.schedule(new RemoteListner(this), 1000, 2000);\n }", "public void initializeTimerTask() {\n timerTask = new TimerTask() {\n @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)\n public void run() {\n Log.e(tag, \"in timer ++++ \"+ (counter++));\n usageStatsManager = (UsageStatsManager) getApplicationContext().getSystemService(\"usagestats\");\n packageManager = getApplicationContext().getPackageManager();\n UsageEvents usageEvents = usageStatsManager.queryEvents(getStartTime(), System.currentTimeMillis());\n while (usageEvents.hasNextEvent()) {\n UsageEvents.Event event = new UsageEvents.Event();\n usageEvents.getNextEvent(event);\n if (event.getEventType() == UsageEvents.Event.MOVE_TO_FOREGROUND &&\n event.getPackageName().equalsIgnoreCase(\"com.google.android.youtube\"))\n {\n handler.post(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getApplicationContext(), \"Sagar says - YouTube is Opened\", Toast.LENGTH_LONG).show();\n }\n });\n Log.e(tag, \"ACTION FOREGROUND\");\n Log.e(tag, \"PackageName \"+ event.getPackageName());\n Log.e(tag, \"timestamp \"+ new SimpleDateFormat\n (\"dd/MM/yyyy HH:mm:ss\").format(event.getTimeStamp()));\n }\n else if (event.getEventType() == UsageEvents.Event.MOVE_TO_BACKGROUND &&\n event.getPackageName().equalsIgnoreCase(\"com.google.android.youtube\"))\n {\n handler.post(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getApplicationContext(), \"Sagar says - YouTube goes in background\", Toast.LENGTH_LONG).show();\n }\n });\n Log.e(tag, \"ACTION BACKGROUND\");\n Log.e(tag, \"PackageName \"+ event.getPackageName());\n Log.e(tag, \"timestamp \"+ new SimpleDateFormat\n (\"dd/MM/yyyy HH:mm:ss\").format(event.getTimeStamp()));\n }\n }\n }\n };\n }", "@Override\r\n public void onStart(Intent intent, int startId) {\n }", "@Override\n\t\t\t\tpublic void onNewIntent(TiRootActivity activity, Intent intent)\n\t\t\t\t{\n\t\t\t\t\tTiActivity.this.onNewIntent(intent);\n\t\t\t\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {\n }", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n if (callbackManager != null) callbackManager.setActivity(activity);\n }", "@Override\n public void onStart(Intent intent, int startid) {\n }", "@Override\n\tpublic void onCreate() {\n\t\tif (mTimer != null) {\n\t\t\tmTimer.cancel();\n\t\t} else {\n\t\t\t// recreate new\n\t\t\tmTimer = new Timer();\n\t\t}\n\t\t// schedule task\n\t\tmTimer.scheduleAtFixedRate(new TimeDisplayTimerTask(), 0,\n\t\t\t\tNOTIFY_INTERVAL);\n\t}", "private void setReceiver() {\n broadcastReceiver = new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent) {\n Bundle bundle = intent.getExtras();\n update(bundle);\n }\n };\n IntentFilter filter = new IntentFilter();\n filter.addAction(RunningContract.progress);\n registerReceiver(broadcastReceiver, filter);\n }", "public void onActivation() { }", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n\n try {\n onDateListener = (OnDateListener) activity;\n } catch (ClassCastException e) {\n throw new ClassCastException(activity.toString() + \" must implement OnDateListener\");\n }\n }", "@Override\n\tpublic void onCreate() {\n\t\tcounter = 0;\n\t\tTimerTask timerTask = new TimerTask() {\n\t\t\tpublic void run() {\n\t\t\t\tcounter = counter + 1;\n\t\t\t\tLog.d(\"SvcCounter\", Integer.toString(counter));\n\t\t\t\tIntent counterValue = new Intent(\"CounterValue\");\n\n\t\t\t\tcounterValue.putExtra(\"cValue\", counter);\n\t\t\t\tsendBroadcast(counterValue);\n\t\t\t}\n\t\t};\n\t\tTimer timer = new Timer();\n\t\ttimer.schedule(timerTask, delay = 2000, period = 5000);\n\t\tsuper.onCreate();\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(\"android.intent.action.BOOT_COMPLETED\")) {\n // instatiate an alarm scheduler\n AlarmScheduler alarmScheduler = new AlarmScheduler();\n // instantiate the database\n SQLiteHelperAlarm sqLiteHelper = new SQLiteHelperAlarm(context);\n // get all the alarms stored in the database\n List<Alarm> alarms = sqLiteHelper.getAllAlarms();\n // pass each alarm to the alarmScheduler object\n for (Alarm alarm : alarms) {\n alarmScheduler.setAlarm(context, alarm);\n }\n }\n }", "@Override\n public void onCreate() {\n\n if(mTimer != null) {\n mTimer.cancel();\n } else {\n // recreate new\n mTimer = new Timer();\n }\n // schedule task\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.HOUR_OF_DAY,11);\n calendar.set(Calendar.MINUTE,00);\n calendar.set(Calendar.SECOND,0);\n calendar.set(Calendar.MILLISECOND,0);\n\n if (calendar.before(new Date())){\n calendar.add(Calendar.DAY_OF_MONTH,1);\n };\n\n //Find next weekday\n int tag = calendar.get(Calendar.DAY_OF_WEEK);\n while ((tag < 2) || (tag > 6)) {\n calendar.add(Calendar.DAY_OF_MONTH,1);\n tag = calendar.get(Calendar.DAY_OF_WEEK);\n };\n\n mTimer.scheduleAtFixedRate(new TimeDisplayTimerTask(this.getApplicationContext()),calendar.getTime(),NOTIFY_INTERVAL);\n }", "@Override\n public void onActivityResumed(@NonNull final Activity activity) {\n sActivity.set(activity);\n\n if (isAccessToLocationAllowed() && mPauseResumeCounter.incrementAndGet() == 1)\n\n addTask(ActivityLifecycle.RESUMED, new Runnable() {\n @Override\n public void run() {\n final LocationClient locationClient = getLocationClient();\n if (locationClient != null && mPauseResumeCounter.get() == 1) {\n\n CoreLogger.log(\"LocationClient.onResume()\");\n locationClient.onResume(activity);\n }\n }\n });\n }", "SetupTask(KaldiActivity activity) {\n this.activityReference = new WeakReference<>(activity);\n }", "@Override\n\t\t\tpublic void onClick(View v){\n\t\t\t\tif (receiver==null) {\n\t\t\t\t\treceiver = new myReceiver();\n\t\t\t\t\tIntentFilter filter=new IntentFilter();\n\t\t\t\t\tfilter.addAction(\"com.chris.hadoop v\");\n\t\t\t\t\tmActivity.registerReceiver(receiver, filter);\n\t\t\t\t}\n\t\t\t\tIntent intent=new Intent(getActivity(),trafficMonitorService.class);\n\t\t\t\tmActivity.startService(intent);\n\t\t\t\tToast.makeText(mActivity,\" \",Toast.LENGTH_SHORT).show();\n\t\t\t}", "private void registerListeners() {\r\n View.OnClickListener clickListener = new ButtonListener();\r\n btnStart.setOnClickListener(clickListener);\r\n btnStop.setOnClickListener(clickListener);\r\n }", "public interface AlarmListener\n{\n void wakeUp();\n}", "void onStarted();", "@Override\n protected void onCreate(Bundle pSavedInstanceState) {\n\n if (activitiesLaunched.incrementAndGet() > 1) { finish(); }\n\n super.onCreate(pSavedInstanceState);\n\n serviceIntent = new Intent(this, TallyDeviceService.class);\n\n }", "@Override\n\tprotected void onHandleIntent(final Intent intent) {\n\t\ttimeFromNow = intent.getExtras().getFloat(\"timeFromNow\");\n\t\tLog.i(\"LocalNotification\", \"scheduleNotification -> timeFromNow: \" + timeFromNow);\n \tTimer t = new Timer(); \n\t\tTimerTask task = new TimerTask() {\n\t\t\t@Override\n\t\t\tpublic void run() { \n\t\t\t\tcreateNotif(intent);\n\t\t\t}\n\t\t};\n\t\tt.schedule(task, (long) (timeFromNow*1000));\n\t}", "public interface RunActionRunningListener\n{\n public static RunActionRunningListener[] EMPTY_ARRAY = {};\n public static Class THIS_CLASS = RunActionRunningListener.class;\n\n /**\n * called when test runner availability changes\n * @param isRunning\n */\n public void onRunActionRunnerAvailabilityChange(boolean isRunning);\n}", "public interface ActivityRecognitionListener {\n void updateDetectedActivitiesList(ArrayList<DetectedActivity> updatedActivities);\n}", "public void onReceive(Context context, Intent intent)\n {\n ComponentName componentName = new ComponentName(context, BootService.class);\n JobInfo jInfo = new JobInfo.Builder(1, componentName).setMinimumLatency(1000).build();\n\n JobScheduler jScheduler = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);\n jScheduler.schedule(jInfo); //Schedulo il servizio\n\n //Log.i(\"MagazzinoDomestico\", \"Scheduler lanciato\");\n }", "public interface OnTaskLoadRunningAppListener {\n void onTaskLoading(AppInfo appInfo, int sizeList);\n void onTaskLoading(AppInfo appInfo);\n void onTaskLoaded(List<AppInfo> list);\n}", "@Override\n public void onAttach(Activity activity)\n {\n super.onAttach(activity);\n // Verify that the host activity implements the callback interface\n try\n {\n // Instantiate the RestartGameDialogListener so we can send events\n // to the host\n mListener = (RestartGameDialogListener)activity;\n }\n catch (ClassCastException e)\n {\n throw new ClassCastException(activity.toString()\n + \" must implement RestartGameDialogListener\");\n }\n }", "public interface OnTaskClickedListener {\n\n void taskOpened(int taskId);\n}", "@Override\r\n\tpublic void onAttach(Activity activity) {\n\t\tsuper.onAttach(activity);\r\n\t\tmActivity = activity;\r\n\t\tstartAppAd = new StartAppAd(activity);\r\n\t}", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n\n Log.v(TAG, \"on attach\");\n callback = (Callback)activity;\n }", "protected void activeActivity() {\n\t\tLog.i(STARTUP, \"active activity\");\n\t\tcheckActiveActivity();\n\t}", "private void setListener() {\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tonIntentClass(activity, MainActivity.class, true);\n\t\t\t}", "@SuppressWarnings(\"deprecation\")\n @Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n callEvents = (MesiboVideoCallFragment.OnCallEvents) activity;\n }", "@Override\n protected void onStart() {\n super.onStart();\n mFetchChatRoomListUseCase.registerListener(this);\n }", "public interface ISEActivityAttatcher {\n void onCreate(Bundle savedInstanceState);\n void onStart();\n void onRestart();\n void onResume();\n void onPause();\n void onStop();\n void onDestroy();\n void onActivityResult(int requestCode, int resultCode, Intent data);\n boolean isRecyled();\n}", "@Override\n public void onClick(final View v) {\n listener.onClickSchedule(a);\n }", "@Override\n\tprotected void onResume() {\n\t\t super.onResume();\n\t\t registerReceiver(timerec, new IntentFilter(\"in.ac.srmuniv.displaytime\"));\n\t}", "public void onStarted(long startedTime);", "public ActivityRecognitionListener(String name) {\n super(name);\n }", "public void mo34037a() {\n if (this.f30043c == 0) {\n this.f30042b.registerReceiver(this, new IntentFilter(\"android.net.conn.CONNECTIVITY_CHANGE\"));\n }\n this.f30043c++;\n }", "private void setOnClickListener() {\n listener = new RecyclerAdapter.RecyclerViewClickListener() {\n @Override\n public void onClick(View v, int position) {\n // Clean sweeps are stopped.\n stopRepeatingDeletionSearch();\n\n // Intent to go to New Reminder is created.\n Intent resultIntent = new Intent(getApplicationContext(),NewReminder.class);\n\n // createNewReminderBundle creates a new bundle containing all the necessary information to recreate the New Reminder activity.\n resultIntent.putExtras(createNewReminderBundle(position));\n\n // New Reminder activity is started.\n startActivityForResult(resultIntent,1);\n }\n };\n }", "public void setListener(final Activity activity, final AdvancedWebviewListener listener,\n final int requestCodeFilePicker) {\n if (activity != null) {\n mActivity = new WeakReference<Activity>(activity);\n } else {\n mActivity = null;\n }\n\n setListener(listener, requestCodeFilePicker);\n }", "@Override\n public void run()\n {\n Intent intent = new Intent(context, NotifyService.class);\n intent.putExtra(NotifyService.INTENT_NOTIFY, true);\n intent.putExtra(\"REMINDER\", showInfo);\n PendingIntent pendingIntent = PendingIntent.getService(context, 0, intent, 0);\n\n boolean alarmUp = (PendingIntent.getBroadcast(context, 0,\n new Intent(\"is.activites.scheduleActivites.INTENT_NOTIFY\"),\n PendingIntent.FLAG_NO_CREATE) != null);\n\n // Sets an alarm - note this alarm will be lost if the phone is turned off and on again\n if(!alarmUp) am.set(AlarmManager.RTC_WAKEUP, date.getTimeInMillis(), pendingIntent);\n }", "@Override\n protected void onResume() {\n super.onResume();\n Log.d(TAG, \"onResume: Registering for broadcasts\");\n placesBroadcastReceiver = new PlacesBroadcastReceiver(this, this); //we are a place broadcast listener\n AppEventsLogger.activateApp(this);\n }", "@SuppressWarnings({\"unchecked\", \"deprecation\", \"all\"})\npublic static interface OnActivityStopListener {\n\n/**\n * See Activity's onStop.\n */\n\npublic void onActivityStop();\n}", "@Override\n public void onCreate() {\n this.rand = randomWithRange(MIN,MAX);\n if (mTimer != null) {\n mTimer.cancel();\n } else {\n // recreate new\n mTimer = new Timer();\n }\n // schedule task\n mTimer.scheduleAtFixedRate(new TimeDisplayTimerTask(), 0, NOTIFY_INTERVAL);\n\n //shellExecuter = new ShellExecuter();\n }", "public void createActivity(Activity activity) {\n\t\t\n\t}", "public interface TeamTaskListener {\n\n /**查询不到对应的任务*/\n int NO_SUCH_NAME_TEAM_TASK = 1 ;\n /**电量过低*/\n int BATTERY_TO_LOW = 2 ;\n\n /**开始队伍的辅助线*/\n void onStartTeamLine(String teamName);\n /**开始收队*/\n void onTeamTaskStart(String teamName) ;\n /**收队进度条*/\n void onTeamTaskSchedule(String teamName,float percent) ;\n /**完成一个收队*/\n void onTeamTaskComplete(String teamName) ;\n\n /**任务失败*/\n void onFail(String teamName,int failCode, String failMessage) ;\n\n /**完成全部收队*/\n void onAllTeamTaskComplete() ;\n}", "@Override\n\tpublic void setActivity(Activity pAcitivity) {\n\n\t}", "ConferenceScheduleBuilderService startEvent();", "@Override\n public void onClick(View v) {\n startHourlyActivity();\n }", "public interface FirstRunActivityObserver {\n /** See {@link #createPostNativeAndPoliciesPageSequence}. */\n void onCreatePostNativeAndPoliciesPageSequence(FirstRunActivity caller);\n\n /** See {@link #acceptTermsOfService}. */\n void onAcceptTermsOfService(FirstRunActivity caller);\n\n /** See {@link #setCurrentItemForPager}. */\n void onJumpToPage(FirstRunActivity caller, int position);\n\n /** Called when First Run is completed. */\n void onUpdateCachedEngineName(FirstRunActivity caller);\n\n /** See {@link #abortFirstRunExperience}. */\n void onAbortFirstRunExperience(FirstRunActivity caller);\n\n /** See {@link #exitFirstRun()}. */\n void onExitFirstRun(FirstRunActivity caller);\n }", "public void attachListener(TaskListener listener) {\n this.mListener = listener;\n }", "public int addListener(Value listener) {\n\n IApplication adapter = new IApplication() {\n private boolean execute(Value jsObject, String memberName, Object... args) {\n if (jsObject == null)\n return true;\n Value member = jsObject.getMember(memberName);\n if (member == null) {\n return true;\n }\n Value result = plugin.executeInContext(member, app);\n return result != null && result.isBoolean() ? result.asBoolean() : true;\n }\n\n @Override\n public boolean appStart(IScope app) {\n return execute(listener, \"appStart\", app);\n }\n\n @Override\n public boolean appConnect(IConnection conn, Object[] params) {\n return execute(listener, \"appConnect\", conn, params);\n }\n\n @Override\n public boolean appJoin(IClient client, IScope app) {\n return execute(listener, \"appJoin\", client, app);\n }\n\n @Override\n public void appDisconnect(IConnection conn) {\n execute(listener, \"appDisconnect\", conn);\n }\n\n @Override\n public void appLeave(IClient client, IScope app) {\n execute(listener, \"appLeave\", client, app);\n }\n\n @Override\n public void appStop(IScope app) {\n execute(listener, \"appStop\", app);\n }\n\n @Override\n public boolean roomStart(IScope room) {\n return execute(listener, \"roomStart\", room);\n }\n\n @Override\n public boolean roomConnect(IConnection conn, Object[] params) {\n return execute(listener, \"roomConnect\", conn, params);\n }\n\n @Override\n public boolean roomJoin(IClient client, IScope room) {\n return execute(listener, \"roomJoin\", client, room);\n }\n\n @Override\n public void roomDisconnect(IConnection conn) {\n execute(listener, \"roomDisconnect\", conn);\n }\n\n @Override\n public void roomLeave(IClient client, IScope room) {\n execute(listener, \"roomLeave\", client, room);\n }\n\n @Override\n public void roomStop(IScope room) {\n execute(listener, \"roomStop\", room);\n }\n };\n this.app.addListener(adapter);\n this.listeners.add(adapter);\n return this.listeners.indexOf(adapter);\n }", "void doActivity();", "public void onStart() {\n super.onStart();\n ApplicationStateMonitor.getInstance().activityStarted();\n }", "@Override\n\tpublic void onActivityCreated(Bundle arg0) {\n\t\tsuper.onActivityCreated(arg0);\n\t}", "public interface AutoServiceRunningCallBack {\n void call();\n}", "@OnLifecycleEvent(Lifecycle.Event.ON_START)\n public void onMoveToForeground() {\n Log.i(\"AppLifecycleListener\", \"Foreground\");\n\n }", "public static void schedule(Context context, Intent intent, long triggerAtMillis) {\n /**\n * PendingIntent.getBroadcast\n *\n * PendingIntent.FLAG_UPDATE_CURRENT\n *\n * */\n PendingIntent p = PendingIntent.getBroadcast(context, 1, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n alarmManager.set(AlarmManager.RTC_WAKEUP, triggerAtMillis, p);\n //Log.i(TAG, \"ALARME com data/hora definido\");\n }", "private void m22002a() {\n if (!this.f23836h) {\n this.f23835g = mo24758a(this.f23833e);\n try {\n this.f23833e.registerReceiver(this.f23837i, new IntentFilter(\"android.net.conn.CONNECTIVITY_CHANGE\"));\n this.f23836h = true;\n } catch (SecurityException e) {\n String str = \"ConnectivityMonitor\";\n if (Log.isLoggable(str, 5)) {\n Log.w(str, \"Failed to register\", e);\n }\n }\n }\n }", "public void activityCreated(Context ctx){\n //set Activity context - in this case there is only MainActivity\n mActivityContext = ctx;\n }", "@Override\n\tpublic void onStart(Intent intent, int startId) {\n\t\tSystem.out.println(\"onSTART\");\n\t\thandleIntent(intent);\n\t}", "void register(NotificationListener<ObservableIntentServiceNotificationType> notificationStrategy);", "public interface OnResumeListener {\n void onResume();\n}", "@Override\n public void onChanged(@Nullable final List<Task> words) {\n adapter.setTasks(words);\n\n int startTime = 0;\n int endTime = 24;\n if (betweenTwoTimes(startTime, endTime) && adapter.getItemCount() != 0)\n {\n Intent intent_service = new Intent(getApplicationContext(), TimerService.class);\n intent_service.setFlags(FLAG_ACTIVITY_NEW_TASK);\n startService(intent_service);\n }\n else\n {\n Intent intent_service = new Intent(getApplicationContext(), TimerService.class);\n intent_service.setFlags(FLAG_ACTIVITY_NEW_TASK);\n stopService(intent_service);\n }\n\n }", "public TabListener(Activity activity, String tag, Class<T> clz) {\n\t mActivity = activity;\n\t mTag = tag;\n\t mClass = clz;\n\t }", "public SpaceAlarmPhoneStateListener(Context context) {\r\n\t\tthis.context = context;\r\n\t}", "public AirLineListener() {\r\n\r\n }", "public void addListener(SchedulerListener toAdd) {\n\t\tlisteners.add(toAdd);\n\t}", "public interface ITimerTaskListener {\n /**\n * 具体要执行的定时任务\n * 此方法在子线程中\n * 变化UI的话,请切换到主线程\n */\n void onTimer();\n}", "public void startListener(){\n new Thread(() -> this.run()).start();\n }" ]
[ "0.6285621", "0.6206065", "0.6190164", "0.617292", "0.59209996", "0.58991176", "0.5842455", "0.58322453", "0.57101095", "0.57018", "0.5682161", "0.56721973", "0.5663645", "0.5650523", "0.5645978", "0.563239", "0.5619762", "0.56112725", "0.56019896", "0.55984545", "0.5595802", "0.5590378", "0.5571751", "0.5567406", "0.5567195", "0.55455893", "0.5535414", "0.55174845", "0.55150574", "0.5511459", "0.55089456", "0.55061543", "0.550051", "0.54859364", "0.54835594", "0.5482931", "0.5462079", "0.5451872", "0.54441124", "0.54331255", "0.54294366", "0.5429018", "0.5424617", "0.5423211", "0.54219985", "0.5420651", "0.54137087", "0.54101187", "0.54018605", "0.5388411", "0.5382356", "0.5379175", "0.5378496", "0.5369993", "0.5369672", "0.5364418", "0.5355176", "0.5341678", "0.53413016", "0.53402185", "0.5327254", "0.53229713", "0.5322305", "0.53085506", "0.5305004", "0.53045905", "0.5291634", "0.5278539", "0.5275303", "0.527451", "0.5273191", "0.52639097", "0.52620745", "0.5260577", "0.5250624", "0.52391267", "0.5237013", "0.5235893", "0.5228553", "0.5227732", "0.5221359", "0.52192444", "0.52143896", "0.5213534", "0.5212217", "0.5208954", "0.5199435", "0.51976854", "0.5196558", "0.5195224", "0.51879764", "0.5186014", "0.5181174", "0.51810056", "0.51780313", "0.5175058", "0.51736313", "0.51708955", "0.51668584", "0.5160953" ]
0.62577605
1
Get an activity listener used when scheduled activity starts/stops
public ActivityListener getListener() { return logger.getConfiguration().getActivityListener(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ActivityScheduler setListener(ActivityListener listener) {\n\t\tlogger.getConfiguration().setActivityListener(listener);\n\t\treturn this;\n\t}", "public ActivityStartEventFactory getActivityStartEventFactory() {\n return activityStartEventFactory;\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState){\n\t\tmStart.setOnClickListener(new OnClickListener(){\n\t\t\t@Override\n\t\t\tpublic void onClick(View v){\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (receiver==null) {\n\t\t\t\t\treceiver = new myReceiver();\n\t\t\t\t\tIntentFilter filter=new IntentFilter();\n\t\t\t\t\tfilter.addAction(\"com.chris.hadoop v\");\n\t\t\t\t\tmActivity.registerReceiver(receiver, filter);\n\t\t\t\t}\n\t\t\t\tIntent intent=new Intent(getActivity(),trafficMonitorService.class);\n\t\t\t\tmActivity.startService(intent);\n\t\t\t\tToast.makeText(mActivity,\" \",Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t});\n\t\tmStop.setOnClickListener(new OnClickListener(){\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v){\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (receiver!=null) {\n\t\t\t\t\tmActivity.unregisterReceiver(receiver);\n\t\t\t\t\treceiver=null;\n\t\t\t\t}\n\t\t\t\tIntent intent=new Intent(mActivity,trafficMonitorService.class);\n\t\t\t\tmActivity.stopService(intent);\n\t\t\t\tToast.makeText(mActivity, \"ֹͣ\",Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "public void InitListener()\n {\n Intent listener = new Intent(this, SmsListener.class);\n listener.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startService(listener);\n }", "public ActivityScheduler(String name, ActivityListener listener) {\n\t\tthis.name = name;\n\t\tTrackerConfig config = DefaultConfigFactory.getInstance().getConfig(name);\n\t\tif (listener != null) config.setActivityListener(listener);\n\t\tthis.logger = TrackingLogger.getInstance(config.build());\n\t\tthis.logger.setKeepThreadContext(false);\n\t}", "public interface RunActionRunningListener\n{\n public static RunActionRunningListener[] EMPTY_ARRAY = {};\n public static Class THIS_CLASS = RunActionRunningListener.class;\n\n /**\n * called when test runner availability changes\n * @param isRunning\n */\n public void onRunActionRunnerAvailabilityChange(boolean isRunning);\n}", "public void onScheduled(long scheduledTime);", "ScheduledEvents getScheduledEvents();", "public void activityListener(CalendarActivityEvent ae){\n CalendarActivity activity = ae.getCalendarActivity();\n \n if(activity != null){\n setActividadEditar((CalendarActivityClinica)activity);\n if(actividadEditar.getTimeType().equals(CalendarActivity.TimeType.ALLDAY)){\n setTodoElDiaEditar(true);\n }else{\n setTodoElDiaEditar(false);\n }\n setInicioEditar(actividadEditar.getStartDate(null));\n setFinEditar(actividadEditar.getEndDate(null));\n }else{\n System.out.println(\"No activity with event \" + ae.toString());\n }\n }", "public void initializeTimerTask() {\n timerTask = new TimerTask() {\n @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)\n public void run() {\n Log.e(tag, \"in timer ++++ \"+ (counter++));\n usageStatsManager = (UsageStatsManager) getApplicationContext().getSystemService(\"usagestats\");\n packageManager = getApplicationContext().getPackageManager();\n UsageEvents usageEvents = usageStatsManager.queryEvents(getStartTime(), System.currentTimeMillis());\n while (usageEvents.hasNextEvent()) {\n UsageEvents.Event event = new UsageEvents.Event();\n usageEvents.getNextEvent(event);\n if (event.getEventType() == UsageEvents.Event.MOVE_TO_FOREGROUND &&\n event.getPackageName().equalsIgnoreCase(\"com.google.android.youtube\"))\n {\n handler.post(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getApplicationContext(), \"Sagar says - YouTube is Opened\", Toast.LENGTH_LONG).show();\n }\n });\n Log.e(tag, \"ACTION FOREGROUND\");\n Log.e(tag, \"PackageName \"+ event.getPackageName());\n Log.e(tag, \"timestamp \"+ new SimpleDateFormat\n (\"dd/MM/yyyy HH:mm:ss\").format(event.getTimeStamp()));\n }\n else if (event.getEventType() == UsageEvents.Event.MOVE_TO_BACKGROUND &&\n event.getPackageName().equalsIgnoreCase(\"com.google.android.youtube\"))\n {\n handler.post(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getApplicationContext(), \"Sagar says - YouTube goes in background\", Toast.LENGTH_LONG).show();\n }\n });\n Log.e(tag, \"ACTION BACKGROUND\");\n Log.e(tag, \"PackageName \"+ event.getPackageName());\n Log.e(tag, \"timestamp \"+ new SimpleDateFormat\n (\"dd/MM/yyyy HH:mm:ss\").format(event.getTimeStamp()));\n }\n }\n }\n };\n }", "public LightAlarmDeviceListener getAlarmListener() {\n return alarmListener;\n }", "protected ScllActivity iGetActivity() {\n\t\treturn (ScllActivity) getActivity();\n\t}", "public interface AlarmListener\n{\n void wakeUp();\n}", "void onTaskStart();", "public int addListener(Value listener) {\n\n IApplication adapter = new IApplication() {\n private boolean execute(Value jsObject, String memberName, Object... args) {\n if (jsObject == null)\n return true;\n Value member = jsObject.getMember(memberName);\n if (member == null) {\n return true;\n }\n Value result = plugin.executeInContext(member, app);\n return result != null && result.isBoolean() ? result.asBoolean() : true;\n }\n\n @Override\n public boolean appStart(IScope app) {\n return execute(listener, \"appStart\", app);\n }\n\n @Override\n public boolean appConnect(IConnection conn, Object[] params) {\n return execute(listener, \"appConnect\", conn, params);\n }\n\n @Override\n public boolean appJoin(IClient client, IScope app) {\n return execute(listener, \"appJoin\", client, app);\n }\n\n @Override\n public void appDisconnect(IConnection conn) {\n execute(listener, \"appDisconnect\", conn);\n }\n\n @Override\n public void appLeave(IClient client, IScope app) {\n execute(listener, \"appLeave\", client, app);\n }\n\n @Override\n public void appStop(IScope app) {\n execute(listener, \"appStop\", app);\n }\n\n @Override\n public boolean roomStart(IScope room) {\n return execute(listener, \"roomStart\", room);\n }\n\n @Override\n public boolean roomConnect(IConnection conn, Object[] params) {\n return execute(listener, \"roomConnect\", conn, params);\n }\n\n @Override\n public boolean roomJoin(IClient client, IScope room) {\n return execute(listener, \"roomJoin\", client, room);\n }\n\n @Override\n public void roomDisconnect(IConnection conn) {\n execute(listener, \"roomDisconnect\", conn);\n }\n\n @Override\n public void roomLeave(IClient client, IScope room) {\n execute(listener, \"roomLeave\", client, room);\n }\n\n @Override\n public void roomStop(IScope room) {\n execute(listener, \"roomStop\", room);\n }\n };\n this.app.addListener(adapter);\n this.listeners.add(adapter);\n return this.listeners.indexOf(adapter);\n }", "public OnApplicationStatusUpdateListener getOnRunnerStatusUpdateListener() {\n return listener;\n }", "public void onStartRunning();", "public interface OnTaskLoadRunningAppListener {\n void onTaskLoading(AppInfo appInfo, int sizeList);\n void onTaskLoading(AppInfo appInfo);\n void onTaskLoaded(List<AppInfo> list);\n}", "@Override\n public void onActivityStopped(@NonNull final Activity activity) {\n if (isAccessToLocationAllowed() && mStartStopCounter.decrementAndGet() == 0)\n\n addTask(ActivityLifecycle.STOPPED, new Runnable() {\n @Override\n public void run() {\n final LocationClient locationClient = getLocationClient();\n if (locationClient != null && mStartStopCounter.get() == 0) {\n\n CoreLogger.log(\"LocationClient.onStop()\");\n locationClient.onStop(activity);\n }\n }\n });\n }", "@SuppressWarnings({\"unchecked\", \"deprecation\", \"all\"})\npublic static interface OnActivityStopListener {\n\n/**\n * See Activity's onStop.\n */\n\npublic void onActivityStop();\n}", "private static StatusListener getListener() {\n StatusListener statusListener = new StatusListener () {\n @Override\n public void onException(Exception e) {\n }\n\n public void onStatus(Status status) {\n reply(status);\n }\n\n @Override\n public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {\n }\n\n @Override\n public void onTrackLimitationNotice(int i) {\n }\n\n @Override\n public void onScrubGeo(long l, long l1) {\n }\n\n @Override\n public void onStallWarning(StallWarning stallWarning) {\n }\n\n };\n return statusListener;\n }", "public interface OnCallingListener {\n void onCallEnd();\n}", "public interface BroadcastListener {\n void broadcastIdAdded(String groupId);\n\n void broadcastMemberAdded(String result, String resultType);\n\n void broadcastDeleteResponse(String response);\n\n void broadcastRemoveMemberResponse(String response);\n\n void broadcastInfoUpdatedResponse(String response);\n}", "public interface AutoServiceRunningCallBack {\n void call();\n}", "abstract BtServiceListener getBtListener();", "protected abstract void startListener();", "@Override\n public void onActivityCreated(Activity activity, Bundle savedInstanceState) {\n eventManager.fire(Event.ACTIVITY_ON_CREATE, activity);\n }", "public interface OnTaskClickedListener {\n\n void taskOpened(int taskId);\n}", "public void onReceive(Context context, Intent intent)\n {\n ComponentName componentName = new ComponentName(context, BootService.class);\n JobInfo jInfo = new JobInfo.Builder(1, componentName).setMinimumLatency(1000).build();\n\n JobScheduler jScheduler = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);\n jScheduler.schedule(jInfo); //Schedulo il servizio\n\n //Log.i(\"MagazzinoDomestico\", \"Scheduler lanciato\");\n }", "@Override\n public void onActivityStarted(@NonNull final Activity activity) {\n sActivity.set(activity);\n\n if (isAccessToLocationAllowed() && mStartStopCounter.incrementAndGet() == 1)\n\n addTask(ActivityLifecycle.STARTED, new Runnable() {\n @Override\n public void run() {\n final LocationClient locationClient = getLocationClient();\n if (locationClient != null && mStartStopCounter.get() == 1) {\n\n CoreLogger.log(\"LocationClient.onStart()\");\n locationClient.onStart(activity);\n }\n }\n });\n }", "@Override\n\tpublic void onAttach(Activity activity) {\n\t\tsuper.onAttach(activity);\n\t\tlistenr = (CheckStateListener) getActivity();\n\t}", "public interface TeamTaskListener {\n\n /**查询不到对应的任务*/\n int NO_SUCH_NAME_TEAM_TASK = 1 ;\n /**电量过低*/\n int BATTERY_TO_LOW = 2 ;\n\n /**开始队伍的辅助线*/\n void onStartTeamLine(String teamName);\n /**开始收队*/\n void onTeamTaskStart(String teamName) ;\n /**收队进度条*/\n void onTeamTaskSchedule(String teamName,float percent) ;\n /**完成一个收队*/\n void onTeamTaskComplete(String teamName) ;\n\n /**任务失败*/\n void onFail(String teamName,int failCode, String failMessage) ;\n\n /**完成全部收队*/\n void onAllTeamTaskComplete() ;\n}", "public interface WFEventListener extends ActivityInsEventListener, ProcessInsEventListener {\r\n\r\n /**\r\n * called when a timer event is fired;\r\n */\r\n public void onTimerEvent();\r\n\r\n public void addECAList(ECAList list);\r\n\r\n}", "public interface ActivityRecognitionListener {\n void updateDetectedActivitiesList(ArrayList<DetectedActivity> updatedActivities);\n}", "public interface WorkflowExecutionListener {}", "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {}", "public void registerAppListener(Activity appActivity) {\n\t\tSmartAppListener smartAppListener = null;\n\t\tif (appActivity != null && this.mobiletManager != null) {\n\t\t\tif (appActivity instanceof SmartAppListener) {\n\t\t\t\tsmartAppListener = (SmartAppListener) appActivity;\n\t\t\t} else {\n\t\t\t\tthrow new MobiletException(ExceptionTypes.SMART_APP_LISTENER_NOT_FOUND_EXCEPTION);\n\t\t\t}\n\t\t\tthis.mobiletManager.registerAppListener(smartAppListener);\n\t\t}\n\t}", "public static synchronized ActivityTaskManager getInstance() {\n if (sInstance == null) {\n sInstance = new ActivityTaskManager();\n }\n return sInstance;\n }", "@Override\n public List<ReportingMessage> onActivityCreated(Activity activity, Bundle bundle) {\n merchant.trackIncomingIntent(applicationContext, activity.getIntent());\n return null;\n }", "public interface MyBroadcastListener {\n void receivedBroadcast();\n }", "public interface LifecycleEventListener {\n\n /**\n * Called when host (activity/service) receives resume event (e.g. {@link Activity#onResume}\n */\n void onHostResume();\n\n /**\n * Called when host (activity/service) receives pause event (e.g. {@link Activity#onPause}\n */\n void onHostPause();\n\n /**\n * Called when host (activity/service) receives destroy event (e.g. {@link Activity#onDestroy}\n */\n void onHostDestroy();\n\n}", "ConferenceScheduleBuilderService startEvent();", "@Override\n public void onCreate() {\n super.onCreate();\n Log.d(TAG, \"onCreate\");\n cellListener = new CellListener(this);\n networkListener = new NetworkListener(this);\n cellListener.start();\n getApplicationContext().registerReceiver(\n new TimeBroadcastReceiver(this),\n new IntentFilter(\"android.intent.action.TIME_TICK\")\n );\n }", "public Listener getListener() {\n return listener;\n }", "public interface Listener {\n\n public void onRecievedCustomBroadCast(String msg);\n}", "@Override\n public void onStart(Intent intent, int startid) {\n }", "@SuppressWarnings(\"deprecation\")\n\torg.ogema.core.resourcemanager.ResourceListener getListener();", "@Override\r\n public void onStart(Intent intent, int startId) {\n }", "public Activity poll();", "@Override\n\tprotected void onHandleIntent(final Intent intent) {\n\t\ttimeFromNow = intent.getExtras().getFloat(\"timeFromNow\");\n\t\tLog.i(\"LocalNotification\", \"scheduleNotification -> timeFromNow: \" + timeFromNow);\n \tTimer t = new Timer(); \n\t\tTimerTask task = new TimerTask() {\n\t\t\t@Override\n\t\t\tpublic void run() { \n\t\t\t\tcreateNotif(intent);\n\t\t\t}\n\t\t};\n\t\tt.schedule(task, (long) (timeFromNow*1000));\n\t}", "public static Intent getIntent(Context context) {\n Intent intent = new Intent(context, WifiSchedulerDialog.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);\n return intent;\n }", "public interface ISEActivityAttatcher {\n void onCreate(Bundle savedInstanceState);\n void onStart();\n void onRestart();\n void onResume();\n void onPause();\n void onStop();\n void onDestroy();\n void onActivityResult(int requestCode, int resultCode, Intent data);\n boolean isRecyled();\n}", "public interface Listener {\n void onConnected(CallAppAbilityConnection callAppAbilityConnection);\n\n void onDisconnected(CallAppAbilityConnection callAppAbilityConnection);\n\n void onReleased(CallAppAbilityConnection callAppAbilityConnection);\n }", "public interface ITimerTaskListener {\n /**\n * 具体要执行的定时任务\n * 此方法在子线程中\n * 变化UI的话,请切换到主线程\n */\n void onTimer();\n}", "public interface OnArrivalListener {\n void onDestinationArrived();\n}", "private void initListener()\n {\n listenerTimer = new Timer();\n listenerTimer.schedule(new RemoteListner(this), 1000, 2000);\n }", "public interface OnGetLiveStreamProgramsListener {\n void onGetLiveStreamProgramsSuccess(SCLiveStream stream, SCLiveStreamPrograms programs);\n void onGetLiveStreamProgramsFailed(SCFailLog reason);\n}", "public void onStarted(long startedTime);", "@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(\"android.intent.action.BOOT_COMPLETED\")) {\n // instatiate an alarm scheduler\n AlarmScheduler alarmScheduler = new AlarmScheduler();\n // instantiate the database\n SQLiteHelperAlarm sqLiteHelper = new SQLiteHelperAlarm(context);\n // get all the alarms stored in the database\n List<Alarm> alarms = sqLiteHelper.getAllAlarms();\n // pass each alarm to the alarmScheduler object\n for (Alarm alarm : alarms) {\n alarmScheduler.setAlarm(context, alarm);\n }\n }\n }", "private String getRunningActivityName(){\n ActivityManager activityManager=(ActivityManager) getContext().getSystemService(Context.ACTIVITY_SERVICE);\n String runningActivity=activityManager.getRunningTasks(1).get(0).topActivity.getClassName();\n return runningActivity;\n }", "public interface ITimerListener {\n void onTimer();\n}", "public interface ServiceListener {\r\n\t\tpublic void startService(String s);\r\n\r\n\t\tpublic void stopNotification();\r\n\t}", "protected abstract void startMonitoring(fr.inria.phoenix.diasuite.framework.datatype.dailyactivityname.DailyActivityName activity) throws Exception;", "void onActivityReady();", "public ArrayList getTaskListeners(){\n initListener();\n return listeners;\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n context.startService(new Intent(context, OnBootUpAlarmScheduler.class));\n }", "private InterstitialViewListener getInterstitialViewListener() {\n return (InterstitialViewListener) WhiteBox.getInternalState(mInterstitialController, \"mInterstitialViewListener\");\n }", "ServerScheduledEvent getServerScheduledEvent();", "public interface FirstRunActivityObserver {\n /** See {@link #createPostNativeAndPoliciesPageSequence}. */\n void onCreatePostNativeAndPoliciesPageSequence(FirstRunActivity caller);\n\n /** See {@link #acceptTermsOfService}. */\n void onAcceptTermsOfService(FirstRunActivity caller);\n\n /** See {@link #setCurrentItemForPager}. */\n void onJumpToPage(FirstRunActivity caller, int position);\n\n /** Called when First Run is completed. */\n void onUpdateCachedEngineName(FirstRunActivity caller);\n\n /** See {@link #abortFirstRunExperience}. */\n void onAbortFirstRunExperience(FirstRunActivity caller);\n\n /** See {@link #exitFirstRun()}. */\n void onExitFirstRun(FirstRunActivity caller);\n }", "public ActivityRecognitionListener(String name) {\n super(name);\n }", "void addListener( AvailabilityListener listener );", "Activity activity();", "@Override\n public void onCreate() {\n\n if(mTimer != null) {\n mTimer.cancel();\n } else {\n // recreate new\n mTimer = new Timer();\n }\n // schedule task\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.HOUR_OF_DAY,11);\n calendar.set(Calendar.MINUTE,00);\n calendar.set(Calendar.SECOND,0);\n calendar.set(Calendar.MILLISECOND,0);\n\n if (calendar.before(new Date())){\n calendar.add(Calendar.DAY_OF_MONTH,1);\n };\n\n //Find next weekday\n int tag = calendar.get(Calendar.DAY_OF_WEEK);\n while ((tag < 2) || (tag > 6)) {\n calendar.add(Calendar.DAY_OF_MONTH,1);\n tag = calendar.get(Calendar.DAY_OF_WEEK);\n };\n\n mTimer.scheduleAtFixedRate(new TimeDisplayTimerTask(this.getApplicationContext()),calendar.getTime(),NOTIFY_INTERVAL);\n }", "@Override\n\tpublic void onCreate() {\n\t\tcounter = 0;\n\t\tTimerTask timerTask = new TimerTask() {\n\t\t\tpublic void run() {\n\t\t\t\tcounter = counter + 1;\n\t\t\t\tLog.d(\"SvcCounter\", Integer.toString(counter));\n\t\t\t\tIntent counterValue = new Intent(\"CounterValue\");\n\n\t\t\t\tcounterValue.putExtra(\"cValue\", counter);\n\t\t\t\tsendBroadcast(counterValue);\n\t\t\t}\n\t\t};\n\t\tTimer timer = new Timer();\n\t\ttimer.schedule(timerTask, delay = 2000, period = 5000);\n\t\tsuper.onCreate();\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {\n }", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n\n try {\n onDateListener = (OnDateListener) activity;\n } catch (ClassCastException e) {\n throw new ClassCastException(activity.toString() + \" must implement OnDateListener\");\n }\n }", "public interface OnResumeListener {\n void onResume();\n}", "@Override\n\tpublic void onCreate() {\n\t\tif (mTimer != null) {\n\t\t\tmTimer.cancel();\n\t\t} else {\n\t\t\t// recreate new\n\t\t\tmTimer = new Timer();\n\t\t}\n\t\t// schedule task\n\t\tmTimer.scheduleAtFixedRate(new TimeDisplayTimerTask(), 0,\n\t\t\t\tNOTIFY_INTERVAL);\n\t}", "public interface BroadCastManagerCallerInterface {\n /**\n * **\n * This method is called when an intent Has Been ReceivedT hrough The BroadCast\n * @param intent This is the intent that was received\n */\n void intentHasBeenReceivedThroughTheBroadCast(Intent intent);\n}", "@Override\r\n\tpublic int onStartCommand(Intent intent, int flags, int startId) {\n\t\tBundle b = intent.getExtras();\r\n\t\tint id = 0;\r\n\r\n\t\tif ((id = b.getInt(AlarmFactory.ARG_NEWS_ID, -1)) >= 0) {\r\n\t\t\t// Toast.makeText(this, \"\"+id, Toast.LENGTH_SHORT).show();\r\n\t\t\tnew UpdateSourceTask(this, handler).execute(id, UpdateSourceTask.ALARM_TRIGER);\r\n\r\n\t\t}\r\n\t\treturn mStartMode;\r\n\t}", "public interface ActivityAware<E> {\r\n E getContextActivity();\r\n}", "public interface BackgroundForegroundDelegate {\n\n void onBackground();\n\n void onForeground();\n}", "void onStarted();", "@Override\n public void onStart(Intent intent, int startId) {\n Log.d(TAG, \" onStart\");\n super.onStart(intent, startId);\n\n if (taskQueue == null) {\n taskQueue = new TaskQueueThread();\n taskQueue.start();\n }\n\n cellListener.start();\n }", "public interface EventListener {\n\n\t/**\n\t * Called when a task event has occurred.\n\t * \n\t * @param event\n\t * the task event which has occurred\n\t */\n\tvoid eventOccurred(AbstractTaskEvent event);\n}", "public interface GetHistoryNewsListener {\n void onGetHistoryNewsSuccess(HistoryNews historyNews);\n\n void onGetHistoryNewsFailed();\n}", "public interface ITaskThreadStateChangedListener {\r\n void TaskThreadStateChanged(TaskThreadState previousState, TaskThreadState newState);\r\n}", "void onListeningStarted();", "public interface CallListener {\r\n void onCallTapListener(int position);\r\n}", "void onServiceBegin(int taskCode);", "public String getListener(int i)\r\n { return this.history.get(i).listener;\r\n }", "@Override\n\tprotected void setListener() {\n\t\tsw_lv_searchschedule.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t\tif (BIntentObj.isGetClass == 1) {// 不能查看项目课表查询的数据\n\n\t\t\t\t} else {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tif (list.get(arg2 - 1).get(\"TYPE\").equals(\"2\")) {//\n\t\t\t\t\t\tIntent intent = new Intent();\n\t\t\t\t\t\tintent.putExtra(\"projectid\",\n\t\t\t\t\t\t\t\tlist.get(arg2 - 1).get(\"Id\"));\n\t\t\t\t\t\tintent.setClass(SearchScheduleActivity.this,\n\t\t\t\t\t\t\t\tSearchScheduleDetailActivity.class);\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\t}", "public void onActivation() { }", "TimerStatus onTimer();", "public interface RoomListener {\n\n /**\n * Notification method names\n */\n public static final String METHOD_PARTICIPANT_JOINED = \"participantJoined\";\n public static final String METHOD_PARTICIPANT_PUBLISHED = \"participantPublished\";\n public static final String METHOD_PARTICIPANT_UNPUBLISHED = \"participantUnpublished\";\n public static final String METHOD_ICE_CANDIDATE = \"iceCandidate\";\n public static final String METHOD_PARTICIPANT_LEFT = \"participantLeft\";\n public static final String METHOD_SEND_MESSAGE = \"sendMessage\";\n public static final String METHOD_MEDIA_ERROR = \"mediaError\";\n\n //room 返回response\n void onRoomResponse(RoomResponse roomResponse);\n\n //当前房间发生错误\n void onRoomError(RoomError roomError);\n\n //接到房间中的notification\n void onRoomNotification(RoomNotification roomNotification);\n\n //与当前房间的连接已建立\n void onRoomConnected();\n\n //与当前房间的连接已断开\n void onRoomDisconnected();\n\n}", "@Override\n public void onAttach(Activity activity)\n {\n super.onAttach(activity);\n mActivity = (PlayerActivity) activity;\n\n // Create and execute the background task.\n mTask = new PlayerBackgroundTask();\n mTask.execute();\n }", "@Override\n\tpublic int onStartCommand(Intent intent, int flags, int startId) {\n\t\tsuper.onStartCommand(intent, flags, startId);\n\t\tif (mApplication != null) {\n\t\t\tmApplication.startWatchingObservers();\n\t\t}\n\t\treturn START_STICKY;\n\t}", "@Override\n protected void onCreate(Bundle pSavedInstanceState) {\n\n if (activitiesLaunched.incrementAndGet() > 1) { finish(); }\n\n super.onCreate(pSavedInstanceState);\n\n serviceIntent = new Intent(this, TallyDeviceService.class);\n\n }", "@Override\n public void onCreate() {\n HandlerThread thread = new HandlerThread(\"ServiceStartArguments\", THREAD_PRIORITY_BACKGROUND);\n thread.start();\n Log.d(\"LOG19\", \"DiscoveryService onCreate\");\n\n this.mLocalBroadCastManager = LocalBroadcastManager.getInstance(this);\n // Get the HandlerThread's Looper and use it for our Handler\n mServiceLooper = thread.getLooper();\n\n mServiceHandler = new ServiceHandler(mServiceLooper);\n }", "public ActivityManager getManager() {\r\n return manager;\r\n }" ]
[ "0.5697059", "0.5631008", "0.56107694", "0.5568216", "0.54805475", "0.54537964", "0.54285663", "0.535913", "0.53514117", "0.5348136", "0.5343254", "0.5293409", "0.52743274", "0.52549946", "0.5218919", "0.5215091", "0.5213697", "0.5162312", "0.5160056", "0.5151145", "0.51476276", "0.51265264", "0.5112507", "0.5112364", "0.5091717", "0.50730413", "0.505624", "0.50506455", "0.50348574", "0.5032079", "0.5023594", "0.5020641", "0.501795", "0.50090784", "0.5007118", "0.49992615", "0.49951723", "0.49857044", "0.4979557", "0.49777317", "0.49746564", "0.4973026", "0.49703962", "0.49697882", "0.4966248", "0.49371594", "0.4929401", "0.49290726", "0.49279493", "0.4918957", "0.49179238", "0.49155924", "0.49138123", "0.4904614", "0.49018738", "0.49018183", "0.4897313", "0.48915815", "0.48846573", "0.48843265", "0.48798376", "0.4879716", "0.48754856", "0.4864253", "0.48602638", "0.485868", "0.48449174", "0.4836997", "0.4836481", "0.48345006", "0.48299196", "0.48221198", "0.48169762", "0.4803254", "0.47983617", "0.4797428", "0.47921208", "0.4780714", "0.47805664", "0.47797674", "0.4779291", "0.4777489", "0.47764075", "0.47664967", "0.47619012", "0.47591823", "0.4756574", "0.47524905", "0.4752368", "0.4752072", "0.4746905", "0.47415882", "0.4740392", "0.4734367", "0.4730274", "0.47302034", "0.4729163", "0.4715125", "0.4714995", "0.47113308" ]
0.66580474
0
Schedule activity with a specified period in milliseconds
public void schedule(long period) { schedule("ActivityTask", period, period, TimeUnit.MILLISECONDS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void schedule() {\n service.scheduleDelayed(task, schedulingInterval);\n isScheduled = true;\n }", "public void schedule(Runnable job, long delay, TimeUnit unit);", "public void schedule(String name, long period) {\n\t\tschedule(name, period, period, TimeUnit.MILLISECONDS);\n\t}", "public void schedule(String name, long initialDelay, long period, TimeUnit tunit, OpLevel severity) {\n\t\tif (future == null || future.isCancelled()) {\n\t\t\tactivityTask = newActivityTask(logger, name, severity);\n\t\t\tfuture = scheduler.scheduleAtFixedRate(activityTask, initialDelay, period, tunit);\n\t\t} else {\n\t\t\tthrow new IllegalStateException(\"Already scheduled\");\n\t\t}\n\t}", "public void schedule(String name, long period, TimeUnit tunit) {\n\t\tschedule(name, period, period, TimeUnit.MILLISECONDS);\n\t}", "public static void scheduleRepeatingElapsedNotification15(Context context) {\n\n\n // Setting intent to class where notification will be handled\n Intent intent = new Intent(context, AlarmReceiver.class);\n\n // Setting pending intent to respond to broadcast sent by AlarmManager everyday at 8am\n alarmIntentElapsed = PendingIntent.getBroadcast(context, ALARM_TYPE_ELAPSED, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Getting instance of AlarmManager service\n alarmManagerElapsed = (AlarmManager)context.getSystemService(ALARM_SERVICE);\n\n // Daily inexact alarm from phone boot - current set to test for 10 seconds\n alarmManagerElapsed.setInexactRepeating(AlarmManager.ELAPSED_REALTIME, SystemClock.elapsedRealtime(), 60000 * 15, alarmIntentElapsed);\n }", "public void scheduleAlarm() {\n\n Calendar cal = Calendar.getInstance();\n Intent alarmIntent = new Intent(context, PeriodicTransactionService.class);\n alarmIntent.setAction(PeriodicTransactionService.ACTION);\n Bundle bundle = new Bundle();\n bundle.putInt(PeriodicTransactionService.USER_ID_PARAM, userId);\n alarmIntent.putExtras(bundle);\n PendingIntent pintent = PendingIntent.getService(context,\n MyAlarmManager.REQUEST_CODE,\n alarmIntent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n AlarmManager alarm = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n alarm.setInexactRepeating(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), 4 * 1000, pintent);\n }", "public static void scheduleRepeatingElapsedNotification60(Context context) {\n\n\n // Setting intent to class where notification will be handled\n Intent intent = new Intent(context, AlarmReceiver.class);\n\n // Setting pending intent to respond to broadcast sent by AlarmManager everyday at 8am\n alarmIntentElapsed = PendingIntent.getBroadcast(context, ALARM_TYPE_ELAPSED, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Getting instance of AlarmManager service\n alarmManagerElapsed = (AlarmManager)context.getSystemService(ALARM_SERVICE);\n\n // Daily inexact alarm from phone boot - current set to test for 10 seconds\n alarmManagerElapsed.setInexactRepeating(AlarmManager.ELAPSED_REALTIME, SystemClock.elapsedRealtime(), 60000 * 60, alarmIntentElapsed);\n }", "private void sleepByScheduleTime() throws InterruptedException\n\t{\n\t\tjava.util.Calendar calendar = java.util.Calendar.getInstance();\n\t\tcalendar.setTime(new java.util.Date(System.currentTimeMillis()));\n\t\tint currHour = calendar.get(calendar.HOUR_OF_DAY);\n\t\tif ((24 - currHour) * 60 < 2 * FtpData.SCHEDULE_TIME)\n\t\t{\n\t\t\tsleep((FtpData.SCHEDULE_TIME + 1) * 60000); // 00h:01\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsleep(FtpData.SCHEDULE_TIME * 60000); // n * minutes;\n\t\t}\n\t}", "public synchronized void start(long period){\n\t\ttickHandle = scheduler.scheduleAtFixedRate(tickTask, 0, period, TimeUnit.MILLISECONDS);\t \n\t}", "public static void scheduleRepeatingElapsedNotification30(Context context) {\n\n // Setting intent to class where notification will be handled\n Intent intent = new Intent(context, AlarmReceiver.class);\n\n // Setting pending intent to respond to broadcast sent by AlarmManager everyday at 8am\n alarmIntentElapsed = PendingIntent.getBroadcast(context, ALARM_TYPE_ELAPSED, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Getting instance of AlarmManager service\n alarmManagerElapsed = (AlarmManager)context.getSystemService(ALARM_SERVICE);\n\n // Daily inexact alarm from phone boot - current set to test for 10 seconds\n alarmManagerElapsed.setInexactRepeating(AlarmManager.ELAPSED_REALTIME, SystemClock.elapsedRealtime(), 60000 * 30, alarmIntentElapsed);\n }", "public void schedule(String name, long initialDelay, long period, TimeUnit tunit) {\n\t\tschedule(name, period, period, tunit, opLevel);\n\t}", "private void scheduleNotification(Notification notification) {\n\n Intent notificationIntent2 = new Intent(MainActivity.this, NotificationPublisher.class);\n notificationIntent2.putExtra(NotificationPublisher.NOTIFICATION_ID, 1);\n notificationIntent2.putExtra(NotificationPublisher.NOTIFICATION, notification);\n PendingIntent pendingIntent2 = PendingIntent.getBroadcast(MainActivity.this, 0, notificationIntent2, PendingIntent.FLAG_UPDATE_CURRENT);\n Date date = new Date();\n\n Calendar calnoti = Calendar.getInstance();\n calnoti.setTime(date);\n\n calnoti.set(Calendar.HOUR_OF_DAY, mHour-1);\n calnoti.set(Calendar.MINUTE, mMin);\n calnoti.set(Calendar.SECOND, 0);\n calnoti.set(Calendar.YEAR,mYear);\n calnoti.set(Calendar.MONTH,mMonth);\n calnoti.set(Calendar.DAY_OF_MONTH,mDay);\n //long futureInMillis2 = SystemClock.elapsedRealtime() + delay;\n AlarmManager alarmManager2 = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n alarmManager2.set(AlarmManager.RTC_WAKEUP, calnoti.getTimeInMillis(), pendingIntent2);\n }", "public void scheduleAlarm() {\n Intent intent = new Intent(getApplicationContext(), MyAlarmReceiver.class);\n\n // Create a PendingIntent to be triggered when the alarm goes off\n final PendingIntent pendingIntent = PendingIntent.getBroadcast(this, MyAlarmReceiver.REQUEST_CODE, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n long firstMillis = System.currentTimeMillis(); // alarm is set right away\n\n AlarmManager alarm = (AlarmManager) this.getSystemService(Context.ALARM_SERVICE);\n\n // First parameter is the type: ELAPSED_REAL_TIME, ELAPSED_REAL_TIME_WAKEUP, RTC_WAKEUP\n // Interval can be INTERVAL_FIFTEEN_MINUTES, INTERVAL_HALF_HOUR, INTERVAL_HOUR, INTERVAL_DAY\n try {\n alarm.setInexactRepeating(AlarmManager.RTC_WAKEUP, firstMillis, 5000L, pendingIntent);\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n\n }", "public static void schedule(Context context, Intent intent, long triggerAtMillis) {\n /**\n * PendingIntent.getBroadcast\n *\n * PendingIntent.FLAG_UPDATE_CURRENT\n *\n * */\n PendingIntent p = PendingIntent.getBroadcast(context, 1, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n alarmManager.set(AlarmManager.RTC_WAKEUP, triggerAtMillis, p);\n //Log.i(TAG, \"ALARME com data/hora definido\");\n }", "@Scheduled(fixedRate = 2000)\n\tpublic void scheduleTaskWithFixedRate() {\n\t\tlog.info(\"Fixed Rate Task :: Execution Time - {}\", dateTimeFormatter.format(LocalDateTime.now()) );\n\t}", "@Scheduled(fixedDelay = 3000)\n\tpublic void scheduleTaskWithFixedDelay() {\n\t\tlog.info(\"Fixed Delay Task :: Execution Time - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t\t//Sleep TimeUnit\n//\t\ttry {\n//\t\t\tTimeUnit.SECONDS.sleep(5);\n//\t\t} catch (Exception e) {\n//\t\t\tlog.error(\"Ran into an error {}\", e);\n//\t throw new IllegalStateException(e);\n//\t\t}\n\t}", "public static void scheduleRepeatingElapsedNotification45(Context context) {\n\n\n // Setting intent to class where notification will be handled\n Intent intent = new Intent(context, AlarmReceiver.class);\n\n // Setting pending intent to respond to broadcast sent by AlarmManager everyday at 8am\n alarmIntentElapsed = PendingIntent.getBroadcast(context, ALARM_TYPE_ELAPSED, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Getting instance of AlarmManager service\n alarmManagerElapsed = (AlarmManager)context.getSystemService(ALARM_SERVICE);\n\n // Daily inexact alarm from phone boot - current set to test for 10 seconds\n alarmManagerElapsed.setInexactRepeating(AlarmManager.ELAPSED_REALTIME, SystemClock.elapsedRealtime(), 60000 * 45, alarmIntentElapsed);\n }", "private void beginSchedule(){\n\t\tDivaApp.getInstance().submitScheduledTask(new RandomUpdater(this), RandomUpdater.DELAY, RandomUpdater.PERIOD);\n\t}", "@Override\n public void schedulePeriodicNotification(Context context, long time, String title, String text, int period) {\n Notification notification = new Notification(title, text, new Date(time), Long.toString(time));\n notification.setNotificationID(notificationId);\n notification.setRequestCode(requestCode);\n user.addNotification(notification);\n Intent intent = new Intent(context, NotificationReceiver.class);\n intent.putExtra(getString(R.string.title), title);\n intent.putExtra(getString(R.string.text), text);\n intent.putExtra(getString(R.string.notificationid), Integer.toString(notificationId));\n notificationId++;\n PendingIntent pending = PendingIntent.getBroadcast(context, requestCode, intent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n requestCode++;\n AlarmManager manager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n assert manager != null;\n manager.setInexactRepeating(AlarmManager.RTC_WAKEUP, time,\n AlarmManager.INTERVAL_DAY*period, pending);\n }", "@Scheduled(cron = \"0/20 * * * * *\")\n public void scheduleTaskSecond() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 20 Second - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "public void scheduleAlarm() {\n Log.v(getClass().getSimpleName(), \"Scheduling alarm\");\n\n // Construct an intent that will execute the AlarmReceiver\n Intent intent = new Intent(getApplicationContext(), AlarmReceiver.class);\n\n // Create a PendingIntent to be triggered when the alarm goes off\n final PendingIntent pIntent = PendingIntent.getBroadcast(this, AlarmReceiver.REQUEST_CODE,\n intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Setup periodic alarm every every half hour from this point onwards\n long firstMillis = System.currentTimeMillis(); // alarm is set right away\n AlarmManager alarm = (AlarmManager) this.getSystemService(Context.ALARM_SERVICE);\n\n // First parameter is the type: ELAPSED_REALTIME, ELAPSED_REALTIME_WAKEUP, RTC_WAKEUP\n // Interval can be INTERVAL_FIFTEEN_MINUTES, INTERVAL_HALF_HOUR, INTERVAL_HOUR, INTERVAL_DAY\n alarm.setInexactRepeating(AlarmManager.RTC_WAKEUP, firstMillis,\n AlarmManager.INTERVAL_FIFTEEN_MINUTES, pIntent);\n }", "public void schedule() {\n cancel();\n timer.schedule(new TimerTask() {\n @Override\n public void run() {\n runnable.run();\n }\n }, delay);\n }", "void scheduleTask(long delay) {\n executorService.schedule(\n backgroundTask, delay, TimeUnit.MILLISECONDS);\n }", "public synchronized void scheduleTick(long deltat){\n\t\tscheduler.schedule(tickTask, deltat, TimeUnit.MILLISECONDS);\n\t}", "public ScheduledFuture<?> schedule(Runnable task, long delay, long period) {\n return executor.scheduleWithFixedDelay(task, delay, period, TimeUnit.MILLISECONDS);\n }", "void schedule(long delay, TimeUnit unit) {\r\n\t\tthis.delay = delay;\r\n\t\tthis.unit = unit;\r\n\t\tif (monitor != null) {\r\n\t\t\tmonitor.cancel(false);\r\n\t\t\tmonitor = pool.scheduleWithFixedDelay(sync, delay, delay, unit);\r\n\t\t}\r\n\t}", "public void onScheduled(long scheduledTime);", "TimerSchedule createTimerSchedule();", "public static void syncTimer(long period, Run runnable) {\n\t\tnew BukkitRunnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\trunnable.run();\n\t\t\t}\n\t\t}.runTaskTimer(AreaShop.getInstance(), 0, period);\n\t}", "public void schedule() {\n\t\tnew Timer().schedule(getTask(), TIME);\n\t}", "ScheduledFuture<?> scheduleAtFixedRate(Runnable publisher, long period, TimeUnit timeUnit, ProbeLevel probeLevel);", "public static void scheduleRestartOfService(Context context)\n\t{\n\t\tCalendar cal = Calendar.getInstance();\n\t\t// add frequency hours to the calendar object\n\t\tcal.add(Calendar.HOUR, 24);\n\t\t//cal.add(Calendar.MINUTE, 5);\n\n\t\tPendingIntent pendingIntent = PendingIntent.getService(context, 0, \n\t\t\t\tnew Intent(\"org.bewellapp.ServiceControllers.BestSleepLib.BestSleepComputationService\"), PendingIntent.FLAG_CANCEL_CURRENT);\n\n\t\t// Get the AlarmManager service\n\t\tAlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n\t\tam.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), pendingIntent);\n\t}", "static void scheduleWork(final boolean shortInterval) {\n if (shortInterval) {\n _cancelWork(false);\n //PPApplication.sleep(5000);\n _scheduleWork(true);\n\n /*PPApplication.startHandlerThreadPPScanners();\n final Handler __handler = new Handler(PPApplication.handlerThreadPPScanners.getLooper());\n __handler.post(() -> {\n// PPApplicationStatic.logE(\"[IN_THREAD_HANDLER] PPApplication.startHandlerThreadPPScanners\", \"START run - from=SearchCalendarEventsWorker.scheduleWork\" + \" shortInterval=true\");\n _cancelWork();\n PPApplication.sleep(5000);\n _scheduleWork(true);\n });*/\n }\n else\n _scheduleWork(false);\n }", "public void scheduleNotification(Context context, long delay, int notificationId, Pills p) {\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context, \"pills\")\n .setContentTitle(p.getName())\n .setContentText(\"Não se esqueça de tomar o seu \"+ p.getName() + \" às \" + p.getTime())\n .setAutoCancel(true)\n .setSmallIcon(R.mipmap.logo)\n .setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION))\n .setPriority(NotificationCompat.PRIORITY_DEFAULT);\n\n Intent intent = new Intent(context, c.getClass());\n PendingIntent activity = PendingIntent.getActivity(context, notificationId, intent, PendingIntent.FLAG_CANCEL_CURRENT);\n builder.setContentIntent(activity);\n\n Notification notification = builder.build();\n\n Intent notificationIntent = new Intent(context, MyNotificationPublisher.class);\n notificationIntent.putExtra(MyNotificationPublisher.NOTIFICATION_ID, notificationId);\n notificationIntent.putExtra(MyNotificationPublisher.NOTIFICATION, notification);\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, notificationId, notificationIntent, PendingIntent.FLAG_CANCEL_CURRENT);\n\n long futureInMillis = SystemClock.elapsedRealtime() + delay;\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n alarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, futureInMillis, pendingIntent);\n Log.d(ContentValues.TAG, \"Scheduling\");\n }", "public void run(){\n Timer time = new Timer(); // Instantiate Timer Object\n\n ScheduledClass st = new ScheduledClass(this.job,this.shm,time,this.stopp); // Instantiate SheduledTask class\n time.schedule(st, 0, this.periodicwait); // Create Repetitively task for every 1 secs\n }", "public void saveScheduleManagement(Runnable task, LocalTime timePoint, Integer period, TimeUnit timeUnit) {\n LOGGER.info(\"START UP SAVE SCHEDULE MANAGEMENT.\");\n if (checkTodayCurrencyListInDb()) {\n saveCurrencyListToDb();\n ScheduledExecutorService service = Executors.newSingleThreadScheduledExecutor();\n service.scheduleAtFixedRate(task, calculateTimeBeforeStart(timePoint), period, timeUnit);\n } else {\n ScheduledExecutorService service = Executors.newSingleThreadScheduledExecutor();\n service.scheduleAtFixedRate(task, calculateTimeBeforeStart(timePoint), period, timeUnit);\n }\n }", "private void schedule(PlanRecord plan, Context context) {\n Date d = null;\n\n try {\n DateTime test = new DateTime();\n test.setStringSQL(plan.offset);\n d = test.getYearMonthDay();\n } catch (java.text.ParseException e) {\n Log.e(\"PlanReceiver-schedule\", \"Couldn't schedule \" + plan.name + \"\\n e:\" + e);\n e.printStackTrace();\n }\n\n Log.e(\"PlanReceiver-schedule\", \"d.year=\" + (d.getYear() + 1900) + \" d.date=\" + d.getDate() + \" d.month=\" + d.getMonth());\n\n Calendar firstRun = new GregorianCalendar(d.getYear() + 1900, d.getMonth(), d.getDate());\n Log.e(\"PlanReceiver-schedule\", \"FirstRun:\" + firstRun);\n\n Intent intent = new Intent(context, PlanReceiver.class);\n intent.putExtra(\"plan_id\", plan.id);\n intent.putExtra(\"plan_acct_id\", plan.acctId);\n intent.putExtra(\"plan_name\", plan.name);\n intent.putExtra(\"plan_value\", plan.value);\n intent.putExtra(\"plan_type\", plan.type);\n intent.putExtra(\"plan_category\", plan.category);\n intent.putExtra(\"plan_memo\", plan.memo);\n intent.putExtra(\"plan_offset\", plan.offset);\n intent.putExtra(\"plan_rate\", plan.rate);\n intent.putExtra(\"plan_next\", plan.next);\n intent.putExtra(\"plan_scheduled\", plan.scheduled);\n intent.putExtra(\"plan_cleared\", plan.cleared);\n\n //Parse Rate (token 0 is amount, token 1 is type)\n final String phrase = plan.rate;\n final String[] tokens = phrase.split(\"[ ]+\");\n\n final PendingIntent sender = PendingIntent.getBroadcast(context, Integer.parseInt(plan.id), intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n //Get the AlarmManager service\n final AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n\n final Locale locale = context.getResources().getConfiguration().locale;\n final DateTime nextRun = new DateTime();\n\n if (tokens[1].contains(\"Days\")) {\n Log.d(\"PlanReceiver-schedule\", \"Days\");\n\n //If Starting Time is in the past, fire off next day(s)\n while (firstRun.before(Calendar.getInstance())) {\n firstRun.add(Calendar.DAY_OF_MONTH, Integer.parseInt(tokens[0]));\n }\n\n Log.d(\"PlanReceiver-schedule\", \"firstRun is \" + firstRun);\n\n nextRun.setCalendar(firstRun);\n\n ContentValues planValues = new ContentValues();\n planValues.put(DatabaseHelper.PLAN_NEXT, nextRun.getSQLDate(locale));\n context.getContentResolver().update(Uri.parse(MyContentProvider.PLANS_URI + \"/\" + plan.id), planValues, DatabaseHelper.PLAN_ID + \"=\" + plan.id, null);\n\n am.setRepeating(AlarmManager.RTC_WAKEUP, firstRun.getTimeInMillis(), (Integer.parseInt(tokens[0]) * AlarmManager.INTERVAL_DAY), sender);\n } else if (tokens[1].contains(\"Weeks\")) {\n Log.d(\"PlanReceiver-schedule\", \"Weeks\");\n\n //If Starting Time is in the past, fire off next week(s)\n while (firstRun.before(Calendar.getInstance())) {\n firstRun.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(tokens[0]));\n }\n\n Log.d(\"PlanReceiver-schedule\", \"firstRun is \" + firstRun);\n\n nextRun.setCalendar(firstRun);\n\n ContentValues planValues = new ContentValues();\n planValues.put(DatabaseHelper.PLAN_NEXT, nextRun.getSQLDate(locale));\n context.getContentResolver().update(Uri.parse(MyContentProvider.PLANS_URI + \"/\" + plan.id), planValues, DatabaseHelper.PLAN_ID + \"=\" + plan.id, null);\n\n am.setRepeating(AlarmManager.RTC_WAKEUP, firstRun.getTimeInMillis(), (Integer.parseInt(tokens[0]) * AlarmManager.INTERVAL_DAY) * 7, sender);\n } else if (tokens[1].contains(\"Months\")) {\n Log.d(\"PlanReceiver-schedule\", \"Months\");\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(cal.getTimeInMillis());\n cal.add(Calendar.MONTH, Integer.parseInt(tokens[0]));\n\n //If Starting Time is in the past, fire off next month(s)\n while (firstRun.before(Calendar.getInstance())) {\n firstRun.add(Calendar.MONTH, Integer.parseInt(tokens[0]));\n }\n\n Log.d(\"PlanReceiver-schedule\", \"firstRun is \" + firstRun);\n\n nextRun.setCalendar(firstRun);\n\n ContentValues planValues = new ContentValues();\n planValues.put(DatabaseHelper.PLAN_NEXT, nextRun.getSQLDate(locale));\n context.getContentResolver().update(Uri.parse(MyContentProvider.PLANS_URI + \"/\" + plan.id), planValues, DatabaseHelper.PLAN_ID + \"=\" + plan.id, null);\n\n am.setRepeating(AlarmManager.RTC_WAKEUP, firstRun.getTimeInMillis(), cal.getTimeInMillis(), sender);\n } else {\n Log.e(\"PlanReceiver-schedule\", \"Could not set alarm; Something wrong with the rate\");\n }\n\n }", "@Override\n public void teleopPeriodic() {\n \tbeginPeriodic();\n Scheduler.getInstance().run();\n endPeriodic();\n }", "@WithName(\"schedule.delay\")\n @WithDefault(\"5s\")\n Duration scheduleDelay();", "@Scheduled(cron = \"0 0 9-17 * * MON-FRI\")\n\tpublic void scheduleTaskWeekly() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 9 - 17 O'clock Every Weekdays - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "void schedule(ScheduledJob job);", "@Scheduled(fixedRate = 2000, initialDelay = 5000)\n\tpublic void scheduleTaskWithInitialDelay() {\n\t\tlog.info(\"Fixed Rate Task With Initial Delay :: Execution Time - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "@Scheduled(cron = \"0 0 8-10 * * *\")\n\tpublic void scheduleTaskHourly() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 8 - 10 O'clock Every Day - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "public static void syncTimer(long period, RunResult<Boolean> runnable) {\n\t\tnew BukkitRunnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tif(!runnable.run()) {\n\t\t\t\t\tthis.cancel();\n\t\t\t\t}\n\t\t\t}\n\t\t}.runTaskTimer(AreaShop.getInstance(), 0, period);\n\t}", "public void scheduleAlarm()\n {\n hour = timePicker.getCurrentHour(); //get hour\n minute = timePicker.getCurrentMinute(); //get minutes\n alarmMgr = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n Intent intent = new Intent(getApplicationContext(), AlarmReceiver.class);\n alarmIntent = PendingIntent.getBroadcast(getApplicationContext(), 0, intent, 0);\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(System.currentTimeMillis());\n calendar.set(Calendar.HOUR_OF_DAY, hour);\n calendar.set(Calendar.MINUTE, minute);\n\n alarmMgr.setInexactRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),\n AlarmManager.INTERVAL_DAY, alarmIntent);\n Toast.makeText(this, \"Alarm scheduled for \" + hour + \":\" + minute, Toast.LENGTH_SHORT).show();\n\n }", "public abstract void schedule();", "@Override\n public void autonomousPeriodic() {\n \tbeginPeriodic();\n Scheduler.getInstance().run();\n endPeriodic();\n }", "@Scheduled(fixedRate = 2000, initialDelay = 5000)\n public void scheduleTaskWithInitialDelay() {\n logger.info(\"Fixed Rate Task with Initial Delay :: Execution Time - {}\", formatter.format(LocalDateTime.now()));\n }", "private static void timerTest4() {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.set(Calendar.HOUR_OF_DAY, 14);\n\t\tcalendar.set(Calendar.MINUTE, 20);\n\t\tcalendar.set(Calendar.SECOND, 0);\n\t\tDate time = calendar.getTime();\n\n\t\tTimer timer = new Timer();\n\t\tSystem.out.println(\"wait ....\");\n\t\ttimer.scheduleAtFixedRate(new TimerTask() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.out.println(\"timertest4\");\n\n\t\t\t}\n\t\t}, time, 24 * 60 * 60 * 1000);\n\n\t}", "public void autonomousPeriodic() \n {\n Scheduler.getInstance().run();\n }", "public void startAlarm() {\n AlarmManager manager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n\n Calendar calendar = Calendar.getInstance();\n\n // Set alarm only if the remained time is over 10 minutes\n if (time >10 ) {\n //TODO: Change to ((time * 60000) - 600000) for 10 minutes before\n calendar.setTimeInMillis((System.currentTimeMillis() + ((time * 1000)) - 10000)); // Alarm set to 10 sec before the booking\n\n Log.d(TAG, \"current time = \" + new Date().toLocaleString());\n// Log.d(TAG, \"current time = \" + System.currentTimeMillis());\n Log.d(TAG, \"Alarm set at = \" + calendar.getTime());\n\n /* no Repeat */\n manager.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),\n 0, pendingIntent);\n }\n\n }", "@Override\n public void autonomousPeriodic() {\n \n Scheduler.getInstance().run();\n \n }", "@Scheduled(cron = \"0 0 10 17 8 ?\")\n\tpublic void scheduleTaskYearly() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 10:00 o'clock in 17 August - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "public <T> ValueFuture<T> schedule(Callable<T> job, long delay, TimeUnit unit);", "public void startScheduling() {\n new Thread(new Runnable() {\n public void run() {\n while(true) {\n try {\n Thread.sleep(30000);\n Calendar c = Calendar.getInstance();\n int min = c.get(Calendar.MINUTE);\n if (((min % 10) == 0) || (min == 0)) {\n boolean action = getLightOnWhenMovementDetectedSchedule().getCurrentSchedule();\n if (action) {\n configureSwitchOnWhenMovement(true);\n } else {\n configureSwitchOnWhenMovement(false);\n }\n action = getLightSchedule().getCurrentSchedule();\n if (action) {\n switchOn();\n } else {\n switchOff();\n }\n saveHistoryData();\n }\n Thread.sleep(30000);\n } catch (InterruptedException e) {\n return;\n } catch (RemoteHomeConnectionException e) {\n e.printStackTrace();\n } catch (RemoteHomeManagerException e) {\n e.printStackTrace();\n }\n }\n }\n }).start(); \n }", "public Schedule(Date startTime, long repeatAfter, TimeUnit unit) {\n\t\tsuper();\n\t\tthis.startTime = startTime == null ? new Date() : startTime;\n\t\tthis.repeatAfter = repeatAfter;\n\t\tthis.unit = unit;\n\t}", "public void reapet(int interval) {\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(System.currentTimeMillis());\n defineAlartRepeat(calendar, interval, AlarmManager.ELAPSED_REALTIME_WAKEUP);\n }", "public void setInterval(int anInterval)\n{\n // Set interval\n _interval = anInterval;\n \n // If timer present, change interval\n if(_timer!=null)\n _timer.setDelay(_interval);\n}", "void restartEventsWithDelay(final boolean longDelay, final boolean alsoRescan, final boolean unblockEventsRun,\n final int logType)\n {\n if (longDelay) {\n\n Data workData = new Data.Builder()\n .putBoolean(PhoneProfilesService.EXTRA_ALSO_RESCAN, alsoRescan)\n .putBoolean(PhoneProfilesService.EXTRA_UNBLOCK_EVENTS_RUN, unblockEventsRun)\n .putInt(PhoneProfilesService.EXTRA_LOG_TYPE, logType)\n .build();\n\n OneTimeWorkRequest restartEventsWithDelayWorker;\n restartEventsWithDelayWorker =\n new OneTimeWorkRequest.Builder(RestartEventsWithDelayWorker.class)\n .addTag(RestartEventsWithDelayWorker.WORK_TAG_2)\n .setInputData(workData)\n .setInitialDelay(15, TimeUnit.SECONDS)\n .build();\n try {\n if (PPApplicationStatic.getApplicationStarted(true, true)) {\n WorkManager workManager = PPApplication.getWorkManagerInstance();\n if (workManager != null) {\n\n// //if (PPApplicationStatic.logEnabled()) {\n// ListenableFuture<List<WorkInfo>> statuses;\n// statuses = workManager.getWorkInfosForUniqueWork(RestartEventsWithDelayWorker.WORK_TAG);\n// try {\n// List<WorkInfo> workInfoList = statuses.get();\n// } catch (Exception ignored) {\n// }\n// //}\n\n// PPApplicationStatic.logE(\"[WORKER_CALL] DataWrapper.restartEventsWithDelay\", \"xxx\");\n //workManager.enqueue(restartEventsWithDelayWorker);\n //if (replace)\n workManager.enqueueUniqueWork(RestartEventsWithDelayWorker.WORK_TAG_2, ExistingWorkPolicy.REPLACE, restartEventsWithDelayWorker);\n //else\n // workManager.enqueueUniqueWork(RestartEventsWithDelayWorker.WORK_TAG_APPEND, ExistingWorkPolicy.APPEND_OR_REPLACE, restartEventsWithDelayWorker);\n }\n }\n } catch (Exception e) {\n PPApplicationStatic.recordException(e);\n }\n } else {\n// PPApplicationStatic.logE(\"[EXECUTOR_CALL] ***** DataWrapper.restartEventsWithDelay\", \"schedule\");\n\n final Context appContext = context.getApplicationContext();\n //final ScheduledExecutorService worker = Executors.newSingleThreadScheduledExecutor();\n Runnable runnable = () -> {\n// long start = System.currentTimeMillis();\n// PPApplicationStatic.logE(\"[IN_EXECUTOR] ***** DataWrapper.restartEventsWithDelay\", \"--------------- START\");\n\n PowerManager powerManager = (PowerManager) appContext.getSystemService(Context.POWER_SERVICE);\n PowerManager.WakeLock wakeLock = null;\n try {\n if (powerManager != null) {\n wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, PPApplication.PACKAGE_NAME + \":DataWrapper_restartEventsWithDelay\");\n wakeLock.acquire(10 * 60 * 1000);\n }\n\n //PPExecutors.doRestartEventsWithDelay(alsoRescan, unblockEventsRun, logType, context);\n\n DataWrapper dataWrapper = new DataWrapper(appContext, false, 0, false, 0, 0, 0f);\n if (logType != PPApplication.ALTYPE_UNDEFINED)\n PPApplicationStatic.addActivityLog(appContext, logType, null, null, \"\");\n //dataWrapper.restartEvents(unblockEventsRun, true, true, false);\n dataWrapper.restartEventsWithRescan(alsoRescan, unblockEventsRun, false, false, true, false);\n //dataWrapper.invalidateDataWrapper();\n\n\n// long finish = System.currentTimeMillis();\n// long timeElapsed = finish - start;\n// PPApplicationStatic.logE(\"[IN_EXECUTOR] ***** DataWrapper.restartEventsWithDelay\", \"--------------- END - timeElapsed=\"+timeElapsed);\n } catch (Exception e) {\n// PPApplicationStatic.logE(\"[IN_EXECUTOR] PPApplication.startHandlerThread\", Log.getStackTraceString(e));\n PPApplicationStatic.recordException(e);\n } finally {\n if ((wakeLock != null) && wakeLock.isHeld()) {\n try {\n wakeLock.release();\n } catch (Exception ignored) {\n }\n }\n //worker.shutdown();\n }\n };\n PPApplicationStatic.createDelayedEventsHandlerExecutor();\n PPApplication.delayedEventsHandlerExecutor.schedule(runnable, 5, TimeUnit.SECONDS);\n }\n }", "public void teleopPeriodic() {\r\n\t\tScheduler.getInstance().run();\r\n\t}", "private void scheduleRecurringTasks() {\n\t\t//created directories expected by the system to exist\n\t\tUtil.initializeDataDirectories();\n\n\t\tTestManager.initializeTests();\n\n\t\t// Gets all the periodic tasks and runs them.\n\t\t// If you need to create a new periodic task, add another enum instance to PeriodicTasks.PeriodicTask\n\t\tSet<PeriodicTasks.PeriodicTask> periodicTasks = EnumSet.allOf(PeriodicTasks.PeriodicTask.class);\n\t\tfor (PeriodicTasks.PeriodicTask task : periodicTasks) {\n\t\t\tif (R.IS_FULL_STAREXEC_INSTANCE || !task.fullInstanceOnly) {\n\t\t\t\ttaskScheduler.scheduleWithFixedDelay(task.task, task.delay, task.period.get(), task.unit);\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\tPaginationQueries.loadPaginationQueries();\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"unable to correctly load pagination queries\");\n\t\t\tlog.error(e.getMessage(), e);\n\t\t}\n\t}", "@Scheduled(cron = \"0 0/30 8-9 * * *\")\n\tpublic void scheduleTaskCustomHourly() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 8:00, 8:30, 9:00, 9:30 O'clock Every Day - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "public void autonomousPeriodic() {\r\n Scheduler.getInstance().run();\r\n }", "public void autonomousPeriodic() {\r\n\t\tScheduler.getInstance().run();\r\n\t}", "@Scheduled(fixedDelay=5000) //indicamos que esta tarea se repetira cada 5 segundos \n\tpublic void doTask() {\n\t\tLOGGER.info(\"Time is: \"+ new Date());\n\t}", "private void schedulerSleep() {\n\n\t\ttry {\n\n\t\t\tThread.sleep(timeSlice);\n\n\t\t} catch (InterruptedException e) {\n\t\t}\n\t\t;\n\n\t}", "public void teleopPeriodic()\n\t{\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\t\n\t}", "public void startTimer() {\n timer = new Timer();\n\n //initialize the TimerTask's job\n //initializeTimerTask();\n\n //schedule the timer, after the first 5000ms the TimerTask will run every 10000ms\n timer.schedule(timerTask, 5000, Your_X_SECS * 1000); //\n //timer.schedule(timerTask, 5000,1000); //\n }", "private void startTimer(long delay, long period) {\n\t\tstartTimer.schedule(new TimerTask() {\n\t\t\tpublic void run() {\n\t\t\t\tmoveTimer = new Timer();\n\t\t\t\tif (restartTimer != null) {\n\t\t\t\t\trestartTimer.cancel();\n\t\t\t\t}\n\t\t\t\trestartTimer = new Timer();\n\t\t\t\trestartTimer(period);\n\t\t\t\trelativeX = 0;\n\t\t\t\tgetOnLog(World.getSprites());\n\t\t\t\tvisible = true;\n\t\t\t\tmoveTimer(MOVE_FREQUENCY_MILLISECOND);\n\t\t\t\tstartTimer.cancel();\n\t\t\t}\n\t\t}, delay);\n\t}", "public void startTimer() {\n timer = new Timer();\n\n //initialize the TimerTask's job\n initializeTimerTask();\n\n //schedule the timer, after the first 5000ms the TimerTask will run every 10000ms\n timer.schedule(timerTask, 5000, Your_X_SECS * 1000); //\n //timer.schedule(timerTask, 5000,1000); //\n }", "@Test\n public void repeatingTask_changeRepeatPeriod_nextWeekDate() {\n LocalDate testDate = LocalDateTime.now().minusWeeks(1).minusDays(1).toLocalDate();\n LocalTime testTime = LocalTime.of(8, 30);\n LocalDateTime testDateTime = LocalDateTime.of(testDate, testTime);\n Event testEvent = new Event(\"8 days ago\", \"CS2113T\", testDateTime, testDateTime.plusHours(4),\n \"testing\");\n testTaskList.addTask(testEvent);\n // Set to 1w\n RepeatCommand testRepeatCommand = new RepeatCommand(2, 1, RepeatCommand.WEEKLY_ICON);\n testRepeatCommand.execute(testTaskList, testUi);\n RepeatEvent repeatEvent = (RepeatEvent) testTaskList.getTask(2);\n // Set to 1d\n testRepeatCommand = new RepeatCommand(2, 1, RepeatCommand.DAILY_ICON);\n testRepeatCommand.execute(testTaskList, testUi);\n repeatEvent = (RepeatEvent) testTaskList.getTask(2);\n\n assertEquals(repeatEvent.getPeriodCounter(), 0);\n assertEquals(repeatEvent.getNextDateTime(), LocalDateTime.of(LocalDate.now().plusWeeks(1), testTime));\n }", "protected void runEachMinute() {\n \n }", "@Override\n public void autonomousPeriodic() {\n teleopPeriodic();\n //Scheduler.getInstance().run();\n }", "private void doSomeThingRepeat() {\n\t\t\n\t\ttimer.scheduleAtFixedRate(new TimerTask() {\n\t\t\tint mHourNow = 0, mMinuteNow = 0;\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t\tfinal Calendar c = Calendar.getInstance();\n\t\t\t\tmHourNow = c.get(Calendar.HOUR_OF_DAY);\n\t\t\t\tmMinuteNow= c.get(Calendar.MINUTE);\n\t\t\t\ttime = prefs.getString(\"time\", \"\");\n\t\t\t\tString mHour = time.substring(0, 2);\n\t\t\t\tString mMinute = time.substring(3, 5) ;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tint mh = Integer.parseInt(mHour);\n\t\t\t\tint mm = Integer.parseInt(mMinute);\n\t\t\t\t\t\n\t\t\t\tif (mHourNow == mh && mMinuteNow == mm) {\n\t\t\t\t\tplayMediaAlarm();\n\t\t\t\t}\n\t\t\t\t\tLog.d(\"Myservice-doSomeThingRepeat\", mHourNow +\"h\"+ mMinuteNow + \"&&\" +mHour +\"h\" + mMinute);\n\t\t\t\t\n\t\t\t}\n\t\t}, 0, UPDATE);\n\t}", "public void scheduleTransaction(Transaction recurringTransaction) {\n long recurrencePeriodMillis = recurringTransaction.getRecurrencePeriod();\n long firstRunMillis = System.currentTimeMillis() + recurrencePeriodMillis;\n long recurringTransactionId = addTransaction(recurringTransaction);\n\n PendingIntent recurringPendingIntent = PendingIntent.getBroadcast(mContext,\n (int)recurringTransactionId, Transaction.createIntent(recurringTransaction), PendingIntent.FLAG_UPDATE_CURRENT);\n AlarmManager alarmManager = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE);\n alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, firstRunMillis,\n recurrencePeriodMillis, recurringPendingIntent);\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void clock(double period);", "@Override\n public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "private void createScheduledNotification(List<SessionModel> values, int test)\n\t{\n\n\t\t// Get new calendar object and set the date to now\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.setTimeInMillis(System.currentTimeMillis());\n\t\t// Add defined amount of days to the date\n\n\t\tgetBaseContext();\n\t\t// Retrieve alarm manager from the system\n\t\tAlarmManager alarmManager = (AlarmManager)getSystemService(Context.ALARM_SERVICE);\n\n\t\tfor (SessionModel element : values) {\n\n\t\t\tString[] ymd = element.getStartDateSplit();\n\t\t\tint month = Integer.parseInt(ymd[0]);\n\t\t\tint date = Integer.parseInt(ymd[1]);\n\t\t\tint year = Integer.parseInt(ymd[2]);\n\n\t\t\tString[] hm = element.getStartTimeSplit();\n\t\t\tint hour = Integer.parseInt(hm[0]);\n\t\t\tint min = Integer.parseInt(hm[1]);\n\n\t\t\tcalendar.set(Calendar.YEAR, year);\n\t\t\tcalendar.set(Calendar.MONTH, month);\n\t\t\tcalendar.set(Calendar.DATE, date);\n\t\t\tcalendar.set(Calendar.HOUR, hour);\n\t\t\tcalendar.set(Calendar.MINUTE, min);\n\n\t\t\tlong secs = calendar.getTimeInMillis();\n\t\t\tsecs -= 600000;\n\t\t\tcalendar.setTimeInMillis(secs);\n\t\t\tLog.w(\"AlarmManager-TDC2014 \", \"Setting Alarm Time : \" + calendar.toString());\n\t\t\tint id = (int) System.currentTimeMillis();\n\t\t\tIntent intent = new Intent(\"net.redirectme.apps.SESSION_NOTIFY\");\n\t\t\tintent.putExtra(android.content.Intent.EXTRA_TEXT, element.getId());\n\t\t\tintent.putExtra(android.content.Intent.EXTRA_TITLE, element.getName());;\n\t\t\tintent.putExtra(android.content.Intent.EXTRA_SUBJECT, element.getAuthor());\n\n\t\t\tint trackIcon = element.getTrackIcon();\n\t\t\tintent.putExtra(android.content.Intent.EXTRA_SHORTCUT_ICON, trackIcon);\n\n\n\t\t\tPendingIntent pendingIntent = PendingIntent.getBroadcast(this, id, intent, PendingIntent.FLAG_ONE_SHOT);\n\t\t\talarmManager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pendingIntent);\n\n\t\t}\n\t\tif(test==1)\n\t\t{\n\t\t\t// 5secs from now\n\t\t\tcalendar.setTimeInMillis(System.currentTimeMillis() + 10000);\n\t\t\tLog.w(\"AlarmManager-TEST \", \"Setting Alarm Time : \" + calendar.getTime());\n\t\t\tint id = (int) System.currentTimeMillis();\n\t\t\tIntent intent = new Intent(\"net.redirectme.apps.SESSION_NOTIFY\");\n\t\t\tlong value = 1;\n\t\t\tintent.putExtra(android.content.Intent.EXTRA_TEXT, value);\n\t\t\tintent.putExtra(android.content.Intent.EXTRA_TITLE, \"Test Session\");;\n\t\t\tintent.putExtra(android.content.Intent.EXTRA_SUBJECT, \"Sanjeev BA\");\n\t\t\tintent.putExtra(android.content.Intent.EXTRA_SHORTCUT_ICON, R.drawable.track_43_general);\n\n\t\t\tPendingIntent pendingIntent = PendingIntent.getBroadcast(this, id, intent, 0);\n\t\t\talarmManager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pendingIntent);\n\t\t}\n\n\t}", "public void autonomousPeriodic()\n\t{\n\t\tScheduler.getInstance().run();\n\t}", "@Scheduled(fixedRateString = \"PT120M\")\n\tvoid someJob(){\n//\t\tString s = \"Testing message.\\nNow time is : \"+new Date();\n////\t\tSystem.out.println(s);\n//\t\tPushNotificationOptions.sendMessageToAllUsers(s);\n//\n\t\t//get all schedules in current dayOfWeek\n\t\tCollection<Notification> notifications = notificationService.findAllByDayOfWeekAndTime();\n\t\tfor(Notification notification : notifications){\n//\t\t\tSystem.out.println(notification.toString());\n//\t\t\tSystem.out.println(!notification.getStatus());\n////\t\t\tSystem.out.println(check(notification.getStartTime()));\n//\t\t\t//check for already not sent notifications , also check for time difference < TIME_CONSTANT\n//\t\t\tif(!notification.getStatus() && check(notification.getStartTime())){\n//\t\t\t\t//send push notification\n//\t\t\t\tPushNotificationOptions.sendMessageToAllUsers(notification.getMessage());\n//\t\t\t\t//mark the notification as sent\n//\t\t\t\tnotificationService.setStatus(notification.getNotificationId());\n//\t\t\t}\n\t\t\tif(checkForDayTime()){\n\t\t\t\tPushNotificationOptions.sendMessageToAllUsers(notification.getMessage());\n\t\t\t\tnotificationService.setStatus(notification.getNotificationId());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t}", "@Override\n public void autonomousPeriodic()\n {\n Scheduler.getInstance().run();\n }", "private void scheduleJob() {\n\n }", "@Scheduled(cron = \"0 0 9 * * *\", zone = \"Asia/Bangkok\")\n public void testEveryNineAM() {\n// log.info(\"Hey Hoo!!!\");\n }", "@Override\n public void periodic() {\n // This method will be called once per scheduler run\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "ScheduledFuture<?> scheduleTask(long delay, Runnable runnable) {\n return timeoutTaskExecutor.schedule(runnable, delay, TimeUnit.MILLISECONDS);\n }", "public static void asyncTimer(long period, Run runnable) {\n\t\tnew BukkitRunnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\trunnable.run();\n\t\t\t}\n\t\t}.runTaskTimerAsynchronously(AreaShop.getInstance(), 0, period);\n\t}", "static void scheduleWork(Context context, final boolean shortInterval) {\n// PPApplicationStatic.logE(\"[SHEDULE_WORK] WifiScanWorker.scheduleWork\", \"shortInterval=\"+shortInterval);\n\n if (EventStatic.isEventPreferenceAllowed(EventPreferencesWifi.PREF_EVENT_WIFI_ENABLED, context).allowed\n == PreferenceAllowed.PREFERENCE_ALLOWED) {\n if (shortInterval) {\n _cancelWork(context, false);\n //PPApplication.sleep(5000);\n _scheduleWork(context, true);\n\n /*final Context appContext = context.getApplicationContext();\n PPApplication.startHandlerThreadPPScanners();\n final Handler __handler = new Handler(PPApplication.handlerThreadPPScanners.getLooper());\n //__handler.post(new PPApplication.PPHandlerThreadRunnable(\n // context.getApplicationContext()) {\n __handler.post(() -> {\n// PPApplicationStatic.logE(\"[IN_THREAD_HANDLER] PPApplication.startHandlerThreadPPScanners\", \"START run - from=WifiScanWorker.scheduleWork\" + \" shortInterval=true\");\n //Context appContext= appContextWeakRef.get();\n //if (appContext != null) {\n _cancelWork(appContext);\n PPApplication.sleep(5000);\n _scheduleWork(appContext, true);\n //}\n });*/\n }\n else\n _scheduleWork(context, false);\n }\n }", "@Override\n public void teleopPeriodic()\n {\n Scheduler.getInstance().run();\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}" ]
[ "0.6663076", "0.66261166", "0.6573605", "0.65520823", "0.64847314", "0.64431536", "0.6414124", "0.63627124", "0.62850475", "0.62826097", "0.62738436", "0.6244067", "0.6237417", "0.62350065", "0.6194068", "0.61535025", "0.614962", "0.6143192", "0.6133565", "0.6126968", "0.6046984", "0.6025458", "0.60230964", "0.60153335", "0.60054374", "0.5986271", "0.5977021", "0.594252", "0.59315884", "0.59148085", "0.5897755", "0.5877739", "0.5825443", "0.58199483", "0.57738346", "0.5769555", "0.5749708", "0.5746729", "0.5741269", "0.5726676", "0.5723506", "0.57099766", "0.57004696", "0.569392", "0.56920046", "0.5678049", "0.5663644", "0.5654062", "0.56520194", "0.56515557", "0.5635089", "0.56276155", "0.56218284", "0.56182855", "0.56177664", "0.5608938", "0.5601812", "0.5599261", "0.5596921", "0.559392", "0.555802", "0.5557322", "0.5550795", "0.55429405", "0.55402344", "0.5534269", "0.55337274", "0.55247533", "0.5518685", "0.551261", "0.5510476", "0.5503481", "0.55019313", "0.5496042", "0.54819167", "0.5477421", "0.5474863", "0.54635054", "0.54635054", "0.54635054", "0.54635054", "0.54635054", "0.54635054", "0.5456769", "0.54560286", "0.5453681", "0.54492164", "0.54437816", "0.5442608", "0.5440601", "0.54301363", "0.54201597", "0.5414172", "0.5414172", "0.5414172", "0.54133785", "0.5413378", "0.5410765", "0.539505", "0.53874606" ]
0.7740395
0
Schedule activity with a specified period in milliseconds
public void schedule(String name, long period) { schedule(name, period, period, TimeUnit.MILLISECONDS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void schedule(long period) {\n\t\tschedule(\"ActivityTask\", period, period, TimeUnit.MILLISECONDS);\n\t}", "private void schedule() {\n service.scheduleDelayed(task, schedulingInterval);\n isScheduled = true;\n }", "public void schedule(Runnable job, long delay, TimeUnit unit);", "public void schedule(String name, long initialDelay, long period, TimeUnit tunit, OpLevel severity) {\n\t\tif (future == null || future.isCancelled()) {\n\t\t\tactivityTask = newActivityTask(logger, name, severity);\n\t\t\tfuture = scheduler.scheduleAtFixedRate(activityTask, initialDelay, period, tunit);\n\t\t} else {\n\t\t\tthrow new IllegalStateException(\"Already scheduled\");\n\t\t}\n\t}", "public void schedule(String name, long period, TimeUnit tunit) {\n\t\tschedule(name, period, period, TimeUnit.MILLISECONDS);\n\t}", "public static void scheduleRepeatingElapsedNotification15(Context context) {\n\n\n // Setting intent to class where notification will be handled\n Intent intent = new Intent(context, AlarmReceiver.class);\n\n // Setting pending intent to respond to broadcast sent by AlarmManager everyday at 8am\n alarmIntentElapsed = PendingIntent.getBroadcast(context, ALARM_TYPE_ELAPSED, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Getting instance of AlarmManager service\n alarmManagerElapsed = (AlarmManager)context.getSystemService(ALARM_SERVICE);\n\n // Daily inexact alarm from phone boot - current set to test for 10 seconds\n alarmManagerElapsed.setInexactRepeating(AlarmManager.ELAPSED_REALTIME, SystemClock.elapsedRealtime(), 60000 * 15, alarmIntentElapsed);\n }", "public void scheduleAlarm() {\n\n Calendar cal = Calendar.getInstance();\n Intent alarmIntent = new Intent(context, PeriodicTransactionService.class);\n alarmIntent.setAction(PeriodicTransactionService.ACTION);\n Bundle bundle = new Bundle();\n bundle.putInt(PeriodicTransactionService.USER_ID_PARAM, userId);\n alarmIntent.putExtras(bundle);\n PendingIntent pintent = PendingIntent.getService(context,\n MyAlarmManager.REQUEST_CODE,\n alarmIntent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n AlarmManager alarm = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n alarm.setInexactRepeating(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), 4 * 1000, pintent);\n }", "public static void scheduleRepeatingElapsedNotification60(Context context) {\n\n\n // Setting intent to class where notification will be handled\n Intent intent = new Intent(context, AlarmReceiver.class);\n\n // Setting pending intent to respond to broadcast sent by AlarmManager everyday at 8am\n alarmIntentElapsed = PendingIntent.getBroadcast(context, ALARM_TYPE_ELAPSED, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Getting instance of AlarmManager service\n alarmManagerElapsed = (AlarmManager)context.getSystemService(ALARM_SERVICE);\n\n // Daily inexact alarm from phone boot - current set to test for 10 seconds\n alarmManagerElapsed.setInexactRepeating(AlarmManager.ELAPSED_REALTIME, SystemClock.elapsedRealtime(), 60000 * 60, alarmIntentElapsed);\n }", "private void sleepByScheduleTime() throws InterruptedException\n\t{\n\t\tjava.util.Calendar calendar = java.util.Calendar.getInstance();\n\t\tcalendar.setTime(new java.util.Date(System.currentTimeMillis()));\n\t\tint currHour = calendar.get(calendar.HOUR_OF_DAY);\n\t\tif ((24 - currHour) * 60 < 2 * FtpData.SCHEDULE_TIME)\n\t\t{\n\t\t\tsleep((FtpData.SCHEDULE_TIME + 1) * 60000); // 00h:01\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsleep(FtpData.SCHEDULE_TIME * 60000); // n * minutes;\n\t\t}\n\t}", "public synchronized void start(long period){\n\t\ttickHandle = scheduler.scheduleAtFixedRate(tickTask, 0, period, TimeUnit.MILLISECONDS);\t \n\t}", "public static void scheduleRepeatingElapsedNotification30(Context context) {\n\n // Setting intent to class where notification will be handled\n Intent intent = new Intent(context, AlarmReceiver.class);\n\n // Setting pending intent to respond to broadcast sent by AlarmManager everyday at 8am\n alarmIntentElapsed = PendingIntent.getBroadcast(context, ALARM_TYPE_ELAPSED, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Getting instance of AlarmManager service\n alarmManagerElapsed = (AlarmManager)context.getSystemService(ALARM_SERVICE);\n\n // Daily inexact alarm from phone boot - current set to test for 10 seconds\n alarmManagerElapsed.setInexactRepeating(AlarmManager.ELAPSED_REALTIME, SystemClock.elapsedRealtime(), 60000 * 30, alarmIntentElapsed);\n }", "public void schedule(String name, long initialDelay, long period, TimeUnit tunit) {\n\t\tschedule(name, period, period, tunit, opLevel);\n\t}", "private void scheduleNotification(Notification notification) {\n\n Intent notificationIntent2 = new Intent(MainActivity.this, NotificationPublisher.class);\n notificationIntent2.putExtra(NotificationPublisher.NOTIFICATION_ID, 1);\n notificationIntent2.putExtra(NotificationPublisher.NOTIFICATION, notification);\n PendingIntent pendingIntent2 = PendingIntent.getBroadcast(MainActivity.this, 0, notificationIntent2, PendingIntent.FLAG_UPDATE_CURRENT);\n Date date = new Date();\n\n Calendar calnoti = Calendar.getInstance();\n calnoti.setTime(date);\n\n calnoti.set(Calendar.HOUR_OF_DAY, mHour-1);\n calnoti.set(Calendar.MINUTE, mMin);\n calnoti.set(Calendar.SECOND, 0);\n calnoti.set(Calendar.YEAR,mYear);\n calnoti.set(Calendar.MONTH,mMonth);\n calnoti.set(Calendar.DAY_OF_MONTH,mDay);\n //long futureInMillis2 = SystemClock.elapsedRealtime() + delay;\n AlarmManager alarmManager2 = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n alarmManager2.set(AlarmManager.RTC_WAKEUP, calnoti.getTimeInMillis(), pendingIntent2);\n }", "public void scheduleAlarm() {\n Intent intent = new Intent(getApplicationContext(), MyAlarmReceiver.class);\n\n // Create a PendingIntent to be triggered when the alarm goes off\n final PendingIntent pendingIntent = PendingIntent.getBroadcast(this, MyAlarmReceiver.REQUEST_CODE, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n long firstMillis = System.currentTimeMillis(); // alarm is set right away\n\n AlarmManager alarm = (AlarmManager) this.getSystemService(Context.ALARM_SERVICE);\n\n // First parameter is the type: ELAPSED_REAL_TIME, ELAPSED_REAL_TIME_WAKEUP, RTC_WAKEUP\n // Interval can be INTERVAL_FIFTEEN_MINUTES, INTERVAL_HALF_HOUR, INTERVAL_HOUR, INTERVAL_DAY\n try {\n alarm.setInexactRepeating(AlarmManager.RTC_WAKEUP, firstMillis, 5000L, pendingIntent);\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n\n }", "public static void schedule(Context context, Intent intent, long triggerAtMillis) {\n /**\n * PendingIntent.getBroadcast\n *\n * PendingIntent.FLAG_UPDATE_CURRENT\n *\n * */\n PendingIntent p = PendingIntent.getBroadcast(context, 1, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n alarmManager.set(AlarmManager.RTC_WAKEUP, triggerAtMillis, p);\n //Log.i(TAG, \"ALARME com data/hora definido\");\n }", "@Scheduled(fixedRate = 2000)\n\tpublic void scheduleTaskWithFixedRate() {\n\t\tlog.info(\"Fixed Rate Task :: Execution Time - {}\", dateTimeFormatter.format(LocalDateTime.now()) );\n\t}", "@Scheduled(fixedDelay = 3000)\n\tpublic void scheduleTaskWithFixedDelay() {\n\t\tlog.info(\"Fixed Delay Task :: Execution Time - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t\t//Sleep TimeUnit\n//\t\ttry {\n//\t\t\tTimeUnit.SECONDS.sleep(5);\n//\t\t} catch (Exception e) {\n//\t\t\tlog.error(\"Ran into an error {}\", e);\n//\t throw new IllegalStateException(e);\n//\t\t}\n\t}", "public static void scheduleRepeatingElapsedNotification45(Context context) {\n\n\n // Setting intent to class where notification will be handled\n Intent intent = new Intent(context, AlarmReceiver.class);\n\n // Setting pending intent to respond to broadcast sent by AlarmManager everyday at 8am\n alarmIntentElapsed = PendingIntent.getBroadcast(context, ALARM_TYPE_ELAPSED, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Getting instance of AlarmManager service\n alarmManagerElapsed = (AlarmManager)context.getSystemService(ALARM_SERVICE);\n\n // Daily inexact alarm from phone boot - current set to test for 10 seconds\n alarmManagerElapsed.setInexactRepeating(AlarmManager.ELAPSED_REALTIME, SystemClock.elapsedRealtime(), 60000 * 45, alarmIntentElapsed);\n }", "private void beginSchedule(){\n\t\tDivaApp.getInstance().submitScheduledTask(new RandomUpdater(this), RandomUpdater.DELAY, RandomUpdater.PERIOD);\n\t}", "@Override\n public void schedulePeriodicNotification(Context context, long time, String title, String text, int period) {\n Notification notification = new Notification(title, text, new Date(time), Long.toString(time));\n notification.setNotificationID(notificationId);\n notification.setRequestCode(requestCode);\n user.addNotification(notification);\n Intent intent = new Intent(context, NotificationReceiver.class);\n intent.putExtra(getString(R.string.title), title);\n intent.putExtra(getString(R.string.text), text);\n intent.putExtra(getString(R.string.notificationid), Integer.toString(notificationId));\n notificationId++;\n PendingIntent pending = PendingIntent.getBroadcast(context, requestCode, intent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n requestCode++;\n AlarmManager manager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n assert manager != null;\n manager.setInexactRepeating(AlarmManager.RTC_WAKEUP, time,\n AlarmManager.INTERVAL_DAY*period, pending);\n }", "@Scheduled(cron = \"0/20 * * * * *\")\n public void scheduleTaskSecond() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 20 Second - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "public void scheduleAlarm() {\n Log.v(getClass().getSimpleName(), \"Scheduling alarm\");\n\n // Construct an intent that will execute the AlarmReceiver\n Intent intent = new Intent(getApplicationContext(), AlarmReceiver.class);\n\n // Create a PendingIntent to be triggered when the alarm goes off\n final PendingIntent pIntent = PendingIntent.getBroadcast(this, AlarmReceiver.REQUEST_CODE,\n intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Setup periodic alarm every every half hour from this point onwards\n long firstMillis = System.currentTimeMillis(); // alarm is set right away\n AlarmManager alarm = (AlarmManager) this.getSystemService(Context.ALARM_SERVICE);\n\n // First parameter is the type: ELAPSED_REALTIME, ELAPSED_REALTIME_WAKEUP, RTC_WAKEUP\n // Interval can be INTERVAL_FIFTEEN_MINUTES, INTERVAL_HALF_HOUR, INTERVAL_HOUR, INTERVAL_DAY\n alarm.setInexactRepeating(AlarmManager.RTC_WAKEUP, firstMillis,\n AlarmManager.INTERVAL_FIFTEEN_MINUTES, pIntent);\n }", "public void schedule() {\n cancel();\n timer.schedule(new TimerTask() {\n @Override\n public void run() {\n runnable.run();\n }\n }, delay);\n }", "void scheduleTask(long delay) {\n executorService.schedule(\n backgroundTask, delay, TimeUnit.MILLISECONDS);\n }", "public synchronized void scheduleTick(long deltat){\n\t\tscheduler.schedule(tickTask, deltat, TimeUnit.MILLISECONDS);\n\t}", "public ScheduledFuture<?> schedule(Runnable task, long delay, long period) {\n return executor.scheduleWithFixedDelay(task, delay, period, TimeUnit.MILLISECONDS);\n }", "void schedule(long delay, TimeUnit unit) {\r\n\t\tthis.delay = delay;\r\n\t\tthis.unit = unit;\r\n\t\tif (monitor != null) {\r\n\t\t\tmonitor.cancel(false);\r\n\t\t\tmonitor = pool.scheduleWithFixedDelay(sync, delay, delay, unit);\r\n\t\t}\r\n\t}", "public void onScheduled(long scheduledTime);", "TimerSchedule createTimerSchedule();", "public static void syncTimer(long period, Run runnable) {\n\t\tnew BukkitRunnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\trunnable.run();\n\t\t\t}\n\t\t}.runTaskTimer(AreaShop.getInstance(), 0, period);\n\t}", "public void schedule() {\n\t\tnew Timer().schedule(getTask(), TIME);\n\t}", "ScheduledFuture<?> scheduleAtFixedRate(Runnable publisher, long period, TimeUnit timeUnit, ProbeLevel probeLevel);", "public static void scheduleRestartOfService(Context context)\n\t{\n\t\tCalendar cal = Calendar.getInstance();\n\t\t// add frequency hours to the calendar object\n\t\tcal.add(Calendar.HOUR, 24);\n\t\t//cal.add(Calendar.MINUTE, 5);\n\n\t\tPendingIntent pendingIntent = PendingIntent.getService(context, 0, \n\t\t\t\tnew Intent(\"org.bewellapp.ServiceControllers.BestSleepLib.BestSleepComputationService\"), PendingIntent.FLAG_CANCEL_CURRENT);\n\n\t\t// Get the AlarmManager service\n\t\tAlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n\t\tam.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), pendingIntent);\n\t}", "static void scheduleWork(final boolean shortInterval) {\n if (shortInterval) {\n _cancelWork(false);\n //PPApplication.sleep(5000);\n _scheduleWork(true);\n\n /*PPApplication.startHandlerThreadPPScanners();\n final Handler __handler = new Handler(PPApplication.handlerThreadPPScanners.getLooper());\n __handler.post(() -> {\n// PPApplicationStatic.logE(\"[IN_THREAD_HANDLER] PPApplication.startHandlerThreadPPScanners\", \"START run - from=SearchCalendarEventsWorker.scheduleWork\" + \" shortInterval=true\");\n _cancelWork();\n PPApplication.sleep(5000);\n _scheduleWork(true);\n });*/\n }\n else\n _scheduleWork(false);\n }", "public void scheduleNotification(Context context, long delay, int notificationId, Pills p) {\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context, \"pills\")\n .setContentTitle(p.getName())\n .setContentText(\"Não se esqueça de tomar o seu \"+ p.getName() + \" às \" + p.getTime())\n .setAutoCancel(true)\n .setSmallIcon(R.mipmap.logo)\n .setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION))\n .setPriority(NotificationCompat.PRIORITY_DEFAULT);\n\n Intent intent = new Intent(context, c.getClass());\n PendingIntent activity = PendingIntent.getActivity(context, notificationId, intent, PendingIntent.FLAG_CANCEL_CURRENT);\n builder.setContentIntent(activity);\n\n Notification notification = builder.build();\n\n Intent notificationIntent = new Intent(context, MyNotificationPublisher.class);\n notificationIntent.putExtra(MyNotificationPublisher.NOTIFICATION_ID, notificationId);\n notificationIntent.putExtra(MyNotificationPublisher.NOTIFICATION, notification);\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, notificationId, notificationIntent, PendingIntent.FLAG_CANCEL_CURRENT);\n\n long futureInMillis = SystemClock.elapsedRealtime() + delay;\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n alarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, futureInMillis, pendingIntent);\n Log.d(ContentValues.TAG, \"Scheduling\");\n }", "public void run(){\n Timer time = new Timer(); // Instantiate Timer Object\n\n ScheduledClass st = new ScheduledClass(this.job,this.shm,time,this.stopp); // Instantiate SheduledTask class\n time.schedule(st, 0, this.periodicwait); // Create Repetitively task for every 1 secs\n }", "public void saveScheduleManagement(Runnable task, LocalTime timePoint, Integer period, TimeUnit timeUnit) {\n LOGGER.info(\"START UP SAVE SCHEDULE MANAGEMENT.\");\n if (checkTodayCurrencyListInDb()) {\n saveCurrencyListToDb();\n ScheduledExecutorService service = Executors.newSingleThreadScheduledExecutor();\n service.scheduleAtFixedRate(task, calculateTimeBeforeStart(timePoint), period, timeUnit);\n } else {\n ScheduledExecutorService service = Executors.newSingleThreadScheduledExecutor();\n service.scheduleAtFixedRate(task, calculateTimeBeforeStart(timePoint), period, timeUnit);\n }\n }", "private void schedule(PlanRecord plan, Context context) {\n Date d = null;\n\n try {\n DateTime test = new DateTime();\n test.setStringSQL(plan.offset);\n d = test.getYearMonthDay();\n } catch (java.text.ParseException e) {\n Log.e(\"PlanReceiver-schedule\", \"Couldn't schedule \" + plan.name + \"\\n e:\" + e);\n e.printStackTrace();\n }\n\n Log.e(\"PlanReceiver-schedule\", \"d.year=\" + (d.getYear() + 1900) + \" d.date=\" + d.getDate() + \" d.month=\" + d.getMonth());\n\n Calendar firstRun = new GregorianCalendar(d.getYear() + 1900, d.getMonth(), d.getDate());\n Log.e(\"PlanReceiver-schedule\", \"FirstRun:\" + firstRun);\n\n Intent intent = new Intent(context, PlanReceiver.class);\n intent.putExtra(\"plan_id\", plan.id);\n intent.putExtra(\"plan_acct_id\", plan.acctId);\n intent.putExtra(\"plan_name\", plan.name);\n intent.putExtra(\"plan_value\", plan.value);\n intent.putExtra(\"plan_type\", plan.type);\n intent.putExtra(\"plan_category\", plan.category);\n intent.putExtra(\"plan_memo\", plan.memo);\n intent.putExtra(\"plan_offset\", plan.offset);\n intent.putExtra(\"plan_rate\", plan.rate);\n intent.putExtra(\"plan_next\", plan.next);\n intent.putExtra(\"plan_scheduled\", plan.scheduled);\n intent.putExtra(\"plan_cleared\", plan.cleared);\n\n //Parse Rate (token 0 is amount, token 1 is type)\n final String phrase = plan.rate;\n final String[] tokens = phrase.split(\"[ ]+\");\n\n final PendingIntent sender = PendingIntent.getBroadcast(context, Integer.parseInt(plan.id), intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n //Get the AlarmManager service\n final AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n\n final Locale locale = context.getResources().getConfiguration().locale;\n final DateTime nextRun = new DateTime();\n\n if (tokens[1].contains(\"Days\")) {\n Log.d(\"PlanReceiver-schedule\", \"Days\");\n\n //If Starting Time is in the past, fire off next day(s)\n while (firstRun.before(Calendar.getInstance())) {\n firstRun.add(Calendar.DAY_OF_MONTH, Integer.parseInt(tokens[0]));\n }\n\n Log.d(\"PlanReceiver-schedule\", \"firstRun is \" + firstRun);\n\n nextRun.setCalendar(firstRun);\n\n ContentValues planValues = new ContentValues();\n planValues.put(DatabaseHelper.PLAN_NEXT, nextRun.getSQLDate(locale));\n context.getContentResolver().update(Uri.parse(MyContentProvider.PLANS_URI + \"/\" + plan.id), planValues, DatabaseHelper.PLAN_ID + \"=\" + plan.id, null);\n\n am.setRepeating(AlarmManager.RTC_WAKEUP, firstRun.getTimeInMillis(), (Integer.parseInt(tokens[0]) * AlarmManager.INTERVAL_DAY), sender);\n } else if (tokens[1].contains(\"Weeks\")) {\n Log.d(\"PlanReceiver-schedule\", \"Weeks\");\n\n //If Starting Time is in the past, fire off next week(s)\n while (firstRun.before(Calendar.getInstance())) {\n firstRun.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(tokens[0]));\n }\n\n Log.d(\"PlanReceiver-schedule\", \"firstRun is \" + firstRun);\n\n nextRun.setCalendar(firstRun);\n\n ContentValues planValues = new ContentValues();\n planValues.put(DatabaseHelper.PLAN_NEXT, nextRun.getSQLDate(locale));\n context.getContentResolver().update(Uri.parse(MyContentProvider.PLANS_URI + \"/\" + plan.id), planValues, DatabaseHelper.PLAN_ID + \"=\" + plan.id, null);\n\n am.setRepeating(AlarmManager.RTC_WAKEUP, firstRun.getTimeInMillis(), (Integer.parseInt(tokens[0]) * AlarmManager.INTERVAL_DAY) * 7, sender);\n } else if (tokens[1].contains(\"Months\")) {\n Log.d(\"PlanReceiver-schedule\", \"Months\");\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(cal.getTimeInMillis());\n cal.add(Calendar.MONTH, Integer.parseInt(tokens[0]));\n\n //If Starting Time is in the past, fire off next month(s)\n while (firstRun.before(Calendar.getInstance())) {\n firstRun.add(Calendar.MONTH, Integer.parseInt(tokens[0]));\n }\n\n Log.d(\"PlanReceiver-schedule\", \"firstRun is \" + firstRun);\n\n nextRun.setCalendar(firstRun);\n\n ContentValues planValues = new ContentValues();\n planValues.put(DatabaseHelper.PLAN_NEXT, nextRun.getSQLDate(locale));\n context.getContentResolver().update(Uri.parse(MyContentProvider.PLANS_URI + \"/\" + plan.id), planValues, DatabaseHelper.PLAN_ID + \"=\" + plan.id, null);\n\n am.setRepeating(AlarmManager.RTC_WAKEUP, firstRun.getTimeInMillis(), cal.getTimeInMillis(), sender);\n } else {\n Log.e(\"PlanReceiver-schedule\", \"Could not set alarm; Something wrong with the rate\");\n }\n\n }", "@Override\n public void teleopPeriodic() {\n \tbeginPeriodic();\n Scheduler.getInstance().run();\n endPeriodic();\n }", "@WithName(\"schedule.delay\")\n @WithDefault(\"5s\")\n Duration scheduleDelay();", "@Scheduled(cron = \"0 0 9-17 * * MON-FRI\")\n\tpublic void scheduleTaskWeekly() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 9 - 17 O'clock Every Weekdays - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "void schedule(ScheduledJob job);", "@Scheduled(fixedRate = 2000, initialDelay = 5000)\n\tpublic void scheduleTaskWithInitialDelay() {\n\t\tlog.info(\"Fixed Rate Task With Initial Delay :: Execution Time - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "@Scheduled(cron = \"0 0 8-10 * * *\")\n\tpublic void scheduleTaskHourly() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 8 - 10 O'clock Every Day - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "public static void syncTimer(long period, RunResult<Boolean> runnable) {\n\t\tnew BukkitRunnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tif(!runnable.run()) {\n\t\t\t\t\tthis.cancel();\n\t\t\t\t}\n\t\t\t}\n\t\t}.runTaskTimer(AreaShop.getInstance(), 0, period);\n\t}", "public void scheduleAlarm()\n {\n hour = timePicker.getCurrentHour(); //get hour\n minute = timePicker.getCurrentMinute(); //get minutes\n alarmMgr = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n Intent intent = new Intent(getApplicationContext(), AlarmReceiver.class);\n alarmIntent = PendingIntent.getBroadcast(getApplicationContext(), 0, intent, 0);\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(System.currentTimeMillis());\n calendar.set(Calendar.HOUR_OF_DAY, hour);\n calendar.set(Calendar.MINUTE, minute);\n\n alarmMgr.setInexactRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),\n AlarmManager.INTERVAL_DAY, alarmIntent);\n Toast.makeText(this, \"Alarm scheduled for \" + hour + \":\" + minute, Toast.LENGTH_SHORT).show();\n\n }", "public abstract void schedule();", "@Override\n public void autonomousPeriodic() {\n \tbeginPeriodic();\n Scheduler.getInstance().run();\n endPeriodic();\n }", "@Scheduled(fixedRate = 2000, initialDelay = 5000)\n public void scheduleTaskWithInitialDelay() {\n logger.info(\"Fixed Rate Task with Initial Delay :: Execution Time - {}\", formatter.format(LocalDateTime.now()));\n }", "private static void timerTest4() {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.set(Calendar.HOUR_OF_DAY, 14);\n\t\tcalendar.set(Calendar.MINUTE, 20);\n\t\tcalendar.set(Calendar.SECOND, 0);\n\t\tDate time = calendar.getTime();\n\n\t\tTimer timer = new Timer();\n\t\tSystem.out.println(\"wait ....\");\n\t\ttimer.scheduleAtFixedRate(new TimerTask() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.out.println(\"timertest4\");\n\n\t\t\t}\n\t\t}, time, 24 * 60 * 60 * 1000);\n\n\t}", "public void autonomousPeriodic() \n {\n Scheduler.getInstance().run();\n }", "public void startAlarm() {\n AlarmManager manager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n\n Calendar calendar = Calendar.getInstance();\n\n // Set alarm only if the remained time is over 10 minutes\n if (time >10 ) {\n //TODO: Change to ((time * 60000) - 600000) for 10 minutes before\n calendar.setTimeInMillis((System.currentTimeMillis() + ((time * 1000)) - 10000)); // Alarm set to 10 sec before the booking\n\n Log.d(TAG, \"current time = \" + new Date().toLocaleString());\n// Log.d(TAG, \"current time = \" + System.currentTimeMillis());\n Log.d(TAG, \"Alarm set at = \" + calendar.getTime());\n\n /* no Repeat */\n manager.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),\n 0, pendingIntent);\n }\n\n }", "@Override\n public void autonomousPeriodic() {\n \n Scheduler.getInstance().run();\n \n }", "@Scheduled(cron = \"0 0 10 17 8 ?\")\n\tpublic void scheduleTaskYearly() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 10:00 o'clock in 17 August - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "public <T> ValueFuture<T> schedule(Callable<T> job, long delay, TimeUnit unit);", "public void startScheduling() {\n new Thread(new Runnable() {\n public void run() {\n while(true) {\n try {\n Thread.sleep(30000);\n Calendar c = Calendar.getInstance();\n int min = c.get(Calendar.MINUTE);\n if (((min % 10) == 0) || (min == 0)) {\n boolean action = getLightOnWhenMovementDetectedSchedule().getCurrentSchedule();\n if (action) {\n configureSwitchOnWhenMovement(true);\n } else {\n configureSwitchOnWhenMovement(false);\n }\n action = getLightSchedule().getCurrentSchedule();\n if (action) {\n switchOn();\n } else {\n switchOff();\n }\n saveHistoryData();\n }\n Thread.sleep(30000);\n } catch (InterruptedException e) {\n return;\n } catch (RemoteHomeConnectionException e) {\n e.printStackTrace();\n } catch (RemoteHomeManagerException e) {\n e.printStackTrace();\n }\n }\n }\n }).start(); \n }", "public Schedule(Date startTime, long repeatAfter, TimeUnit unit) {\n\t\tsuper();\n\t\tthis.startTime = startTime == null ? new Date() : startTime;\n\t\tthis.repeatAfter = repeatAfter;\n\t\tthis.unit = unit;\n\t}", "public void reapet(int interval) {\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(System.currentTimeMillis());\n defineAlartRepeat(calendar, interval, AlarmManager.ELAPSED_REALTIME_WAKEUP);\n }", "public void setInterval(int anInterval)\n{\n // Set interval\n _interval = anInterval;\n \n // If timer present, change interval\n if(_timer!=null)\n _timer.setDelay(_interval);\n}", "void restartEventsWithDelay(final boolean longDelay, final boolean alsoRescan, final boolean unblockEventsRun,\n final int logType)\n {\n if (longDelay) {\n\n Data workData = new Data.Builder()\n .putBoolean(PhoneProfilesService.EXTRA_ALSO_RESCAN, alsoRescan)\n .putBoolean(PhoneProfilesService.EXTRA_UNBLOCK_EVENTS_RUN, unblockEventsRun)\n .putInt(PhoneProfilesService.EXTRA_LOG_TYPE, logType)\n .build();\n\n OneTimeWorkRequest restartEventsWithDelayWorker;\n restartEventsWithDelayWorker =\n new OneTimeWorkRequest.Builder(RestartEventsWithDelayWorker.class)\n .addTag(RestartEventsWithDelayWorker.WORK_TAG_2)\n .setInputData(workData)\n .setInitialDelay(15, TimeUnit.SECONDS)\n .build();\n try {\n if (PPApplicationStatic.getApplicationStarted(true, true)) {\n WorkManager workManager = PPApplication.getWorkManagerInstance();\n if (workManager != null) {\n\n// //if (PPApplicationStatic.logEnabled()) {\n// ListenableFuture<List<WorkInfo>> statuses;\n// statuses = workManager.getWorkInfosForUniqueWork(RestartEventsWithDelayWorker.WORK_TAG);\n// try {\n// List<WorkInfo> workInfoList = statuses.get();\n// } catch (Exception ignored) {\n// }\n// //}\n\n// PPApplicationStatic.logE(\"[WORKER_CALL] DataWrapper.restartEventsWithDelay\", \"xxx\");\n //workManager.enqueue(restartEventsWithDelayWorker);\n //if (replace)\n workManager.enqueueUniqueWork(RestartEventsWithDelayWorker.WORK_TAG_2, ExistingWorkPolicy.REPLACE, restartEventsWithDelayWorker);\n //else\n // workManager.enqueueUniqueWork(RestartEventsWithDelayWorker.WORK_TAG_APPEND, ExistingWorkPolicy.APPEND_OR_REPLACE, restartEventsWithDelayWorker);\n }\n }\n } catch (Exception e) {\n PPApplicationStatic.recordException(e);\n }\n } else {\n// PPApplicationStatic.logE(\"[EXECUTOR_CALL] ***** DataWrapper.restartEventsWithDelay\", \"schedule\");\n\n final Context appContext = context.getApplicationContext();\n //final ScheduledExecutorService worker = Executors.newSingleThreadScheduledExecutor();\n Runnable runnable = () -> {\n// long start = System.currentTimeMillis();\n// PPApplicationStatic.logE(\"[IN_EXECUTOR] ***** DataWrapper.restartEventsWithDelay\", \"--------------- START\");\n\n PowerManager powerManager = (PowerManager) appContext.getSystemService(Context.POWER_SERVICE);\n PowerManager.WakeLock wakeLock = null;\n try {\n if (powerManager != null) {\n wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, PPApplication.PACKAGE_NAME + \":DataWrapper_restartEventsWithDelay\");\n wakeLock.acquire(10 * 60 * 1000);\n }\n\n //PPExecutors.doRestartEventsWithDelay(alsoRescan, unblockEventsRun, logType, context);\n\n DataWrapper dataWrapper = new DataWrapper(appContext, false, 0, false, 0, 0, 0f);\n if (logType != PPApplication.ALTYPE_UNDEFINED)\n PPApplicationStatic.addActivityLog(appContext, logType, null, null, \"\");\n //dataWrapper.restartEvents(unblockEventsRun, true, true, false);\n dataWrapper.restartEventsWithRescan(alsoRescan, unblockEventsRun, false, false, true, false);\n //dataWrapper.invalidateDataWrapper();\n\n\n// long finish = System.currentTimeMillis();\n// long timeElapsed = finish - start;\n// PPApplicationStatic.logE(\"[IN_EXECUTOR] ***** DataWrapper.restartEventsWithDelay\", \"--------------- END - timeElapsed=\"+timeElapsed);\n } catch (Exception e) {\n// PPApplicationStatic.logE(\"[IN_EXECUTOR] PPApplication.startHandlerThread\", Log.getStackTraceString(e));\n PPApplicationStatic.recordException(e);\n } finally {\n if ((wakeLock != null) && wakeLock.isHeld()) {\n try {\n wakeLock.release();\n } catch (Exception ignored) {\n }\n }\n //worker.shutdown();\n }\n };\n PPApplicationStatic.createDelayedEventsHandlerExecutor();\n PPApplication.delayedEventsHandlerExecutor.schedule(runnable, 5, TimeUnit.SECONDS);\n }\n }", "public void teleopPeriodic() {\r\n\t\tScheduler.getInstance().run();\r\n\t}", "private void scheduleRecurringTasks() {\n\t\t//created directories expected by the system to exist\n\t\tUtil.initializeDataDirectories();\n\n\t\tTestManager.initializeTests();\n\n\t\t// Gets all the periodic tasks and runs them.\n\t\t// If you need to create a new periodic task, add another enum instance to PeriodicTasks.PeriodicTask\n\t\tSet<PeriodicTasks.PeriodicTask> periodicTasks = EnumSet.allOf(PeriodicTasks.PeriodicTask.class);\n\t\tfor (PeriodicTasks.PeriodicTask task : periodicTasks) {\n\t\t\tif (R.IS_FULL_STAREXEC_INSTANCE || !task.fullInstanceOnly) {\n\t\t\t\ttaskScheduler.scheduleWithFixedDelay(task.task, task.delay, task.period.get(), task.unit);\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\tPaginationQueries.loadPaginationQueries();\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"unable to correctly load pagination queries\");\n\t\t\tlog.error(e.getMessage(), e);\n\t\t}\n\t}", "@Scheduled(cron = \"0 0/30 8-9 * * *\")\n\tpublic void scheduleTaskCustomHourly() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 8:00, 8:30, 9:00, 9:30 O'clock Every Day - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "public void autonomousPeriodic() {\r\n Scheduler.getInstance().run();\r\n }", "public void autonomousPeriodic() {\r\n\t\tScheduler.getInstance().run();\r\n\t}", "@Scheduled(fixedDelay=5000) //indicamos que esta tarea se repetira cada 5 segundos \n\tpublic void doTask() {\n\t\tLOGGER.info(\"Time is: \"+ new Date());\n\t}", "private void schedulerSleep() {\n\n\t\ttry {\n\n\t\t\tThread.sleep(timeSlice);\n\n\t\t} catch (InterruptedException e) {\n\t\t}\n\t\t;\n\n\t}", "public void teleopPeriodic()\n\t{\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\t\n\t}", "public void startTimer() {\n timer = new Timer();\n\n //initialize the TimerTask's job\n //initializeTimerTask();\n\n //schedule the timer, after the first 5000ms the TimerTask will run every 10000ms\n timer.schedule(timerTask, 5000, Your_X_SECS * 1000); //\n //timer.schedule(timerTask, 5000,1000); //\n }", "private void startTimer(long delay, long period) {\n\t\tstartTimer.schedule(new TimerTask() {\n\t\t\tpublic void run() {\n\t\t\t\tmoveTimer = new Timer();\n\t\t\t\tif (restartTimer != null) {\n\t\t\t\t\trestartTimer.cancel();\n\t\t\t\t}\n\t\t\t\trestartTimer = new Timer();\n\t\t\t\trestartTimer(period);\n\t\t\t\trelativeX = 0;\n\t\t\t\tgetOnLog(World.getSprites());\n\t\t\t\tvisible = true;\n\t\t\t\tmoveTimer(MOVE_FREQUENCY_MILLISECOND);\n\t\t\t\tstartTimer.cancel();\n\t\t\t}\n\t\t}, delay);\n\t}", "public void startTimer() {\n timer = new Timer();\n\n //initialize the TimerTask's job\n initializeTimerTask();\n\n //schedule the timer, after the first 5000ms the TimerTask will run every 10000ms\n timer.schedule(timerTask, 5000, Your_X_SECS * 1000); //\n //timer.schedule(timerTask, 5000,1000); //\n }", "@Test\n public void repeatingTask_changeRepeatPeriod_nextWeekDate() {\n LocalDate testDate = LocalDateTime.now().minusWeeks(1).minusDays(1).toLocalDate();\n LocalTime testTime = LocalTime.of(8, 30);\n LocalDateTime testDateTime = LocalDateTime.of(testDate, testTime);\n Event testEvent = new Event(\"8 days ago\", \"CS2113T\", testDateTime, testDateTime.plusHours(4),\n \"testing\");\n testTaskList.addTask(testEvent);\n // Set to 1w\n RepeatCommand testRepeatCommand = new RepeatCommand(2, 1, RepeatCommand.WEEKLY_ICON);\n testRepeatCommand.execute(testTaskList, testUi);\n RepeatEvent repeatEvent = (RepeatEvent) testTaskList.getTask(2);\n // Set to 1d\n testRepeatCommand = new RepeatCommand(2, 1, RepeatCommand.DAILY_ICON);\n testRepeatCommand.execute(testTaskList, testUi);\n repeatEvent = (RepeatEvent) testTaskList.getTask(2);\n\n assertEquals(repeatEvent.getPeriodCounter(), 0);\n assertEquals(repeatEvent.getNextDateTime(), LocalDateTime.of(LocalDate.now().plusWeeks(1), testTime));\n }", "protected void runEachMinute() {\n \n }", "@Override\n public void autonomousPeriodic() {\n teleopPeriodic();\n //Scheduler.getInstance().run();\n }", "private void doSomeThingRepeat() {\n\t\t\n\t\ttimer.scheduleAtFixedRate(new TimerTask() {\n\t\t\tint mHourNow = 0, mMinuteNow = 0;\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t\tfinal Calendar c = Calendar.getInstance();\n\t\t\t\tmHourNow = c.get(Calendar.HOUR_OF_DAY);\n\t\t\t\tmMinuteNow= c.get(Calendar.MINUTE);\n\t\t\t\ttime = prefs.getString(\"time\", \"\");\n\t\t\t\tString mHour = time.substring(0, 2);\n\t\t\t\tString mMinute = time.substring(3, 5) ;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tint mh = Integer.parseInt(mHour);\n\t\t\t\tint mm = Integer.parseInt(mMinute);\n\t\t\t\t\t\n\t\t\t\tif (mHourNow == mh && mMinuteNow == mm) {\n\t\t\t\t\tplayMediaAlarm();\n\t\t\t\t}\n\t\t\t\t\tLog.d(\"Myservice-doSomeThingRepeat\", mHourNow +\"h\"+ mMinuteNow + \"&&\" +mHour +\"h\" + mMinute);\n\t\t\t\t\n\t\t\t}\n\t\t}, 0, UPDATE);\n\t}", "public void scheduleTransaction(Transaction recurringTransaction) {\n long recurrencePeriodMillis = recurringTransaction.getRecurrencePeriod();\n long firstRunMillis = System.currentTimeMillis() + recurrencePeriodMillis;\n long recurringTransactionId = addTransaction(recurringTransaction);\n\n PendingIntent recurringPendingIntent = PendingIntent.getBroadcast(mContext,\n (int)recurringTransactionId, Transaction.createIntent(recurringTransaction), PendingIntent.FLAG_UPDATE_CURRENT);\n AlarmManager alarmManager = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE);\n alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, firstRunMillis,\n recurrencePeriodMillis, recurringPendingIntent);\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void clock(double period);", "@Override\n public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "private void createScheduledNotification(List<SessionModel> values, int test)\n\t{\n\n\t\t// Get new calendar object and set the date to now\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.setTimeInMillis(System.currentTimeMillis());\n\t\t// Add defined amount of days to the date\n\n\t\tgetBaseContext();\n\t\t// Retrieve alarm manager from the system\n\t\tAlarmManager alarmManager = (AlarmManager)getSystemService(Context.ALARM_SERVICE);\n\n\t\tfor (SessionModel element : values) {\n\n\t\t\tString[] ymd = element.getStartDateSplit();\n\t\t\tint month = Integer.parseInt(ymd[0]);\n\t\t\tint date = Integer.parseInt(ymd[1]);\n\t\t\tint year = Integer.parseInt(ymd[2]);\n\n\t\t\tString[] hm = element.getStartTimeSplit();\n\t\t\tint hour = Integer.parseInt(hm[0]);\n\t\t\tint min = Integer.parseInt(hm[1]);\n\n\t\t\tcalendar.set(Calendar.YEAR, year);\n\t\t\tcalendar.set(Calendar.MONTH, month);\n\t\t\tcalendar.set(Calendar.DATE, date);\n\t\t\tcalendar.set(Calendar.HOUR, hour);\n\t\t\tcalendar.set(Calendar.MINUTE, min);\n\n\t\t\tlong secs = calendar.getTimeInMillis();\n\t\t\tsecs -= 600000;\n\t\t\tcalendar.setTimeInMillis(secs);\n\t\t\tLog.w(\"AlarmManager-TDC2014 \", \"Setting Alarm Time : \" + calendar.toString());\n\t\t\tint id = (int) System.currentTimeMillis();\n\t\t\tIntent intent = new Intent(\"net.redirectme.apps.SESSION_NOTIFY\");\n\t\t\tintent.putExtra(android.content.Intent.EXTRA_TEXT, element.getId());\n\t\t\tintent.putExtra(android.content.Intent.EXTRA_TITLE, element.getName());;\n\t\t\tintent.putExtra(android.content.Intent.EXTRA_SUBJECT, element.getAuthor());\n\n\t\t\tint trackIcon = element.getTrackIcon();\n\t\t\tintent.putExtra(android.content.Intent.EXTRA_SHORTCUT_ICON, trackIcon);\n\n\n\t\t\tPendingIntent pendingIntent = PendingIntent.getBroadcast(this, id, intent, PendingIntent.FLAG_ONE_SHOT);\n\t\t\talarmManager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pendingIntent);\n\n\t\t}\n\t\tif(test==1)\n\t\t{\n\t\t\t// 5secs from now\n\t\t\tcalendar.setTimeInMillis(System.currentTimeMillis() + 10000);\n\t\t\tLog.w(\"AlarmManager-TEST \", \"Setting Alarm Time : \" + calendar.getTime());\n\t\t\tint id = (int) System.currentTimeMillis();\n\t\t\tIntent intent = new Intent(\"net.redirectme.apps.SESSION_NOTIFY\");\n\t\t\tlong value = 1;\n\t\t\tintent.putExtra(android.content.Intent.EXTRA_TEXT, value);\n\t\t\tintent.putExtra(android.content.Intent.EXTRA_TITLE, \"Test Session\");;\n\t\t\tintent.putExtra(android.content.Intent.EXTRA_SUBJECT, \"Sanjeev BA\");\n\t\t\tintent.putExtra(android.content.Intent.EXTRA_SHORTCUT_ICON, R.drawable.track_43_general);\n\n\t\t\tPendingIntent pendingIntent = PendingIntent.getBroadcast(this, id, intent, 0);\n\t\t\talarmManager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pendingIntent);\n\t\t}\n\n\t}", "public void autonomousPeriodic()\n\t{\n\t\tScheduler.getInstance().run();\n\t}", "@Scheduled(fixedRateString = \"PT120M\")\n\tvoid someJob(){\n//\t\tString s = \"Testing message.\\nNow time is : \"+new Date();\n////\t\tSystem.out.println(s);\n//\t\tPushNotificationOptions.sendMessageToAllUsers(s);\n//\n\t\t//get all schedules in current dayOfWeek\n\t\tCollection<Notification> notifications = notificationService.findAllByDayOfWeekAndTime();\n\t\tfor(Notification notification : notifications){\n//\t\t\tSystem.out.println(notification.toString());\n//\t\t\tSystem.out.println(!notification.getStatus());\n////\t\t\tSystem.out.println(check(notification.getStartTime()));\n//\t\t\t//check for already not sent notifications , also check for time difference < TIME_CONSTANT\n//\t\t\tif(!notification.getStatus() && check(notification.getStartTime())){\n//\t\t\t\t//send push notification\n//\t\t\t\tPushNotificationOptions.sendMessageToAllUsers(notification.getMessage());\n//\t\t\t\t//mark the notification as sent\n//\t\t\t\tnotificationService.setStatus(notification.getNotificationId());\n//\t\t\t}\n\t\t\tif(checkForDayTime()){\n\t\t\t\tPushNotificationOptions.sendMessageToAllUsers(notification.getMessage());\n\t\t\t\tnotificationService.setStatus(notification.getNotificationId());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t}", "@Override\n public void autonomousPeriodic()\n {\n Scheduler.getInstance().run();\n }", "private void scheduleJob() {\n\n }", "@Scheduled(cron = \"0 0 9 * * *\", zone = \"Asia/Bangkok\")\n public void testEveryNineAM() {\n// log.info(\"Hey Hoo!!!\");\n }", "@Override\n public void periodic() {\n // This method will be called once per scheduler run\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "ScheduledFuture<?> scheduleTask(long delay, Runnable runnable) {\n return timeoutTaskExecutor.schedule(runnable, delay, TimeUnit.MILLISECONDS);\n }", "public static void asyncTimer(long period, Run runnable) {\n\t\tnew BukkitRunnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\trunnable.run();\n\t\t\t}\n\t\t}.runTaskTimerAsynchronously(AreaShop.getInstance(), 0, period);\n\t}", "static void scheduleWork(Context context, final boolean shortInterval) {\n// PPApplicationStatic.logE(\"[SHEDULE_WORK] WifiScanWorker.scheduleWork\", \"shortInterval=\"+shortInterval);\n\n if (EventStatic.isEventPreferenceAllowed(EventPreferencesWifi.PREF_EVENT_WIFI_ENABLED, context).allowed\n == PreferenceAllowed.PREFERENCE_ALLOWED) {\n if (shortInterval) {\n _cancelWork(context, false);\n //PPApplication.sleep(5000);\n _scheduleWork(context, true);\n\n /*final Context appContext = context.getApplicationContext();\n PPApplication.startHandlerThreadPPScanners();\n final Handler __handler = new Handler(PPApplication.handlerThreadPPScanners.getLooper());\n //__handler.post(new PPApplication.PPHandlerThreadRunnable(\n // context.getApplicationContext()) {\n __handler.post(() -> {\n// PPApplicationStatic.logE(\"[IN_THREAD_HANDLER] PPApplication.startHandlerThreadPPScanners\", \"START run - from=WifiScanWorker.scheduleWork\" + \" shortInterval=true\");\n //Context appContext= appContextWeakRef.get();\n //if (appContext != null) {\n _cancelWork(appContext);\n PPApplication.sleep(5000);\n _scheduleWork(appContext, true);\n //}\n });*/\n }\n else\n _scheduleWork(context, false);\n }\n }", "@Override\n public void teleopPeriodic()\n {\n Scheduler.getInstance().run();\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}" ]
[ "0.7740395", "0.6663076", "0.66261166", "0.65520823", "0.64847314", "0.64431536", "0.6414124", "0.63627124", "0.62850475", "0.62826097", "0.62738436", "0.6244067", "0.6237417", "0.62350065", "0.6194068", "0.61535025", "0.614962", "0.6143192", "0.6133565", "0.6126968", "0.6046984", "0.6025458", "0.60230964", "0.60153335", "0.60054374", "0.5986271", "0.5977021", "0.594252", "0.59315884", "0.59148085", "0.5897755", "0.5877739", "0.5825443", "0.58199483", "0.57738346", "0.5769555", "0.5749708", "0.5746729", "0.5741269", "0.5726676", "0.5723506", "0.57099766", "0.57004696", "0.569392", "0.56920046", "0.5678049", "0.5663644", "0.5654062", "0.56520194", "0.56515557", "0.5635089", "0.56276155", "0.56218284", "0.56182855", "0.56177664", "0.5608938", "0.5601812", "0.5599261", "0.5596921", "0.559392", "0.555802", "0.5557322", "0.5550795", "0.55429405", "0.55402344", "0.5534269", "0.55337274", "0.55247533", "0.5518685", "0.551261", "0.5510476", "0.5503481", "0.55019313", "0.5496042", "0.54819167", "0.5477421", "0.5474863", "0.54635054", "0.54635054", "0.54635054", "0.54635054", "0.54635054", "0.54635054", "0.5456769", "0.54560286", "0.5453681", "0.54492164", "0.54437816", "0.5442608", "0.5440601", "0.54301363", "0.54201597", "0.5414172", "0.5414172", "0.5414172", "0.54133785", "0.5413378", "0.5410765", "0.539505", "0.53874606" ]
0.6573605
3
Schedule activity with a given name and timing details
public void schedule(String name, long period, TimeUnit tunit) { schedule(name, period, period, TimeUnit.MILLISECONDS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void schedule(String name, long initialDelay, long period, TimeUnit tunit, OpLevel severity) {\n\t\tif (future == null || future.isCancelled()) {\n\t\t\tactivityTask = newActivityTask(logger, name, severity);\n\t\t\tfuture = scheduler.scheduleAtFixedRate(activityTask, initialDelay, period, tunit);\n\t\t} else {\n\t\t\tthrow new IllegalStateException(\"Already scheduled\");\n\t\t}\n\t}", "public void schedule(String name, long period) {\n\t\tschedule(name, period, period, TimeUnit.MILLISECONDS);\n\t}", "public abstract void schedule();", "TimerSchedule createTimerSchedule();", "public void schedule(long period) {\n\t\tschedule(\"ActivityTask\", period, period, TimeUnit.MILLISECONDS);\n\t}", "Schedule createSchedule();", "public static synchronized void recordTimerActivity(String name, long time, Object o) {\r\n recordTimerActivity(name, time, o, false);\r\n }", "public void schedule(String name, long initialDelay, long period, TimeUnit tunit) {\n\t\tschedule(name, period, period, tunit, opLevel);\n\t}", "public void generateSchedule(){\n\t\t\n\t}", "public TimedTask(String task) {\n this.task = task;\n timeStart = System.currentTimeMillis();\n }", "public String scheduleAOneTimeJob(Object instance,\n String methodName,\n Class<?>[] inputTypes,\n Object[] inputParams,\n long initialDelay,\n TimeUnit timeUnit);", "private void beginSchedule(){\n\t\tDivaApp.getInstance().submitScheduledTask(new RandomUpdater(this), RandomUpdater.DELAY, RandomUpdater.PERIOD);\n\t}", "private ActionInterface timeSchedulingTest(PlayerInfo playerInfo, Timestamp executionTime, double responseFactor) {\r\n\r\n User user = playerInfo.getUser();\r\n int favouriteTime = playerInfo.getReceptivityForPlayer().getFavouriteTimeOfDay(ReceptivityProfile.SignificanceLevel.SPECIFIC);\r\n\r\n switch(favouriteTime){\r\n\r\n case ReceptivityProfile.DAY:\r\n\r\n if(randomize3(user, 0)){\r\n\r\n // Schedule correctly\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1000, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.DAY );\r\n }\r\n\r\n if(randomize3(user, 1)){\r\n\r\n // Schedule later\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1001, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.EVENING );\r\n }\r\n\r\n // Schedule earlier\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1002, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.NIGHT );\r\n\r\n case ReceptivityProfile.EVENING:\r\n\r\n if(randomize3(user, 0)){\r\n\r\n // Schedule correctly\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1011, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.EVENING );\r\n }\r\n\r\n if(randomize3(user, 1)){\r\n\r\n // Schedule later\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1012, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.NIGHT );\r\n }\r\n\r\n // Schedule earlier\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1010, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.DAY );\r\n\r\n case ReceptivityProfile.NIGHT:\r\n\r\n if(randomize3(user, 0)){\r\n\r\n // Schedule correctly\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1022, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.DAY );\r\n }\r\n\r\n if(randomize3(user, 1)){\r\n\r\n // Schedule later\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1020, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.EVENING );\r\n }\r\n\r\n // Schedule earlier\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1021, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.NIGHT );\r\n\r\n\r\n default:\r\n\r\n // No specific time of day for user.\r\n\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 3, getState(), responseFactor)\r\n .scheduleInTime( favouriteTime );\r\n\r\n }\r\n\r\n\r\n\r\n\r\n\r\n }", "public void schedule() {\n\t\tnew Timer().schedule(getTask(), TIME);\n\t}", "public ActivityScheduler(String name) {\n\t\tthis(name, null);\n\t}", "@Test\n public void testTask() throws InterruptedException {\n\n SchedulingRunnable task1 = new SchedulingRunnable(\"demoTask\", \"taskWithParams\", \"aaa\",\"111\");\n cronTaskRegistrar.addCronTask(task1, \"0/15 * * * * ?\");\n Thread.sleep(10000);\n\n SchedulingRunnable task2 = new SchedulingRunnable(\"demoTask\", \"taskWithParams\", \"aaa\",\"111\");\n cronTaskRegistrar.addCronTask(task2, \"0/8 * * * * ?\");\n // 便于观察\n\n Thread.sleep(3000000);\n }", "public static void main(String[] args) {\n\t\tMyTaskA a=new MyTaskA();\n\t\tMyTask task=new MyTask();\n\t\tCalendar ca=Calendar.getInstance();\n\t\tca.add(Calendar.SECOND, 10);\n\t\tCalendar ca1=Calendar.getInstance();\n\t\tca1.add(Calendar.SECOND, 11);\n\t\tSystem.out.println(\"计划执行时间为:\"+ca.getTime());\n\t\tSystem.out.println(\"计划执行时间为:\"+ca1.getTime());\n\t\tTimer t=new Timer();\n\t\tt.schedule(a, ca.getTime());\n\t\tt.schedule(task, ca1.getTime(),4000);\n\t\t\n\t}", "private void schedule() {\n service.scheduleDelayed(task, schedulingInterval);\n isScheduled = true;\n }", "protected abstract void startMonitoring(fr.inria.phoenix.diasuite.framework.datatype.dailyactivityname.DailyActivityName activity) throws Exception;", "private void scheduleJob() {\n\n }", "public void scheduleJob(JobInfo t) {\n Log.d(TAG, \"Scheduling job\");\n try {\n JobScheduler tm = (JobScheduler) appContext.getSystemService(appContext.JOB_SCHEDULER_SERVICE);\n tm.schedule(t);\n int i = 0;\n } catch (Exception e) {\n e.printStackTrace();\n int i = 0;\n }\n }", "public static void main(String[] args) {\n Task a = new Task(\"s\", new Date(0), new Date(1000*3600*24*7), 3600);\n a.setActive(true);\n System.out.println(a.getStartTime());\n System.out.println(a.getEndTime());\n System.out.println(a.nextTimeAfter(new Date(0)));\n\n\n\n }", "public void setAlarm(int time, String name){\n\t}", "@Override\n public void mySchedule(String date) {\n FastJsonRequest request = new FastJsonRequest(SystemUtils.mainUrl + MethodCode.CLASSSCHEDULE + MethodType.MYSCHEDULEV2, RequestMethod.POST);\n request.add(\"username\", application.getSystemUtils().getDefaultUsername());\n request.add(\"token\", application.getSystemUtils().getToken());\n request.add(\"date\", date);\n request.add(MethodCode.DEVICEID, application.getSystemUtils().getSn());\n request.add(MethodCode.DEVICETYPE, SystemUtils.deviceType);\n request.add(MethodCode.APPVERSION, SystemUtils.getVersionName(context));\n addQueue(MethodCode.EVENT_MYSCHEDULE, request);\n\n\n// startQueue();\n }", "public void setActTime(java.lang.String param) {\r\n localActTimeTracker = param != null;\r\n\r\n this.localActTime = param;\r\n }", "void schedule(ScheduledJob job);", "public void schedule(Context context, int requestCode)\n {\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n\n int alarmID = 0;\n Days[] days = getDays();\n int routineID = id;\n String routineName = name;\n\n Calendar routineTime = Calendar.getInstance();\n\n try\n {\n routineTime.setTime(Objects.requireNonNull(formatter.parse(time)));\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n\n // Schedule for each selected days\n for (Days day : days)\n {\n Calendar scheduleTime = Calendar.getInstance();\n\n // Set current calendar to current system time\n scheduleTime.setTimeInMillis(System.currentTimeMillis());\n scheduleTime.set(Calendar.HOUR_OF_DAY, routineTime.get(Calendar.HOUR_OF_DAY));\n scheduleTime.set(Calendar.MINUTE, routineTime.get(Calendar.MINUTE));\n scheduleTime.set(Calendar.SECOND, 0);\n scheduleTime.set(Calendar.MILLISECOND, 0);\n scheduleTime.set(Calendar.DAY_OF_MONTH, Calendar.DAY_OF_MONTH);\n\n switch(day)\n {\n case Sunday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);\n break;\n\n case Monday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);\n break;\n\n case Tuesday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.TUESDAY);\n break;\n\n case Wednesday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.WEDNESDAY);\n break;\n\n case Thursday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.THURSDAY);\n break;\n\n case Friday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.FRIDAY);\n break;\n\n case Saturday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.SATURDAY);\n break;\n }\n\n Log.i(\"Routine\", \"----- Scheduling -----\");\n\n // Check if whether the day selected has passed, if yes then\n // add 7 days into the scheduler\n if (scheduleTime.getTimeInMillis() <= System.currentTimeMillis())\n {\n scheduleTime.add(Calendar.DAY_OF_MONTH, 7);\n Log.i(\"Routine\", \"ADD 7 DAYS\");\n }\n\n // DEBUG LOG\n Log.i(\"Routine\", \"Routine ID : \" + routineID);\n Log.i(\"Routine\", \"Day : \" + scheduleTime.get(Calendar.DAY_OF_WEEK));\n Log.i(\"Routine\", \"Hours : \" + scheduleTime.get(Calendar.HOUR_OF_DAY));\n Log.i(\"Routine\", \"Minutes : \" + scheduleTime.get(Calendar.MINUTE));\n Log.i(\"Routine\", \"DOM : \" + scheduleTime.get(Calendar.DAY_OF_MONTH));\n Log.i(\"Routine\", \"Month : \" + scheduleTime.get(Calendar.MONTH));\n\n // Intent to handle broadcast from alarm manager\n Intent intent = new Intent(context, AlarmBroadcastReceiver.class);\n intent.putExtra(\"Routine ID\", routineID);\n intent.putExtra(\"Routine Name\", routineName);\n\n PendingIntent alarmPendingIntent = PendingIntent.getBroadcast(context, (routineID * 10) + alarmID, intent, 0);\n\n // Routine will always repeating\n int RUN_WEEKLY = 24 * 7 * 60 * 60 * 1000;\n\n switch(requestCode)\n {\n case REQ_ADD_SCHEDULE:\n Log.i(\"Routine\", \"SCHEDULE ACTION ADD\");\n\n // Schedule to alarm manager\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n alarmManager.setExactAndAllowWhileIdle(\n AlarmManager.RTC_WAKEUP,\n scheduleTime.getTimeInMillis(),\n alarmPendingIntent\n );\n }\n else\n {\n alarmManager.setExact(\n AlarmManager.RTC_WAKEUP,\n scheduleTime.getTimeInMillis(),\n alarmPendingIntent\n );\n }\n\n alarmID++;\n break;\n\n case REQ_DELETE_SCHEDULE:\n Log.i(\"Routine\", \"SCHEDULE ACTION REMOVE\");\n alarmManager.cancel(alarmPendingIntent);\n alarmID++;\n break;\n }\n }\n }", "@Scheduled(cron = \"0 0/30 8-9 * * *\")\n\tpublic void scheduleTaskCustomHourly() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 8:00, 8:30, 9:00, 9:30 O'clock Every Day - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "public void scheduleEvent(int number, TimeUnit measurement,TaskType taskType, RoomTask task) {\n task.setTaskType(taskType);\n \n long taskInSeconds = measurement.toSeconds(number);\n \n if (!this.tasks.containsKey(taskInSeconds)) {\n this.tasks.put(taskInSeconds, new ConcurrentLinkedQueue<>());\n }\n \n this.tasks.get(taskInSeconds).add(task);\n }", "public String addEvent(String name, String time) {\n USER_TASKS.add(new Event(name, time));\n return \" \" + USER_TASKS.get(USER_TASKS.size() - 1).toString();\n }", "public Schedule(int timeOfDay, int minute, int duration, List<Integer> daysOfWeek, List<SprinklerGroup> sprinklerGroups) {\n\t\tsuper();\n\t\t\n\t\t\tTimeOfDay = timeOfDay;\n\t\t\tMinute = minute;\n\t\t\tDuration = duration;\n\t\t\tDaysOfWeek = daysOfWeek;\n\t\t\tSprinklerGroups = sprinklerGroups;\n\t\t\tType=ScheduleType.TIMED;\t\n\t\t\n\t}", "void deschedule(ScheduledJob job);", "public void scheduleJobs();", "abstract public void computeSchedule();", "public void scheduleJob() {\n JobInfo.Builder builder = null;\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {\n builder = new JobInfo.Builder(mJobId++, mServiceComponent);\n builder.setMinimumLatency(1000);\n builder.setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY);\n // Extras, work duration.\n PersistableBundle extras = new PersistableBundle();\n extras.putLong(WORK_DURATION_KEY, Long.valueOf(1) * 1000);\n extras.putString(\"gsonData\", gsonDataa);\n extras.putInt(\"servicetype\", 1);\n builder.setExtras(extras);\n // Schedule job\n Log.d(TAG, \"Scheduling job\");\n JobScheduler tm = (JobScheduler) getSystemService(Context.JOB_SCHEDULER_SERVICE);\n tm.schedule(builder.build());\n\n }\n\n\n\n }", "public Schedule(List<Integer> SprinklerIDs,int timeOfDay, int minute, int duration, List<Integer> daysOfWeek) {\n\t\tsuper();\n\t\tTimeOfDay = timeOfDay;\n\t\tMinute = minute;\n\t\tDuration = duration;\n\t\tDaysOfWeek = daysOfWeek;\n\t\tSprinklerIDs = SprinklerIDs;\n\t\tType=ScheduleType.TIMED;\n\t}", "public SchedulingRequest(LocalDateTime startTime, LocalDateTime endTime,\n LocalDateTime timeRequested, LocalDateTime timeCompleted,\n String name, Node room) {\n this();\n\n this.startTime.set(startTime);\n this.endTime.set(endTime);\n this.timeRequested.set(timeRequested);\n this.timeCompleted.set(timeCompleted);\n this.whoReserved.set(name);\n this.room.set(room);\n }", "public Task(String name, String category, Date start, Date end, Time s) throws Exception{\n\t\tthis.setName(name);\n\t\tthis.setCategory(category);\n\t\tthis.setEndDate(end);\n\t\tthis.setStartDate(start);\n\t\tthis.setStartTime(s);\n\t\tTime autoEndTime = new Time(s.getHours() + 1, s.getMins());\n\t\tthis.setEndTime(autoEndTime);\n\t\tsetIfOverdue();\n\t}", "@Scheduled(cron = \"0/20 * * * * *\")\n public void scheduleTaskSecond() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 20 Second - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "private String reschedule(MessageIntent intent, Conversation conv) \n throws IOException, IllegalStateException {\n switch (intent) {\n case AFFIRMATIVE:\n // schedule an appointment from scratch\n return proposeTime(conv, true);\n\n case CANCEL: // proceed to NEGATIVE\n case NEGATIVE:\n // archive, probably still do a message\n conv.setState(Conversation.STATE_ARCHIVED);\n\n // signoff\n return WordLattice.fromFile(\"yourewelcome.lat\")\n .generate(conv.getAppointmentTime(), conv.getName());\n default:\n Server.logger.log(Level.SEVERE, String.format(\"Got signal %s\", intent));\n throw new IllegalStateException(\"Reached an illegal action out of S3\");\n }\n }", "public void startScheduling() {\n new Thread(new Runnable() {\n public void run() {\n while(true) {\n try {\n Thread.sleep(30000);\n Calendar c = Calendar.getInstance();\n int min = c.get(Calendar.MINUTE);\n if (((min % 10) == 0) || (min == 0)) {\n boolean action = getLightOnWhenMovementDetectedSchedule().getCurrentSchedule();\n if (action) {\n configureSwitchOnWhenMovement(true);\n } else {\n configureSwitchOnWhenMovement(false);\n }\n action = getLightSchedule().getCurrentSchedule();\n if (action) {\n switchOn();\n } else {\n switchOff();\n }\n saveHistoryData();\n }\n Thread.sleep(30000);\n } catch (InterruptedException e) {\n return;\n } catch (RemoteHomeConnectionException e) {\n e.printStackTrace();\n } catch (RemoteHomeManagerException e) {\n e.printStackTrace();\n }\n }\n }\n }).start(); \n }", "public static void schedule(Context context, Intent intent, long triggerAtMillis) {\n /**\n * PendingIntent.getBroadcast\n *\n * PendingIntent.FLAG_UPDATE_CURRENT\n *\n * */\n PendingIntent p = PendingIntent.getBroadcast(context, 1, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n alarmManager.set(AlarmManager.RTC_WAKEUP, triggerAtMillis, p);\n //Log.i(TAG, \"ALARME com data/hora definido\");\n }", "void setSchedule(java.lang.String schedule);", "private void sleepByScheduleTime() throws InterruptedException\n\t{\n\t\tjava.util.Calendar calendar = java.util.Calendar.getInstance();\n\t\tcalendar.setTime(new java.util.Date(System.currentTimeMillis()));\n\t\tint currHour = calendar.get(calendar.HOUR_OF_DAY);\n\t\tif ((24 - currHour) * 60 < 2 * FtpData.SCHEDULE_TIME)\n\t\t{\n\t\t\tsleep((FtpData.SCHEDULE_TIME + 1) * 60000); // 00h:01\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsleep(FtpData.SCHEDULE_TIME * 60000); // n * minutes;\n\t\t}\n\t}", "private List<Schedule> getSchedules(String traverserName, int delay) {\n List<ScheduleTimeInterval> intervals =\n new ArrayList<ScheduleTimeInterval>();\n intervals.add(new ScheduleTimeInterval(\n new ScheduleTime(0),\n new ScheduleTime(0)));\n \n List<Schedule> schedules = new ArrayList<Schedule>();\n Schedule schedule = new Schedule(traverserName, false, 60, delay, intervals);\n schedules.add(schedule);\n return schedules;\n }", "protected abstract void scheduleSuspicions();", "public void scheduleAlarm() {\n\n Calendar cal = Calendar.getInstance();\n Intent alarmIntent = new Intent(context, PeriodicTransactionService.class);\n alarmIntent.setAction(PeriodicTransactionService.ACTION);\n Bundle bundle = new Bundle();\n bundle.putInt(PeriodicTransactionService.USER_ID_PARAM, userId);\n alarmIntent.putExtras(bundle);\n PendingIntent pintent = PendingIntent.getService(context,\n MyAlarmManager.REQUEST_CODE,\n alarmIntent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n AlarmManager alarm = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n alarm.setInexactRepeating(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), 4 * 1000, pintent);\n }", "private void schedule(PlanRecord plan, Context context) {\n Date d = null;\n\n try {\n DateTime test = new DateTime();\n test.setStringSQL(plan.offset);\n d = test.getYearMonthDay();\n } catch (java.text.ParseException e) {\n Log.e(\"PlanReceiver-schedule\", \"Couldn't schedule \" + plan.name + \"\\n e:\" + e);\n e.printStackTrace();\n }\n\n Log.e(\"PlanReceiver-schedule\", \"d.year=\" + (d.getYear() + 1900) + \" d.date=\" + d.getDate() + \" d.month=\" + d.getMonth());\n\n Calendar firstRun = new GregorianCalendar(d.getYear() + 1900, d.getMonth(), d.getDate());\n Log.e(\"PlanReceiver-schedule\", \"FirstRun:\" + firstRun);\n\n Intent intent = new Intent(context, PlanReceiver.class);\n intent.putExtra(\"plan_id\", plan.id);\n intent.putExtra(\"plan_acct_id\", plan.acctId);\n intent.putExtra(\"plan_name\", plan.name);\n intent.putExtra(\"plan_value\", plan.value);\n intent.putExtra(\"plan_type\", plan.type);\n intent.putExtra(\"plan_category\", plan.category);\n intent.putExtra(\"plan_memo\", plan.memo);\n intent.putExtra(\"plan_offset\", plan.offset);\n intent.putExtra(\"plan_rate\", plan.rate);\n intent.putExtra(\"plan_next\", plan.next);\n intent.putExtra(\"plan_scheduled\", plan.scheduled);\n intent.putExtra(\"plan_cleared\", plan.cleared);\n\n //Parse Rate (token 0 is amount, token 1 is type)\n final String phrase = plan.rate;\n final String[] tokens = phrase.split(\"[ ]+\");\n\n final PendingIntent sender = PendingIntent.getBroadcast(context, Integer.parseInt(plan.id), intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n //Get the AlarmManager service\n final AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n\n final Locale locale = context.getResources().getConfiguration().locale;\n final DateTime nextRun = new DateTime();\n\n if (tokens[1].contains(\"Days\")) {\n Log.d(\"PlanReceiver-schedule\", \"Days\");\n\n //If Starting Time is in the past, fire off next day(s)\n while (firstRun.before(Calendar.getInstance())) {\n firstRun.add(Calendar.DAY_OF_MONTH, Integer.parseInt(tokens[0]));\n }\n\n Log.d(\"PlanReceiver-schedule\", \"firstRun is \" + firstRun);\n\n nextRun.setCalendar(firstRun);\n\n ContentValues planValues = new ContentValues();\n planValues.put(DatabaseHelper.PLAN_NEXT, nextRun.getSQLDate(locale));\n context.getContentResolver().update(Uri.parse(MyContentProvider.PLANS_URI + \"/\" + plan.id), planValues, DatabaseHelper.PLAN_ID + \"=\" + plan.id, null);\n\n am.setRepeating(AlarmManager.RTC_WAKEUP, firstRun.getTimeInMillis(), (Integer.parseInt(tokens[0]) * AlarmManager.INTERVAL_DAY), sender);\n } else if (tokens[1].contains(\"Weeks\")) {\n Log.d(\"PlanReceiver-schedule\", \"Weeks\");\n\n //If Starting Time is in the past, fire off next week(s)\n while (firstRun.before(Calendar.getInstance())) {\n firstRun.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(tokens[0]));\n }\n\n Log.d(\"PlanReceiver-schedule\", \"firstRun is \" + firstRun);\n\n nextRun.setCalendar(firstRun);\n\n ContentValues planValues = new ContentValues();\n planValues.put(DatabaseHelper.PLAN_NEXT, nextRun.getSQLDate(locale));\n context.getContentResolver().update(Uri.parse(MyContentProvider.PLANS_URI + \"/\" + plan.id), planValues, DatabaseHelper.PLAN_ID + \"=\" + plan.id, null);\n\n am.setRepeating(AlarmManager.RTC_WAKEUP, firstRun.getTimeInMillis(), (Integer.parseInt(tokens[0]) * AlarmManager.INTERVAL_DAY) * 7, sender);\n } else if (tokens[1].contains(\"Months\")) {\n Log.d(\"PlanReceiver-schedule\", \"Months\");\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(cal.getTimeInMillis());\n cal.add(Calendar.MONTH, Integer.parseInt(tokens[0]));\n\n //If Starting Time is in the past, fire off next month(s)\n while (firstRun.before(Calendar.getInstance())) {\n firstRun.add(Calendar.MONTH, Integer.parseInt(tokens[0]));\n }\n\n Log.d(\"PlanReceiver-schedule\", \"firstRun is \" + firstRun);\n\n nextRun.setCalendar(firstRun);\n\n ContentValues planValues = new ContentValues();\n planValues.put(DatabaseHelper.PLAN_NEXT, nextRun.getSQLDate(locale));\n context.getContentResolver().update(Uri.parse(MyContentProvider.PLANS_URI + \"/\" + plan.id), planValues, DatabaseHelper.PLAN_ID + \"=\" + plan.id, null);\n\n am.setRepeating(AlarmManager.RTC_WAKEUP, firstRun.getTimeInMillis(), cal.getTimeInMillis(), sender);\n } else {\n Log.e(\"PlanReceiver-schedule\", \"Could not set alarm; Something wrong with the rate\");\n }\n\n }", "public Resource startedAtTime(Resource activity, Date date) {\n Statement atTime = model.createStatement(activity,\n model.createProperty(ProvOntology.getStartedAtTimeStartingPointPropertyFullURI()),\n getDateLiteral(date));\n model.add(atTime);\n return activity;\n }", "public void run(){\n Timer time = new Timer(); // Instantiate Timer Object\n\n ScheduledClass st = new ScheduledClass(this.job,this.shm,time,this.stopp); // Instantiate SheduledTask class\n time.schedule(st, 0, this.periodicwait); // Create Repetitively task for every 1 secs\n }", "@Scheduled(cron = \"0 0 8-10 * * *\")\n\tpublic void scheduleTaskHourly() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 8 - 10 O'clock Every Day - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "public Task(String taskName, int startHour, int startMinute, int finishHour, int finishMinute) {\n this.taskName = taskName;\n this.startHour = startHour;\n this.startMinute = startMinute;\n this.finishHour = finishHour;\n this.finishMinute = finishMinute;\n }", "public ActivityScheduler(String name, ActivityListener listener) {\n\t\tthis.name = name;\n\t\tTrackerConfig config = DefaultConfigFactory.getInstance().getConfig(name);\n\t\tif (listener != null) config.setActivityListener(listener);\n\t\tthis.logger = TrackingLogger.getInstance(config.build());\n\t\tthis.logger.setKeepThreadContext(false);\n\t}", "public Resource atTime(Resource activity, Resource instantaneousEvent) {\n return createStatement(activity.getURI(), ProvOntology.getAtTimeQualifiedPropertyFullURI(),\n instantaneousEvent.getURI());\n }", "@ExcludeClassInterceptors\n @Interceptors({InterceptorA.class, InterceptorB.class,\n InterceptorE.class, InterceptorF.class})\n @Schedule(second=\"*\", minute=\"*\", hour=\"*\", info=\"SlessEJB4-abef\")\n public void abef(Timer t) {}", "public Schedule(Date startTime, long repeatAfter, TimeUnit unit) {\n\t\tsuper();\n\t\tthis.startTime = startTime == null ? new Date() : startTime;\n\t\tthis.repeatAfter = repeatAfter;\n\t\tthis.unit = unit;\n\t}", "public static synchronized void recordTimerActivity(String name, long time, Object o, boolean writeToMessageLog) {\r\n Timer t = (Timer) _timers.get(name);\r\n if (t == null) {\r\n t = new Timer();\r\n _timers.put(name, t);\r\n }\r\n t.count++;\r\n t.totalTime += time;\r\n if (writeToMessageLog)\r\n MessageLog.writeDebugMessage(\"Timer:\" + name + \" elapsed time (ms):\" + time, o);\r\n }", "@WithName(\"schedule.delay\")\n @WithDefault(\"5s\")\n Duration scheduleDelay();", "@Scheduled(cron = \"0 0 10 17 8 ?\")\n\tpublic void scheduleTaskYearly() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 10:00 o'clock in 17 August - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "public void setSchedule(String timeframe) {\n\t\t\n\t}", "public void subTask(String name) {\n\r\n\t}", "java.lang.String getSchedule();", "public Task(String title, int start, int end, int repeat)\n {\n try\n {\n check(start, end, repeat);\n\n setTitle(title);\n\n if(repeat == 0)\n {\n setTime(start);\n }\n else\n {\n setTime(start, end, repeat);\n }\n\n setActive(false);\n }\n catch (IllegalArgumentException e)\n {\n System.out.println(\"Incorrect data for a repeated tasks\");\n throw e;\n }\n\n }", "public static void start(String name) {\n if (timers.containsKey(name)) {\n timers.get(name).start();\n } else {\n timers.put(name, new Timer());\n }\n }", "public Task(String name, int number) {\r\n this.name = name;\r\n this.id = number;\r\n this.timer = new Timer();\r\n }", "public void schedule(String id, String[] schedule) {\n\t}", "public void setActtime(String acttime) {\r\n this.acttime = acttime;\r\n }", "public Task(String name) {\n\t\tthis.name=name;\n\t}", "public void onScheduled(long scheduledTime);", "public void scheduleAlarm() {\n Log.v(getClass().getSimpleName(), \"Scheduling alarm\");\n\n // Construct an intent that will execute the AlarmReceiver\n Intent intent = new Intent(getApplicationContext(), AlarmReceiver.class);\n\n // Create a PendingIntent to be triggered when the alarm goes off\n final PendingIntent pIntent = PendingIntent.getBroadcast(this, AlarmReceiver.REQUEST_CODE,\n intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Setup periodic alarm every every half hour from this point onwards\n long firstMillis = System.currentTimeMillis(); // alarm is set right away\n AlarmManager alarm = (AlarmManager) this.getSystemService(Context.ALARM_SERVICE);\n\n // First parameter is the type: ELAPSED_REALTIME, ELAPSED_REALTIME_WAKEUP, RTC_WAKEUP\n // Interval can be INTERVAL_FIFTEEN_MINUTES, INTERVAL_HALF_HOUR, INTERVAL_HOUR, INTERVAL_DAY\n alarm.setInexactRepeating(AlarmManager.RTC_WAKEUP, firstMillis,\n AlarmManager.INTERVAL_FIFTEEN_MINUTES, pIntent);\n }", "public void saveScheduleManagement(Runnable task, LocalTime timePoint, Integer period, TimeUnit timeUnit) {\n LOGGER.info(\"START UP SAVE SCHEDULE MANAGEMENT.\");\n if (checkTodayCurrencyListInDb()) {\n saveCurrencyListToDb();\n ScheduledExecutorService service = Executors.newSingleThreadScheduledExecutor();\n service.scheduleAtFixedRate(task, calculateTimeBeforeStart(timePoint), period, timeUnit);\n } else {\n ScheduledExecutorService service = Executors.newSingleThreadScheduledExecutor();\n service.scheduleAtFixedRate(task, calculateTimeBeforeStart(timePoint), period, timeUnit);\n }\n }", "String scheduleACronJob(Object instance,\n String methodName,\n Class<?>[] inputTypes,\n Object[] inputParams,\n String cronExpression);", "public void scheduleAlarm() {\n Intent intent = new Intent(getApplicationContext(), MyAlarmReceiver.class);\n\n // Create a PendingIntent to be triggered when the alarm goes off\n final PendingIntent pendingIntent = PendingIntent.getBroadcast(this, MyAlarmReceiver.REQUEST_CODE, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n long firstMillis = System.currentTimeMillis(); // alarm is set right away\n\n AlarmManager alarm = (AlarmManager) this.getSystemService(Context.ALARM_SERVICE);\n\n // First parameter is the type: ELAPSED_REAL_TIME, ELAPSED_REAL_TIME_WAKEUP, RTC_WAKEUP\n // Interval can be INTERVAL_FIFTEEN_MINUTES, INTERVAL_HALF_HOUR, INTERVAL_HOUR, INTERVAL_DAY\n try {\n alarm.setInexactRepeating(AlarmManager.RTC_WAKEUP, firstMillis, 5000L, pendingIntent);\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n\n }", "public void scheduleAlarm()\n {\n hour = timePicker.getCurrentHour(); //get hour\n minute = timePicker.getCurrentMinute(); //get minutes\n alarmMgr = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n Intent intent = new Intent(getApplicationContext(), AlarmReceiver.class);\n alarmIntent = PendingIntent.getBroadcast(getApplicationContext(), 0, intent, 0);\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(System.currentTimeMillis());\n calendar.set(Calendar.HOUR_OF_DAY, hour);\n calendar.set(Calendar.MINUTE, minute);\n\n alarmMgr.setInexactRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),\n AlarmManager.INTERVAL_DAY, alarmIntent);\n Toast.makeText(this, \"Alarm scheduled for \" + hour + \":\" + minute, Toast.LENGTH_SHORT).show();\n\n }", "public void setActivationTime(java.util.Calendar param){\n localActivationTimeTracker = true;\n \n this.localActivationTime=param;\n \n\n }", "@Override\n\t\t\tpublic void subTask(String name) {\n\t\t\t\t\n\t\t\t}", "public void requestSchedule(AsynchronousScheduleResponseHandler asrh) throws RemoteException {\n\n\t\tAsynchResponder ar = new AsynchResponder(asrh);\n\t\t(new Thread(ar)).start();\n\n\t}", "public CronTimer(String name, int min) {\n this.name = name;\n cronExpression = \"*\" + \" \" + \"0/\" + min + \" \" + \"* * * ?\";\n }", "public static void scheduleJob() {\n Set<JobRequest> jobRequests = JobManager.instance().getAllJobRequestsForTag(MobssJob.TAG);\n if (!jobRequests.isEmpty()) {\n return;\n }\n\n new JobRequest.Builder(MobssJob.TAG)\n .setPeriodic(AlarmManager.INTERVAL_DAY)\n .setUpdateCurrent(true) // cancel any preexisting job with the same tag while being scheduled.\n// .setRequiredNetworkType(JobRequest.NetworkType.CONNECTED) // since the sync service needs network connection\n// .setRequirementsEnforced(true) // makes sure that all the requirements are met before starting the sync service, if at least one of the requirements is not met then the sync service will be rescheduled and not run\n .build()\n .schedule();\n }", "private void printNameWithTimes(Course course, String name, String type) {\n String startTime = \"\";\n String endTime = \"\";\n int[][] selection;\n\n if (type.equals(\"Section\")) {\n selection = course.getSubClassTimes().get(name);\n } else if (type.equals(\"Lab\")) {\n selection = course.getLabTimes().get(name);\n } else {\n selection = course.getTutorialTimes().get(name);\n }\n\n if (selection[0][1] == 0) {\n startTime = String.valueOf(selection[0][0]) + \":00\";\n } else {\n startTime = String.valueOf(selection[0][0]) + \":\" + String.valueOf(selection[0][1]);\n }\n\n if (selection[1][1] == 0) {\n endTime = String.valueOf(selection[1][0]) + \":00\";\n } else {\n endTime = String.valueOf(selection[1][0]) + \":\" + String.valueOf(selection[1][1]);\n }\n\n String days = intsToDays(selection[2]);\n\n System.out.println(\"\\t\" + type + \": \" + name + \"\\t Start: \" + startTime\n + \"\\t End: \" + endTime + \"\\t Days: \" + days);\n }", "public void scheduleGamesInLeagues(String leagueName) {\n // Click this button after you have all the teams in league, Automatic scheduling\n // League league = get from DB by leagueName\n // league.scheduledGames();\n }", "public static void main(String[] args) \n { \n Timer timer = new Timer(); \n TimerTask task = new Helper(); \n\n timer.schedule(task, 3000, 5000); \n System.out.println(\"hi\");\n\n }", "Task(String name) {\n this.name = name;\n }", "@Override\n\t\t\tpublic void setTaskName(String name) {\n\t\t\t\t\n\t\t\t}", "public void schedule(Runnable job, long delay, TimeUnit unit);", "public ScheduledTask (Task task, int startTime, int processor) {\n\t\tthis.task = task;\n\t\tthis.startTime = startTime;\n\t\tthis.processor = processor;\n\t}", "@Override\n\tpublic void setStartTime(int t) {\n\t\t\n\t}", "public void setTaskName(String name) {\n\r\n\t}", "@Scheduled(cron = \"0 0 9-17 * * MON-FRI\")\n\tpublic void scheduleTaskWeekly() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 9 - 17 O'clock Every Weekdays - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "public Task(String name, String category, Date start, Date end, Time s, Time e) throws Exception{\n\t\tthis.setName(name);\n\t\tthis.setCategory(category);\n\t\tthis.setEndDate(end);\n\t\tthis.setStartDate(start);\n\t\tthis.setStartTime(s);\n\t\tthis.setEndTime(e);\n\t\tsetIfOverdue();\n\t}", "public void buildSchedule() {\n class SimulationStep extends BasicAction {\n public void execute() {\n SimUtilities.shuffle(rabbitList);\n for (int i = 0; i < rabbitList.size(); i++) {\n RabbitsGrassSimulationAgent rabbit = rabbitList.get(i);\n rabbit.step();\n }\n\n reapDeadRabbits();\n\n displaySurf.updateDisplay();\n }\n }\n schedule.scheduleActionBeginning(0, new SimulationStep());\n\n class GrassGrowth extends BasicAction {\n public void execute() {\n space.spreadGrass(grassGrowthRate);\n }\n }\n schedule.scheduleActionBeginning(0, new GrassGrowth());\n\n class UpdatePopulationPlot extends BasicAction {\n public void execute() {\n populationPlot.step();\n }\n }\n schedule.scheduleActionAtInterval(5, new UpdatePopulationPlot());\n }", "public void clickSchedule(View view) {\n\n final String WorkoutText=WorkoutName.getText().toString();\n\n //Toast.makeText(CalendarActivity.this, WorkoutText, Toast.LENGTH_LONG).show();\n\n Calendar notification = Calendar.getInstance();\n notification.set(Calendar.DAY_OF_MONTH, _day );\n notification.set(Calendar.MONTH, _month);\n notification.set(Calendar.HOUR,_hour);\n notification.set(Calendar.MINUTE, _minute);\n final String date = String.valueOf(_day) + '-' + String.valueOf(_month) + '-' + String.valueOf(_year);\n final String _time = time.getText().toString().replace(\" \",\"\");\n System.out.println(_time);\n final Session session = new Session(this);\n\n\n\n Schedule schedule = new Schedule(session.getUsername(), date, _time, WorkoutText);\n\n OkHttpClient httpClient = new OkHttpClient();\n Retrofit.Builder builder = new Retrofit.Builder()\n .baseUrl(WorkoutAPI.BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .client(httpClient);\n\n Retrofit retrofit = builder.build();\n WorkoutAPI requests = retrofit.create(WorkoutAPI.class);\n\n Call<ResponseBody> call = requests.newSchedulePost(schedule);\n call.enqueue(new Callback<ResponseBody>() {\n @Override\n public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {\n\n if(response.code() == 201){\n System.out.println(\"Success\");\n Session session = new Session(CalendarActivity.this);\n session.setDate(date);\n session.setTime(_time);\n session.setWorkout(WorkoutText);\n Intent intent = new Intent(getApplicationContext(),BodyListActivity.class);\n startActivity(intent);\n\n// PendingIntent alarmIntent = PendingIntent.getBroadcast(getApplicationContext(),111,intent,PendingIntent.FLAG_UPDATE_CURRENT);\n//\n// AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);\n// alarmManager.set(AlarmManager.RTC_WAKEUP, notification.getTimeInMillis(), alarmIntent);\n //include AlarmManager after Millis to set up intervals\n }else{\n System.out.println(\"Failed\");\n }\n }\n\n @Override\n public void onFailure(Call<ResponseBody> call, Throwable t) {\n System.out.println(\"Throws: \" + t);\n }\n\n });\n\n\n\n\n\n\n }", "public String scheduleAFixedDelayJob(Object instance,\n String methodName,\n Class<?>[] inputTypes,\n Object[] inputParams,\n long initialDelay,\n long taskDelay,\n TimeUnit timeUnit);", "private void updateSimState(Date currentSimDateTime){\n\n SimpleDateFormat ft =\n new SimpleDateFormat(\"E yyyy.MM.dd 'at' hh:mm:ss a\");\n String simDateTime = ft.format(currentSimDateTime);\n\n\n for(Person person : entirePopulation){\n for (Task task : person.getSchedule().getTasks()){\n int taskHour = task.getHourOfDay();\n\n int currentSimHour = currentSimDateTime.getHours();\n\n String output = \"{\" + taskHour + \" , \" + currentSimHour + \"}\";\n Log.d(\"Testing\", output);\n\n if(taskHour == currentSimHour ){\n // Perform given task now.\n Log.d(\"Task Executed: \", task.getTaskName());\n }\n }\n }\n }", "@Scheduled(cron = \"${toil1.schedule1}\")\n\tpublic void toiL1Schedule1() {\n\t\tlog.info(\"Running toiL1Schedule1\");\n\t\trunToiL1Schedule();\n\t\trunToiBlogsL1Schedule();\n\t}", "@Scheduled(fixedDelay=5000) //indicamos que esta tarea se repetira cada 5 segundos \n\tpublic void doTask() {\n\t\tLOGGER.info(\"Time is: \"+ new Date());\n\t}", "public static void scheduleJob(Context context) {\n ComponentName serviceComponent = new ComponentName(context, SimUtilService.class);\n JobInfo.Builder builder = new JobInfo.Builder(0, serviceComponent);\n builder.setMinimumLatency(1 * 1000); // wait at least\n builder.setOverrideDeadline(3 * 1000); // maximum delay\n JobScheduler jobScheduler = context.getSystemService(JobScheduler.class);\n jobScheduler.schedule(builder.build());\n }", "public abstract void maintenanceSchedule() ;", "public void creatTask(int uid,String title,String detail,int money,String type,int total_num,Timestamp end_time,String state);", "Observable<Task2> scheduleTask(String name, String groupKey, int executionOrder, Map<String, String> parameters,\n Trigger trigger);" ]
[ "0.65914714", "0.6284912", "0.6164715", "0.6124568", "0.6067508", "0.60291445", "0.5994606", "0.5968336", "0.59080815", "0.58535653", "0.5812753", "0.5792465", "0.5782935", "0.5775849", "0.5766724", "0.5765774", "0.57527494", "0.57404983", "0.56826794", "0.56613076", "0.56555337", "0.5641468", "0.5580452", "0.55788505", "0.55552137", "0.555392", "0.55316514", "0.54957455", "0.54842705", "0.5476416", "0.54684293", "0.5458665", "0.5444887", "0.54380786", "0.5417232", "0.54164743", "0.54158425", "0.5415063", "0.5399651", "0.53968996", "0.5387147", "0.5367061", "0.5355857", "0.5354629", "0.5351224", "0.53511775", "0.53465426", "0.5335158", "0.533193", "0.53302836", "0.5327036", "0.53262407", "0.5324143", "0.53125346", "0.5311019", "0.53071964", "0.5301219", "0.5295442", "0.5281224", "0.526619", "0.5251195", "0.5249477", "0.52486324", "0.52351445", "0.52274257", "0.52226937", "0.521579", "0.521367", "0.51981", "0.5193805", "0.51814383", "0.51774704", "0.5169488", "0.51621383", "0.5155965", "0.5150887", "0.513167", "0.5131455", "0.51287603", "0.5119382", "0.51189387", "0.51108027", "0.5109658", "0.51095325", "0.5104327", "0.5093545", "0.5090214", "0.5090133", "0.5087859", "0.5086808", "0.5084875", "0.508134", "0.5081067", "0.50711334", "0.5069287", "0.5061565", "0.50490713", "0.5047076", "0.50421643", "0.50396407" ]
0.6263216
2
Schedule activity with a given name and timing details
public void schedule(String name, long initialDelay, long period, TimeUnit tunit) { schedule(name, period, period, tunit, opLevel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void schedule(String name, long initialDelay, long period, TimeUnit tunit, OpLevel severity) {\n\t\tif (future == null || future.isCancelled()) {\n\t\t\tactivityTask = newActivityTask(logger, name, severity);\n\t\t\tfuture = scheduler.scheduleAtFixedRate(activityTask, initialDelay, period, tunit);\n\t\t} else {\n\t\t\tthrow new IllegalStateException(\"Already scheduled\");\n\t\t}\n\t}", "public void schedule(String name, long period) {\n\t\tschedule(name, period, period, TimeUnit.MILLISECONDS);\n\t}", "public void schedule(String name, long period, TimeUnit tunit) {\n\t\tschedule(name, period, period, TimeUnit.MILLISECONDS);\n\t}", "public abstract void schedule();", "TimerSchedule createTimerSchedule();", "public void schedule(long period) {\n\t\tschedule(\"ActivityTask\", period, period, TimeUnit.MILLISECONDS);\n\t}", "Schedule createSchedule();", "public static synchronized void recordTimerActivity(String name, long time, Object o) {\r\n recordTimerActivity(name, time, o, false);\r\n }", "public void generateSchedule(){\n\t\t\n\t}", "public TimedTask(String task) {\n this.task = task;\n timeStart = System.currentTimeMillis();\n }", "public String scheduleAOneTimeJob(Object instance,\n String methodName,\n Class<?>[] inputTypes,\n Object[] inputParams,\n long initialDelay,\n TimeUnit timeUnit);", "private void beginSchedule(){\n\t\tDivaApp.getInstance().submitScheduledTask(new RandomUpdater(this), RandomUpdater.DELAY, RandomUpdater.PERIOD);\n\t}", "private ActionInterface timeSchedulingTest(PlayerInfo playerInfo, Timestamp executionTime, double responseFactor) {\r\n\r\n User user = playerInfo.getUser();\r\n int favouriteTime = playerInfo.getReceptivityForPlayer().getFavouriteTimeOfDay(ReceptivityProfile.SignificanceLevel.SPECIFIC);\r\n\r\n switch(favouriteTime){\r\n\r\n case ReceptivityProfile.DAY:\r\n\r\n if(randomize3(user, 0)){\r\n\r\n // Schedule correctly\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1000, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.DAY );\r\n }\r\n\r\n if(randomize3(user, 1)){\r\n\r\n // Schedule later\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1001, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.EVENING );\r\n }\r\n\r\n // Schedule earlier\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1002, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.NIGHT );\r\n\r\n case ReceptivityProfile.EVENING:\r\n\r\n if(randomize3(user, 0)){\r\n\r\n // Schedule correctly\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1011, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.EVENING );\r\n }\r\n\r\n if(randomize3(user, 1)){\r\n\r\n // Schedule later\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1012, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.NIGHT );\r\n }\r\n\r\n // Schedule earlier\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1010, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.DAY );\r\n\r\n case ReceptivityProfile.NIGHT:\r\n\r\n if(randomize3(user, 0)){\r\n\r\n // Schedule correctly\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1022, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.DAY );\r\n }\r\n\r\n if(randomize3(user, 1)){\r\n\r\n // Schedule later\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1020, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.EVENING );\r\n }\r\n\r\n // Schedule earlier\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1021, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.NIGHT );\r\n\r\n\r\n default:\r\n\r\n // No specific time of day for user.\r\n\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 3, getState(), responseFactor)\r\n .scheduleInTime( favouriteTime );\r\n\r\n }\r\n\r\n\r\n\r\n\r\n\r\n }", "public void schedule() {\n\t\tnew Timer().schedule(getTask(), TIME);\n\t}", "public ActivityScheduler(String name) {\n\t\tthis(name, null);\n\t}", "@Test\n public void testTask() throws InterruptedException {\n\n SchedulingRunnable task1 = new SchedulingRunnable(\"demoTask\", \"taskWithParams\", \"aaa\",\"111\");\n cronTaskRegistrar.addCronTask(task1, \"0/15 * * * * ?\");\n Thread.sleep(10000);\n\n SchedulingRunnable task2 = new SchedulingRunnable(\"demoTask\", \"taskWithParams\", \"aaa\",\"111\");\n cronTaskRegistrar.addCronTask(task2, \"0/8 * * * * ?\");\n // 便于观察\n\n Thread.sleep(3000000);\n }", "public static void main(String[] args) {\n\t\tMyTaskA a=new MyTaskA();\n\t\tMyTask task=new MyTask();\n\t\tCalendar ca=Calendar.getInstance();\n\t\tca.add(Calendar.SECOND, 10);\n\t\tCalendar ca1=Calendar.getInstance();\n\t\tca1.add(Calendar.SECOND, 11);\n\t\tSystem.out.println(\"计划执行时间为:\"+ca.getTime());\n\t\tSystem.out.println(\"计划执行时间为:\"+ca1.getTime());\n\t\tTimer t=new Timer();\n\t\tt.schedule(a, ca.getTime());\n\t\tt.schedule(task, ca1.getTime(),4000);\n\t\t\n\t}", "private void schedule() {\n service.scheduleDelayed(task, schedulingInterval);\n isScheduled = true;\n }", "protected abstract void startMonitoring(fr.inria.phoenix.diasuite.framework.datatype.dailyactivityname.DailyActivityName activity) throws Exception;", "private void scheduleJob() {\n\n }", "public void scheduleJob(JobInfo t) {\n Log.d(TAG, \"Scheduling job\");\n try {\n JobScheduler tm = (JobScheduler) appContext.getSystemService(appContext.JOB_SCHEDULER_SERVICE);\n tm.schedule(t);\n int i = 0;\n } catch (Exception e) {\n e.printStackTrace();\n int i = 0;\n }\n }", "public static void main(String[] args) {\n Task a = new Task(\"s\", new Date(0), new Date(1000*3600*24*7), 3600);\n a.setActive(true);\n System.out.println(a.getStartTime());\n System.out.println(a.getEndTime());\n System.out.println(a.nextTimeAfter(new Date(0)));\n\n\n\n }", "public void setAlarm(int time, String name){\n\t}", "@Override\n public void mySchedule(String date) {\n FastJsonRequest request = new FastJsonRequest(SystemUtils.mainUrl + MethodCode.CLASSSCHEDULE + MethodType.MYSCHEDULEV2, RequestMethod.POST);\n request.add(\"username\", application.getSystemUtils().getDefaultUsername());\n request.add(\"token\", application.getSystemUtils().getToken());\n request.add(\"date\", date);\n request.add(MethodCode.DEVICEID, application.getSystemUtils().getSn());\n request.add(MethodCode.DEVICETYPE, SystemUtils.deviceType);\n request.add(MethodCode.APPVERSION, SystemUtils.getVersionName(context));\n addQueue(MethodCode.EVENT_MYSCHEDULE, request);\n\n\n// startQueue();\n }", "public void setActTime(java.lang.String param) {\r\n localActTimeTracker = param != null;\r\n\r\n this.localActTime = param;\r\n }", "void schedule(ScheduledJob job);", "public void schedule(Context context, int requestCode)\n {\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n\n int alarmID = 0;\n Days[] days = getDays();\n int routineID = id;\n String routineName = name;\n\n Calendar routineTime = Calendar.getInstance();\n\n try\n {\n routineTime.setTime(Objects.requireNonNull(formatter.parse(time)));\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n\n // Schedule for each selected days\n for (Days day : days)\n {\n Calendar scheduleTime = Calendar.getInstance();\n\n // Set current calendar to current system time\n scheduleTime.setTimeInMillis(System.currentTimeMillis());\n scheduleTime.set(Calendar.HOUR_OF_DAY, routineTime.get(Calendar.HOUR_OF_DAY));\n scheduleTime.set(Calendar.MINUTE, routineTime.get(Calendar.MINUTE));\n scheduleTime.set(Calendar.SECOND, 0);\n scheduleTime.set(Calendar.MILLISECOND, 0);\n scheduleTime.set(Calendar.DAY_OF_MONTH, Calendar.DAY_OF_MONTH);\n\n switch(day)\n {\n case Sunday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);\n break;\n\n case Monday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);\n break;\n\n case Tuesday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.TUESDAY);\n break;\n\n case Wednesday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.WEDNESDAY);\n break;\n\n case Thursday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.THURSDAY);\n break;\n\n case Friday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.FRIDAY);\n break;\n\n case Saturday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.SATURDAY);\n break;\n }\n\n Log.i(\"Routine\", \"----- Scheduling -----\");\n\n // Check if whether the day selected has passed, if yes then\n // add 7 days into the scheduler\n if (scheduleTime.getTimeInMillis() <= System.currentTimeMillis())\n {\n scheduleTime.add(Calendar.DAY_OF_MONTH, 7);\n Log.i(\"Routine\", \"ADD 7 DAYS\");\n }\n\n // DEBUG LOG\n Log.i(\"Routine\", \"Routine ID : \" + routineID);\n Log.i(\"Routine\", \"Day : \" + scheduleTime.get(Calendar.DAY_OF_WEEK));\n Log.i(\"Routine\", \"Hours : \" + scheduleTime.get(Calendar.HOUR_OF_DAY));\n Log.i(\"Routine\", \"Minutes : \" + scheduleTime.get(Calendar.MINUTE));\n Log.i(\"Routine\", \"DOM : \" + scheduleTime.get(Calendar.DAY_OF_MONTH));\n Log.i(\"Routine\", \"Month : \" + scheduleTime.get(Calendar.MONTH));\n\n // Intent to handle broadcast from alarm manager\n Intent intent = new Intent(context, AlarmBroadcastReceiver.class);\n intent.putExtra(\"Routine ID\", routineID);\n intent.putExtra(\"Routine Name\", routineName);\n\n PendingIntent alarmPendingIntent = PendingIntent.getBroadcast(context, (routineID * 10) + alarmID, intent, 0);\n\n // Routine will always repeating\n int RUN_WEEKLY = 24 * 7 * 60 * 60 * 1000;\n\n switch(requestCode)\n {\n case REQ_ADD_SCHEDULE:\n Log.i(\"Routine\", \"SCHEDULE ACTION ADD\");\n\n // Schedule to alarm manager\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n alarmManager.setExactAndAllowWhileIdle(\n AlarmManager.RTC_WAKEUP,\n scheduleTime.getTimeInMillis(),\n alarmPendingIntent\n );\n }\n else\n {\n alarmManager.setExact(\n AlarmManager.RTC_WAKEUP,\n scheduleTime.getTimeInMillis(),\n alarmPendingIntent\n );\n }\n\n alarmID++;\n break;\n\n case REQ_DELETE_SCHEDULE:\n Log.i(\"Routine\", \"SCHEDULE ACTION REMOVE\");\n alarmManager.cancel(alarmPendingIntent);\n alarmID++;\n break;\n }\n }\n }", "@Scheduled(cron = \"0 0/30 8-9 * * *\")\n\tpublic void scheduleTaskCustomHourly() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 8:00, 8:30, 9:00, 9:30 O'clock Every Day - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "public void scheduleEvent(int number, TimeUnit measurement,TaskType taskType, RoomTask task) {\n task.setTaskType(taskType);\n \n long taskInSeconds = measurement.toSeconds(number);\n \n if (!this.tasks.containsKey(taskInSeconds)) {\n this.tasks.put(taskInSeconds, new ConcurrentLinkedQueue<>());\n }\n \n this.tasks.get(taskInSeconds).add(task);\n }", "public String addEvent(String name, String time) {\n USER_TASKS.add(new Event(name, time));\n return \" \" + USER_TASKS.get(USER_TASKS.size() - 1).toString();\n }", "public Schedule(int timeOfDay, int minute, int duration, List<Integer> daysOfWeek, List<SprinklerGroup> sprinklerGroups) {\n\t\tsuper();\n\t\t\n\t\t\tTimeOfDay = timeOfDay;\n\t\t\tMinute = minute;\n\t\t\tDuration = duration;\n\t\t\tDaysOfWeek = daysOfWeek;\n\t\t\tSprinklerGroups = sprinklerGroups;\n\t\t\tType=ScheduleType.TIMED;\t\n\t\t\n\t}", "void deschedule(ScheduledJob job);", "public void scheduleJobs();", "abstract public void computeSchedule();", "public void scheduleJob() {\n JobInfo.Builder builder = null;\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {\n builder = new JobInfo.Builder(mJobId++, mServiceComponent);\n builder.setMinimumLatency(1000);\n builder.setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY);\n // Extras, work duration.\n PersistableBundle extras = new PersistableBundle();\n extras.putLong(WORK_DURATION_KEY, Long.valueOf(1) * 1000);\n extras.putString(\"gsonData\", gsonDataa);\n extras.putInt(\"servicetype\", 1);\n builder.setExtras(extras);\n // Schedule job\n Log.d(TAG, \"Scheduling job\");\n JobScheduler tm = (JobScheduler) getSystemService(Context.JOB_SCHEDULER_SERVICE);\n tm.schedule(builder.build());\n\n }\n\n\n\n }", "public Schedule(List<Integer> SprinklerIDs,int timeOfDay, int minute, int duration, List<Integer> daysOfWeek) {\n\t\tsuper();\n\t\tTimeOfDay = timeOfDay;\n\t\tMinute = minute;\n\t\tDuration = duration;\n\t\tDaysOfWeek = daysOfWeek;\n\t\tSprinklerIDs = SprinklerIDs;\n\t\tType=ScheduleType.TIMED;\n\t}", "public SchedulingRequest(LocalDateTime startTime, LocalDateTime endTime,\n LocalDateTime timeRequested, LocalDateTime timeCompleted,\n String name, Node room) {\n this();\n\n this.startTime.set(startTime);\n this.endTime.set(endTime);\n this.timeRequested.set(timeRequested);\n this.timeCompleted.set(timeCompleted);\n this.whoReserved.set(name);\n this.room.set(room);\n }", "public Task(String name, String category, Date start, Date end, Time s) throws Exception{\n\t\tthis.setName(name);\n\t\tthis.setCategory(category);\n\t\tthis.setEndDate(end);\n\t\tthis.setStartDate(start);\n\t\tthis.setStartTime(s);\n\t\tTime autoEndTime = new Time(s.getHours() + 1, s.getMins());\n\t\tthis.setEndTime(autoEndTime);\n\t\tsetIfOverdue();\n\t}", "@Scheduled(cron = \"0/20 * * * * *\")\n public void scheduleTaskSecond() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 20 Second - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "private String reschedule(MessageIntent intent, Conversation conv) \n throws IOException, IllegalStateException {\n switch (intent) {\n case AFFIRMATIVE:\n // schedule an appointment from scratch\n return proposeTime(conv, true);\n\n case CANCEL: // proceed to NEGATIVE\n case NEGATIVE:\n // archive, probably still do a message\n conv.setState(Conversation.STATE_ARCHIVED);\n\n // signoff\n return WordLattice.fromFile(\"yourewelcome.lat\")\n .generate(conv.getAppointmentTime(), conv.getName());\n default:\n Server.logger.log(Level.SEVERE, String.format(\"Got signal %s\", intent));\n throw new IllegalStateException(\"Reached an illegal action out of S3\");\n }\n }", "public void startScheduling() {\n new Thread(new Runnable() {\n public void run() {\n while(true) {\n try {\n Thread.sleep(30000);\n Calendar c = Calendar.getInstance();\n int min = c.get(Calendar.MINUTE);\n if (((min % 10) == 0) || (min == 0)) {\n boolean action = getLightOnWhenMovementDetectedSchedule().getCurrentSchedule();\n if (action) {\n configureSwitchOnWhenMovement(true);\n } else {\n configureSwitchOnWhenMovement(false);\n }\n action = getLightSchedule().getCurrentSchedule();\n if (action) {\n switchOn();\n } else {\n switchOff();\n }\n saveHistoryData();\n }\n Thread.sleep(30000);\n } catch (InterruptedException e) {\n return;\n } catch (RemoteHomeConnectionException e) {\n e.printStackTrace();\n } catch (RemoteHomeManagerException e) {\n e.printStackTrace();\n }\n }\n }\n }).start(); \n }", "public static void schedule(Context context, Intent intent, long triggerAtMillis) {\n /**\n * PendingIntent.getBroadcast\n *\n * PendingIntent.FLAG_UPDATE_CURRENT\n *\n * */\n PendingIntent p = PendingIntent.getBroadcast(context, 1, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n alarmManager.set(AlarmManager.RTC_WAKEUP, triggerAtMillis, p);\n //Log.i(TAG, \"ALARME com data/hora definido\");\n }", "void setSchedule(java.lang.String schedule);", "private void sleepByScheduleTime() throws InterruptedException\n\t{\n\t\tjava.util.Calendar calendar = java.util.Calendar.getInstance();\n\t\tcalendar.setTime(new java.util.Date(System.currentTimeMillis()));\n\t\tint currHour = calendar.get(calendar.HOUR_OF_DAY);\n\t\tif ((24 - currHour) * 60 < 2 * FtpData.SCHEDULE_TIME)\n\t\t{\n\t\t\tsleep((FtpData.SCHEDULE_TIME + 1) * 60000); // 00h:01\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsleep(FtpData.SCHEDULE_TIME * 60000); // n * minutes;\n\t\t}\n\t}", "private List<Schedule> getSchedules(String traverserName, int delay) {\n List<ScheduleTimeInterval> intervals =\n new ArrayList<ScheduleTimeInterval>();\n intervals.add(new ScheduleTimeInterval(\n new ScheduleTime(0),\n new ScheduleTime(0)));\n \n List<Schedule> schedules = new ArrayList<Schedule>();\n Schedule schedule = new Schedule(traverserName, false, 60, delay, intervals);\n schedules.add(schedule);\n return schedules;\n }", "protected abstract void scheduleSuspicions();", "public void scheduleAlarm() {\n\n Calendar cal = Calendar.getInstance();\n Intent alarmIntent = new Intent(context, PeriodicTransactionService.class);\n alarmIntent.setAction(PeriodicTransactionService.ACTION);\n Bundle bundle = new Bundle();\n bundle.putInt(PeriodicTransactionService.USER_ID_PARAM, userId);\n alarmIntent.putExtras(bundle);\n PendingIntent pintent = PendingIntent.getService(context,\n MyAlarmManager.REQUEST_CODE,\n alarmIntent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n AlarmManager alarm = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n alarm.setInexactRepeating(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), 4 * 1000, pintent);\n }", "private void schedule(PlanRecord plan, Context context) {\n Date d = null;\n\n try {\n DateTime test = new DateTime();\n test.setStringSQL(plan.offset);\n d = test.getYearMonthDay();\n } catch (java.text.ParseException e) {\n Log.e(\"PlanReceiver-schedule\", \"Couldn't schedule \" + plan.name + \"\\n e:\" + e);\n e.printStackTrace();\n }\n\n Log.e(\"PlanReceiver-schedule\", \"d.year=\" + (d.getYear() + 1900) + \" d.date=\" + d.getDate() + \" d.month=\" + d.getMonth());\n\n Calendar firstRun = new GregorianCalendar(d.getYear() + 1900, d.getMonth(), d.getDate());\n Log.e(\"PlanReceiver-schedule\", \"FirstRun:\" + firstRun);\n\n Intent intent = new Intent(context, PlanReceiver.class);\n intent.putExtra(\"plan_id\", plan.id);\n intent.putExtra(\"plan_acct_id\", plan.acctId);\n intent.putExtra(\"plan_name\", plan.name);\n intent.putExtra(\"plan_value\", plan.value);\n intent.putExtra(\"plan_type\", plan.type);\n intent.putExtra(\"plan_category\", plan.category);\n intent.putExtra(\"plan_memo\", plan.memo);\n intent.putExtra(\"plan_offset\", plan.offset);\n intent.putExtra(\"plan_rate\", plan.rate);\n intent.putExtra(\"plan_next\", plan.next);\n intent.putExtra(\"plan_scheduled\", plan.scheduled);\n intent.putExtra(\"plan_cleared\", plan.cleared);\n\n //Parse Rate (token 0 is amount, token 1 is type)\n final String phrase = plan.rate;\n final String[] tokens = phrase.split(\"[ ]+\");\n\n final PendingIntent sender = PendingIntent.getBroadcast(context, Integer.parseInt(plan.id), intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n //Get the AlarmManager service\n final AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n\n final Locale locale = context.getResources().getConfiguration().locale;\n final DateTime nextRun = new DateTime();\n\n if (tokens[1].contains(\"Days\")) {\n Log.d(\"PlanReceiver-schedule\", \"Days\");\n\n //If Starting Time is in the past, fire off next day(s)\n while (firstRun.before(Calendar.getInstance())) {\n firstRun.add(Calendar.DAY_OF_MONTH, Integer.parseInt(tokens[0]));\n }\n\n Log.d(\"PlanReceiver-schedule\", \"firstRun is \" + firstRun);\n\n nextRun.setCalendar(firstRun);\n\n ContentValues planValues = new ContentValues();\n planValues.put(DatabaseHelper.PLAN_NEXT, nextRun.getSQLDate(locale));\n context.getContentResolver().update(Uri.parse(MyContentProvider.PLANS_URI + \"/\" + plan.id), planValues, DatabaseHelper.PLAN_ID + \"=\" + plan.id, null);\n\n am.setRepeating(AlarmManager.RTC_WAKEUP, firstRun.getTimeInMillis(), (Integer.parseInt(tokens[0]) * AlarmManager.INTERVAL_DAY), sender);\n } else if (tokens[1].contains(\"Weeks\")) {\n Log.d(\"PlanReceiver-schedule\", \"Weeks\");\n\n //If Starting Time is in the past, fire off next week(s)\n while (firstRun.before(Calendar.getInstance())) {\n firstRun.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(tokens[0]));\n }\n\n Log.d(\"PlanReceiver-schedule\", \"firstRun is \" + firstRun);\n\n nextRun.setCalendar(firstRun);\n\n ContentValues planValues = new ContentValues();\n planValues.put(DatabaseHelper.PLAN_NEXT, nextRun.getSQLDate(locale));\n context.getContentResolver().update(Uri.parse(MyContentProvider.PLANS_URI + \"/\" + plan.id), planValues, DatabaseHelper.PLAN_ID + \"=\" + plan.id, null);\n\n am.setRepeating(AlarmManager.RTC_WAKEUP, firstRun.getTimeInMillis(), (Integer.parseInt(tokens[0]) * AlarmManager.INTERVAL_DAY) * 7, sender);\n } else if (tokens[1].contains(\"Months\")) {\n Log.d(\"PlanReceiver-schedule\", \"Months\");\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(cal.getTimeInMillis());\n cal.add(Calendar.MONTH, Integer.parseInt(tokens[0]));\n\n //If Starting Time is in the past, fire off next month(s)\n while (firstRun.before(Calendar.getInstance())) {\n firstRun.add(Calendar.MONTH, Integer.parseInt(tokens[0]));\n }\n\n Log.d(\"PlanReceiver-schedule\", \"firstRun is \" + firstRun);\n\n nextRun.setCalendar(firstRun);\n\n ContentValues planValues = new ContentValues();\n planValues.put(DatabaseHelper.PLAN_NEXT, nextRun.getSQLDate(locale));\n context.getContentResolver().update(Uri.parse(MyContentProvider.PLANS_URI + \"/\" + plan.id), planValues, DatabaseHelper.PLAN_ID + \"=\" + plan.id, null);\n\n am.setRepeating(AlarmManager.RTC_WAKEUP, firstRun.getTimeInMillis(), cal.getTimeInMillis(), sender);\n } else {\n Log.e(\"PlanReceiver-schedule\", \"Could not set alarm; Something wrong with the rate\");\n }\n\n }", "public Resource startedAtTime(Resource activity, Date date) {\n Statement atTime = model.createStatement(activity,\n model.createProperty(ProvOntology.getStartedAtTimeStartingPointPropertyFullURI()),\n getDateLiteral(date));\n model.add(atTime);\n return activity;\n }", "public void run(){\n Timer time = new Timer(); // Instantiate Timer Object\n\n ScheduledClass st = new ScheduledClass(this.job,this.shm,time,this.stopp); // Instantiate SheduledTask class\n time.schedule(st, 0, this.periodicwait); // Create Repetitively task for every 1 secs\n }", "@Scheduled(cron = \"0 0 8-10 * * *\")\n\tpublic void scheduleTaskHourly() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 8 - 10 O'clock Every Day - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "public Task(String taskName, int startHour, int startMinute, int finishHour, int finishMinute) {\n this.taskName = taskName;\n this.startHour = startHour;\n this.startMinute = startMinute;\n this.finishHour = finishHour;\n this.finishMinute = finishMinute;\n }", "public ActivityScheduler(String name, ActivityListener listener) {\n\t\tthis.name = name;\n\t\tTrackerConfig config = DefaultConfigFactory.getInstance().getConfig(name);\n\t\tif (listener != null) config.setActivityListener(listener);\n\t\tthis.logger = TrackingLogger.getInstance(config.build());\n\t\tthis.logger.setKeepThreadContext(false);\n\t}", "public Resource atTime(Resource activity, Resource instantaneousEvent) {\n return createStatement(activity.getURI(), ProvOntology.getAtTimeQualifiedPropertyFullURI(),\n instantaneousEvent.getURI());\n }", "@ExcludeClassInterceptors\n @Interceptors({InterceptorA.class, InterceptorB.class,\n InterceptorE.class, InterceptorF.class})\n @Schedule(second=\"*\", minute=\"*\", hour=\"*\", info=\"SlessEJB4-abef\")\n public void abef(Timer t) {}", "public Schedule(Date startTime, long repeatAfter, TimeUnit unit) {\n\t\tsuper();\n\t\tthis.startTime = startTime == null ? new Date() : startTime;\n\t\tthis.repeatAfter = repeatAfter;\n\t\tthis.unit = unit;\n\t}", "public static synchronized void recordTimerActivity(String name, long time, Object o, boolean writeToMessageLog) {\r\n Timer t = (Timer) _timers.get(name);\r\n if (t == null) {\r\n t = new Timer();\r\n _timers.put(name, t);\r\n }\r\n t.count++;\r\n t.totalTime += time;\r\n if (writeToMessageLog)\r\n MessageLog.writeDebugMessage(\"Timer:\" + name + \" elapsed time (ms):\" + time, o);\r\n }", "@WithName(\"schedule.delay\")\n @WithDefault(\"5s\")\n Duration scheduleDelay();", "@Scheduled(cron = \"0 0 10 17 8 ?\")\n\tpublic void scheduleTaskYearly() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 10:00 o'clock in 17 August - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "public void setSchedule(String timeframe) {\n\t\t\n\t}", "public void subTask(String name) {\n\r\n\t}", "java.lang.String getSchedule();", "public Task(String title, int start, int end, int repeat)\n {\n try\n {\n check(start, end, repeat);\n\n setTitle(title);\n\n if(repeat == 0)\n {\n setTime(start);\n }\n else\n {\n setTime(start, end, repeat);\n }\n\n setActive(false);\n }\n catch (IllegalArgumentException e)\n {\n System.out.println(\"Incorrect data for a repeated tasks\");\n throw e;\n }\n\n }", "public static void start(String name) {\n if (timers.containsKey(name)) {\n timers.get(name).start();\n } else {\n timers.put(name, new Timer());\n }\n }", "public Task(String name, int number) {\r\n this.name = name;\r\n this.id = number;\r\n this.timer = new Timer();\r\n }", "public void schedule(String id, String[] schedule) {\n\t}", "public void setActtime(String acttime) {\r\n this.acttime = acttime;\r\n }", "public Task(String name) {\n\t\tthis.name=name;\n\t}", "public void onScheduled(long scheduledTime);", "public void scheduleAlarm() {\n Log.v(getClass().getSimpleName(), \"Scheduling alarm\");\n\n // Construct an intent that will execute the AlarmReceiver\n Intent intent = new Intent(getApplicationContext(), AlarmReceiver.class);\n\n // Create a PendingIntent to be triggered when the alarm goes off\n final PendingIntent pIntent = PendingIntent.getBroadcast(this, AlarmReceiver.REQUEST_CODE,\n intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Setup periodic alarm every every half hour from this point onwards\n long firstMillis = System.currentTimeMillis(); // alarm is set right away\n AlarmManager alarm = (AlarmManager) this.getSystemService(Context.ALARM_SERVICE);\n\n // First parameter is the type: ELAPSED_REALTIME, ELAPSED_REALTIME_WAKEUP, RTC_WAKEUP\n // Interval can be INTERVAL_FIFTEEN_MINUTES, INTERVAL_HALF_HOUR, INTERVAL_HOUR, INTERVAL_DAY\n alarm.setInexactRepeating(AlarmManager.RTC_WAKEUP, firstMillis,\n AlarmManager.INTERVAL_FIFTEEN_MINUTES, pIntent);\n }", "public void saveScheduleManagement(Runnable task, LocalTime timePoint, Integer period, TimeUnit timeUnit) {\n LOGGER.info(\"START UP SAVE SCHEDULE MANAGEMENT.\");\n if (checkTodayCurrencyListInDb()) {\n saveCurrencyListToDb();\n ScheduledExecutorService service = Executors.newSingleThreadScheduledExecutor();\n service.scheduleAtFixedRate(task, calculateTimeBeforeStart(timePoint), period, timeUnit);\n } else {\n ScheduledExecutorService service = Executors.newSingleThreadScheduledExecutor();\n service.scheduleAtFixedRate(task, calculateTimeBeforeStart(timePoint), period, timeUnit);\n }\n }", "String scheduleACronJob(Object instance,\n String methodName,\n Class<?>[] inputTypes,\n Object[] inputParams,\n String cronExpression);", "public void scheduleAlarm() {\n Intent intent = new Intent(getApplicationContext(), MyAlarmReceiver.class);\n\n // Create a PendingIntent to be triggered when the alarm goes off\n final PendingIntent pendingIntent = PendingIntent.getBroadcast(this, MyAlarmReceiver.REQUEST_CODE, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n long firstMillis = System.currentTimeMillis(); // alarm is set right away\n\n AlarmManager alarm = (AlarmManager) this.getSystemService(Context.ALARM_SERVICE);\n\n // First parameter is the type: ELAPSED_REAL_TIME, ELAPSED_REAL_TIME_WAKEUP, RTC_WAKEUP\n // Interval can be INTERVAL_FIFTEEN_MINUTES, INTERVAL_HALF_HOUR, INTERVAL_HOUR, INTERVAL_DAY\n try {\n alarm.setInexactRepeating(AlarmManager.RTC_WAKEUP, firstMillis, 5000L, pendingIntent);\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n\n }", "public void scheduleAlarm()\n {\n hour = timePicker.getCurrentHour(); //get hour\n minute = timePicker.getCurrentMinute(); //get minutes\n alarmMgr = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n Intent intent = new Intent(getApplicationContext(), AlarmReceiver.class);\n alarmIntent = PendingIntent.getBroadcast(getApplicationContext(), 0, intent, 0);\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(System.currentTimeMillis());\n calendar.set(Calendar.HOUR_OF_DAY, hour);\n calendar.set(Calendar.MINUTE, minute);\n\n alarmMgr.setInexactRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),\n AlarmManager.INTERVAL_DAY, alarmIntent);\n Toast.makeText(this, \"Alarm scheduled for \" + hour + \":\" + minute, Toast.LENGTH_SHORT).show();\n\n }", "public void setActivationTime(java.util.Calendar param){\n localActivationTimeTracker = true;\n \n this.localActivationTime=param;\n \n\n }", "@Override\n\t\t\tpublic void subTask(String name) {\n\t\t\t\t\n\t\t\t}", "public void requestSchedule(AsynchronousScheduleResponseHandler asrh) throws RemoteException {\n\n\t\tAsynchResponder ar = new AsynchResponder(asrh);\n\t\t(new Thread(ar)).start();\n\n\t}", "public CronTimer(String name, int min) {\n this.name = name;\n cronExpression = \"*\" + \" \" + \"0/\" + min + \" \" + \"* * * ?\";\n }", "public static void scheduleJob() {\n Set<JobRequest> jobRequests = JobManager.instance().getAllJobRequestsForTag(MobssJob.TAG);\n if (!jobRequests.isEmpty()) {\n return;\n }\n\n new JobRequest.Builder(MobssJob.TAG)\n .setPeriodic(AlarmManager.INTERVAL_DAY)\n .setUpdateCurrent(true) // cancel any preexisting job with the same tag while being scheduled.\n// .setRequiredNetworkType(JobRequest.NetworkType.CONNECTED) // since the sync service needs network connection\n// .setRequirementsEnforced(true) // makes sure that all the requirements are met before starting the sync service, if at least one of the requirements is not met then the sync service will be rescheduled and not run\n .build()\n .schedule();\n }", "private void printNameWithTimes(Course course, String name, String type) {\n String startTime = \"\";\n String endTime = \"\";\n int[][] selection;\n\n if (type.equals(\"Section\")) {\n selection = course.getSubClassTimes().get(name);\n } else if (type.equals(\"Lab\")) {\n selection = course.getLabTimes().get(name);\n } else {\n selection = course.getTutorialTimes().get(name);\n }\n\n if (selection[0][1] == 0) {\n startTime = String.valueOf(selection[0][0]) + \":00\";\n } else {\n startTime = String.valueOf(selection[0][0]) + \":\" + String.valueOf(selection[0][1]);\n }\n\n if (selection[1][1] == 0) {\n endTime = String.valueOf(selection[1][0]) + \":00\";\n } else {\n endTime = String.valueOf(selection[1][0]) + \":\" + String.valueOf(selection[1][1]);\n }\n\n String days = intsToDays(selection[2]);\n\n System.out.println(\"\\t\" + type + \": \" + name + \"\\t Start: \" + startTime\n + \"\\t End: \" + endTime + \"\\t Days: \" + days);\n }", "public void scheduleGamesInLeagues(String leagueName) {\n // Click this button after you have all the teams in league, Automatic scheduling\n // League league = get from DB by leagueName\n // league.scheduledGames();\n }", "public static void main(String[] args) \n { \n Timer timer = new Timer(); \n TimerTask task = new Helper(); \n\n timer.schedule(task, 3000, 5000); \n System.out.println(\"hi\");\n\n }", "Task(String name) {\n this.name = name;\n }", "@Override\n\t\t\tpublic void setTaskName(String name) {\n\t\t\t\t\n\t\t\t}", "public void schedule(Runnable job, long delay, TimeUnit unit);", "public ScheduledTask (Task task, int startTime, int processor) {\n\t\tthis.task = task;\n\t\tthis.startTime = startTime;\n\t\tthis.processor = processor;\n\t}", "@Override\n\tpublic void setStartTime(int t) {\n\t\t\n\t}", "public void setTaskName(String name) {\n\r\n\t}", "@Scheduled(cron = \"0 0 9-17 * * MON-FRI\")\n\tpublic void scheduleTaskWeekly() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 9 - 17 O'clock Every Weekdays - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "public Task(String name, String category, Date start, Date end, Time s, Time e) throws Exception{\n\t\tthis.setName(name);\n\t\tthis.setCategory(category);\n\t\tthis.setEndDate(end);\n\t\tthis.setStartDate(start);\n\t\tthis.setStartTime(s);\n\t\tthis.setEndTime(e);\n\t\tsetIfOverdue();\n\t}", "public void buildSchedule() {\n class SimulationStep extends BasicAction {\n public void execute() {\n SimUtilities.shuffle(rabbitList);\n for (int i = 0; i < rabbitList.size(); i++) {\n RabbitsGrassSimulationAgent rabbit = rabbitList.get(i);\n rabbit.step();\n }\n\n reapDeadRabbits();\n\n displaySurf.updateDisplay();\n }\n }\n schedule.scheduleActionBeginning(0, new SimulationStep());\n\n class GrassGrowth extends BasicAction {\n public void execute() {\n space.spreadGrass(grassGrowthRate);\n }\n }\n schedule.scheduleActionBeginning(0, new GrassGrowth());\n\n class UpdatePopulationPlot extends BasicAction {\n public void execute() {\n populationPlot.step();\n }\n }\n schedule.scheduleActionAtInterval(5, new UpdatePopulationPlot());\n }", "public void clickSchedule(View view) {\n\n final String WorkoutText=WorkoutName.getText().toString();\n\n //Toast.makeText(CalendarActivity.this, WorkoutText, Toast.LENGTH_LONG).show();\n\n Calendar notification = Calendar.getInstance();\n notification.set(Calendar.DAY_OF_MONTH, _day );\n notification.set(Calendar.MONTH, _month);\n notification.set(Calendar.HOUR,_hour);\n notification.set(Calendar.MINUTE, _minute);\n final String date = String.valueOf(_day) + '-' + String.valueOf(_month) + '-' + String.valueOf(_year);\n final String _time = time.getText().toString().replace(\" \",\"\");\n System.out.println(_time);\n final Session session = new Session(this);\n\n\n\n Schedule schedule = new Schedule(session.getUsername(), date, _time, WorkoutText);\n\n OkHttpClient httpClient = new OkHttpClient();\n Retrofit.Builder builder = new Retrofit.Builder()\n .baseUrl(WorkoutAPI.BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .client(httpClient);\n\n Retrofit retrofit = builder.build();\n WorkoutAPI requests = retrofit.create(WorkoutAPI.class);\n\n Call<ResponseBody> call = requests.newSchedulePost(schedule);\n call.enqueue(new Callback<ResponseBody>() {\n @Override\n public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {\n\n if(response.code() == 201){\n System.out.println(\"Success\");\n Session session = new Session(CalendarActivity.this);\n session.setDate(date);\n session.setTime(_time);\n session.setWorkout(WorkoutText);\n Intent intent = new Intent(getApplicationContext(),BodyListActivity.class);\n startActivity(intent);\n\n// PendingIntent alarmIntent = PendingIntent.getBroadcast(getApplicationContext(),111,intent,PendingIntent.FLAG_UPDATE_CURRENT);\n//\n// AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);\n// alarmManager.set(AlarmManager.RTC_WAKEUP, notification.getTimeInMillis(), alarmIntent);\n //include AlarmManager after Millis to set up intervals\n }else{\n System.out.println(\"Failed\");\n }\n }\n\n @Override\n public void onFailure(Call<ResponseBody> call, Throwable t) {\n System.out.println(\"Throws: \" + t);\n }\n\n });\n\n\n\n\n\n\n }", "public String scheduleAFixedDelayJob(Object instance,\n String methodName,\n Class<?>[] inputTypes,\n Object[] inputParams,\n long initialDelay,\n long taskDelay,\n TimeUnit timeUnit);", "private void updateSimState(Date currentSimDateTime){\n\n SimpleDateFormat ft =\n new SimpleDateFormat(\"E yyyy.MM.dd 'at' hh:mm:ss a\");\n String simDateTime = ft.format(currentSimDateTime);\n\n\n for(Person person : entirePopulation){\n for (Task task : person.getSchedule().getTasks()){\n int taskHour = task.getHourOfDay();\n\n int currentSimHour = currentSimDateTime.getHours();\n\n String output = \"{\" + taskHour + \" , \" + currentSimHour + \"}\";\n Log.d(\"Testing\", output);\n\n if(taskHour == currentSimHour ){\n // Perform given task now.\n Log.d(\"Task Executed: \", task.getTaskName());\n }\n }\n }\n }", "@Scheduled(cron = \"${toil1.schedule1}\")\n\tpublic void toiL1Schedule1() {\n\t\tlog.info(\"Running toiL1Schedule1\");\n\t\trunToiL1Schedule();\n\t\trunToiBlogsL1Schedule();\n\t}", "@Scheduled(fixedDelay=5000) //indicamos que esta tarea se repetira cada 5 segundos \n\tpublic void doTask() {\n\t\tLOGGER.info(\"Time is: \"+ new Date());\n\t}", "public static void scheduleJob(Context context) {\n ComponentName serviceComponent = new ComponentName(context, SimUtilService.class);\n JobInfo.Builder builder = new JobInfo.Builder(0, serviceComponent);\n builder.setMinimumLatency(1 * 1000); // wait at least\n builder.setOverrideDeadline(3 * 1000); // maximum delay\n JobScheduler jobScheduler = context.getSystemService(JobScheduler.class);\n jobScheduler.schedule(builder.build());\n }", "public abstract void maintenanceSchedule() ;", "public void creatTask(int uid,String title,String detail,int money,String type,int total_num,Timestamp end_time,String state);", "Observable<Task2> scheduleTask(String name, String groupKey, int executionOrder, Map<String, String> parameters,\n Trigger trigger);" ]
[ "0.65914714", "0.6284912", "0.6263216", "0.6164715", "0.6124568", "0.6067508", "0.60291445", "0.5994606", "0.59080815", "0.58535653", "0.5812753", "0.5792465", "0.5782935", "0.5775849", "0.5766724", "0.5765774", "0.57527494", "0.57404983", "0.56826794", "0.56613076", "0.56555337", "0.5641468", "0.5580452", "0.55788505", "0.55552137", "0.555392", "0.55316514", "0.54957455", "0.54842705", "0.5476416", "0.54684293", "0.5458665", "0.5444887", "0.54380786", "0.5417232", "0.54164743", "0.54158425", "0.5415063", "0.5399651", "0.53968996", "0.5387147", "0.5367061", "0.5355857", "0.5354629", "0.5351224", "0.53511775", "0.53465426", "0.5335158", "0.533193", "0.53302836", "0.5327036", "0.53262407", "0.5324143", "0.53125346", "0.5311019", "0.53071964", "0.5301219", "0.5295442", "0.5281224", "0.526619", "0.5251195", "0.5249477", "0.52486324", "0.52351445", "0.52274257", "0.52226937", "0.521579", "0.521367", "0.51981", "0.5193805", "0.51814383", "0.51774704", "0.5169488", "0.51621383", "0.5155965", "0.5150887", "0.513167", "0.5131455", "0.51287603", "0.5119382", "0.51189387", "0.51108027", "0.5109658", "0.51095325", "0.5104327", "0.5093545", "0.5090214", "0.5090133", "0.5087859", "0.5086808", "0.5084875", "0.508134", "0.5081067", "0.50711334", "0.5069287", "0.5061565", "0.50490713", "0.5047076", "0.50421643", "0.50396407" ]
0.5968336
8
Schedule activity with a given name and timing details
public void schedule(String name, long initialDelay, long period, TimeUnit tunit, OpLevel severity) { if (future == null || future.isCancelled()) { activityTask = newActivityTask(logger, name, severity); future = scheduler.scheduleAtFixedRate(activityTask, initialDelay, period, tunit); } else { throw new IllegalStateException("Already scheduled"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void schedule(String name, long period) {\n\t\tschedule(name, period, period, TimeUnit.MILLISECONDS);\n\t}", "public void schedule(String name, long period, TimeUnit tunit) {\n\t\tschedule(name, period, period, TimeUnit.MILLISECONDS);\n\t}", "public abstract void schedule();", "TimerSchedule createTimerSchedule();", "public void schedule(long period) {\n\t\tschedule(\"ActivityTask\", period, period, TimeUnit.MILLISECONDS);\n\t}", "Schedule createSchedule();", "public static synchronized void recordTimerActivity(String name, long time, Object o) {\r\n recordTimerActivity(name, time, o, false);\r\n }", "public void schedule(String name, long initialDelay, long period, TimeUnit tunit) {\n\t\tschedule(name, period, period, tunit, opLevel);\n\t}", "public void generateSchedule(){\n\t\t\n\t}", "public TimedTask(String task) {\n this.task = task;\n timeStart = System.currentTimeMillis();\n }", "public String scheduleAOneTimeJob(Object instance,\n String methodName,\n Class<?>[] inputTypes,\n Object[] inputParams,\n long initialDelay,\n TimeUnit timeUnit);", "private void beginSchedule(){\n\t\tDivaApp.getInstance().submitScheduledTask(new RandomUpdater(this), RandomUpdater.DELAY, RandomUpdater.PERIOD);\n\t}", "private ActionInterface timeSchedulingTest(PlayerInfo playerInfo, Timestamp executionTime, double responseFactor) {\r\n\r\n User user = playerInfo.getUser();\r\n int favouriteTime = playerInfo.getReceptivityForPlayer().getFavouriteTimeOfDay(ReceptivityProfile.SignificanceLevel.SPECIFIC);\r\n\r\n switch(favouriteTime){\r\n\r\n case ReceptivityProfile.DAY:\r\n\r\n if(randomize3(user, 0)){\r\n\r\n // Schedule correctly\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1000, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.DAY );\r\n }\r\n\r\n if(randomize3(user, 1)){\r\n\r\n // Schedule later\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1001, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.EVENING );\r\n }\r\n\r\n // Schedule earlier\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1002, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.NIGHT );\r\n\r\n case ReceptivityProfile.EVENING:\r\n\r\n if(randomize3(user, 0)){\r\n\r\n // Schedule correctly\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1011, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.EVENING );\r\n }\r\n\r\n if(randomize3(user, 1)){\r\n\r\n // Schedule later\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1012, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.NIGHT );\r\n }\r\n\r\n // Schedule earlier\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1010, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.DAY );\r\n\r\n case ReceptivityProfile.NIGHT:\r\n\r\n if(randomize3(user, 0)){\r\n\r\n // Schedule correctly\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1022, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.DAY );\r\n }\r\n\r\n if(randomize3(user, 1)){\r\n\r\n // Schedule later\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1020, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.EVENING );\r\n }\r\n\r\n // Schedule earlier\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1021, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.NIGHT );\r\n\r\n\r\n default:\r\n\r\n // No specific time of day for user.\r\n\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 3, getState(), responseFactor)\r\n .scheduleInTime( favouriteTime );\r\n\r\n }\r\n\r\n\r\n\r\n\r\n\r\n }", "public void schedule() {\n\t\tnew Timer().schedule(getTask(), TIME);\n\t}", "public ActivityScheduler(String name) {\n\t\tthis(name, null);\n\t}", "@Test\n public void testTask() throws InterruptedException {\n\n SchedulingRunnable task1 = new SchedulingRunnable(\"demoTask\", \"taskWithParams\", \"aaa\",\"111\");\n cronTaskRegistrar.addCronTask(task1, \"0/15 * * * * ?\");\n Thread.sleep(10000);\n\n SchedulingRunnable task2 = new SchedulingRunnable(\"demoTask\", \"taskWithParams\", \"aaa\",\"111\");\n cronTaskRegistrar.addCronTask(task2, \"0/8 * * * * ?\");\n // 便于观察\n\n Thread.sleep(3000000);\n }", "public static void main(String[] args) {\n\t\tMyTaskA a=new MyTaskA();\n\t\tMyTask task=new MyTask();\n\t\tCalendar ca=Calendar.getInstance();\n\t\tca.add(Calendar.SECOND, 10);\n\t\tCalendar ca1=Calendar.getInstance();\n\t\tca1.add(Calendar.SECOND, 11);\n\t\tSystem.out.println(\"计划执行时间为:\"+ca.getTime());\n\t\tSystem.out.println(\"计划执行时间为:\"+ca1.getTime());\n\t\tTimer t=new Timer();\n\t\tt.schedule(a, ca.getTime());\n\t\tt.schedule(task, ca1.getTime(),4000);\n\t\t\n\t}", "private void schedule() {\n service.scheduleDelayed(task, schedulingInterval);\n isScheduled = true;\n }", "protected abstract void startMonitoring(fr.inria.phoenix.diasuite.framework.datatype.dailyactivityname.DailyActivityName activity) throws Exception;", "private void scheduleJob() {\n\n }", "public void scheduleJob(JobInfo t) {\n Log.d(TAG, \"Scheduling job\");\n try {\n JobScheduler tm = (JobScheduler) appContext.getSystemService(appContext.JOB_SCHEDULER_SERVICE);\n tm.schedule(t);\n int i = 0;\n } catch (Exception e) {\n e.printStackTrace();\n int i = 0;\n }\n }", "public static void main(String[] args) {\n Task a = new Task(\"s\", new Date(0), new Date(1000*3600*24*7), 3600);\n a.setActive(true);\n System.out.println(a.getStartTime());\n System.out.println(a.getEndTime());\n System.out.println(a.nextTimeAfter(new Date(0)));\n\n\n\n }", "public void setAlarm(int time, String name){\n\t}", "@Override\n public void mySchedule(String date) {\n FastJsonRequest request = new FastJsonRequest(SystemUtils.mainUrl + MethodCode.CLASSSCHEDULE + MethodType.MYSCHEDULEV2, RequestMethod.POST);\n request.add(\"username\", application.getSystemUtils().getDefaultUsername());\n request.add(\"token\", application.getSystemUtils().getToken());\n request.add(\"date\", date);\n request.add(MethodCode.DEVICEID, application.getSystemUtils().getSn());\n request.add(MethodCode.DEVICETYPE, SystemUtils.deviceType);\n request.add(MethodCode.APPVERSION, SystemUtils.getVersionName(context));\n addQueue(MethodCode.EVENT_MYSCHEDULE, request);\n\n\n// startQueue();\n }", "public void setActTime(java.lang.String param) {\r\n localActTimeTracker = param != null;\r\n\r\n this.localActTime = param;\r\n }", "void schedule(ScheduledJob job);", "public void schedule(Context context, int requestCode)\n {\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n\n int alarmID = 0;\n Days[] days = getDays();\n int routineID = id;\n String routineName = name;\n\n Calendar routineTime = Calendar.getInstance();\n\n try\n {\n routineTime.setTime(Objects.requireNonNull(formatter.parse(time)));\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n\n // Schedule for each selected days\n for (Days day : days)\n {\n Calendar scheduleTime = Calendar.getInstance();\n\n // Set current calendar to current system time\n scheduleTime.setTimeInMillis(System.currentTimeMillis());\n scheduleTime.set(Calendar.HOUR_OF_DAY, routineTime.get(Calendar.HOUR_OF_DAY));\n scheduleTime.set(Calendar.MINUTE, routineTime.get(Calendar.MINUTE));\n scheduleTime.set(Calendar.SECOND, 0);\n scheduleTime.set(Calendar.MILLISECOND, 0);\n scheduleTime.set(Calendar.DAY_OF_MONTH, Calendar.DAY_OF_MONTH);\n\n switch(day)\n {\n case Sunday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);\n break;\n\n case Monday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);\n break;\n\n case Tuesday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.TUESDAY);\n break;\n\n case Wednesday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.WEDNESDAY);\n break;\n\n case Thursday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.THURSDAY);\n break;\n\n case Friday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.FRIDAY);\n break;\n\n case Saturday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.SATURDAY);\n break;\n }\n\n Log.i(\"Routine\", \"----- Scheduling -----\");\n\n // Check if whether the day selected has passed, if yes then\n // add 7 days into the scheduler\n if (scheduleTime.getTimeInMillis() <= System.currentTimeMillis())\n {\n scheduleTime.add(Calendar.DAY_OF_MONTH, 7);\n Log.i(\"Routine\", \"ADD 7 DAYS\");\n }\n\n // DEBUG LOG\n Log.i(\"Routine\", \"Routine ID : \" + routineID);\n Log.i(\"Routine\", \"Day : \" + scheduleTime.get(Calendar.DAY_OF_WEEK));\n Log.i(\"Routine\", \"Hours : \" + scheduleTime.get(Calendar.HOUR_OF_DAY));\n Log.i(\"Routine\", \"Minutes : \" + scheduleTime.get(Calendar.MINUTE));\n Log.i(\"Routine\", \"DOM : \" + scheduleTime.get(Calendar.DAY_OF_MONTH));\n Log.i(\"Routine\", \"Month : \" + scheduleTime.get(Calendar.MONTH));\n\n // Intent to handle broadcast from alarm manager\n Intent intent = new Intent(context, AlarmBroadcastReceiver.class);\n intent.putExtra(\"Routine ID\", routineID);\n intent.putExtra(\"Routine Name\", routineName);\n\n PendingIntent alarmPendingIntent = PendingIntent.getBroadcast(context, (routineID * 10) + alarmID, intent, 0);\n\n // Routine will always repeating\n int RUN_WEEKLY = 24 * 7 * 60 * 60 * 1000;\n\n switch(requestCode)\n {\n case REQ_ADD_SCHEDULE:\n Log.i(\"Routine\", \"SCHEDULE ACTION ADD\");\n\n // Schedule to alarm manager\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n alarmManager.setExactAndAllowWhileIdle(\n AlarmManager.RTC_WAKEUP,\n scheduleTime.getTimeInMillis(),\n alarmPendingIntent\n );\n }\n else\n {\n alarmManager.setExact(\n AlarmManager.RTC_WAKEUP,\n scheduleTime.getTimeInMillis(),\n alarmPendingIntent\n );\n }\n\n alarmID++;\n break;\n\n case REQ_DELETE_SCHEDULE:\n Log.i(\"Routine\", \"SCHEDULE ACTION REMOVE\");\n alarmManager.cancel(alarmPendingIntent);\n alarmID++;\n break;\n }\n }\n }", "@Scheduled(cron = \"0 0/30 8-9 * * *\")\n\tpublic void scheduleTaskCustomHourly() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 8:00, 8:30, 9:00, 9:30 O'clock Every Day - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "public void scheduleEvent(int number, TimeUnit measurement,TaskType taskType, RoomTask task) {\n task.setTaskType(taskType);\n \n long taskInSeconds = measurement.toSeconds(number);\n \n if (!this.tasks.containsKey(taskInSeconds)) {\n this.tasks.put(taskInSeconds, new ConcurrentLinkedQueue<>());\n }\n \n this.tasks.get(taskInSeconds).add(task);\n }", "public String addEvent(String name, String time) {\n USER_TASKS.add(new Event(name, time));\n return \" \" + USER_TASKS.get(USER_TASKS.size() - 1).toString();\n }", "public Schedule(int timeOfDay, int minute, int duration, List<Integer> daysOfWeek, List<SprinklerGroup> sprinklerGroups) {\n\t\tsuper();\n\t\t\n\t\t\tTimeOfDay = timeOfDay;\n\t\t\tMinute = minute;\n\t\t\tDuration = duration;\n\t\t\tDaysOfWeek = daysOfWeek;\n\t\t\tSprinklerGroups = sprinklerGroups;\n\t\t\tType=ScheduleType.TIMED;\t\n\t\t\n\t}", "void deschedule(ScheduledJob job);", "public void scheduleJobs();", "abstract public void computeSchedule();", "public void scheduleJob() {\n JobInfo.Builder builder = null;\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {\n builder = new JobInfo.Builder(mJobId++, mServiceComponent);\n builder.setMinimumLatency(1000);\n builder.setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY);\n // Extras, work duration.\n PersistableBundle extras = new PersistableBundle();\n extras.putLong(WORK_DURATION_KEY, Long.valueOf(1) * 1000);\n extras.putString(\"gsonData\", gsonDataa);\n extras.putInt(\"servicetype\", 1);\n builder.setExtras(extras);\n // Schedule job\n Log.d(TAG, \"Scheduling job\");\n JobScheduler tm = (JobScheduler) getSystemService(Context.JOB_SCHEDULER_SERVICE);\n tm.schedule(builder.build());\n\n }\n\n\n\n }", "public Schedule(List<Integer> SprinklerIDs,int timeOfDay, int minute, int duration, List<Integer> daysOfWeek) {\n\t\tsuper();\n\t\tTimeOfDay = timeOfDay;\n\t\tMinute = minute;\n\t\tDuration = duration;\n\t\tDaysOfWeek = daysOfWeek;\n\t\tSprinklerIDs = SprinklerIDs;\n\t\tType=ScheduleType.TIMED;\n\t}", "public SchedulingRequest(LocalDateTime startTime, LocalDateTime endTime,\n LocalDateTime timeRequested, LocalDateTime timeCompleted,\n String name, Node room) {\n this();\n\n this.startTime.set(startTime);\n this.endTime.set(endTime);\n this.timeRequested.set(timeRequested);\n this.timeCompleted.set(timeCompleted);\n this.whoReserved.set(name);\n this.room.set(room);\n }", "public Task(String name, String category, Date start, Date end, Time s) throws Exception{\n\t\tthis.setName(name);\n\t\tthis.setCategory(category);\n\t\tthis.setEndDate(end);\n\t\tthis.setStartDate(start);\n\t\tthis.setStartTime(s);\n\t\tTime autoEndTime = new Time(s.getHours() + 1, s.getMins());\n\t\tthis.setEndTime(autoEndTime);\n\t\tsetIfOverdue();\n\t}", "@Scheduled(cron = \"0/20 * * * * *\")\n public void scheduleTaskSecond() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 20 Second - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "private String reschedule(MessageIntent intent, Conversation conv) \n throws IOException, IllegalStateException {\n switch (intent) {\n case AFFIRMATIVE:\n // schedule an appointment from scratch\n return proposeTime(conv, true);\n\n case CANCEL: // proceed to NEGATIVE\n case NEGATIVE:\n // archive, probably still do a message\n conv.setState(Conversation.STATE_ARCHIVED);\n\n // signoff\n return WordLattice.fromFile(\"yourewelcome.lat\")\n .generate(conv.getAppointmentTime(), conv.getName());\n default:\n Server.logger.log(Level.SEVERE, String.format(\"Got signal %s\", intent));\n throw new IllegalStateException(\"Reached an illegal action out of S3\");\n }\n }", "public void startScheduling() {\n new Thread(new Runnable() {\n public void run() {\n while(true) {\n try {\n Thread.sleep(30000);\n Calendar c = Calendar.getInstance();\n int min = c.get(Calendar.MINUTE);\n if (((min % 10) == 0) || (min == 0)) {\n boolean action = getLightOnWhenMovementDetectedSchedule().getCurrentSchedule();\n if (action) {\n configureSwitchOnWhenMovement(true);\n } else {\n configureSwitchOnWhenMovement(false);\n }\n action = getLightSchedule().getCurrentSchedule();\n if (action) {\n switchOn();\n } else {\n switchOff();\n }\n saveHistoryData();\n }\n Thread.sleep(30000);\n } catch (InterruptedException e) {\n return;\n } catch (RemoteHomeConnectionException e) {\n e.printStackTrace();\n } catch (RemoteHomeManagerException e) {\n e.printStackTrace();\n }\n }\n }\n }).start(); \n }", "public static void schedule(Context context, Intent intent, long triggerAtMillis) {\n /**\n * PendingIntent.getBroadcast\n *\n * PendingIntent.FLAG_UPDATE_CURRENT\n *\n * */\n PendingIntent p = PendingIntent.getBroadcast(context, 1, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n alarmManager.set(AlarmManager.RTC_WAKEUP, triggerAtMillis, p);\n //Log.i(TAG, \"ALARME com data/hora definido\");\n }", "void setSchedule(java.lang.String schedule);", "private void sleepByScheduleTime() throws InterruptedException\n\t{\n\t\tjava.util.Calendar calendar = java.util.Calendar.getInstance();\n\t\tcalendar.setTime(new java.util.Date(System.currentTimeMillis()));\n\t\tint currHour = calendar.get(calendar.HOUR_OF_DAY);\n\t\tif ((24 - currHour) * 60 < 2 * FtpData.SCHEDULE_TIME)\n\t\t{\n\t\t\tsleep((FtpData.SCHEDULE_TIME + 1) * 60000); // 00h:01\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsleep(FtpData.SCHEDULE_TIME * 60000); // n * minutes;\n\t\t}\n\t}", "private List<Schedule> getSchedules(String traverserName, int delay) {\n List<ScheduleTimeInterval> intervals =\n new ArrayList<ScheduleTimeInterval>();\n intervals.add(new ScheduleTimeInterval(\n new ScheduleTime(0),\n new ScheduleTime(0)));\n \n List<Schedule> schedules = new ArrayList<Schedule>();\n Schedule schedule = new Schedule(traverserName, false, 60, delay, intervals);\n schedules.add(schedule);\n return schedules;\n }", "protected abstract void scheduleSuspicions();", "public void scheduleAlarm() {\n\n Calendar cal = Calendar.getInstance();\n Intent alarmIntent = new Intent(context, PeriodicTransactionService.class);\n alarmIntent.setAction(PeriodicTransactionService.ACTION);\n Bundle bundle = new Bundle();\n bundle.putInt(PeriodicTransactionService.USER_ID_PARAM, userId);\n alarmIntent.putExtras(bundle);\n PendingIntent pintent = PendingIntent.getService(context,\n MyAlarmManager.REQUEST_CODE,\n alarmIntent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n AlarmManager alarm = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n alarm.setInexactRepeating(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), 4 * 1000, pintent);\n }", "private void schedule(PlanRecord plan, Context context) {\n Date d = null;\n\n try {\n DateTime test = new DateTime();\n test.setStringSQL(plan.offset);\n d = test.getYearMonthDay();\n } catch (java.text.ParseException e) {\n Log.e(\"PlanReceiver-schedule\", \"Couldn't schedule \" + plan.name + \"\\n e:\" + e);\n e.printStackTrace();\n }\n\n Log.e(\"PlanReceiver-schedule\", \"d.year=\" + (d.getYear() + 1900) + \" d.date=\" + d.getDate() + \" d.month=\" + d.getMonth());\n\n Calendar firstRun = new GregorianCalendar(d.getYear() + 1900, d.getMonth(), d.getDate());\n Log.e(\"PlanReceiver-schedule\", \"FirstRun:\" + firstRun);\n\n Intent intent = new Intent(context, PlanReceiver.class);\n intent.putExtra(\"plan_id\", plan.id);\n intent.putExtra(\"plan_acct_id\", plan.acctId);\n intent.putExtra(\"plan_name\", plan.name);\n intent.putExtra(\"plan_value\", plan.value);\n intent.putExtra(\"plan_type\", plan.type);\n intent.putExtra(\"plan_category\", plan.category);\n intent.putExtra(\"plan_memo\", plan.memo);\n intent.putExtra(\"plan_offset\", plan.offset);\n intent.putExtra(\"plan_rate\", plan.rate);\n intent.putExtra(\"plan_next\", plan.next);\n intent.putExtra(\"plan_scheduled\", plan.scheduled);\n intent.putExtra(\"plan_cleared\", plan.cleared);\n\n //Parse Rate (token 0 is amount, token 1 is type)\n final String phrase = plan.rate;\n final String[] tokens = phrase.split(\"[ ]+\");\n\n final PendingIntent sender = PendingIntent.getBroadcast(context, Integer.parseInt(plan.id), intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n //Get the AlarmManager service\n final AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n\n final Locale locale = context.getResources().getConfiguration().locale;\n final DateTime nextRun = new DateTime();\n\n if (tokens[1].contains(\"Days\")) {\n Log.d(\"PlanReceiver-schedule\", \"Days\");\n\n //If Starting Time is in the past, fire off next day(s)\n while (firstRun.before(Calendar.getInstance())) {\n firstRun.add(Calendar.DAY_OF_MONTH, Integer.parseInt(tokens[0]));\n }\n\n Log.d(\"PlanReceiver-schedule\", \"firstRun is \" + firstRun);\n\n nextRun.setCalendar(firstRun);\n\n ContentValues planValues = new ContentValues();\n planValues.put(DatabaseHelper.PLAN_NEXT, nextRun.getSQLDate(locale));\n context.getContentResolver().update(Uri.parse(MyContentProvider.PLANS_URI + \"/\" + plan.id), planValues, DatabaseHelper.PLAN_ID + \"=\" + plan.id, null);\n\n am.setRepeating(AlarmManager.RTC_WAKEUP, firstRun.getTimeInMillis(), (Integer.parseInt(tokens[0]) * AlarmManager.INTERVAL_DAY), sender);\n } else if (tokens[1].contains(\"Weeks\")) {\n Log.d(\"PlanReceiver-schedule\", \"Weeks\");\n\n //If Starting Time is in the past, fire off next week(s)\n while (firstRun.before(Calendar.getInstance())) {\n firstRun.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(tokens[0]));\n }\n\n Log.d(\"PlanReceiver-schedule\", \"firstRun is \" + firstRun);\n\n nextRun.setCalendar(firstRun);\n\n ContentValues planValues = new ContentValues();\n planValues.put(DatabaseHelper.PLAN_NEXT, nextRun.getSQLDate(locale));\n context.getContentResolver().update(Uri.parse(MyContentProvider.PLANS_URI + \"/\" + plan.id), planValues, DatabaseHelper.PLAN_ID + \"=\" + plan.id, null);\n\n am.setRepeating(AlarmManager.RTC_WAKEUP, firstRun.getTimeInMillis(), (Integer.parseInt(tokens[0]) * AlarmManager.INTERVAL_DAY) * 7, sender);\n } else if (tokens[1].contains(\"Months\")) {\n Log.d(\"PlanReceiver-schedule\", \"Months\");\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(cal.getTimeInMillis());\n cal.add(Calendar.MONTH, Integer.parseInt(tokens[0]));\n\n //If Starting Time is in the past, fire off next month(s)\n while (firstRun.before(Calendar.getInstance())) {\n firstRun.add(Calendar.MONTH, Integer.parseInt(tokens[0]));\n }\n\n Log.d(\"PlanReceiver-schedule\", \"firstRun is \" + firstRun);\n\n nextRun.setCalendar(firstRun);\n\n ContentValues planValues = new ContentValues();\n planValues.put(DatabaseHelper.PLAN_NEXT, nextRun.getSQLDate(locale));\n context.getContentResolver().update(Uri.parse(MyContentProvider.PLANS_URI + \"/\" + plan.id), planValues, DatabaseHelper.PLAN_ID + \"=\" + plan.id, null);\n\n am.setRepeating(AlarmManager.RTC_WAKEUP, firstRun.getTimeInMillis(), cal.getTimeInMillis(), sender);\n } else {\n Log.e(\"PlanReceiver-schedule\", \"Could not set alarm; Something wrong with the rate\");\n }\n\n }", "public Resource startedAtTime(Resource activity, Date date) {\n Statement atTime = model.createStatement(activity,\n model.createProperty(ProvOntology.getStartedAtTimeStartingPointPropertyFullURI()),\n getDateLiteral(date));\n model.add(atTime);\n return activity;\n }", "public void run(){\n Timer time = new Timer(); // Instantiate Timer Object\n\n ScheduledClass st = new ScheduledClass(this.job,this.shm,time,this.stopp); // Instantiate SheduledTask class\n time.schedule(st, 0, this.periodicwait); // Create Repetitively task for every 1 secs\n }", "@Scheduled(cron = \"0 0 8-10 * * *\")\n\tpublic void scheduleTaskHourly() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 8 - 10 O'clock Every Day - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "public Task(String taskName, int startHour, int startMinute, int finishHour, int finishMinute) {\n this.taskName = taskName;\n this.startHour = startHour;\n this.startMinute = startMinute;\n this.finishHour = finishHour;\n this.finishMinute = finishMinute;\n }", "public ActivityScheduler(String name, ActivityListener listener) {\n\t\tthis.name = name;\n\t\tTrackerConfig config = DefaultConfigFactory.getInstance().getConfig(name);\n\t\tif (listener != null) config.setActivityListener(listener);\n\t\tthis.logger = TrackingLogger.getInstance(config.build());\n\t\tthis.logger.setKeepThreadContext(false);\n\t}", "public Resource atTime(Resource activity, Resource instantaneousEvent) {\n return createStatement(activity.getURI(), ProvOntology.getAtTimeQualifiedPropertyFullURI(),\n instantaneousEvent.getURI());\n }", "@ExcludeClassInterceptors\n @Interceptors({InterceptorA.class, InterceptorB.class,\n InterceptorE.class, InterceptorF.class})\n @Schedule(second=\"*\", minute=\"*\", hour=\"*\", info=\"SlessEJB4-abef\")\n public void abef(Timer t) {}", "public Schedule(Date startTime, long repeatAfter, TimeUnit unit) {\n\t\tsuper();\n\t\tthis.startTime = startTime == null ? new Date() : startTime;\n\t\tthis.repeatAfter = repeatAfter;\n\t\tthis.unit = unit;\n\t}", "public static synchronized void recordTimerActivity(String name, long time, Object o, boolean writeToMessageLog) {\r\n Timer t = (Timer) _timers.get(name);\r\n if (t == null) {\r\n t = new Timer();\r\n _timers.put(name, t);\r\n }\r\n t.count++;\r\n t.totalTime += time;\r\n if (writeToMessageLog)\r\n MessageLog.writeDebugMessage(\"Timer:\" + name + \" elapsed time (ms):\" + time, o);\r\n }", "@WithName(\"schedule.delay\")\n @WithDefault(\"5s\")\n Duration scheduleDelay();", "@Scheduled(cron = \"0 0 10 17 8 ?\")\n\tpublic void scheduleTaskYearly() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 10:00 o'clock in 17 August - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "public void setSchedule(String timeframe) {\n\t\t\n\t}", "public void subTask(String name) {\n\r\n\t}", "java.lang.String getSchedule();", "public Task(String title, int start, int end, int repeat)\n {\n try\n {\n check(start, end, repeat);\n\n setTitle(title);\n\n if(repeat == 0)\n {\n setTime(start);\n }\n else\n {\n setTime(start, end, repeat);\n }\n\n setActive(false);\n }\n catch (IllegalArgumentException e)\n {\n System.out.println(\"Incorrect data for a repeated tasks\");\n throw e;\n }\n\n }", "public static void start(String name) {\n if (timers.containsKey(name)) {\n timers.get(name).start();\n } else {\n timers.put(name, new Timer());\n }\n }", "public Task(String name, int number) {\r\n this.name = name;\r\n this.id = number;\r\n this.timer = new Timer();\r\n }", "public void schedule(String id, String[] schedule) {\n\t}", "public void setActtime(String acttime) {\r\n this.acttime = acttime;\r\n }", "public Task(String name) {\n\t\tthis.name=name;\n\t}", "public void onScheduled(long scheduledTime);", "public void scheduleAlarm() {\n Log.v(getClass().getSimpleName(), \"Scheduling alarm\");\n\n // Construct an intent that will execute the AlarmReceiver\n Intent intent = new Intent(getApplicationContext(), AlarmReceiver.class);\n\n // Create a PendingIntent to be triggered when the alarm goes off\n final PendingIntent pIntent = PendingIntent.getBroadcast(this, AlarmReceiver.REQUEST_CODE,\n intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Setup periodic alarm every every half hour from this point onwards\n long firstMillis = System.currentTimeMillis(); // alarm is set right away\n AlarmManager alarm = (AlarmManager) this.getSystemService(Context.ALARM_SERVICE);\n\n // First parameter is the type: ELAPSED_REALTIME, ELAPSED_REALTIME_WAKEUP, RTC_WAKEUP\n // Interval can be INTERVAL_FIFTEEN_MINUTES, INTERVAL_HALF_HOUR, INTERVAL_HOUR, INTERVAL_DAY\n alarm.setInexactRepeating(AlarmManager.RTC_WAKEUP, firstMillis,\n AlarmManager.INTERVAL_FIFTEEN_MINUTES, pIntent);\n }", "public void saveScheduleManagement(Runnable task, LocalTime timePoint, Integer period, TimeUnit timeUnit) {\n LOGGER.info(\"START UP SAVE SCHEDULE MANAGEMENT.\");\n if (checkTodayCurrencyListInDb()) {\n saveCurrencyListToDb();\n ScheduledExecutorService service = Executors.newSingleThreadScheduledExecutor();\n service.scheduleAtFixedRate(task, calculateTimeBeforeStart(timePoint), period, timeUnit);\n } else {\n ScheduledExecutorService service = Executors.newSingleThreadScheduledExecutor();\n service.scheduleAtFixedRate(task, calculateTimeBeforeStart(timePoint), period, timeUnit);\n }\n }", "String scheduleACronJob(Object instance,\n String methodName,\n Class<?>[] inputTypes,\n Object[] inputParams,\n String cronExpression);", "public void scheduleAlarm() {\n Intent intent = new Intent(getApplicationContext(), MyAlarmReceiver.class);\n\n // Create a PendingIntent to be triggered when the alarm goes off\n final PendingIntent pendingIntent = PendingIntent.getBroadcast(this, MyAlarmReceiver.REQUEST_CODE, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n long firstMillis = System.currentTimeMillis(); // alarm is set right away\n\n AlarmManager alarm = (AlarmManager) this.getSystemService(Context.ALARM_SERVICE);\n\n // First parameter is the type: ELAPSED_REAL_TIME, ELAPSED_REAL_TIME_WAKEUP, RTC_WAKEUP\n // Interval can be INTERVAL_FIFTEEN_MINUTES, INTERVAL_HALF_HOUR, INTERVAL_HOUR, INTERVAL_DAY\n try {\n alarm.setInexactRepeating(AlarmManager.RTC_WAKEUP, firstMillis, 5000L, pendingIntent);\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n\n }", "public void scheduleAlarm()\n {\n hour = timePicker.getCurrentHour(); //get hour\n minute = timePicker.getCurrentMinute(); //get minutes\n alarmMgr = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n Intent intent = new Intent(getApplicationContext(), AlarmReceiver.class);\n alarmIntent = PendingIntent.getBroadcast(getApplicationContext(), 0, intent, 0);\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(System.currentTimeMillis());\n calendar.set(Calendar.HOUR_OF_DAY, hour);\n calendar.set(Calendar.MINUTE, minute);\n\n alarmMgr.setInexactRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),\n AlarmManager.INTERVAL_DAY, alarmIntent);\n Toast.makeText(this, \"Alarm scheduled for \" + hour + \":\" + minute, Toast.LENGTH_SHORT).show();\n\n }", "public void setActivationTime(java.util.Calendar param){\n localActivationTimeTracker = true;\n \n this.localActivationTime=param;\n \n\n }", "@Override\n\t\t\tpublic void subTask(String name) {\n\t\t\t\t\n\t\t\t}", "public void requestSchedule(AsynchronousScheduleResponseHandler asrh) throws RemoteException {\n\n\t\tAsynchResponder ar = new AsynchResponder(asrh);\n\t\t(new Thread(ar)).start();\n\n\t}", "public CronTimer(String name, int min) {\n this.name = name;\n cronExpression = \"*\" + \" \" + \"0/\" + min + \" \" + \"* * * ?\";\n }", "public static void scheduleJob() {\n Set<JobRequest> jobRequests = JobManager.instance().getAllJobRequestsForTag(MobssJob.TAG);\n if (!jobRequests.isEmpty()) {\n return;\n }\n\n new JobRequest.Builder(MobssJob.TAG)\n .setPeriodic(AlarmManager.INTERVAL_DAY)\n .setUpdateCurrent(true) // cancel any preexisting job with the same tag while being scheduled.\n// .setRequiredNetworkType(JobRequest.NetworkType.CONNECTED) // since the sync service needs network connection\n// .setRequirementsEnforced(true) // makes sure that all the requirements are met before starting the sync service, if at least one of the requirements is not met then the sync service will be rescheduled and not run\n .build()\n .schedule();\n }", "private void printNameWithTimes(Course course, String name, String type) {\n String startTime = \"\";\n String endTime = \"\";\n int[][] selection;\n\n if (type.equals(\"Section\")) {\n selection = course.getSubClassTimes().get(name);\n } else if (type.equals(\"Lab\")) {\n selection = course.getLabTimes().get(name);\n } else {\n selection = course.getTutorialTimes().get(name);\n }\n\n if (selection[0][1] == 0) {\n startTime = String.valueOf(selection[0][0]) + \":00\";\n } else {\n startTime = String.valueOf(selection[0][0]) + \":\" + String.valueOf(selection[0][1]);\n }\n\n if (selection[1][1] == 0) {\n endTime = String.valueOf(selection[1][0]) + \":00\";\n } else {\n endTime = String.valueOf(selection[1][0]) + \":\" + String.valueOf(selection[1][1]);\n }\n\n String days = intsToDays(selection[2]);\n\n System.out.println(\"\\t\" + type + \": \" + name + \"\\t Start: \" + startTime\n + \"\\t End: \" + endTime + \"\\t Days: \" + days);\n }", "public void scheduleGamesInLeagues(String leagueName) {\n // Click this button after you have all the teams in league, Automatic scheduling\n // League league = get from DB by leagueName\n // league.scheduledGames();\n }", "public static void main(String[] args) \n { \n Timer timer = new Timer(); \n TimerTask task = new Helper(); \n\n timer.schedule(task, 3000, 5000); \n System.out.println(\"hi\");\n\n }", "Task(String name) {\n this.name = name;\n }", "@Override\n\t\t\tpublic void setTaskName(String name) {\n\t\t\t\t\n\t\t\t}", "public void schedule(Runnable job, long delay, TimeUnit unit);", "public ScheduledTask (Task task, int startTime, int processor) {\n\t\tthis.task = task;\n\t\tthis.startTime = startTime;\n\t\tthis.processor = processor;\n\t}", "@Override\n\tpublic void setStartTime(int t) {\n\t\t\n\t}", "public void setTaskName(String name) {\n\r\n\t}", "@Scheduled(cron = \"0 0 9-17 * * MON-FRI\")\n\tpublic void scheduleTaskWeekly() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 9 - 17 O'clock Every Weekdays - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "public Task(String name, String category, Date start, Date end, Time s, Time e) throws Exception{\n\t\tthis.setName(name);\n\t\tthis.setCategory(category);\n\t\tthis.setEndDate(end);\n\t\tthis.setStartDate(start);\n\t\tthis.setStartTime(s);\n\t\tthis.setEndTime(e);\n\t\tsetIfOverdue();\n\t}", "public void buildSchedule() {\n class SimulationStep extends BasicAction {\n public void execute() {\n SimUtilities.shuffle(rabbitList);\n for (int i = 0; i < rabbitList.size(); i++) {\n RabbitsGrassSimulationAgent rabbit = rabbitList.get(i);\n rabbit.step();\n }\n\n reapDeadRabbits();\n\n displaySurf.updateDisplay();\n }\n }\n schedule.scheduleActionBeginning(0, new SimulationStep());\n\n class GrassGrowth extends BasicAction {\n public void execute() {\n space.spreadGrass(grassGrowthRate);\n }\n }\n schedule.scheduleActionBeginning(0, new GrassGrowth());\n\n class UpdatePopulationPlot extends BasicAction {\n public void execute() {\n populationPlot.step();\n }\n }\n schedule.scheduleActionAtInterval(5, new UpdatePopulationPlot());\n }", "public void clickSchedule(View view) {\n\n final String WorkoutText=WorkoutName.getText().toString();\n\n //Toast.makeText(CalendarActivity.this, WorkoutText, Toast.LENGTH_LONG).show();\n\n Calendar notification = Calendar.getInstance();\n notification.set(Calendar.DAY_OF_MONTH, _day );\n notification.set(Calendar.MONTH, _month);\n notification.set(Calendar.HOUR,_hour);\n notification.set(Calendar.MINUTE, _minute);\n final String date = String.valueOf(_day) + '-' + String.valueOf(_month) + '-' + String.valueOf(_year);\n final String _time = time.getText().toString().replace(\" \",\"\");\n System.out.println(_time);\n final Session session = new Session(this);\n\n\n\n Schedule schedule = new Schedule(session.getUsername(), date, _time, WorkoutText);\n\n OkHttpClient httpClient = new OkHttpClient();\n Retrofit.Builder builder = new Retrofit.Builder()\n .baseUrl(WorkoutAPI.BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .client(httpClient);\n\n Retrofit retrofit = builder.build();\n WorkoutAPI requests = retrofit.create(WorkoutAPI.class);\n\n Call<ResponseBody> call = requests.newSchedulePost(schedule);\n call.enqueue(new Callback<ResponseBody>() {\n @Override\n public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {\n\n if(response.code() == 201){\n System.out.println(\"Success\");\n Session session = new Session(CalendarActivity.this);\n session.setDate(date);\n session.setTime(_time);\n session.setWorkout(WorkoutText);\n Intent intent = new Intent(getApplicationContext(),BodyListActivity.class);\n startActivity(intent);\n\n// PendingIntent alarmIntent = PendingIntent.getBroadcast(getApplicationContext(),111,intent,PendingIntent.FLAG_UPDATE_CURRENT);\n//\n// AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);\n// alarmManager.set(AlarmManager.RTC_WAKEUP, notification.getTimeInMillis(), alarmIntent);\n //include AlarmManager after Millis to set up intervals\n }else{\n System.out.println(\"Failed\");\n }\n }\n\n @Override\n public void onFailure(Call<ResponseBody> call, Throwable t) {\n System.out.println(\"Throws: \" + t);\n }\n\n });\n\n\n\n\n\n\n }", "public String scheduleAFixedDelayJob(Object instance,\n String methodName,\n Class<?>[] inputTypes,\n Object[] inputParams,\n long initialDelay,\n long taskDelay,\n TimeUnit timeUnit);", "private void updateSimState(Date currentSimDateTime){\n\n SimpleDateFormat ft =\n new SimpleDateFormat(\"E yyyy.MM.dd 'at' hh:mm:ss a\");\n String simDateTime = ft.format(currentSimDateTime);\n\n\n for(Person person : entirePopulation){\n for (Task task : person.getSchedule().getTasks()){\n int taskHour = task.getHourOfDay();\n\n int currentSimHour = currentSimDateTime.getHours();\n\n String output = \"{\" + taskHour + \" , \" + currentSimHour + \"}\";\n Log.d(\"Testing\", output);\n\n if(taskHour == currentSimHour ){\n // Perform given task now.\n Log.d(\"Task Executed: \", task.getTaskName());\n }\n }\n }\n }", "@Scheduled(cron = \"${toil1.schedule1}\")\n\tpublic void toiL1Schedule1() {\n\t\tlog.info(\"Running toiL1Schedule1\");\n\t\trunToiL1Schedule();\n\t\trunToiBlogsL1Schedule();\n\t}", "@Scheduled(fixedDelay=5000) //indicamos que esta tarea se repetira cada 5 segundos \n\tpublic void doTask() {\n\t\tLOGGER.info(\"Time is: \"+ new Date());\n\t}", "public static void scheduleJob(Context context) {\n ComponentName serviceComponent = new ComponentName(context, SimUtilService.class);\n JobInfo.Builder builder = new JobInfo.Builder(0, serviceComponent);\n builder.setMinimumLatency(1 * 1000); // wait at least\n builder.setOverrideDeadline(3 * 1000); // maximum delay\n JobScheduler jobScheduler = context.getSystemService(JobScheduler.class);\n jobScheduler.schedule(builder.build());\n }", "public abstract void maintenanceSchedule() ;", "public void creatTask(int uid,String title,String detail,int money,String type,int total_num,Timestamp end_time,String state);", "Observable<Task2> scheduleTask(String name, String groupKey, int executionOrder, Map<String, String> parameters,\n Trigger trigger);" ]
[ "0.6284912", "0.6263216", "0.6164715", "0.6124568", "0.6067508", "0.60291445", "0.5994606", "0.5968336", "0.59080815", "0.58535653", "0.5812753", "0.5792465", "0.5782935", "0.5775849", "0.5766724", "0.5765774", "0.57527494", "0.57404983", "0.56826794", "0.56613076", "0.56555337", "0.5641468", "0.5580452", "0.55788505", "0.55552137", "0.555392", "0.55316514", "0.54957455", "0.54842705", "0.5476416", "0.54684293", "0.5458665", "0.5444887", "0.54380786", "0.5417232", "0.54164743", "0.54158425", "0.5415063", "0.5399651", "0.53968996", "0.5387147", "0.5367061", "0.5355857", "0.5354629", "0.5351224", "0.53511775", "0.53465426", "0.5335158", "0.533193", "0.53302836", "0.5327036", "0.53262407", "0.5324143", "0.53125346", "0.5311019", "0.53071964", "0.5301219", "0.5295442", "0.5281224", "0.526619", "0.5251195", "0.5249477", "0.52486324", "0.52351445", "0.52274257", "0.52226937", "0.521579", "0.521367", "0.51981", "0.5193805", "0.51814383", "0.51774704", "0.5169488", "0.51621383", "0.5155965", "0.5150887", "0.513167", "0.5131455", "0.51287603", "0.5119382", "0.51189387", "0.51108027", "0.5109658", "0.51095325", "0.5104327", "0.5093545", "0.5090214", "0.5090133", "0.5087859", "0.5086808", "0.5084875", "0.508134", "0.5081067", "0.50711334", "0.5069287", "0.5061565", "0.50490713", "0.5047076", "0.50421643", "0.50396407" ]
0.65914714
0